/* ============================================================
   Castle Gate Garage Door — Landing styles v1
   Palette: navy #01172a + gold #c5943c (brand sheet), #0f0f0f, #ffffff
   Type: Playfair Display (titles, echoes the serif wordmark)
         Montserrat (body, echoes "GARAGE DOOR" and the brand sheet)
   ============================================================ */

@font-face {
  font-family: 'Playfair Display';
  src: url('/assets/fonts/playfair-normal-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/assets/fonts/playfair-italic-var.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* marca (hoja de paleta del cliente) */
  --navy: #01172a;
  --gold: #c5943c;
  --black: #0f0f0f;
  --white: #ffffff;
  /* derivados de la marca: tintes del navy y del dorado, nada fuera de la paleta */
  --navy-2: #0a2338;          /* paneles sobre navy */
  --navy-3: #173450;          /* líneas sobre navy */
  --gold-light: #dcb469;      /* brillo de botones */
  --gold-deep: #8a6420;       /* dorado como TEXTO sobre fondo claro (contraste AA) */
  --gold-soft: #f6ecd9;       /* fondos suaves */
  --water: #1f4569;           /* agua del mapa: tinte azul del navy */
  --paper: #f7f4ee;           /* blanco cálido de fondo */
  --panel: #ffffff;
  --ink: #0f0f0f;
  --ink-2: #4f5a66;
  --line: #e4ded2;
  --on-navy: #e9edf2;
  --on-navy-dim: #9fb0c2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(1, 23, 42, 0.06), 0 14px 34px -14px rgba(1, 23, 42, 0.22);
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- scroll progress ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gold);
  z-index: 90;
}

/* ---------- utility bar ---------- */

.utility {
  background: var(--navy);
  color: var(--on-navy-dim);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--navy-3);
}
.utility .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.utility strong { color: var(--on-navy); font-weight: 700; }
.utility .dot { color: var(--gold); margin: 0 9px; font-size: 9px; vertical-align: 2px; }
.utility-right { white-space: nowrap; }
@media (max-width: 760px) {
  .utility-right { display: none; }
  .utility .wrap { justify-content: center; text-align: center; }
}

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.header.is-scrolled { box-shadow: 0 6px 24px -12px rgba(1, 23, 42, 0.28); }
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.brand-icon { width: auto; height: 52px; }
.brand-word { width: auto; height: 38px; }

.nav { display: flex; gap: 26px; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--navy); }
@media (max-width: 1120px) { .nav { gap: 18px; } .nav a { font-size: 14px; } }
@media (max-width: 1020px) { .nav { display: none; } }

/* hamburguesa + drawer mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  flex: none;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
@media (max-width: 1020px) { .nav-toggle { display: flex; } }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 24px 22px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav > a:not(.btn) {
  text-decoration: none;
  font-weight: 700;
  font-size: 16.5px;
  color: var(--navy);
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 14px; }
.mobile-nav-phone {
  margin-top: 12px;
  text-align: center;
  font-weight: 800;
  font-size: 17px;
  color: var(--gold-deep) !important;
  text-decoration: none;
  border-bottom: 0 !important;
}

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone {
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  color: var(--navy);
  white-space: nowrap;
}
.header-phone .label { font-weight: 600; color: var(--ink-2); font-size: 14px; }
@media (max-width: 640px) { .header-phone .label { display: none; } }
@media (max-width: 480px) { .btn.header-est { display: none; } } /* la mobile-bar ya lleva el CTA */

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 9px;
  padding: 16px 30px;
  border: 0;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  position: relative;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 55%, #b5852f 100%);
  color: var(--navy);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 4px rgba(138, 100, 32, 0.25),
    0 10px 24px -8px rgba(197, 148, 60, 0.6);
}
.btn-gold:hover, .btn-gold:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 8px rgba(138, 100, 32, 0.28),
    0 16px 32px -10px rgba(197, 148, 60, 0.75);
}
.btn-navy {
  background: linear-gradient(180deg, var(--navy-3) 0%, var(--navy) 100%);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px -10px rgba(1, 23, 42, 0.7);
}
.btn-navy:hover, .btn-navy:focus-visible { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 30px -12px rgba(1, 23, 42, 0.8); }
.btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}
.btn-ghost-light:hover, .btn-ghost-light:focus-visible {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}
.btn-sm { padding: 12px 20px; font-size: 14.5px; }
.btn-xl { padding: 18px 36px; font-size: 17px; }

.nowrap { white-space: nowrap; }

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- hero: atardecer sobre la Front Range ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--white);
  background:
    /* atardecer detrás de la Front Range: el sol se pone al oeste, detrás de los picos */
    radial-gradient(ellipse 46% 34% at 26% 80%, rgba(220, 180, 105, 0.5), transparent 72%),
    radial-gradient(ellipse 80% 40% at 50% 92%, rgba(197, 148, 60, 0.24), transparent 75%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy) 38%, #0c2a44 72%, #3b3f3f 100%);
}
.hero-sky {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  z-index: -1;
  pointer-events: none;
}
.hero-range { position: absolute; inset: 0; width: 100%; height: 100%; }
.ridge.r-far { fill: #1b3550; }
.ridge.r-mid { fill: #0f2840; }
.ridge.r-near { fill: var(--navy); }
.hero::after {
  /* la base del hero se funde con la banda navy de abajo */
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--navy);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 120px;
}
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; padding-top: 52px; padding-bottom: 96px; }
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(197, 148, 60, 0.45);
  border-radius: 999px;
  padding: 7px 16px 7px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--on-navy-dim);
}
.hero-chip img { width: auto; height: 24px; }
.hero-chip strong { color: var(--white); font-weight: 700; }

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(42px, 5.8vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 24px 0 22px;
}
.hero h1 em {
  display: block;
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
}

.hero-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 31em;
  text-wrap: pretty;
  margin-bottom: 30px;
}
.hero-sub strong { color: var(--white); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero-points { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; list-style: none; }
.hero-points li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
}
.hero-points .check { color: var(--gold); font-size: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(22px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
  .rise-1 { animation-delay: 0.05s; }
  .rise-2 { animation-delay: 0.16s; }
  .rise-3 { animation-delay: 0.27s; }
  .rise-4 { animation-delay: 0.38s; }
  .rise-5 { animation-delay: 0.49s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .ridge { animation: ridgeIn 1.4s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  .ridge.r-far { animation-delay: 0.1s; }
  .ridge.r-mid { animation-delay: 0.25s; }
  .ridge.r-near { animation-delay: 0.4s; }
  @keyframes ridgeIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- quote card: la puerta del logo ---------- */

.quote-card {
  position: relative;
  background: var(--panel);
  color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 34px 80px -28px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.gate-frame {
  position: relative;
  background: var(--navy);
  padding: 20px 34px 0;
}
.gate-frame::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: var(--gold);
}
.gate-arch {
  position: relative;
  height: 142px;
  overflow: hidden;
  border: 5px solid var(--gold);
  border-bottom: 0;
  border-radius: 120px 120px 0 0 / 52px 52px 0 0;
  background:
    radial-gradient(ellipse 80% 90% at 50% 0%, rgba(197, 148, 60, 0.2), transparent 70%),
    var(--navy-2);
}
.gate-arch::before {
  /* la "clave" del arco, como en el logo */
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  width: 22px;
  height: 12px;
  transform: translateX(-50%);
  background: var(--gold);
  border-radius: 0 0 4px 4px;
  z-index: 3;
}
.gate-inside {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 10px 16px 0;
}
.gate-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.gate-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 29px;
  line-height: 1.05;
  color: var(--white);
}
.gate-panels {
  position: absolute;
  inset: 14px 20px 0;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 5px;
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.25, 1);
  will-change: transform;
  z-index: 2;
}
.gate-panels.is-open { transform: translateY(-112%); }
.gate-panel {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, #b5852f 100%);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.gate-panel-windows {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14%;
}
.gate-panel-windows i {
  width: 16%;
  height: 46%;
  background: var(--navy);
  transform: skewX(-24deg);
}
@media (prefers-reduced-motion: reduce) { .gate-panels { display: none; } }

.quote-body { padding: 22px 26px 24px; }
.quote-body > p {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--navy);
}
.field .optional { font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  outline: none;
}

.quote-body .btn { width: 100%; margin-top: 14px; }

.quote-alt {
  margin-top: 13px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}
.quote-alt a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}
.quote-alt a:hover { text-decoration: underline; }

.form-note {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 14px;
  font-weight: 600;
}
.form-note.is-visible { display: block; }

/* ---------- promise band con almenas ---------- */

.promise-band {
  position: relative;
  background: var(--navy);
  color: var(--on-navy);
}
.promise-band::before {
  /* almenas del castillo: bloques navy recortados contra el fondo claro de abajo */
  content: '';
  position: absolute;
  inset: auto 0 -18px 0;
  height: 18px;
  background: linear-gradient(90deg, var(--navy) 0 50%, transparent 50% 100%) 0 0 / 44px 100% repeat-x;
  z-index: 1;
}
.promise-band .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 48px;
}
@media (max-width: 940px) { .promise-band .wrap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .promise-band .wrap { grid-template-columns: 1fr; gap: 22px; } }

.band-item { border-top: 1px solid var(--navy-3); padding-top: 20px; }
.band-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 46px;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums lining-nums;
}
.band-num-text { font-style: italic; font-weight: 700; }
.band-label {
  margin-top: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-navy-dim);
  text-wrap: pretty;
}
.band-label strong { color: var(--white); font-weight: 700; }

/* ---------- sections ---------- */

.section { padding: 100px 0 92px; }
.section-white { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .section { padding: 64px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  /* la línea a los costados de "GARAGE DOOR" en el logo */
  content: '';
  width: 28px;
  height: 2px;
  background: currentColor;
}
.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(31px, 4.1vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-wrap: balance;
  max-width: 20em;
}
.section-title em { font-style: italic; font-weight: 600; color: var(--gold-deep); }
.section-intro {
  margin-top: 16px;
  font-size: 17.5px;
  color: var(--ink-2);
  max-width: 38em;
  text-wrap: pretty;
}

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 46px;
}
@media (max-width: 1000px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(1, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(197, 148, 60, 0.5); }

.service-photo {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-2);
}
.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-photo img { transform: scale(1.06); }
.service-photo .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.service-photo .tag-quiet { background: var(--navy); color: var(--gold); }

.service-body { padding: 20px 20px 22px; flex: 1; border-top: 3px solid var(--gold); }
.service-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 8px;
}
.service-card p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- spring check ---------- */

.spring-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 960px) { .spring-grid { grid-template-columns: 1fr; gap: 36px; } }

.spring-fine {
  margin-top: 22px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
  font-size: 14px;
  color: var(--ink-2);
  max-width: 34em;
}

.spring-tool {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  display: grid;
  gap: 26px;
  box-shadow: var(--shadow);
}
.spring-inputs { display: grid; gap: 20px; }
.range-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.range-head label { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.range-head output {
  flex: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums lining-nums;
}

/* slider con los colores de la marca */
.range-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
  --fill: 30%;
}
.range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0 var(--fill), var(--line) var(--fill) 100%);
}
.range-field input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.range-field input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--gold); }
.range-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--navy);
  border: 4px solid var(--gold);
  box-shadow: 0 3px 10px rgba(1, 23, 42, 0.35);
}
.range-field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 4px solid var(--gold);
}

.seg { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg legend { font-size: 14.5px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.seg small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.seg input:checked + span { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.spring-result {
  background: var(--navy);
  color: var(--on-navy);
  border-radius: 14px;
  padding: 22px 22px 24px;
  display: grid;
  gap: 16px;
}
.coil-wrap { padding: 4px 2px 0; }
.coil { width: 100%; height: auto; display: block; overflow: visible; }
.coil path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.coil-base { stroke: var(--navy-3); }
.coil-used {
  stroke: var(--gold);
  stroke-dasharray: 68 100;
  transition: stroke-dasharray 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), stroke 0.3s ease;
}
.spring-result[data-level="high"] .coil-used { stroke: #e0a94a; filter: drop-shadow(0 0 6px rgba(197, 148, 60, 0.55)); }
.coil-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
}
.spring-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spring-big {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums lining-nums;
}
.spring-small { display: block; margin-top: 6px; font-size: 13px; color: var(--on-navy-dim); }
.spring-verdict {
  font-size: 15px;
  color: var(--on-navy);
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--navy-2);
  border-left: 4px solid var(--gold);
}
.spring-verdict strong { color: var(--gold); }
.spring-result .btn-navy {
  background: var(--gold);
  color: var(--navy);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ---------- why castle gate ---------- */

.promise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) { .promise-grid { grid-template-columns: 1fr; gap: 40px; } }
/* los reveals de esta sección se desplazan en X: sin clip ensanchan el viewport en mobile */
#why-us { overflow-x: hidden; overflow-x: clip; }

.promise-quote { position: relative; }
.promise-quote p {
  position: relative;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(27px, 3.3vw, 38px);
  line-height: 1.22;
  color: var(--navy);
  text-wrap: balance;
}
.promise-quote .attribution {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.promise-quote .attribution::before { content: ''; flex: none; width: 36px; height: 2px; background: var(--gold); }
.promise-quote .attribution strong { color: var(--navy); font-weight: 700; }

.promise-list { list-style: none; display: grid; gap: 24px; }
.promise-list li { display: flex; gap: 18px; }
.promise-num {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50% 50% 8px 8px;  /* forma de arco de la puerta */
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}
.promise-list h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.promise-list p { font-size: 15px; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .promise-quote.reveal { transform: translateX(-32px); }
  .promise-quote.reveal.is-in { transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
  .promise-list .reveal { transform: translateX(36px); }
  .promise-list .reveal.is-in { transform: none; }
  .promise-list .reveal:nth-child(1) { transition-delay: 0.05s; }
  .promise-list .reveal:nth-child(2) { transition-delay: 0.17s; }
  .promise-list .reveal:nth-child(3) { transition-delay: 0.29s; }
  .promise-list .reveal:nth-child(4) { transition-delay: 0.41s; }
}

/* ---------- tune-up band (dorado) ---------- */

.tuneup {
  position: relative;
  background:
    radial-gradient(ellipse 70% 120% at 50% -20%, rgba(255, 255, 255, 0.28), transparent 60%),
    linear-gradient(160deg, var(--gold-light) 0%, var(--gold) 50%, #a97a28 100%);
  color: var(--navy);
}
.tuneup::before, .tuneup::after {
  /* almenas arriba y abajo de la banda */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(90deg, var(--paper) 0 50%, transparent 50% 100%) 0 0 / 40px 100% repeat-x;
}
.tuneup::before { top: 0; }
.tuneup::after { bottom: 0; background-color: transparent; transform: scaleY(-1); background-image: linear-gradient(90deg, var(--white) 0 50%, transparent 50% 100%); }
.tuneup-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-top: 78px;
  padding-bottom: 82px;
}
.tuneup-kicker {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.tuneup-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.1;
  text-wrap: balance;
  max-width: 19em;
}
.tuneup-text span { display: block; font-style: italic; font-weight: 600; color: var(--white); text-shadow: 0 1px 0 rgba(1, 23, 42, 0.25); }
.tuneup-sub { font-size: 16.5px; font-weight: 500; max-width: 32em; text-wrap: pretty; }
.tuneup-inner .btn { margin-top: 10px; }

/* ---------- service area ---------- */

.area-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 960px) { .area-grid { grid-template-columns: 1fr; gap: 36px; } }

.area-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.chip[data-spot] { cursor: pointer; }
.chip[data-spot]:hover, .chip.is-hot {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(1, 23, 42, 0.5);
}
.chip-more { border-style: dashed; color: var(--gold-deep); background: transparent; }

.area-map {
  background: var(--navy);
  border-radius: 18px;
  padding: 16px 16px 12px;
  box-shadow: var(--shadow);
  max-width: 520px;
  width: 100%;
  justify-self: center;
}
.area-map svg { width: 100%; height: auto; display: block; }
.map-land { fill: var(--navy-2); }
.map-town {
  fill: rgba(220, 180, 105, 0.2);   /* --gold-light translúcido: sobre navy el --gold se ve oliva */
  stroke: var(--gold);
  stroke-width: 1.1;
  stroke-linejoin: round;
  transition: fill 0.2s ease;
}
.map-town.is-hot { fill: rgba(220, 180, 105, 0.45); }
.map-town-also {
  fill: rgba(233, 237, 242, 0.035);
  stroke: rgba(233, 237, 242, 0.28);
  stroke-width: 0.9;
  stroke-dasharray: 3 4;
  stroke-linejoin: round;
  transition: fill 0.2s ease;
}
.map-town-also.is-hot { fill: rgba(233, 237, 242, 0.12); }
.map-town-other { fill: none; stroke: rgba(233, 237, 242, 0.09); stroke-width: 0.8; }
.map-roads { fill: none; stroke: rgba(233, 237, 242, 0.11); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.map-lake { fill: var(--water); stroke: #2c5b86; stroke-width: 0.8; }
.map-river { fill: none; stroke: #2c5b86; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.map-creek { fill: none; stroke: #244e76; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.map-waterlabel {
  fill: #7ea6cc;
  font-family: var(--body);
  font-size: 9.5px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.03em;
  paint-order: stroke;
  stroke: var(--navy-2);
  stroke-width: 3px;
}
.map-spot-also circle { fill: var(--navy-2); stroke: rgba(233, 237, 242, 0.6); stroke-width: 1.5; }
.map-spot-also text { fill: var(--on-navy-dim); }
.map-road { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.road-i25 { stroke: rgba(233, 237, 242, 0.42); stroke-width: 2.6; }
.road-e470, .road-c470 { stroke: rgba(233, 237, 242, 0.24); stroke-width: 2; }
.map-shield rect { fill: var(--navy); stroke: rgba(233, 237, 242, 0.35); stroke-width: 1; }
.map-shield.wide rect { x: -23px; width: 46px; }
.map-shield text {
  fill: var(--on-navy);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 800;
  text-anchor: middle;
  letter-spacing: 0.04em;
}
.map-spot circle {
  fill: var(--gold);
  stroke: rgba(197, 148, 60, 0.3);
  stroke-width: 6;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.4), fill 0.2s ease;
}
.map-spot text, .map-hq text {
  fill: var(--on-navy);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--navy-2);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.map-spot.is-hot circle { fill: var(--white); transform: scale(1.6); }
.map-spot.is-hot text { fill: var(--gold); font-weight: 800; }
.hq-halo { fill: rgba(197, 148, 60, 0.18); stroke: var(--gold); stroke-width: 1.5; }
.hq-mark { fill: var(--gold); }
.map-hq text { font-family: var(--display); font-size: 17px; font-weight: 800; fill: var(--white); }
.map-hq .hq-sub { font-family: var(--body); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; fill: var(--gold); }
.map-hq.is-hot .hq-halo { fill: rgba(197, 148, 60, 0.4); }
.map-edge {
  fill: var(--on-navy-dim);
  font-family: var(--body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 12px 6px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-navy-dim);
}
.map-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.leg-hq { width: 11px; height: 11px; background: var(--gold); border-radius: 50% 50% 2px 2px; }
.leg-area { width: 16px; height: 11px; border-radius: 3px; background: rgba(197, 148, 60, 0.3); border: 1px solid var(--gold); }
.leg-also { width: 16px; height: 11px; border-radius: 3px; border: 1px dashed rgba(233, 237, 242, 0.5); }
.leg-water { width: 16px; height: 11px; border-radius: 3px; background: var(--water); border: 1px solid #2c5b86; }
.map-credit { text-align: center; font-size: 10.5px; color: rgba(159, 176, 194, 0.7); padding-bottom: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .area-map .map-road { stroke-dasharray: 1400; stroke-dashoffset: 1400; }
  .area-map.is-in .map-road { animation: roadDraw 1.6s cubic-bezier(0.3, 0, 0.2, 1) forwards; }
  .area-map.is-in .road-e470 { animation-delay: 0.15s; }
  .area-map.is-in .road-c470 { animation-delay: 0.3s; }
  @keyframes roadDraw { to { stroke-dashoffset: 0; } }

  .area-map .map-spot, .area-map .map-hq, .area-map .map-shield, .area-map .map-towns { opacity: 0; }
  .area-map.is-in .map-towns { animation: spotPop 0.9s ease forwards 0.2s; }
  .area-map.is-in .map-spot { animation: spotPop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.35) forwards; animation-delay: calc(var(--d, 0s) + 0.5s); }
  .area-map.is-in .map-shield { animation: spotPop 0.4s ease forwards 1.2s; }
  .area-map.is-in .map-hq { animation: spotPop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.35) forwards 0.35s; }
  @keyframes spotPop { from { opacity: 0; } to { opacity: 1; } }
  .area-map.is-in .hq-halo { animation: halo 3s ease-in-out infinite 1.2s; transform-box: fill-box; transform-origin: center; }
  @keyframes halo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
}

/* ---------- FAQ ---------- */

.faq-list { margin-top: 40px; display: grid; gap: 12px; max-width: 840px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--gold); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 19px 22px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  color: var(--gold-deep);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 22px 20px;
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 46em;
}

/* ---------- final CTA ---------- */

.cta {
  position: relative;
  background:
    radial-gradient(ellipse 70% 80% at 50% 120%, rgba(197, 148, 60, 0.3), transparent 62%),
    var(--navy);
  color: var(--on-navy);
  text-align: center;
  overflow: hidden;
}
.cta .wrap { padding-top: 84px; padding-bottom: 90px; }
.cta-icon { width: auto; height: 74px; margin: 0 auto 22px; }
.cta .eyebrow { color: var(--gold); }
.cta .eyebrow::before { display: none; }
.cta h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  color: var(--white);
  text-wrap: balance;
  max-width: 15em;
  margin: 0 auto 16px;
}
.cta h2 em { font-style: italic; font-weight: 600; color: var(--gold); }
.cta p {
  font-size: 17.5px;
  color: var(--on-navy-dim);
  max-width: 33em;
  margin: 0 auto 34px;
  text-wrap: pretty;
}
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta .btn { font-size: 17px; padding: 17px 32px; }
.cta .cta-echo {
  max-width: none;
  margin: 28px auto 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
}

/* ---------- footer ---------- */

.footer {
  background: #000f1c;
  color: var(--on-navy-dim);
  font-size: 14px;
  border-top: 1px solid var(--navy-3);
}
.footer .wrap { padding-top: 50px; padding-bottom: 40px; }
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--navy-3);
}
.footer-brand p { margin-top: 16px; max-width: 24em; }
.footer .brand-icon { height: 48px; }
.footer .brand-word { height: 34px; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--on-navy-dim); text-decoration: none; }
.footer-col a:hover { color: var(--white); }
.footer-col .phone-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  color: var(--white);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  font-size: 13px;
}
.powered-by { text-decoration: none; color: var(--on-navy-dim); transition: color 0.15s ease; }
.powered-by strong { color: var(--on-navy); }
.powered-by:hover, .powered-by:hover strong { color: var(--gold); }

/* ---------- sticky mobile call bar ---------- */

.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(1, 23, 42, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--navy-3);
}
.mobile-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
}
.mobile-bar-call {
  flex: 1.4;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--navy);
}
.mobile-bar-text { color: var(--on-navy); border: 1.5px solid var(--navy-3); }
.mobile-bar-est { background: var(--white); color: var(--navy); }
@media (max-width: 720px) {
  .mobile-bar { display: flex; }
  body { padding-bottom: 76px; }
}

/* ---------- mobile polish ---------- */

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 18px; }
  .header .wrap { min-height: 64px; gap: 12px; }
  .brand { gap: 7px; }
  .brand-icon { height: 40px; }
  .brand-word { height: 27px; }
  .header-phone { font-size: 15px; }
  .hero h1 { font-size: clamp(36px, 10.4vw, 46px); }
  .hero .wrap { padding-top: 40px; padding-bottom: 84px; gap: 34px; }
  .hero-actions .btn { width: 100%; }
  .hero-sub { font-size: 16.5px; }
  .hero-chip { font-size: 12.5px; }
  .gate-frame { padding: 16px 20px 0; }
  .gate-title { font-size: 25px; }
  .quote-body { padding: 20px 18px 22px; }
  .section-title { font-size: clamp(28px, 7.8vw, 36px); }
  .section-intro { font-size: 16px; }
  .services-grid { margin-top: 32px; gap: 14px; }
  .spring-tool { padding: 18px; gap: 20px; border-radius: 14px; }
  .spring-big { font-size: 30px; }
  .seg { grid-template-columns: 1fr; }
  .promise-quote p { font-size: clamp(24px, 6.8vw, 30px); }
  .tuneup-inner { padding-top: 64px; padding-bottom: 68px; }
  .tuneup-inner .btn { width: 100%; }
  .area-map { padding: 10px 10px 8px; }
  .cta h2 { font-size: clamp(31px, 8.6vw, 40px); }
  .cta .wrap { padding-top: 60px; padding-bottom: 64px; }
  .cta-actions .btn { width: 100%; }
  .faq-item summary { font-size: 15.5px; padding: 16px 18px; }
  .faq-item .faq-body { font-size: 15px; padding: 0 18px 18px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 380px) {
  .brand-word { height: 23px; }
  .header-phone { font-size: 14px; }
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
