/* Hale Lumina — shared brand tokens & utilities */

/* Fonts: Cormorant Garamond (default), Playfair, EB Garamond — display options. DM Sans body. JetBrains Mono labels. */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Playfair+Display:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Core palette — warm, dusk-aware */
  --limestone: #F5F0E8;       /* main bg */
  --bone: #E8DFD2;            /* secondary panels */
  --umber: #7A5E49;           /* warm text accent */
  --koa: #3A2C24;             /* deep brown */
  --lava: #26231F;            /* darkest, warm-black */
  --olive: #777866;           /* sparing natural */
  --brass: #B08A62;           /* highlight, rules, light strokes */
  --dusk: #C7A27A;            /* soft glow / hover */

  /* Semantic */
  --bg: var(--limestone);
  --bg-panel: var(--bone);
  --bg-dark: var(--lava);
  --ink: #1c1a17;
  --ink-soft: #46413a;
  --ink-mute: rgba(28,26,23,.55);
  --rule: rgba(60,50,40,.18);
  --rule-soft: rgba(60,50,40,.10);
  --accent: var(--brass);

  /* Typography */
  --f-display: "Cormorant Garamond", "Playfair Display", "EB Garamond", Georgia, serif;
  --f-body: "DM Sans", "Söhne", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Tracking */
  --tr-label: 0.18em;
  --tr-display: -0.012em;
  --tr-body: 0.005em;

  /* Spacing */
  --pad-section: 140px;
  --pad-x: clamp(24px, 5vw, 88px);
  --maxw: 1320px;
  --col-gap: 32px;

  /* Simulated lighting image filters */
  --img-filter: brightness(1.02) contrast(1) sepia(0.04) saturate(1.05);
  --img-overlay: rgba(220, 180, 140, 0);
  --img-mix: normal;
  --spotlight-color: rgba(176, 138, 98, 0.08);
  --spotlight-bg: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(220, 170, 120, 0.12) 0%, rgba(220, 170, 120, 0.03) 60%, transparent 100%);
  --cove-color: 220, 155, 80;

  /* Global background transition */
  --bg-transition: background-color 1.2s cubic-bezier(0.22, 1, 0.36, 1), color 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Density modes (toggled via tweaks) */
:root[data-density="airy"]     { --pad-section: 200px; }
:root[data-density="standard"] { --pad-section: 140px; }
:root[data-density="dense"]    { --pad-section: 96px; }

/* Day / Dusk / Night global mood — shifts bg + accent intensity + image filters */
:root[data-mood="day"] {
  --bg: #F8F3EB;
  --bg-panel: #EFE7D9;
  --ink: #1c1a17;
  --ink-soft: #4b4439;
  --img-filter: brightness(1.04) contrast(1.02) sepia(0.02) saturate(1.08);
  --img-overlay: rgba(220, 180, 140, 0);
  --spotlight-bg: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(200, 180, 150, 0.10) 0%, rgba(200, 180, 150, 0.02) 60%, transparent 100%);
  --cove-color: 220, 165, 110;
}
:root[data-mood="golden"] {
  --bg: #F5ECD7;
  --bg-panel: #EADCBF;
  --ink: #201b15;
  --ink-soft: #544435;
  --img-filter: brightness(0.92) contrast(1.05) sepia(0.3) saturate(1.25);
  --img-overlay: rgba(200, 110, 40, 0.14);
  --img-mix: color-burn;
  --spotlight-bg: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(240, 140, 50, 0.16) 0%, rgba(240, 140, 50, 0.04) 60%, transparent 100%);
  --cove-color: 235, 130, 40;
}
:root[data-mood="dusk"] {
  --bg: #F5F0E8;
  --bg-panel: #E8DFD2;
  --ink: #1c1a17;
  --ink-soft: #46413a;
  --img-filter: brightness(0.78) contrast(1.06) sepia(0.16) saturate(0.95);
  --img-overlay: rgba(199, 162, 122, 0.2);
  --img-mix: multiply;
  --spotlight-bg: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(220, 170, 120, 0.12) 0%, rgba(220, 170, 120, 0.03) 60%, transparent 100%);
  --cove-color: 220, 155, 80;
}
:root[data-mood="night"] {
  --bg: #151311;
  --bg-panel: #1d1a18;
  --ink: #ece4d4;
  --ink-soft: #b3a78f;
  --ink-mute: rgba(236,228,212,.45);
  --rule: rgba(236,228,212,.14);
  --rule-soft: rgba(236,228,212,.06);
  --img-filter: brightness(0.48) contrast(1.15) sepia(0.12) saturate(0.85);
  --img-overlay: rgba(38, 35, 31, 0.45);
  --img-mix: multiply;
  --spotlight-color: rgba(220, 180, 140, 0.04);
  --spotlight-bg: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 145, 70, 0.08) 0%, rgba(255, 145, 70, 0.02) 60%, transparent 100%);
  --cove-color: 255, 140, 60;
}

/* Typeface pairings */
:root[data-typeface="modern"] {
  --f-display: "Playfair Display", Georgia, serif;
}
:root[data-typeface="classical"] {
  --f-display: "EB Garamond", "Cormorant Garamond", Georgia, serif;
}

/* Brass intensity */
:root[data-brass="subtle"]   { --brass: #A08868; --dusk: #BBA288; }
:root[data-brass="standard"] { --brass: #B08A62; --dusk: #C7A27A; }
:root[data-brass="strong"]   { --brass: #C99A65; --dusk: #DCB48A; }

/* Palette variants */
:root[data-palette="cool"] {
  --limestone: #F0EFEA;
  --bone: #DFDED6;
  --koa: #2A2E2C;
  --lava: #1F2220;
  --brass: #9A8E73;
  --dusk: #B5B09C;
}
:root[data-palette="deeper"] {
  --limestone: #ECE4D4;
  --bone: #D9CDB6;
  --koa: #2A1F18;
  --lava: #18150F;
  --brass: #C99B66;
  --dusk: #D9B286;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: var(--tr-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: var(--bg-transition);
}

img, svg, video { display: block; max-width: 100%; }

/* Image Slot Lighting Simulations */
image-slot {
  background: var(--bone);
  color: var(--ink-mute);
  filter: var(--img-filter);
  transition: filter 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-mood="night"] image-slot { background: #221f1b; }

.img-frame {
  background: var(--bone);
  position: relative;
  overflow: hidden;
  transition: background-color 1s cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-mood="night"] .img-frame { background: #221f1b; }

/* Warm blend overlay that acts like physical atmospheric lighting */
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--img-overlay);
  mix-blend-mode: var(--img-mix);
  pointer-events: none;
  transition: background-color 1s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

/* Curtain reveal scroll animations */
.curtain-frame {
  position: relative;
  overflow: hidden;
}
.curtain-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-panel);
  transform: scaleY(1);
  transform-origin: bottom;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 1s ease;
  z-index: 3;
}
.curtain-frame.in::before {
  transform: scaleY(0);
}

.curtain-frame-x {
  position: relative;
  overflow: hidden;
}
.curtain-frame-x::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-panel);
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 1s ease;
  z-index: 3;
}
.curtain-frame-x.in::before {
  transform: scaleX(0);
}

/* Fine architectural vertical blueprint grid */
.blueprint-grid {
  position: fixed;
  inset: 0 var(--pad-x);
  pointer-events: none;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  opacity: 0.12;
  transition: opacity 0.8s ease;
}
.blueprint-grid span {
  border-right: 0.5px solid var(--ink);
  height: 100%;
}
.blueprint-grid span:last-child {
  border-right: none;
}
:root[data-mood="night"] .blueprint-grid span {
  border-right-color: var(--brass);
}

/* Dynamic Cursor spotlight lighting */
.hover-spotlight {
  position: relative;
  isolation: isolate;
}
.hover-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--spotlight-bg);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hover-spotlight:hover::before {
  opacity: 1;
}

/* Card padding adjustments for cursor spotlight overlays */
.proj-card.hover-spotlight::before,
.room.hover-spotlight::before,
.mvlr-card.hover-spotlight::before,
.pf-item.hover-spotlight::before {
  inset: -20px;
  border-radius: 12px;
  background: var(--spotlight-bg), transparent;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-card.hover-spotlight::before,
.pf-item.hover-spotlight::before {
  box-shadow: 0 16px 36px rgba(28,26,23,0), 0 0 40px rgba(176, 138, 98, 0);
}
.proj-card.hover-spotlight:hover::before,
.room.hover-spotlight:hover::before,
.mvlr-card.hover-spotlight:hover::before,
.pf-item.hover-spotlight:hover::before {
  background: var(--spotlight-bg), var(--bg-panel);
}
.proj-card.hover-spotlight:hover::before,
.pf-item.hover-spotlight:hover::before {
  box-shadow: 0 16px 36px rgba(28,26,23,0.06), 0 0 40px rgba(176, 138, 98, 0.12);
}
:root[data-mood="night"] .proj-card.hover-spotlight:hover::before,
:root[data-mood="night"] .pf-item.hover-spotlight:hover::before {
  box-shadow: 0 20px 48px rgba(0,0,0,0.45), 0 0 40px rgba(176, 138, 98, 0.12);
}

/* Type */
.display, h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: var(--tr-display);
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
  transition: color 1s ease;
}

h1 { font-size: clamp(48px, 7.2vw, 108px); font-weight: 300; }
h2 { font-size: clamp(36px, 4.8vw, 72px); font-weight: 300; }
h3 { font-size: clamp(24px, 2.4vw, 36px); font-weight: 400; }

.italic { font-style: italic; }

p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
  max-width: 62ch;
  transition: color 1s ease;
}
p.lead { font-size: 19px; line-height: 1.55; color: var(--ink-soft); }

.label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--umber);
  transition: color 1s ease;
}
.site-footer a {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-footer a:hover {
  color: var(--brass);
  transform: translateX(4px);
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--umber);
  transition: color 1s ease;
}

/* Section number margin marker */
.sec-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-mute);
  transition: color 1s ease;
}

/* Layout */
.section {
  padding: var(--pad-section) var(--pad-x);
  position: relative;
}
.section-tight { padding: calc(var(--pad-section) * 0.6) var(--pad-x); }
.container { max-width: var(--maxw); margin: 0 auto; }
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
}
.span-1  { grid-column: span 1; }
.span-2  { grid-column: span 2; }
.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12 {
    grid-column: span 12;
  }
}


/* Lightfall divider — thin brass with a subtle glow taper and draw-in animation */
.lightfall {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--brass) 18%,
    var(--brass) 82%,
    transparent 100%);
  opacity: 0;
  border: 0;
  transform: scaleX(0.4);
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.8s ease;
}
.lightfall.in {
  opacity: 0.55;
  transform: scaleX(1);
}
.lightfall-soft {
  height: 1px;
  background: var(--rule);
  border: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: background 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -150%;
  width: 80%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-25deg);
  transition: none;
  z-index: 2;
  pointer-events: none;
}
.btn:hover::before {
  left: 180%;
  transition: left 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn .arrow { transition: transform .45s cubic-bezier(.22,1,.36,1); display: inline-block; }
.btn:hover .arrow { transform: translateX(6px); }
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(176, 138, 98, 0.12), 0 0 20px rgba(176, 138, 98, 0.04);
}

.svc-detail-img, .studio-img {
  position: relative;
  box-shadow: 0 0 40px rgba(176, 138, 98, 0);
  border-radius: 4px;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-detail-img:hover, .studio-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(28,26,23,0.06), 0 0 40px rgba(176, 138, 98, 0.12);
}
:root[data-mood="night"] .svc-detail-img:hover,
:root[data-mood="night"] .studio-img:hover {
  box-shadow: 0 20px 48px rgba(0,0,0,0.45), 0 0 40px rgba(176, 138, 98, 0.12);
}

.proj-card, .pf-item {
  position: relative;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-card:hover, .pf-item:hover {
  transform: translateY(-4px);
}

/* Scroll Parallax Crop Frame image inside slot */
.parallax-crop-frame {
  overflow: hidden;
  position: relative;
}

/* Hover scales the image inside the web component frame */
.proj-card:hover image-slot::part(frame),
.pf-item:hover image-slot::part(frame),
.svc-detail-img:hover image-slot::part(frame),
.studio-img:hover image-slot::part(frame) {
  transform: scale(1.08);
}

/* Sync card hovering to child titles and links */
.proj-card:hover h3, .proj-card:hover h4,
.pf-item:hover h3, .pf-item:hover h4 {
  color: var(--brass);
}
.proj-card:hover .tlink::after, .pf-item:hover .tlink::after {
  transform: scaleX(1);
  transform-origin: left;
}
.proj-card:hover .tlink .arrow, .pf-item:hover .tlink .arrow {
  transform: translateX(6px);
}

.btn-primary {
  background: var(--brass);
  color: var(--lava);
  border-color: var(--brass);
}
.btn-primary:hover {
  background: var(--dusk);
  border-color: var(--dusk);
  color: var(--lava);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176, 138, 98, 0.25);
}
:root[data-mood="night"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(220, 180, 140, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  background: rgba(28,26,23,0.02);
}
:root[data-mood="night"] .btn-ghost:hover {
  background: rgba(236,228,212,0.02);
  border-color: var(--brass);
}

.btn-ghost-light {
  background: transparent;
  color: #ece4d4;
  border-color: rgba(236,228,212,.35);
}
.btn-ghost-light:hover {
  border-color: #ece4d4;
  transform: translateY(-2px);
  background: rgba(236,228,212,0.05);
}

/* Text link with brass arrow */
.tlink {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--umber);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.4s ease, letter-spacing 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-mood="night"] .tlink {
  color: var(--brass);
}
.tlink:hover {
  color: var(--brass);
  letter-spacing: 0.17em;
}
.tlink::after {
  content: ""; position: absolute; left:0; bottom:0; height:1px;
  width: 100%; background: var(--brass); transform-origin: right;
  transform: scaleX(.25); transition: transform .6s cubic-bezier(.22,1,.36,1);
}
.tlink:hover::after { transform: scaleX(1); transform-origin: left; }
.tlink .arrow { transition: transform .45s cubic-bezier(.22,1,.36,1); }
.tlink:hover .arrow { transform: translateX(6px); }

/* Monogram HL — two variants */
.hl-mark {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-display);
  font-weight: 300;
  position: relative;
  user-select: none;
}
.hl-mark .h, .hl-mark .l {
  font-size: inherit;
  line-height: .9;
  display: inline-block;
}
.hl-mark .bar {
  display: inline-block;
  height: 1px;
  background: var(--brass);
  width: 0.35em;
  margin: 0 0.04em;
  align-self: center;
}

/* Image slot baseline — looks like a paused art frame */
image-slot {
  background: var(--bone);
  color: var(--ink-mute);
}
image-slot::part(frame) {
  transform: scale(1.001);
  transition: transform 1.2s cubic-bezier(0.15, 1, 0.3, 1);
  will-change: transform;
}

/* Dark sections */
.section-dark {
  background: var(--lava);
  color: #ece4d4;
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: #ece4d4; }
.section-dark p { color: rgba(236,228,212,.78); }
.section-dark .label { color: var(--brass); }
.section-dark .sec-num { color: rgba(236,228,212,.45); }

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* Selection */
::selection { background: var(--brass); color: var(--lava); }

/* Recessed architectural cove lighting (Section top/bottom wash) */
.section-cove {
  position: relative;
}
.section-cove::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 250px;
  background: linear-gradient(180deg, rgba(var(--cove-color, 220, 155, 80), 0.14) 0%, rgba(var(--cove-color, 220, 155, 80), 0) 100%);
  pointer-events: none;
  z-index: 0;
  opacity: var(--backlight-opacity, 0.5);
  transition: opacity 0.6s ease, background 1.2s ease;
}

.section-uplight {
  position: relative;
}
.section-uplight::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background: linear-gradient(0deg, rgba(var(--cove-color, 220, 155, 80), 0.12) 0%, rgba(var(--cove-color, 220, 155, 80), 0) 100%);
  pointer-events: none;
  z-index: 0;
  opacity: var(--backlight-opacity, 0.5);
  transition: opacity 0.6s ease, background 1.2s ease;
}

/* Linear LED Light Strip Profile (Divider rule) */
.light-strip {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
  box-shadow: 0 0 calc(var(--backlight-opacity, 0.5) * 16px) rgba(var(--cove-color, 220, 155, 80), 0.6);
  opacity: calc(var(--backlight-opacity, 0.5) * 0.7);
  transition: box-shadow 0.6s ease, opacity 0.6s ease, background 1.2s ease;
  border: none;
  margin: 0;
  z-index: 1;
}

/* Site nav */
.site-nav {
  position: fixed; top: 24px; left: clamp(24px, 5vw, 64px); right: clamp(24px, 5vw, 64px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px;
  background: rgba(245, 240, 232, 0.45);
  border: 1px solid rgba(176, 138, 98, 0.15);
  border-radius: 40px;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  transition: all .5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.site-nav[data-on-dark="true"] {
  background: rgba(26, 23, 20, 0.35);
  border-color: rgba(255, 255, 255, 0.08);
}
.site-nav.is-scrolled {
  background: color-mix(in oklab, var(--bg-panel) 88%, transparent);
  backdrop-filter: saturate(120%) blur(24px);
  -webkit-backdrop-filter: saturate(120%) blur(24px);
  padding: 10px 28px;
  top: 16px;
  border: 1px solid rgba(176, 138, 98, 0.22);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 12px 32px rgba(28,26,23,0.08);
}
.site-nav[data-on-dark="true"].is-scrolled {
  background: rgba(21, 19, 17, 0.88);
  border-color: rgba(220, 180, 140, 0.25);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 40px rgba(0,0,0,0.4);
}

@media (max-height: 680px) {
  .site-nav {
    top: 12px;
    padding: 8px 20px;
  }
  .site-nav.is-scrolled {
    top: 8px;
    padding: 6px 20px;
  }
}
@media (max-height: 560px) {
  .site-nav {
    top: 8px;
    padding: 6px 16px;
  }
  .site-nav.is-scrolled {
    top: 6px;
    padding: 4px 16px;
  }
}
.site-nav-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-nav-links { display: flex; gap: 28px; font-family: var(--f-body);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.site-nav-links a { 
  color: inherit; 
  text-decoration: none; 
  opacity: .75; 
  position: relative;
  padding: 4px 0;
  transition: opacity .3s cubic-bezier(0.22, 1, 0.36, 1), letter-spacing 0.4s cubic-bezier(0.22, 1, 0.36, 1); 
}
.site-nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav-links a:hover { opacity: 1; letter-spacing: 0.17em; }
.site-nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav-links a.active::after { transform: scaleX(1); background: var(--brass); height: 1.5px; }

/* Nav Keypad Pop-up animations and elements */
.nav-keypad-popup {
  animation: navKeypadFadeIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top right;
}

@keyframes navKeypadFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.site-nav-atmosphere-btn:hover {
  text-shadow: 0 0 8px rgba(176, 138, 98, 0.4);
}

/* Lutron Alisse Keypad styling rules */
.keypad-button-label {
  font-family: var(--f-mono, monospace);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #f7ede2;
  text-transform: uppercase;
  font-weight: 500;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.35);
  user-select: none;
  transition: color 0.3s ease;
}

.keypad-button:hover .keypad-button-label {
  color: #fff;
}

.keypad-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2b1f16;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.6);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255,255,255,0.05);
}

.keypad-button[data-active="true"] {
  border-color: rgba(230, 180, 130, 0.65) !important;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 0 14px rgba(163, 127, 92, 0.4) !important;
  background: linear-gradient(180deg, #947456 0%, #75593e 100%) !important;
}

.keypad-button[data-active="true"] .keypad-button-label {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
}

.keypad-button[data-active="true"] .keypad-led {
  background: #ffcc88;
  box-shadow: 
    0 0 6px #ffa834,
    0 0 12px #ffa834,
    inset 0 1px 0 rgba(255,255,255,0.2);
  border-color: #ffd8a6;
}

@media (min-width: 1025px) and (max-width: 1200px) {
  .site-nav {
    padding: 10px 22px;
  }
  .site-nav-links {
    gap: 16px;
    font-size: 11px;
  }
}

@media (max-width: 1024px) {
  .site-nav { top: 12px; left: 16px; right: 16px; padding: 10px 20px; }
  .site-nav-links { display: none; }
  
  :root {
    --pad-section: 64px;
    --pad-x: 20px;
    --col-gap: 16px;
  }
  :root[data-density="airy"]     { --pad-section: 88px; }
  :root[data-density="standard"] { --pad-section: 64px; }
  :root[data-density="dense"]    { --pad-section: 44px; }

  .blueprint-grid {
    grid-template-columns: repeat(4, 1fr);
    opacity: 0.04;
  }
}

@media (max-width: 600px) {
  .footer-base {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 40px;
  }
}

/* Mobile Nav Styles */
.mobile-nav-toggle {
  display: none;
}
.mobile-nav-backdrop,
.mobile-nav-dropdown {
  display: none;
}

@media (max-width: 1024px) {
  .site-nav {
    padding: 10px 20px;
    border-radius: 28px;
    top: 12px;
    left: 16px;
    right: 16px;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  }

  .site-nav.mobile-nav-open {
    border-radius: 28px;
    background: rgba(26, 23, 20, 0.96) !important;
    border-color: rgba(176, 138, 98, 0.3) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
  }

  .site-nav-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
    position: relative;
    padding: 0;
    margin: -4px -8px -4px 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
  }

  .hamburger-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    transform-origin: center;
    pointer-events: none;
  }

  .mobile-nav-toggle.is-open .line-1 {
    transform: translateY(6.5px) rotate(45deg);
  }
  .mobile-nav-toggle.is-open .line-2 {
    opacity: 0;
  }
  .mobile-nav-toggle.is-open .line-3 {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* Backdrop covers the page below the nav so taps outside close the menu. */
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(10, 8, 6, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mobileBackdropFade 0.25s ease forwards;
  }

  /* Dropdown is now a fixed overlay panel, not a nav child — avoids
     iOS Safari clipping bugs with overflow + backdrop-filter parents. */
  .mobile-nav-dropdown {
    display: flex;
    position: fixed;
    top: 76px;
    left: 16px;
    right: 16px;
    z-index: 9999;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    gap: 24px;
    padding: 20px 22px 24px;
    background: rgba(26, 23, 20, 0.96);
    border: 1px solid rgba(176, 138, 98, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: mobileNavDropdownFade 0.35s ease forwards;
  }

  .mobile-menu-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
  }

  .mobile-menu-links a {
    font-family: var(--f-display);
    font-size: 16px;
    font-weight: 300;
    text-decoration: none;
    color: rgba(236, 228, 212, 0.78);
    letter-spacing: 0.06em;
    padding: 10px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color 0.3s ease, padding-left 0.3s ease;
  }

  .mobile-menu-links a:hover,
  .mobile-menu-links a:active,
  .mobile-menu-links a.active {
    color: var(--brass);
    padding-left: 4px;
  }

  .mobile-menu-atmosphere {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-atmosphere-title {
    display: flex;
    flex-direction: column;
    font-family: var(--f-mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    color: rgba(236, 228, 212, 0.4);
    text-transform: uppercase;
  }
  
  .mobile-atmosphere-title .keypad-sub {
    font-size: 8px;
    color: var(--brass);
    margin-top: 2px;
  }

  .mobile-keypad {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 20px 16px !important;
  }

  .mobile-keypad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mobile-keypad-grid .keypad-button {
    padding: 10px 8px;
  }

  .mobile-menu-footer {
    font-family: var(--f-mono);
    font-size: 8px;
    letter-spacing: 0.12em;
    color: rgba(236, 228, 212, 0.3);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
    margin-top: 8px;
  }
}

@keyframes mobileNavDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobileBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
