/* =====================================================
   DoorPro Systems — styles
   Phase 1: structure and layout (mobile-first).
   Phase 2: fonts, colors, stars and visual design.
   Write the small-screen styles first; wider screens are
   added at the bottom inside @media (min-width: ...) blocks.
   ===================================================== */

/* ---------- Colors & sizes (change them here, once) ---------- */
:root {
  --navy: #0A2A5E;
  --red: #CF142B;
  --red-dark: #A80F22;
  --blue: #1F4FBF;
  --white: #FFFFFF;
  --offwhite: #F5F6F8;
  --text: #1B2433;
  --muted: #5A6578;
  --line: #DDE1E8;

  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 6px 20px rgba(10, 42, 94, .10);

  --radius: 12px;
  --header-h: 64px;
  --bar-h: 68px; /* height of the sticky bottom bar on phones */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  padding-bottom: var(--bar-h); /* room for the sticky bar */
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4, .logo, .price-amount, .contact-phone, .footer-brand { font-family: var(--font-head); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255, 255, 255, .15); }
.btn-outline-dark { border-color: var(--navy); color: var(--navy); background: var(--white); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-large { min-height: 56px; font-size: 1.1rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--white);
  height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; line-height: 1.1; }
.logo-star { color: var(--red); }
.logo-text { font-size: 1.05rem; }
.logo-text span { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle { font-size: .85rem; font-weight: 700; display: flex; gap: 4px; }
.lang-toggle a { text-decoration: none; opacity: .7; padding: 6px 2px; }
.lang-toggle a[aria-current="true"] { opacity: 1; text-decoration: underline; }

/* Menu button (phones) */
.nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 3px; background: var(--white); border-radius: 2px; }

/* Nav: hidden on phones until the menu button is tapped */
.main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--navy); padding: 8px 20px 16px; border-top: 1px solid rgba(255, 255, 255, .15); }
.main-nav.is-open { display: block; }
.main-nav a { display: block; padding: 14px 0; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .1); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-light { background: var(--offwhite); }
.section-dark { background: var(--navy); color: var(--white); }
.section h2 { font-size: 1.8rem; line-height: 1.2; margin-bottom: 12px; }
.section-intro { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }
.section-dark .section-intro { color: rgba(255, 255, 255, .85); }
.section-cta { margin: 32px 0 0; text-align: center; }

/* ---------- Hero ---------- */
/* (all hero styles live together in the HERO section near the bottom of this file) */

/* ---------- Services ---------- */
.group-title { font-size: 1.35rem; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 3px solid var(--red); display: inline-block; }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h4 { font-size: 1.1rem; margin-bottom: 6px; color: var(--navy); }
.card p { margin: 0; color: var(--muted); }

/* ---------- Sliding door scene (static for now) ---------- */
.sliding-inner { display: grid; gap: 32px; align-items: center; }
.sliding-text p { font-size: 1.1rem; margin-bottom: 20px; }
.sliding-door { width: 100%; max-width: 420px; margin: 0 auto; }
.sliding-frame { position: relative; display: flex; aspect-ratio: 4 / 3; border: 6px solid #c9d3e6; border-radius: 6px; overflow: hidden; background: #9fc3ea; }
.sliding-panel { flex: 1; background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .15)); border-right: 4px solid #c9d3e6; }
.sliding-panel-moving { border-right: 0; transform: translateX(0); }

/* ---------- Repair or replace ---------- */
.quiz-card { background: var(--offwhite); border: 1px solid var(--line); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 28px 24px; }
.quiz-card p { max-width: 55ch; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.price-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.price-card h3 { font-size: 1.2rem; margin-bottom: 4px; color: var(--navy); }
.price-hours { font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.price-amount { font-size: 1.6rem; font-weight: 800; color: var(--red); line-height: 1.2; margin-bottom: 8px; }
.price-card p:last-child { margin-bottom: 0; }
.price-card-emergency { border-color: var(--red); border-width: 2px; }

/* ---------- Why us ---------- */
.why-list { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
.why-list li { padding-left: 34px; position: relative; }
.why-list li::before { content: "★"; position: absolute; left: 0; top: 0; color: var(--red); font-size: 1.4rem; line-height: 1.3; }
.why-list h3 { font-size: 1.15rem; margin-bottom: 4px; color: var(--navy); }
.why-list p { margin: 0; color: var(--muted); }

/* ---------- Areas ---------- */
.city-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.city-list li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 600; color: var(--navy); }
.areas-note { color: var(--muted); }

/* ---------- Reviews ---------- */
.reviews-empty { text-align: center; max-width: 520px; margin: 24px auto 0; padding: 36px 24px; border: 2px dashed var(--line); border-radius: var(--radius); }
.reviews-empty-title { font-size: 1.4rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.reviews-list { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
.review-card { background: var(--offwhite); border-radius: var(--radius); padding: 20px; }
.review-stars { color: #E6A700; margin-bottom: 8px; letter-spacing: 2px; }
.review-text { margin: 0 0 8px; }
.review-author { margin: 0; font-weight: 700; color: var(--navy); }

/* ---------- Contact ---------- */
.contact-inner { display: grid; gap: 32px; }
.contact-phone { font-size: 2rem; font-weight: 800; text-decoration: none; }
.contact-small { opacity: .85; font-size: .95rem; }
.contact-form { background: var(--white); color: var(--text); border-radius: var(--radius); padding: 24px 20px; display: grid; gap: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; color: var(--text); background: var(--white);
  border: 2px solid var(--line); border-radius: 8px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; }
.form-note { margin: 0; font-weight: 600; }
.form-note.is-success { color: #1A7F37; }
.form-note.is-error { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: #071D42; color: rgba(255, 255, 255, .85); padding: 40px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer-col p { margin-bottom: 4px; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: var(--white); }
.footer-title { font-weight: 800; color: var(--white); text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-legal { margin: 28px auto 0; font-size: .85rem; opacity: .7; }

/* ---------- Sticky bottom bar (phones only) ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--white); box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
}

/* =====================================================
   Wider screens (tablet and up)
   ===================================================== */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }

  .nav-toggle { display: none; }
  .main-nav { display: block; position: static; padding: 0; border: 0; background: none; }
  .main-nav ul { display: flex; gap: 28px; }
  .main-nav a { padding: 8px 0; border: 0; }
  .main-nav a:hover { text-decoration: underline; }

  .section { padding: 80px 0; }
  .section h2 { font-size: 2.4rem; }
  .hero-buttons { flex-direction: row; max-width: none; }
  .hero:not([data-hero-mode="photo"]) h1 { font-size: 3.4rem; max-width: 18ch; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .sliding-inner { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .why-list { grid-template-columns: repeat(2, 1fr); }
  .reviews-list { grid-template-columns: repeat(3, 1fr); }
  .contact-inner { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1000px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .why-list { grid-template-columns: repeat(4, 1fr); }
}

/* People who turn off animations: no smooth scrolling either */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =====================================================
   PHASE 2 — Design layer
   Stars, shadows, hero look, small-phone fixes.
   Colors come from the :root block at the top of this file.
   ===================================================== */

/* ---------- Headings & buttons ---------- */
h1, h2 { font-weight: 800; letter-spacing: -0.01em; }
h3, h4 { font-weight: 700; }
.section h2 { color: var(--navy); }
.section-dark h2 { color: var(--white); }

.btn { transition: background-color .2s, transform .15s; }
.btn:active { transform: scale(.98); }
.btn-red { box-shadow: 0 4px 14px rgba(207, 20, 43, .35); }

/* ---------- Star divider under every section title ---------- */
/* A small red star + a thin line. It is a picture drawn in CSS, so no extra file to download. */
.section h2::after {
  content: ""; display: block; width: 132px; height: 18px; margin-top: 12px;
  background: no-repeat left center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='18' viewBox='0 0 132 18'%3E%3Cpath fill='%23CF142B' transform='scale(.75)' d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.7 7.3L12 17.8 5.7 21.5l1.7-7.3L2 9.5l7.1-.6z'/%3E%3Crect x='26' y='8' width='106' height='2' rx='1' fill='%230A2A5E' opacity='.25'/%3E%3C/svg%3E");
}
.section-dark h2::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='18' viewBox='0 0 132 18'%3E%3Cpath fill='%23FFFFFF' transform='scale(.75)' d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.7 7.3L12 17.8 5.7 21.5l1.7-7.3L2 9.5l7.1-.6z'/%3E%3Crect x='26' y='8' width='106' height='2' rx='1' fill='%23FFFFFF' opacity='.4'/%3E%3C/svg%3E");
}
.section-intro { margin-top: 16px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 3px solid var(--red); }
.logo-text { font-weight: 800; }

/* ---------- Cards ---------- */
.card { border-top: 4px solid var(--blue); box-shadow: var(--shadow); transition: transform .2s; }
.card:hover { transform: translateY(-3px); }
.card h4::before { content: "★"; color: var(--red); margin-right: 8px; font-size: .9em; }

/* ---------- Sliding door picture ---------- */
.sliding-frame { background: linear-gradient(180deg, #8fb8e6 0%, #dbe9f7 100%); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.sliding-panel { position: relative; }
.sliding-panel-moving::after {
  content: ""; position: absolute; left: 12px; top: 42%; width: 6px; height: 56px;
  border-radius: 3px; background: #c9d3e6;
}

/* ---------- Repair or replace ---------- */
.quiz-card { box-shadow: var(--shadow); }

/* ---------- Pricing ---------- */
.price-card { border-top: 6px solid var(--blue); box-shadow: var(--shadow); }
.price-card:first-child { border-top-color: var(--red); }
.price-card-emergency { background: var(--navy); border-color: var(--navy); color: var(--white); }
.price-card-emergency h3,
.price-card-emergency .price-amount { color: var(--white); }
.price-card-emergency .price-hours { color: rgba(255, 255, 255, .8); }

/* ---------- Why us ---------- */
.why-list li { padding-left: 46px; }
.why-list li::before {
  content: "★"; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: var(--white); font-size: 1rem; line-height: 1;
}

/* ---------- Cities ---------- */
.city-list li::before { content: "★"; color: var(--red); margin-right: 8px; font-size: .8em; }

/* ---------- Reviews ---------- */
.reviews-empty { background: var(--offwhite); border-style: solid; border-width: 1px; border-top: 4px solid var(--red); }

/* ---------- Contact ---------- */
.contact-form { box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.contact-phone { color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { border-top: 6px solid transparent; border-image: linear-gradient(90deg, var(--red) 0 33.3%, var(--white) 33.3% 66.6%, var(--blue) 66.6% 100%) 1; }
.footer-brand::before { content: "★ "; color: var(--red); }

/* ---------- Small phones (375px and narrower) ---------- */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .header-actions { gap: 6px; }
  .logo-text { font-size: .95rem; }
  .logo-text span { font-size: .62rem; }
  .btn-small { padding: 8px 12px; font-size: .85rem; }
  .nav-toggle { width: 40px; padding: 8px; }
  .lang-toggle { font-size: .8rem; }
  .section h2 { font-size: 1.6rem; }
}

/* Reduced motion: no hover movement either */
@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none; }
  .card:hover, .btn:active { transform: none; }
}

/* ---------- Phase 2 touch-ups ---------- */
.group-title { color: var(--navy); }
.lang-toggle { align-items: center; }
.lang-toggle a { line-height: 1; padding: 8px 2px; }

/* =====================================================
   PHASE 3 — Garage door hero + sliding door scene
   The garage door is plain HTML/CSS. It only shows when the page
   has the "motion-ok" class (set in the <head> of index.html), so
   people with reduced-motion settings see the doors already open.
   ===================================================== */

/* Smooth-scroll library (Lenis) needs the browser's own smooth scrolling off */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }

/* =====================================================
   HERO — real garage photo with a door that opens as you scroll
   (Phase 3b. Replaces the first CSS-only hero, which is kept as a fallback.)

   HOW IT WORKS
   - index.html:  <section id="hero" data-hero-mode="photo">
     That attribute picks the version of the hero:
        "photo"  = the garage photo (default)
        "css"    = fallback: a door built from HTML/CSS panels
        "frames" = fallback: picture sequence drawn on a canvas (see js/frame-sequence.js)
     If the photo files are missing, js/main.js switches to "css" by itself.
   - --p  = how open the door is (0 closed ... 1 open). js/main.js changes it while you scroll.
   - --hl = headlights (0 off ... 1 on).
   - Everything inside .scene is placed in % of the 1672x941 photo, so layers always line up.
   - No motion (reduced-motion setting / scripts failed): --p and --hl stay at 1 = door open, lights on.
   ===================================================== */

.hero {
  --p: 1;
  --hl: 1;
  position: relative; color: var(--white);
  margin-top: calc(-1 * var(--header-h)); /* the hero starts underneath the sticky header */
}
.hero-stage {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background: linear-gradient(#1f86ee, #2a91f2 60%, #d6d4dc 60%);
}
/* Motion on: the hero is tall, and the stage sticks to the screen while you scroll through it */
.motion-ok .hero { --p: 0; --hl: 0; height: 320vh; } /* 320vh = scroll distance. Bigger = slower door */
.motion-ok .hero-stage { position: sticky; top: 0; }

/* ---------- Photo scene (default) ---------- */
/* scene keeps the photo's ratio and covers the screen */
.scene {
  position: absolute; left: 50%; top: 50%;
  aspect-ratio: 1672 / 941;
  width: max(100vw, calc(100vh * 1672 / 941));
  transform: translate(-50%, -50%) scale(calc(1 + var(--p) * 0.07)); transform-origin: 50% 64%;
  will-change: transform;
}
.scene picture { display: contents; }
.scene .layer { position: absolute; display: block; }
.scene .bg { inset: 0; width: 100%; height: 100%; }
/* door opening window: everything inside is clipped to the opening */
.scene .win { left: 22.727%; top: 45.484%; width: 54.665%; height: 38.470%; overflow: hidden; }
/* interior is dim while the door is closed, light floods in as it opens */
.scene .dim {
  inset: 0;
  background: radial-gradient(120% 90% at 50% 100%, rgba(10, 14, 25, .35), rgba(5, 8, 15, .85));
  opacity: calc(1 - var(--p) * 1.15);
}
/* soft shadow the door's bottom edge casts on the floor/car */
.scene .cast {
  left: -2%; right: -2%; height: 22%; top: calc((1 - var(--p)) * 100%);
  background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  opacity: calc(min(1, var(--p) * 8) * (1 - var(--p)));
}
.scene .door { left: 0; top: 0; width: 100%; height: 100%; transform: translateY(calc(var(--p) * -100%)); will-change: transform; }
.scene .door img { width: 100%; height: 100%; display: block; }
/* panels darken as they slide up into the header */
.scene .door::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0) calc(var(--p) * 100% + 10%), rgba(0, 0, 0, .55) calc(var(--p) * 100% + 45%));
}
/* shadow line under the header (lintel) */
.scene .lintel { left: 0; right: 0; top: 0; height: 9%; background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0)); opacity: min(1, calc(var(--p) * 6)); }
/* warm light spilling onto the driveway */
.scene .glow { left: 0; width: 100%; top: 82.891%; height: 17.109%; opacity: var(--p); }
/* headlights switch on near the end */
.scene .hl {
  width: 5.5%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 250, 225, .95) 0 12%, rgba(255, 235, 170, .45) 30%, rgba(255, 220, 140, 0) 70%);
  mix-blend-mode: screen; opacity: var(--hl, 0);
}
.scene .beam {
  left: 50%; top: 71%; width: 60%; height: 30%; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 240, 200, .35), rgba(255, 240, 200, 0) 70%);
  mix-blend-mode: screen; opacity: var(--hl, 0);
}

/* "Scroll to open" hint (photo version) */
.hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 5; margin: 0;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  opacity: calc(1 - var(--p) * 5); color: #fff; text-shadow: 0 1px 8px #000;
}
.hint::after { content: ""; display: block; width: 2px; height: 28px; margin: 8px auto 0; background: #fff; animation: hint-line 1.6s infinite; }
@keyframes hint-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Phones / tall screens: scene is wider than the screen and sits at the bottom, fading into the sky */
@media (max-aspect-ratio: 1/1) {
  .hero-stage { background: linear-gradient(#1f86ee, #2a91f2); }
  .scene {
    width: 180vw; top: auto; bottom: 0;
    transform: translate(-50%, 0) scale(calc(1 + var(--p) * 0.07)); transform-origin: 50% 80%;
    -webkit-mask-image: linear-gradient(transparent, #000 14%); mask-image: linear-gradient(transparent, #000 14%);
  }
}
/* ...and on phones the sticky Call / Free estimate bar covers the bottom, so lift the scene above it */
@media (max-aspect-ratio: 1/1) and (max-width: 767px) {
  .scene { bottom: var(--bar-h); }
  .hint { bottom: calc(22px + var(--bar-h)); }
}

/* ---------- Hero text (the site's own copy) ---------- */
.hero-inner { position: relative; z-index: 5; }
.hero-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; letter-spacing: .01em;
}
.hero-brand svg { color: var(--red); }
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #FFB3BC; margin-bottom: 12px; }
.hero-sub { font-size: 1.15rem; max-width: 36ch; margin-bottom: 28px; }
.hero-buttons { display: flex; flex-direction: column; gap: 12px; max-width: 360px; }
.hero-note { margin: 20px 0 0; font-size: .95rem; opacity: .85; }
.hero-note::before { content: "★ "; color: #FFB3BC; }

/* Photo version: text sits on the sky, top-left, above the garage */
.hero[data-hero-mode="photo"] .hero-inner {
  position: absolute; left: clamp(16px, 5vw, 80px); top: clamp(80px, 14vh, 140px);
  width: auto; max-width: min(600px, 90vw); margin: 0; padding: 0;
  /* a tight dark edge + the soft glow, so white text stays readable on the white brick walls */
  text-shadow: 0 1px 3px rgba(5, 20, 50, .65), 0 2px 18px rgba(10, 42, 94, .55);
}
.hero[data-hero-mode="photo"] .hero-brand { display: none; } /* the logo is already in the header */
.hero[data-hero-mode="photo"] .eyebrow { color: #fff; }
.hero[data-hero-mode="photo"] .hero-note::before { color: #fff; }
.hero[data-hero-mode="photo"] h1 { font-size: clamp(28px, 3.4vw, 50px); line-height: 1.04; letter-spacing: -.02em; margin: 0; }
.hero[data-hero-mode="photo"] .hero-sub { margin: .6em 0 1.1em; font-size: clamp(15px, 1.4vw, 19px); font-weight: 600; }
.hero[data-hero-mode="photo"] .btn { text-shadow: none; }
.hero[data-hero-mode="photo"] .btn-outline { background: rgba(10, 42, 94, .6); } /* readable on any part of the photo */
@media (max-width: 767px) {
  .hero[data-hero-mode="photo"] .hero-inner { top: calc(var(--header-h) + 14px); }
  .hero[data-hero-mode="photo"] .eyebrow,
  .hero[data-hero-mode="photo"] .hero-note { display: none; } /* keeps the phone hero short; same info is in the bottom bar and Pricing */
  .hero[data-hero-mode="photo"] .hero-buttons { gap: 10px; }
  .hero[data-hero-mode="photo"] .hero-buttons .btn-large { min-height: 52px; }
}

/* ---------- Fallback hero: HTML/CSS door or canvas frames ---------- */
.garage-door, .garage-frame, .garage-canvas, .garage-hint { display: none; }
.hero:not([data-hero-mode="photo"]) .scene,
.hero:not([data-hero-mode="photo"]) .hint { display: none; }

.hero:not([data-hero-mode="photo"]) { margin-top: 0; }
.hero:not([data-hero-mode="photo"]) .hero-stage {
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  background: radial-gradient(circle at 85% 10%, #1B4488 0%, var(--navy) 55%, #071D42 100%);
}
.motion-ok .hero:not([data-hero-mode="photo"]) { height: calc(200vh - var(--header-h)); height: calc(200svh - var(--header-h)); }
.motion-ok .hero:not([data-hero-mode="photo"]) .hero-stage { top: var(--header-h); }
/* Faint stars + red/white/blue stripe on the navy background */
.hero:not([data-hero-mode="photo"]) .hero-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23FFFFFF' opacity='.07'%3E%3Cpath transform='translate(14 20) scale(1.1)' d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.7 7.3L12 17.8 5.7 21.5l1.7-7.3L2 9.5l7.1-.6z'/%3E%3Cpath transform='translate(88 84) scale(.8)' d='M12 2l2.9 6.9 7.1.6-5.4 4.7 1.7 7.3L12 17.8 5.7 21.5l1.7-7.3L2 9.5l7.1-.6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero:not([data-hero-mode="photo"]) .hero-stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--red) 0 33.3%, var(--white) 33.3% 66.6%, var(--blue) 66.6% 100%);
}
/* The copy is revealed as the door opens (same --p as the photo version) */
.hero:not([data-hero-mode="photo"]) .hero-inner {
  --r: min(1, max(0, calc((var(--p) - .2) / .7)));
  opacity: calc(.35 + .65 * var(--r));
  transform: translateY(calc((1 - var(--r)) * 28px)) scale(calc(.97 + .03 * var(--r)));
  padding-top: 24px; padding-bottom: 24px;
}
.hero:not([data-hero-mode="photo"]) h1 { font-size: 1.9rem; line-height: 1.12; margin-bottom: 12px; }
.hero:not([data-hero-mode="photo"]) .hero-sub { font-size: 1.05rem; margin-bottom: 20px; }
@media (max-width: 767px) {
  .hero:not([data-hero-mode="photo"]) .hero-inner { padding-bottom: calc(var(--bar-h) + 8px); }
  .hero:not([data-hero-mode="photo"]) .hero-buttons { gap: 10px; }
  .hero:not([data-hero-mode="photo"]) .hero-buttons .btn-large { min-height: 52px; }
}
@media (max-height: 700px) { .hero-brand { display: none; } }

/* CSS door (fallback "css"): shown only when motion is on */
.motion-ok .hero[data-hero-mode="css"] .garage-door { display: flex; }
.motion-ok .hero[data-hero-mode="css"] .garage-frame { display: block; }
.garage-door {
  position: absolute; inset: 0; z-index: 5;
  flex-direction: column;
  transform: translateY(calc(var(--p) * -100%)); /* rolls up as --p goes 0 -> 1 */
  will-change: transform;
  background: #b9c2d1;
}
.garage-panel {
  position: relative; flex: 1;
  background: linear-gradient(180deg, #fdfdfe 0%, #e6eaf1 100%);
  border-bottom: 3px solid #aab4c5;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .9);
  display: grid; place-items: center;
}
/* The raised rectangle pressed into each panel */
.garage-panel::before {
  content: ""; position: absolute; inset: 14px 18px;
  border: 2px solid rgba(10, 42, 94, .14); border-radius: 4px;
  background: linear-gradient(180deg, #eef1f6, #f9fafc);
  box-shadow: inset 0 2px 5px rgba(10, 42, 94, .12);
}
/* Top panel: a row of four windows instead of a raised rectangle */
.garage-panel-top { display: flex; gap: 10px; padding: 16px 18px; place-items: stretch; }
.garage-panel-top::before { display: none; }
.garage-window {
  position: relative; flex: 1;
  border: 4px solid #d3d9e4; border-radius: 4px;
  background: linear-gradient(160deg, #cfe4f7 0%, #8fb8e6 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 2px 4px rgba(10, 42, 94, .2);
}
.garage-star { position: relative; z-index: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.garage-handle {
  position: relative; z-index: 1; width: 64px; height: 12px; border-radius: 6px;
  background: linear-gradient(180deg, #8d98ab, #5d6a80); box-shadow: 0 2px 3px rgba(0, 0, 0, .3);
}
/* Dark rubber strip along the bottom of the door */
.garage-seal { flex: none; height: 14px; background: #1b2433; border-top: 2px solid #3a4558; }

/* "Scroll to open" label on the CSS door (decorative) */
.motion-ok .hero[data-hero-mode="css"] .garage-hint { display: block; }
.garage-hint {
  position: absolute; left: 50%; top: 62%; margin: 0; z-index: 2;
  transform: translateX(-50%);
  padding: 10px 20px; border-radius: 999px;
  background: var(--navy); color: var(--white);
  font-weight: 700; white-space: nowrap; box-shadow: 0 6px 16px rgba(10, 42, 94, .35);
  opacity: calc(1 - var(--p) * 12);
}
.garage-arrow { display: inline-block; animation: garage-bounce 1.4s ease-in-out infinite; }
@keyframes garage-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Door frame: beam on top + posts on the sides. Stays still while the door rolls up behind it. */
.garage-frame {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  border: solid #071D42; border-width: 18px 10px 0;
  box-shadow: inset 0 14px 14px -8px rgba(0, 0, 0, .45);
}
@media (max-width: 767px) { .garage-panel-top { padding: 12px; gap: 6px; } }

/* Canvas picture-sequence (fallback "frames") */
.motion-ok .hero[data-hero-mode="frames"] .garage-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; }

/* ---------- Sliding glass door ---------- */
/* Open by default (no animation / reduced motion). In motion mode it starts closed and JS slides it open. */
.sliding-frame {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  background: #7fb2e6;
}
.sliding-view {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #7fb2e6 0%, #cfe4f7 62%, #6fae58 62%, #55954a 100%);
}
.sliding-sun { position: absolute; left: 12%; top: 12%; width: 14%; aspect-ratio: 1; border-radius: 50%; background: #ffe58a; box-shadow: 0 0 30px 10px rgba(255, 229, 138, .6); }
.sliding-palm { position: absolute; right: 14%; bottom: 36%; width: 28%; height: auto; }

.sliding-panel {
  position: absolute; top: 0; bottom: 0; width: 50%; flex: none;
  border: 6px solid #c9d3e6; border-radius: 2px;
  background: linear-gradient(115deg, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, .08) 40%, rgba(255, 255, 255, .28) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4);
}
.sliding-panel-fixed { left: 0; border-right-width: 6px; }
.sliding-panel-moving { left: 2%; z-index: 2; border-right-width: 6px; will-change: transform; }
.motion-ok .sliding-panel-moving { left: 50%; }

/* Reduced motion: leave the pulsing arrow off too */
@media (prefers-reduced-motion: reduce) {
  .garage-arrow { animation: none; }
}

/* ---------- Phase 5 touch-ups (Spanish text is a bit longer than English) ---------- */
.mobile-bar .btn { padding-left: 12px; padding-right: 12px; font-size: .95rem; white-space: nowrap; }
.hint { white-space: nowrap; }
