/* Home hero: a room wall with the headline on the left and a door on the right.
   The door opens by itself onto a real photo; clicking it (or the first scroll
   down at the top of the page) zooms through the doorway into the page.
   Shown on every visit; the normal header and door bar stay on top. */
:root {
  --ix-vh: 100vh;
  --ix-bar-h: 144px;                                /* door bar height; js/intro.js keeps it exact */
  --ix-head-h: var(--site-header-h, 72px);          /* the fixed header covers this much of the hero top */
  --ix-crown-h: clamp(26px, 4.2vh, 42px);
  --ix-floor-h: clamp(44px, 9vh, 96px);
  --ix-door-h: clamp(240px, calc(var(--ix-vh) - var(--ix-bar-h) - var(--ix-head-h) - var(--ix-crown-h) - var(--ix-floor-h) - 110px), 560px);
  --ix-door-w: calc(var(--ix-door-h) * .62);
  --ix-casing: clamp(14px, calc(var(--ix-door-w) * .075), 28px);
  --ix-bb-h: calc(var(--ix-door-h) * .07);
  --ix-trim: #fff; --ix-wall: #F3F0EA;
}
@supports (height: 100svh) { :root { --ix-vh: 100svh; } }
body.ix-locked { overflow: hidden; }
  /* ───────────── SCENE (the hero section; gets zoomed on fly-through) ───────────── */
  .ix-scene {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: end;
    column-gap: clamp(24px, 4vw, 64px);
    min-height: calc(var(--ix-vh) - var(--ix-bar-h));
    padding: calc(var(--ix-head-h) + var(--ix-crown-h)) max(clamp(20px, 5vw, 48px), calc((100% - var(--max-width, 1240px)) / 2 + 48px)) 0;
    background: var(--ix-wall);
  }
  .ix-scene.ix-gone { display: none; }

  /* Left: headline, one line, two buttons, small proof line */
  .ix-copy { position: relative; z-index: 4; align-self: center; padding-bottom: var(--ix-floor-h); max-width: 640px; }
  .ix-copy h1 {
    font-size: clamp(40px, 5vw, 72px); line-height: 1.04; letter-spacing: -0.025em;
    color: var(--ink); margin-bottom: .38em; text-wrap: balance;
  }
  .ix-lead { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.5; color: #3B3631; max-width: 34em; margin-bottom: 1.6rem; }
  .ix-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
  .ix-note { margin-top: 1rem; font-size: .85rem; line-height: 1.5; color: var(--muted); }

  /* Right: the door, standing on the floor */
  .ix-stage {
    position: relative; display: flex; justify-content: center; align-items: flex-end;
    padding-top: calc(var(--ix-casing) + 64px);    /* head casing + plaque */
    padding-bottom: var(--ix-floor-h);
  }

  /* The opening holds the photo; a giant shadow paints the wall around it */
  .ix-opening {
    position: relative; flex: 0 0 auto;
    width: var(--ix-door-w); height: var(--ix-door-h);
    box-shadow: 0 0 0 300vmax var(--ix-wall);
    perspective: 1600px;
    cursor: pointer;
  }
  /* Real photo behind the door, with a slight warm glow */
  .ix-photo { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
  .ix-glow {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
      radial-gradient(ellipse 85% 60% at 50% 32%, rgba(255, 214, 150, .32), transparent 72%),
      linear-gradient(180deg, rgba(255, 200, 140, .10), rgba(255, 200, 140, 0) 60%);
    box-shadow: inset 0 0 28px rgba(40, 25, 10, .28);
  }

  /* Casing (trim) around the opening */
  .ix-casing {
    position: absolute; pointer-events: none;
    inset: calc(var(--ix-casing) * -1) calc(var(--ix-casing) * -1) 0 calc(var(--ix-casing) * -1);
    border: var(--ix-casing) solid var(--ix-trim); border-bottom: 0;
    box-shadow:
      0 1px 0 rgba(0,0,0,.04),
      0 6px 18px rgba(0,0,0,.08),
      inset 0 0 0 1px rgba(0,0,0,.05),
      inset 0 3px 8px rgba(0,0,0,.08);
    z-index: 3;
  }
  .ix-casing::after { /* head casing a bit wider, like real trim */
    content: ''; position: absolute;
    left: calc(var(--ix-casing) * -1.3); right: calc(var(--ix-casing) * -1.3);
    top: calc(var(--ix-casing) * -1 - 8px); height: 10px;
    background: var(--ix-trim); border-radius: 1px;
    box-shadow: 0 3px 6px rgba(0,0,0,.07);
  }

  /* ───────────── ROOM: crown, floor, baseboard, plaque ───────────── */
  /* Crown moulding along the top of the wall (just under the fixed header): stepped profile, white */
  .ix-crown {
    position: absolute; left: 0; right: 0; top: var(--ix-head-h); height: var(--ix-crown-h); z-index: 1;
    background: linear-gradient(180deg,
      #E6E2DB 0, #E6E2DB 2px,                 /* ceiling line */
      #FFFFFF 2px, #FFFFFF 20%,               /* top fascia */
      #E4E0D9 20%, #E4E0D9 calc(20% + 1px),   /* step */
      #FBFAF8 calc(20% + 1px), #FFFFFF 32%,   /* bead */
      #D3CDC3 32%, #E7E3DC 46%, #FFFFFF 76%,  /* cove, shaded at the top */
      #E2DED7 76%, #E2DED7 calc(76% + 1px),   /* step */
      #FFFFFF calc(76% + 1px), #F7F5F1 100%); /* bottom fillet */
    box-shadow: 0 1px 0 rgba(0,0,0,.07), 0 5px 10px rgba(0,0,0,.06);
    pointer-events: none;
  }

  /* Light wood floor: starts where the door ends, runs off both sides */
  .ix-floor {
    position: absolute; top: 100%; left: -300vmax; right: -300vmax; height: 300vmax;
    background:
      linear-gradient(180deg, rgba(60,40,20,.16), rgba(60,40,20,0) 14px),
      repeating-linear-gradient(90deg, rgba(110,75,40,.10) 0 1px, transparent 1px 190px),
      repeating-linear-gradient(180deg, rgba(255,255,255,.06) 0 2px, transparent 2px 9px),
      linear-gradient(180deg, #DCC29C 0%, #D2B48A 60%, #C9A97C 100%);
    pointer-events: none;
  }

  /* Baseboard (~5.5" on an 80" door) with a small cap; stops at the casing */
  .ix-bb {
    position: absolute; bottom: 0; height: var(--ix-bb-h); z-index: 1;
    background:
      linear-gradient(180deg,
        #FFFFFF 0, #FFFFFF 12%,                  /* cap */
        rgba(0,0,0,.09) 12%, rgba(0,0,0,.09) calc(12% + 1px),
        #F4F2EE calc(12% + 1px), #FFFFFF 26%,    /* shadow under the cap */
        #FFFFFF 70%, #F6F4F0 100%);
    box-shadow: 0 -1px 0 rgba(0,0,0,.06), 0 -3px 6px rgba(0,0,0,.04), 0 2px 3px rgba(0,0,0,.08);
    pointer-events: none;
  }
  .ix-bb-l { left: -300vmax; right: calc(100% + var(--ix-casing)); }
  .ix-bb-r { right: -300vmax; left: calc(100% + var(--ix-casing)); }

  /* Brass plaque above the door casing */
  .ix-plaque {
    position: absolute; z-index: 1; left: 50%; transform: translateX(-50%);
    bottom: calc(100% + var(--ix-casing) + 8px + 12px);
    padding: .35em 1.3em; border-radius: 2px; white-space: nowrap;
    background:
      radial-gradient(circle at .55em 50%, #7A5E2C 0 .14em, transparent .2em),
      radial-gradient(circle at calc(100% - .55em) 50%, #7A5E2C 0 .14em, transparent .2em),
      linear-gradient(135deg, #DCBE80 0%, #BC9852 48%, #A2803F 100%);
    box-shadow: 0 3px 8px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.15);
    font-family: 'Fraunces', Georgia, serif; font-weight: 600;
    font-size: max(11px, calc(var(--ix-door-w) * .034)); letter-spacing: .04em; color: #3A2C17;
    pointer-events: none;
  }

  /* ───────────── DOOR ───────────── */
  .ix-door {
    position: absolute; inset: 0; z-index: 2;
    transform-origin: left center;
    transform-style: preserve-3d;
    background: linear-gradient(180deg, #FFFFFF 0%, #F7F6F3 100%);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 6px 0 18px rgba(0,0,0,.06);
    cursor: pointer; border: 0; outline-offset: 6px;
    transition: transform 1.25s cubic-bezier(.45,.05,.25,1), box-shadow 1.25s;
  }
  .ix-door:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 10px 0 26px rgba(0,0,0,.1); }
  .ix-door.ix-open {
    transform: rotateY(82deg);  /* swings away from you, into the room */
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), -20px 0 40px rgba(0,0,0,.18);
  }

  /* 2-panel Shaker: two recessed panels */
  .ix-panel {
    position: absolute; left: 14%; right: 14%;
    background: linear-gradient(180deg, #F5F3EF 0%, #FBFAF8 100%);
    box-shadow:
      inset 0 2px 3px rgba(0,0,0,.08),
      inset 0 -1px 1px rgba(255,255,255,.9),
      0 0 0 1px rgba(0,0,0,.04);
  }
  .ix-panel.ix-top { top: 8%; height: 50%; }
  .ix-panel.ix-bottom { top: 64%; bottom: 8%; }

  /* Matte black lever handle */
  .ix-handle {
    position: absolute; right: 9%; top: 52%;
    width: 10px; height: 46px; border-radius: 5px;
    background: linear-gradient(90deg, #2b2b2b, #111 60%, #2b2b2b);
    box-shadow: 0 2px 4px rgba(0,0,0,.3);
    transform: translateY(-50%);
  }
  .ix-handle::after {
    content: ''; position: absolute; top: 9px; right: 3px;
    width: 46px; height: 8px; border-radius: 4px;
    background: linear-gradient(180deg, #333, #0d0d0d);
    box-shadow: 0 3px 5px rgba(0,0,0,.3);
  }

  /* Zoom: walk through the doorway */
  .ix-scene.ix-zoom {
    transition: transform 1.5s cubic-bezier(.6,.02,.85,.4), opacity .35s ease 1.2s;
    transform: scale(var(--ix-zoom, 9));
    opacity: 0;
  }
  /* During the zoom the hero is pinned where it was (js/intro.js sets top/left/size
     and leaves a spacer), so the page can move to the next section underneath */
  .ix-scene.ix-flying { position: fixed; z-index: 1000; margin: 0; will-change: transform; }
  .ix-scene.ix-reset, .ix-scene.ix-reset * { transition: none !important; }

  /* Tablet / small laptop: header + door bar are shorter */
  @media (max-width: 760px) { :root { --ix-bar-h: 138px; --ix-head-h: var(--site-header-h-mobile, 60px); } }

  /* Phones: stacked. Headline, line and buttons first, the door below */
  @media (max-width: 640px) {
    :root {
      --ix-crown-h: 22px; --ix-floor-h: 34px; --ix-casing: 12px;
      --ix-door-h: clamp(170px, calc(var(--ix-vh) * .3), 260px);
    }
    .ix-scene {
      grid-template-columns: minmax(0, 1fr); align-items: start; row-gap: 0;
      padding: calc(var(--ix-head-h) + var(--ix-crown-h) + 16px) 16px 0;
    }
    .ix-copy { align-self: start; padding-bottom: 0; }
    .ix-copy h1 { font-size: clamp(30px, 8.6vw, 40px); margin-bottom: .32em; }
    .ix-lead { font-size: 18px; line-height: 1.45; margin-bottom: 1rem; }
    .ix-cta { gap: .5rem; }
    .ix-cta .btn { flex: 1 1 auto; justify-content: center; padding: 12px 14px; font-size: 14.5px; min-height: 46px; }
    .ix-note { margin-top: .6rem; font-size: 12.5px; }
    .ix-stage { align-self: end; padding-top: calc(var(--ix-casing) + 50px); }
    .ix-plaque { font-size: 11px; }
    .ix-handle { height: 34px; width: 8px; }
    .ix-handle::after { width: 26px; height: 6px; top: 7px; }
  }
  @media (max-width: 480px) { :root { --ix-bar-h: 105px; } }

  /* Reduced motion: the door is already open (js/intro.js), nothing moves */
  @media (prefers-reduced-motion: reduce) { .ix-door, .ix-scene { transition: none !important; } }
