/* Wilsoar Vision — design tokens drawn from the logo: deep navy, ocean teal, sunset gold, sand. */
:root {
  --navy: #0b1a2b;
  --navy-2: #13283f;
  --steel: #9fb2c6;
  --teal: #12a3b0;
  --teal-dark: #0b7f8a;
  --gold: #f2a23a;
  --gold-dark: #d9851c;
  --sand: #f5efe5;
  --paper: #fbfaf7;
  --ink: #0b1a2b;
  --muted: #55657a;
  --line: rgba(11, 26, 43, 0.12);
  --white: #ffffff;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --header-h: 72px;
  --radius: 14px;
  --container: 1180px;
  --shadow: 0 12px 40px rgba(11, 26, 43, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; }
h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: 0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; font-weight: 600; color: var(--teal-dark); margin-bottom: 0.8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 0.98rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #ffb653; }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.18); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.92rem; }
.btn-block { width: 100%; }

/* ---------- Header: glass over the tour, solid after it ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top);
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease, -webkit-backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-glass { background: linear-gradient(to bottom, rgba(11,26,43,0.72), rgba(11,26,43,0)); }
.site-header.is-solid, body.menu-open .site-header {
  background: rgba(11, 26, 43, 0.93);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: rgba(255,255,255,0.1);
}
.header-inner {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(var(--container), 100% - 32px); margin-inline: auto;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); min-height: 44px; }
.brand-mark { width: 62px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.brand-word span { color: var(--gold); }
.nav-desktop { display: flex; align-items: center; gap: 26px; }
.nav-desktop a:not(.btn) { color: var(--white); text-decoration: none; font-weight: 500; font-size: 0.95rem; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.nav-desktop a:not(.btn):hover { color: var(--gold); }

.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; height: 2px; background: var(--white); border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 150; background: rgba(11, 26, 43, 0.97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 18px) 24px 32px;
}
.mobile-menu[hidden] { display: none; }
.menu-close { align-self: flex-end; width: 44px; height: 44px; font-size: 2rem; line-height: 1; color: var(--white); background: none; border: 0; cursor: pointer; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; margin-top: 24px; }
.mobile-menu nav a:not(.btn) { color: var(--white); text-decoration: none; font-family: var(--font-display); font-size: 1.5rem; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-menu nav .btn { margin-top: 24px; }
body.menu-open { overflow: hidden; }

/* ---------- Fly-through stage ---------- */
.tour { position: relative; background: var(--navy); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage-canvas, .stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-poster { object-fit: cover; transition: opacity .4s; }
.stage.has-frames .stage-poster { opacity: 0; }
.stage-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(11,26,43,.68) 0%, rgba(11,26,43,.22) 45%, rgba(11,26,43,0) 62%),
              linear-gradient(270deg, rgba(11,26,43,.5) 0%, rgba(11,26,43,0) 40%),
              linear-gradient(0deg, rgba(11,26,43,.45) 0%, rgba(11,26,43,0) 35%); }

.chapters { position: absolute; inset: 0; pointer-events: none; }
.chapter {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: min(520px, 100% - 32px); color: var(--white);
  opacity: 0; visibility: hidden; transition: none;
}
.chapter.align-left { left: max(16px, calc((100% - var(--container)) / 2)); }
.chapter.align-right { right: max(16px, calc((100% - var(--container)) / 2)); }
.chapter.align-center { left: 50%; transform: translate(-50%, -50%); text-align: center; }
.chapter.is-active { visibility: visible; pointer-events: auto; }
.chapter .eyebrow { color: var(--gold); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.chapter h1, .chapter h2 {
  font-family: var(--font-display); font-weight: 700; color: var(--white);
  font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.08; text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.chapter p.body { font-size: 1.12rem; color: rgba(255,255,255,.92); text-shadow: 0 1px 12px rgba(0,0,0,.6); max-width: 42ch; }
.chapter.align-center p.body { margin-inline: auto; }
.chapter .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.chapter.align-center .actions { justify-content: center; }
.chapter .card-back { position: absolute; inset: -24px -28px; z-index: -1; border-radius: 20px; background: radial-gradient(ellipse at center, rgba(11,26,43,.45), rgba(11,26,43,0) 70%); }

.skip-tour {
  position: absolute; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 5;
  color: var(--white); font-size: 0.88rem; font-weight: 500; text-decoration: none;
  padding: 10px 14px; border-radius: 999px; background: rgba(11,26,43,.45); border: 1px solid rgba(255,255,255,.25);
}
.skip-tour:hover { background: rgba(11,26,43,.7); }
.scroll-cue { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); color: rgba(255,255,255,.85); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity .3s; }
.scroll-cue i { width: 2px; height: 32px; background: linear-gradient(var(--white), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 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; } }

/* Static fallback (reduced motion / no frames): chapters become normal blocks */
.tour.is-static .stage { position: relative; height: auto; }
.tour.is-static .stage-canvas, .tour.is-static .stage-poster, .tour.is-static .stage-scrim, .tour.is-static .scroll-cue, .tour.is-static .skip-tour { display: none; }
.tour.is-static .chapters { position: relative; }
.tour.is-static .chapter {
  position: relative; inset: auto; transform: none; width: 100%; opacity: 1; visibility: visible; pointer-events: auto;
  min-height: 80vh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 40px) max(16px, calc((100% - var(--container)) / 2)) 60px;
  background-size: cover; background-position: center;
}
.tour.is-static .chapter::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,26,43,.75), rgba(11,26,43,.25)); }
.tour.is-static .chapter > * { position: relative; max-width: 560px; }
.tour.is-static .chapter.align-center { text-align: left; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-light { background: var(--paper); }
.section-sand { background: var(--sand); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.section-note { color: var(--muted); margin: 0; }

.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 40px; }
.service-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.service-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--navy); display: grid; place-items: center; margin-bottom: 18px; }
.service-icon svg { width: 26px; height: 26px; fill: var(--gold); }
.service-card p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 28px; position: relative; margin: 8px 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 14px; height: 8px; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }

/* Realtors band */
.realtors { position: relative; color: var(--white); overflow: hidden; background: var(--navy); }
.realtors-bg { position: absolute; inset: 0; background: url("../assets/web/reveal.jpg") center / cover no-repeat; }
.realtors-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,26,43,.92) 0%, rgba(11,26,43,.78) 45%, rgba(11,26,43,.35) 100%); }
.realtors-inner { position: relative; }
.realtors .eyebrow { color: var(--gold); }
.realtors h2 { color: var(--white); max-width: 18ch; }
.realtors .lead { color: rgba(255,255,255,.85); }
.realtor-points { list-style: none; padding: 0; margin: 32px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 900px; }
.realtor-points li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 20px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.realtor-points strong { display: block; font-size: 1.05rem; margin-bottom: 4px; color: var(--gold); }
.realtor-points span { color: rgba(255,255,255,.85); font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.share-status { font-size: .9rem; color: var(--gold); }

/* Portfolio cards */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.work-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; }
/* Vertical clips keep their own shape; the 16/10 box would crop them to a sliver. */
.work-media.is-portrait { aspect-ratio: 9 / 16; }
.work-media.is-portrait video { object-fit: contain; background: var(--navy-2); }
.work-media { aspect-ratio: 16 / 10; background: var(--navy-2); position: relative; overflow: hidden; }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; }
.work-media.is-placeholder { display: grid; place-items: center; background: repeating-linear-gradient(135deg, #e9e3d8 0 12px, #efe9df 12px 24px); color: var(--muted); font-size: .9rem; font-weight: 500; }
.work-body { padding: 18px 20px 20px; }
.work-body h3 { margin: 0 0 2px; font-size: 1.05rem; }
.work-body p { margin: 0; color: var(--muted); font-size: .92rem; }
a.work-card:hover { transform: translateY(-3px); transition: transform .2s; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%; background: rgba(11,26,43,.6); display: grid; place-items: center; }
.play-badge::after { content: ""; border-left: 18px solid var(--white); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: none; }
.steps li { position: relative; padding-top: 8px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 30px; left: 64px; right: -12px; height: 2px; background: linear-gradient(90deg, var(--teal), rgba(18,163,176,.15)); }
.step-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 16px; }
.steps p { color: var(--muted); font-size: .95rem; }

/* Quote */
.quote { background: var(--navy); color: var(--white); }
.quote h2 { color: var(--white); }
.quote .eyebrow { color: var(--gold); }
.quote .lead { color: rgba(255,255,255,.8); }
.quote-inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.quote-direct { color: rgba(255,255,255,.75); }
.quote-direct a { color: var(--gold); }
.quote-form { background: var(--white); color: var(--ink); border-radius: 18px; padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: .88rem; font-weight: 600; }
.field em { font-weight: 400; color: var(--muted); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid #d3dae3; border-radius: 10px;
  font: 400 1rem var(--font-body); color: var(--ink); background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field input[aria-invalid="true"] { border-color: #c0392b; }
.choice { flex-direction: row; flex-wrap: wrap; gap: 10px 22px; }
.choice legend { margin-bottom: 8px; width: 100%; }
.choice label { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--teal-dark); }
.hp { display: none !important; }
.form-status { margin: 12px 0 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: #157347; }
.form-status.err { color: #b02a37; }

/* Footer */
.site-footer { background: #07121e; color: rgba(255,255,255,.8); padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.footer-logo { background: var(--white); border-radius: var(--radius); padding: 18px 20px; max-width: 260px; display: grid; place-items: center; }
.footer-logo img { width: 100%; max-width: 210px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h4 { color: var(--white); font-family: var(--font-display); font-size: 1rem; letter-spacing: .06em; }
.footer-cols a { display: block; color: rgba(255,255,255,.8); text-decoration: none; padding: 4px 0; word-break: break-word; }
.footer-cols a:hover { color: var(--gold); }
.copyright { text-align: center; font-size: .82rem; color: rgba(255,255,255,.5); margin: 40px 16px 0; }

/* ---------- Tablet & phone ---------- */
@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .quote-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-logo { max-width: 280px; }
}

@media (max-width: 767px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; }
  .brand-mark { width: 50px; }
  .brand-word { font-size: 0.98rem; letter-spacing: .06em; }

  /* Chapters anchor to the bottom over a soft scrim on phones */
  .stage-scrim { background: linear-gradient(0deg, rgba(11,26,43,.85) 0%, rgba(11,26,43,.35) 38%, rgba(11,26,43,0) 60%); }
  .chapter, .chapter.align-left, .chapter.align-right, .chapter.align-center {
    left: 16px; right: 16px; width: auto; top: auto; bottom: calc(76px + env(safe-area-inset-bottom));
    transform: none; text-align: left;
  }
  .chapter h1, .chapter h2 { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
  .chapter .eyebrow { font-size: .7rem; margin-bottom: .5em; }
  .chapter p.body { display: none; }
  .chapter.is-last p.body { display: block; font-size: 1rem; }
  .chapter .actions .btn:not(.btn-primary) { display: none; }
  .chapter.align-center .actions { justify-content: flex-start; }
  .scroll-cue { left: 16px; transform: none; bottom: calc(26px + env(safe-area-inset-bottom)); flex-direction: row; gap: 8px; font-size: .68rem; }
  .scroll-cue i { width: 14px; height: 2px; background: rgba(255,255,255,.8); animation: none; }
  .menu-toggle { margin-right: -8px; }
  .skip-tour { bottom: calc(14px + env(safe-area-inset-bottom)); }

  .section-head { flex-direction: column; align-items: start; gap: 6px; }
  .service-grid, .card-grid, .steps, .realtor-points { grid-template-columns: 1fr; }
  .service-card { padding: 24px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .quote-form { padding: 20px; }
  .actions .btn { flex: 1 1 100%; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > div:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header { transition: none; }
  .scroll-cue i { animation: none; }
}
