:root {
  color-scheme: light;
  --bg: #fbfaf6;
  --bg-rgb: 251, 250, 246;
  --surface: #ffffff;
  --surface-strong: #f1eee6;
  --panel: rgba(255, 255, 255, 0.86);
  --ink: #171611;
  --muted: #626052;
  --soft: #8a866e;
  --accent: #817c43;
  --accent-strong: #b3954b;
  --accent-rgb: 129, 124, 67;
  --line: rgba(36, 34, 24, 0.14);
  --shadow: 0 20px 60px rgba(58, 53, 38, 0.12);
  --header-bg: rgba(251, 250, 246, 0.82);
  --hero-image: url("assets/light-hero.webp");
  --compat-image: url("assets/light-compat.webp");
  --serif: Didot, "Bodoni 72", "Bodoni 72 Smallcaps", Georgia, serif;
  --sans: Avenir, "Avenir Next", Inter, "Helvetica Neue", Arial, sans-serif;
  --radius: 8px;
  --section-pad: clamp(4.25rem, 8vw, 7.5rem);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0807;
  --bg-rgb: 10, 8, 7;
  --surface: #15100e;
  --surface-strong: #211612;
  --panel: rgba(19, 13, 10, 0.86);
  --ink: #fbf4eb;
  --muted: #cabdaf;
  --soft: #a28a75;
  --accent: #c89a45;
  --accent-strong: #d5ad63;
  --accent-rgb: 200, 154, 69;
  --line: rgba(242, 220, 192, 0.16);
  --shadow: 0 24px 76px rgba(0, 0, 0, 0.42);
  --header-bg: rgba(10, 8, 7, 0.8);
  --hero-image: url("assets/dark-hero.webp");
  --compat-image: url("assets/dark-compat.webp");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.08), transparent 36rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 420ms ease, color 420ms ease;
}

body.gate-open {
  overflow: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.8rem 1rem;
  color: var(--bg);
  background: var(--ink);
  border-radius: var(--radius);
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

.foyer-gate {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 2rem;
  overflow: hidden;
  color: #eee8dc;
  background:
    radial-gradient(circle at 50% 34%, rgba(191, 158, 111, 0.12), transparent 27%),
    radial-gradient(circle at 50% 100%, rgba(80, 33, 24, 0.2), transparent 34%),
    #0b0a09;
  text-align: center;
  transition: opacity 760ms cubic-bezier(0.22, 1, 0.36, 1), visibility 760ms ease;
}

.foyer-gate::before,
.foyer-gate::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 13vh;
  background: linear-gradient(transparent, rgba(238, 232, 220, 0.38));
}

.foyer-gate::before {
  top: 0;
}

.foyer-gate::after {
  bottom: 0;
  transform: rotate(180deg);
}

.foyer-gate.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.foyer-gate-inner {
  position: relative;
  width: min(100%, 48rem);
}

.foyer-monogram {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: clamp(2rem, 7vh, 3.75rem);
  border: 1px solid rgba(238, 232, 220, 0.26);
  border-radius: 50%;
  color: #d5ad63;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1;
  animation: foyer-breathe 4s ease-in-out infinite;
}

@keyframes foyer-breathe {
  50% {
    box-shadow: 0 0 0 1rem rgba(238, 232, 220, 0.025);
  }
}

.foyer-kicker,
.foyer-subtitle,
.foyer-enter,
.foyer-note {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.foyer-kicker {
  margin-bottom: 0.85rem;
  color: #caa969;
}

.foyer-gate h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: 0.13em;
  line-height: 0.88;
  text-transform: uppercase;
}

.foyer-subtitle {
  margin-bottom: clamp(3rem, 9vh, 5rem);
  color: #b49a72;
}

.foyer-copy {
  max-width: 34rem;
  margin: 0 auto 1.7rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.35;
}

.foyer-enter {
  position: relative;
  padding: 1rem 0.25rem;
  color: #fffaf0;
  background: transparent;
  border: 0;
}

.foyer-enter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform 420ms ease;
}

.foyer-enter:hover::after,
.foyer-enter:focus-visible::after {
  transform: scaleX(0.42);
}

.foyer-note {
  max-width: 30rem;
  margin: 1.55rem auto 0;
  color: rgba(238, 232, 220, 0.54);
  font-size: 0.58rem;
  line-height: 1.7;
}

.experience-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  min-height: 100svh;
  overflow: hidden;
  color: #fffaf0;
  background: #0b0a09;
  transition: opacity 650ms cubic-bezier(0.22, 1, 0.36, 1), visibility 650ms ease;
}

.experience-gate.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-topbar {
  position: absolute;
  z-index: 5;
  top: clamp(1.8rem, 4.8vh, 4.2rem);
  left: clamp(1.5rem, 4.4vw, 5rem);
  right: clamp(1.5rem, 4.4vw, 5rem);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  pointer-events: none;
}

.gate-logo {
  display: grid;
  gap: 0.45rem;
  text-transform: uppercase;
}

.gate-logo span {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: 0.16em;
  line-height: 0.9;
}

.gate-logo small {
  color: #caa969;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.gate-head {
  position: absolute;
  z-index: 4;
  top: clamp(9rem, 17vh, 13rem);
  left: 50%;
  width: min(92%, 60rem);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.gate-enter {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.gate-head h2 {
  max-width: none;
  margin: 0 0 clamp(14rem, 30vh, 24rem);
  color: rgba(255, 250, 240, 0.9);
  font-size: clamp(1.9rem, 3.1vw, 3.2rem);
  letter-spacing: 0.14em;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.48);
}

.gate-head p {
  max-width: 18rem;
  margin: 0 auto;
  color: rgba(243, 214, 154, 0.78);
  font-size: 0.9rem;
  line-height: 1.65;
}

.gate-head p span {
  display: block;
  color: #f3d69a;
}

.gate-divider {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 250, 240, 0.32), transparent);
}

.gate-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100svh;
}

.gate-choice {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  color: #fffaf0;
  background: #12100d;
  border: 0;
  text-align: left;
  isolation: isolate;
}

.gate-choice::before,
.gate-choice::after {
  content: "";
  position: absolute;
  inset: 0;
}

.gate-choice::before {
  z-index: -2;
  inset: -8%;
  background-image: var(--gate-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--gate-position, center top);
  filter: saturate(0.8) contrast(1.04) brightness(0.96);
  transform: scale(1.045);
  transition: transform 1200ms cubic-bezier(0.22, 1, 0.36, 1), filter 900ms ease;
}

.gate-choice::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 6, 5, 0.24), rgba(7, 6, 5, 0.08) 34%, rgba(7, 6, 5, 0.78)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 55%);
  transition: background 500ms ease;
}

.gate-choice:hover::before,
.gate-choice:focus-visible::before {
  filter: saturate(0.96) contrast(1.08);
  transform: scale(1);
}

.gate-choice:hover::after,
.gate-choice:focus-visible::after {
  background:
    linear-gradient(180deg, rgba(7, 6, 5, 0.18), rgba(7, 6, 5, 0.03) 34%, rgba(7, 6, 5, 0.7)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), transparent 55%);
}

.gate-choice-interior::before {
  filter: saturate(1.08) contrast(1.06) brightness(1.22);
}

.gate-choice-standard {
  --gate-image: url("assets/threshold-standard.webp");
  --gate-position: 57% center;
}

.gate-choice-interior {
  --gate-image: url("assets/threshold-interior.webp");
  --gate-position: 50% center;
}

.gate-choice-copy {
  position: absolute;
  left: clamp(1.5rem, 5vw, 5rem);
  right: clamp(1.5rem, 5vw, 5rem);
  bottom: clamp(2.6rem, 8vh, 5.2rem);
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.gate-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gate-title-row strong {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-transform: uppercase;
}

.gate-choice small {
  max-width: 31rem;
  color: #d5ad63;
  font-size: clamp(0.9rem, 1.25vw, 1.08rem);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.gate-enter {
  display: inline-grid;
  place-items: center;
  width: min(100%, 24rem);
  min-height: 4.15rem;
  margin-top: 0.65rem;
  color: #f3d69a;
  border: 1px solid rgba(213, 173, 99, 0.9);
  background: rgba(0, 0, 0, 0.18);
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

.gate-choice:hover .gate-enter,
.gate-choice:focus-visible .gate-enter {
  color: #fffaf0;
  background: rgba(213, 173, 99, 0.16);
  border-color: #f3d69a;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  color: var(--ink);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: background-color 420ms ease, color 420ms ease, border-color 420ms ease;
}

.header-inner,
.section-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(13rem, auto) 1fr auto;
  align-items: center;
  gap: clamp(1rem, 2.8vw, 2.5rem);
  min-height: 5.2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.2rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.brand-mark {
  flex: 0 0 auto;
  width: clamp(2.1rem, 3vw, 2.8rem);
  height: clamp(2.1rem, 3vw, 2.8rem);
  color: var(--accent-strong);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-copy {
  display: grid;
  justify-items: start;
  gap: 0.42rem;
  min-width: 0;
}

.brand-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.28em;
  line-height: 0.88;
}

.brand-subtitle {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  line-height: 1.2;
}

.primary-nav {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.7rem);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.primary-nav a {
  position: relative;
  padding: 0.4rem 0;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 5.8rem;
  height: 2.28rem;
  padding: 0;
  overflow: hidden;
  color: #2b352e;
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.92), transparent 38%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(226, 214, 196, 0.5)),
    #f7f1e8;
  border: 2px solid rgba(156, 115, 43, 0.88);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 249, 230, 0.72),
    inset 0 0.18rem 0.45rem rgba(255, 255, 255, 0.64),
    inset 0 -0.12rem 0.28rem rgba(75, 48, 17, 0.22),
    0 0.45rem 1.1rem rgba(54, 39, 20, 0.18);
  transition: background-color 420ms ease, border-color 420ms ease, box-shadow 420ms ease;
}

.theme-switch::before {
  content: "";
  position: absolute;
  inset: 0.14rem;
  border: 1px solid rgba(92, 63, 24, 0.4);
  border-radius: inherit;
  pointer-events: none;
}

.switch-track {
  position: absolute;
  inset: 0;
  display: block;
}

.switch-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.2rem;
  height: 0.76rem;
  border-radius: 999px;
  background: rgba(128, 96, 54, 0.08);
  box-shadow:
    inset 0 0.18rem 0.35rem rgba(96, 70, 36, 0.18),
    inset 0 -0.08rem 0.25rem rgba(255, 255, 255, 0.88);
  transform: translate(-50%, -50%);
}

.switch-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 0.96rem;
  height: 0.96rem;
  color: rgba(139, 103, 44, 0.88);
  opacity: 0.62;
  transform: translateY(-50%);
  transition: color 260ms ease, opacity 260ms ease;
}

.switch-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.switch-icon-sun {
  left: 0.58rem;
  opacity: 1;
}

.switch-icon-moon {
  right: 0.58rem;
  color: rgba(139, 103, 44, 0.82);
}

.switch-knob {
  position: absolute;
  z-index: 3;
  left: calc(50% - 0.38rem);
  top: 50%;
  display: grid;
  place-items: center;
  width: 1.64rem;
  height: 1.64rem;
  border-radius: 50%;
  color: #28180d;
  background:
    radial-gradient(circle at 34% 24%, #fff4c4, transparent 30%),
    linear-gradient(145deg, #f3ca77, #9f6721 58%, #f0d284);
  border: 1px solid rgba(58, 37, 15, 0.68);
  box-shadow:
    inset 0 0 0 2px rgba(255, 238, 183, 0.34),
    inset 0 -0.36rem 0.62rem rgba(77, 43, 16, 0.28),
    0 0.16rem 0.24rem rgba(78, 46, 17, 0.38),
    0 0.45rem 0.9rem rgba(0, 0, 0, 0.26);
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1;
  transform: translate(-50%, -50%);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 420ms ease, color 420ms ease, box-shadow 420ms ease;
}

[data-theme="dark"] .theme-switch {
  color: #d5ad63;
  background:
    radial-gradient(circle at 50% 0%, rgba(133, 94, 48, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(44, 30, 21, 0.82), rgba(9, 7, 6, 0.94)),
    #0b0806;
  border-color: rgba(212, 164, 74, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 219, 145, 0.2),
    inset 0 2px 8px rgba(0, 0, 0, 0.72),
    0 8px 22px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .theme-switch::before {
  border-color: rgba(238, 193, 110, 0.2);
}

[data-theme="dark"] .switch-track::before {
  background: rgba(0, 0, 0, 0.34);
  box-shadow:
    inset 0 0.18rem 0.35rem rgba(0, 0, 0, 0.72),
    inset 0 -0.08rem 0.18rem rgba(240, 204, 123, 0.1);
}

[data-theme="dark"] .switch-icon {
  color: rgba(213, 173, 99, 0.7);
}

[data-theme="dark"] .switch-icon-sun {
  opacity: 0.4;
}

[data-theme="dark"] .switch-icon-moon {
  color: #f0cc7b;
  opacity: 1;
}

[data-theme="dark"] .switch-knob {
  transform: translate(calc(-50% + 0.76rem), -50%);
}

.menu-button {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  padding: 0.65rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.menu-button span:not(.sr-only) {
  display: block;
  width: 1.1rem;
  height: 1px;
  margin: 0.16rem auto;
  background: currentColor;
  transition: transform 220ms ease, opacity 220ms ease;
}

.nav-open .menu-button span:nth-child(1) {
  transform: translateY(0.32rem) rotate(45deg);
}

.nav-open .menu-button span:nth-child(2) {
  opacity: 0;
}

.nav-open .menu-button span:nth-child(3) {
  transform: translateY(-0.32rem) rotate(-45deg);
}

.section-band {
  position: relative;
  padding: var(--section-pad) 0;
}

.section-contrast {
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.86), rgba(var(--bg-rgb), 0.92)),
    var(--surface-strong);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.98;
}

h1 {
  display: grid;
  gap: 0.08em;
  margin-bottom: 1.35rem;
  font-size: clamp(4rem, 8.6vw, 7.8rem);
}

h2 {
  max-width: 15ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.2rem, 4.4vw, 4.5rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  width: 2.1rem;
  height: 1px;
  background: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.95rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffaf0;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.button-ghost {
  color: var(--ink);
  background: rgba(var(--bg-rgb), 0.28);
  border-color: color-mix(in srgb, var(--ink) 42%, transparent);
}

.hero {
  display: grid;
  align-items: center;
  min-height: 92svh;
  padding-top: clamp(6.5rem, 10vh, 8.5rem);
  padding-bottom: clamp(2.25rem, 5vh, 4.5rem);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.98) 0%, rgba(var(--bg-rgb), 0.8) 34%, rgba(var(--bg-rgb), 0.12) 73%),
    var(--hero-image) right center / cover no-repeat,
    var(--bg);
  transition: background 480ms ease;
}

[data-theme="dark"] .hero {
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.98) 0%, rgba(var(--bg-rgb), 0.78) 32%, rgba(var(--bg-rgb), 0.18) 72%),
    var(--hero-image) right center / cover no-repeat,
    var(--bg);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 72%, var(--bg) 100%),
    radial-gradient(circle at 78% 28%, rgba(var(--accent-rgb), 0.08), transparent 22rem);
}

.hero-copy {
  max-width: 35rem;
}

.hero-intro {
  max-width: 25rem;
  margin-bottom: 1.55rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.split-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.section-copy {
  max-width: 42rem;
}

.ruled-copy {
  display: grid;
  gap: 0.85rem;
  color: var(--muted);
}

.ruled-copy p {
  margin-bottom: 0;
}

.image-panel {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.image-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 23rem;
  object-fit: cover;
  transition: opacity 240ms ease, transform 700ms ease;
}

.image-panel:hover img {
  transform: scale(1.025);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  max-width: 18ch;
  margin-bottom: 0;
}

.gallery {
  overflow: hidden;
}

[data-theme="dark"] .gallery {
  background:
    linear-gradient(180deg, rgba(10, 8, 7, 0.98), rgba(20, 9, 8, 0.96)),
    var(--bg);
}

.gallery .section-heading {
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}

[data-theme="dark"] .gallery .section-heading h2 {
  color: #fffaf0;
  text-shadow: 0 0 28px rgba(200, 154, 69, 0.22);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(5.4rem, 7.2vw));
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
}

.gallery-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-strong);
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--accent) 30%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
  isolation: isolate;
}

.gallery-card:nth-child(1) {
  grid-column: 1 / 6;
  grid-row: 1 / 5;
}

.gallery-card:nth-child(2) {
  grid-column: 6 / 9;
  grid-row: 1 / 5;
}

.gallery-card:nth-child(3) {
  grid-column: 9 / 13;
  grid-row: 1 / 3;
}

.gallery-card:nth-child(4) {
  grid-column: 9 / 11;
  grid-row: 3 / 5;
}

.gallery-card:nth-child(5) {
  grid-column: 11 / 13;
  grid-row: 3 / 5;
}

.gallery-card:nth-child(6) {
  grid-column: 1 / 5;
  grid-row: 5 / 8;
}

.gallery-card:nth-child(7) {
  grid-column: 5 / 9;
  grid-row: 5 / 8;
}

.gallery-card:nth-child(8) {
  grid-column: 9 / 13;
  grid-row: 5 / 8;
}

.gallery-card::before,
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.gallery-card::before {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 38%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent 54%);
}

.gallery-card::after {
  inset: 0.65rem;
  border: 1px solid rgba(255, 250, 240, 0.22);
  opacity: 0;
  transition: opacity 300ms ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--gallery-position, center);
  filter: saturate(0.92) contrast(1.04);
  transform: scale(1.01);
  transition: transform 650ms ease, filter 650ms ease;
}

.gallery-card:hover::after {
  opacity: 1;
}

.gallery-card:hover img {
  transform: scale(1.045);
  filter: saturate(1.05) contrast(1.08);
}

.gallery-card figcaption {
  position: absolute;
  left: clamp(0.9rem, 1.6vw, 1.35rem);
  right: clamp(0.9rem, 1.6vw, 1.35rem);
  bottom: clamp(0.9rem, 1.6vw, 1.35rem);
  z-index: 2;
  display: grid;
  gap: 0.25rem;
  color: #fffaf0;
}

.gallery-card:nth-child(4) figcaption,
.gallery-card:nth-child(5) figcaption {
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
}

.gallery-index {
  width: max-content;
  padding-bottom: 0.35rem;
  color: var(--accent-strong);
  border-bottom: 1px solid currentColor;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1;
}

.gallery-label {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.05;
}

.gallery-note {
  max-width: 20rem;
  color: rgba(255, 250, 240, 0.76);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.gallery-card:nth-child(4) .gallery-label,
.gallery-card:nth-child(5) .gallery-label {
  font-size: clamp(1rem, 1.45vw, 1.28rem);
}

.gallery-card:nth-child(4) .gallery-note,
.gallery-card:nth-child(5) .gallery-note {
  display: none;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-card {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.9fr) minmax(0, 1.1fr);
  min-height: 18rem;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.04);
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.1rem, 2vw, 1.7rem);
}

.service-card h3 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.service-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.service-card a {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compatibility {
  overflow: hidden;
  color: #fffaf0;
  background: #111;
}

.compatibility-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.48)),
    var(--compat-image) center / cover no-repeat;
  transform: scale(1.02);
}

.compatibility-inner {
  position: relative;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.quiz-intro h2 {
  max-width: 14ch;
}

.quiz-intro p {
  max-width: 30rem;
  color: rgba(255, 250, 240, 0.78);
}

.quiz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.quiz-meta li {
  padding: 0.65rem 0.8rem;
  color: rgba(255, 250, 240, 0.88);
  border: 1px solid rgba(255, 250, 240, 0.26);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.quiz-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: rgba(8, 7, 6, 0.72);
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}

fieldset {
  min-width: 0;
  padding: 1rem;
  margin: 0;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: var(--radius);
}

legend {
  padding: 0 0.3rem;
  font-size: 0.88rem;
  font-weight: 800;
}

.quiz-card label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  margin-top: 0.65rem;
  color: rgba(255, 250, 240, 0.8);
  font-size: 0.9rem;
}

.quiz-card input {
  margin-top: 0.25rem;
  accent-color: var(--accent-strong);
}

.quiz-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.quiz-result {
  flex: 1 1 18rem;
  min-height: 2.8rem;
  margin: 0;
  color: rgba(255, 250, 240, 0.88);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.principle-grid article {
  display: grid;
  gap: 1.15rem;
  align-content: center;
  justify-items: center;
  min-height: 14rem;
  padding: 1.5rem;
  background: var(--surface);
  text-align: center;
}

.principle-grid svg {
  width: 3.35rem;
  height: 3.35rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.principle-grid h3 {
  max-width: 10rem;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.faq-grid {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.faq-grid .section-heading {
  display: block;
  margin-bottom: 0;
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-item button {
  position: relative;
  width: 100%;
  padding: 1.1rem 2.5rem 1.1rem 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  font-weight: 800;
}

.accordion-item button::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.7rem;
  transform: translateY(-50%);
  transition: transform 220ms ease;
}

.accordion-item button[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(45deg);
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms ease;
}

.accordion-panel > p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
}

.accordion-item button[aria-expanded="true"] + .accordion-panel {
  grid-template-rows: 1fr;
  padding-bottom: 1rem;
}

.apply {
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.9), rgba(var(--bg-rgb), 1)),
    var(--surface-strong);
}

.apply-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.apply-note {
  color: var(--muted);
}

.instruction-list {
  display: grid;
  gap: 0.55rem;
  padding: 1.1rem 1.1rem 1.1rem 2.2rem;
  margin: 1.2rem 0 1.5rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.instruction-list li::marker {
  color: var(--accent);
}

.apply-image img {
  min-height: 13rem;
}

.application-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.8vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.application-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.application-form input,
.application-form select,
.application-form textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 0.9rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, var(--bg) 12%);
  border: 1px solid var(--line);
  border-radius: 4px;
  letter-spacing: 0;
  text-transform: none;
}

.application-form textarea {
  resize: vertical;
  min-height: 13rem;
}

.consent-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.consent-row input {
  width: auto;
  min-height: auto;
  margin-top: 0.22rem;
  accent-color: var(--accent);
}

.form-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer {
  padding: 2rem 0;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-footer .brand-name {
  font-size: 1.5rem;
}

.brand-footer .brand-subtitle {
  font-size: 0.55rem;
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto auto;
    justify-content: space-between;
  }

  .menu-button {
    display: grid;
    order: 3;
  }

  .theme-switch {
    order: 2;
  }

  .primary-nav {
    position: fixed;
    top: 5.2rem;
    left: 0;
    right: 0;
    display: grid;
    justify-content: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(calc(-100% - 5.5rem));
    transition: transform 260ms ease;
    backdrop-filter: blur(18px);
  }

  .primary-nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-open .primary-nav {
    transform: translateY(0);
  }

  .gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(13, minmax(5.25rem, 9vw));
  }

  .gallery-card:nth-child(1) {
    grid-column: 1 / 5;
    grid-row: 1 / 5;
  }

  .gallery-card:nth-child(2) {
    grid-column: 5 / 7;
    grid-row: 1 / 5;
  }

  .gallery-card:nth-child(3) {
    grid-column: 1 / 4;
    grid-row: 5 / 8;
  }

  .gallery-card:nth-child(4) {
    grid-column: 4 / 7;
    grid-row: 5 / 8;
  }

  .gallery-card:nth-child(5) {
    grid-column: 1 / 3;
    grid-row: 8 / 11;
  }

  .gallery-card:nth-child(6) {
    grid-column: 3 / 5;
    grid-row: 8 / 11;
  }

  .gallery-card:nth-child(7) {
    grid-column: 5 / 7;
    grid-row: 8 / 11;
  }

  .gallery-card:nth-child(8) {
    grid-column: 1 / 7;
    grid-row: 11 / 14;
  }

  .service-grid,
  .principle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principle-grid article:last-child {
    grid-column: 1 / -1;
  }

  .compatibility-inner,
  .faq-grid,
  .apply-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --section-pad: 3.5rem;
  }

  .header-inner {
    width: min(100% - 1rem, 1180px);
    min-height: 4.65rem;
    gap: 0.75rem;
  }

  .brand {
    gap: 0.62rem;
    padding-block: 0.25rem;
  }

  .brand-name {
    font-size: 1.85rem;
  }

  .brand-subtitle {
    font-size: 0.52rem;
    letter-spacing: 0.16em;
  }

  .brand-mark {
    display: none;
  }

  .theme-switch {
    width: 5.35rem;
    height: 2.16rem;
  }

  .switch-knob {
    left: calc(50% - 0.32rem);
    width: 1.52rem;
    height: 1.52rem;
    font-size: 0.84rem;
  }

  [data-theme="dark"] .switch-knob {
    transform: translate(calc(-50% + 0.64rem), -50%);
  }

  .switch-icon {
    width: 0.86rem;
    height: 0.86rem;
  }

  .switch-icon-sun {
    left: 0.52rem;
  }

  .switch-icon-moon {
    right: 0.52rem;
  }

  .switch-track::before {
    left: 50%;
    width: 1.9rem;
    height: 0.68rem;
  }

  .primary-nav {
    top: 4.65rem;
  }

  .foyer-gate {
    padding: 1rem;
  }

  .foyer-monogram {
    margin-bottom: 2rem;
  }

  .foyer-gate h1 {
    font-size: clamp(3.5rem, 18vw, 5.5rem);
    letter-spacing: 0.1em;
  }

  .foyer-subtitle {
    margin-bottom: 2.5rem;
  }

  .foyer-copy {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .foyer-note {
    font-size: 0.54rem;
  }

  .experience-gate {
    display: grid;
    grid-template-rows: minmax(31rem, 58svh) auto minmax(31rem, 58svh);
    overflow-y: auto;
  }

  .gate-topbar {
    top: 1.6rem;
    left: 1.35rem;
    right: 1.35rem;
    align-items: flex-start;
  }

  .gate-logo span {
    font-size: 2.25rem;
  }

  .gate-logo small {
    font-size: 0.58rem;
  }

  .gate-head {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 7;
    grid-row: 2;
    width: 100%;
    padding: 1.5rem 1rem;
    color: #171611;
    background: #fbfaf6;
    transform: none;
  }

  .gate-head h2 {
    margin: 0;
    color: #171611;
    font-size: clamp(1.55rem, 6.8vw, 2.25rem);
    letter-spacing: 0.12em;
    text-shadow: none;
  }

  .gate-head p {
    display: none;
  }

  .gate-divider {
    display: none;
  }

  .gate-choices {
    display: contents;
    grid-template-columns: 1fr;
  }

  .gate-choice {
    min-height: 0;
  }

  .gate-choice-standard {
    grid-row: 1;
  }

  .gate-choice-interior {
    grid-row: 3;
  }

  .gate-choice-copy {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.7rem;
    gap: 0.7rem;
  }

  .gate-title-row {
  }

  .gate-title-row strong {
    font-size: clamp(1.55rem, 7.2vw, 2.25rem);
    letter-spacing: 0.1em;
  }

  .gate-choice small {
    display: block;
    font-size: clamp(0.82rem, 3.5vw, 1rem);
  }

  .gate-enter {
    width: min(100%, 19rem);
    min-height: 3.7rem;
    margin-top: 0.35rem;
    font-size: 0.64rem;
  }

  .hero {
    align-items: end;
    min-height: 43rem;
    padding-top: 8rem;
    background:
      linear-gradient(180deg, rgba(var(--bg-rgb), 0.2) 0%, rgba(var(--bg-rgb), 0.82) 56%, rgba(var(--bg-rgb), 1) 100%),
      var(--hero-image) 60% top / auto 55% no-repeat,
      var(--bg);
  }

  [data-theme="dark"] .hero {
    background:
      linear-gradient(180deg, rgba(var(--bg-rgb), 0.16) 0%, rgba(var(--bg-rgb), 0.78) 54%, rgba(var(--bg-rgb), 1) 100%),
      var(--hero-image) 66% top / auto 55% no-repeat,
      var(--bg);
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 5.2rem);
  }

  h2 {
    max-width: 100%;
  }

  .hero-actions,
  .quiz-actions {
    display: grid;
  }

  .split-grid,
  .service-card {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(14rem, auto);
    gap: 0.75rem;
  }

  .gallery-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    min-height: 14rem;
  }

  .gallery-card:nth-child(1),
  .gallery-card:nth-child(8) {
    grid-column: 1 / -1;
    min-height: 19rem;
  }

  .gallery-card figcaption {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .gallery-index {
    font-size: 1.15rem;
  }

  .gallery-label {
    font-size: 1.35rem;
  }

  .gallery-note {
    font-size: 0.62rem;
  }

  .service-card img {
    min-height: 15rem;
  }

  .quiz-card,
  .form-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .principle-grid article:last-child {
    grid-column: auto;
  }

}

@media (max-width: 460px) {
  .header-inner,
  .section-inner {
    width: min(100% - 1rem, 1180px);
  }

  .brand-subtitle {
    display: none;
  }

  .brand {
    padding-block: 0.2rem;
  }

  .theme-switch {
    width: 5rem;
    height: 2.05rem;
  }

  .switch-knob {
    left: calc(50% - 0.28rem);
    width: 1.42rem;
    height: 1.42rem;
    font-size: 0.78rem;
  }

  [data-theme="dark"] .switch-knob {
    transform: translate(calc(-50% + 0.56rem), -50%);
  }

  .switch-icon {
    width: 0.78rem;
    height: 0.78rem;
  }

  .switch-icon-sun {
    left: 0.48rem;
  }

  .switch-icon-moon {
    right: 0.48rem;
  }

  .switch-track::before {
    left: 50%;
    width: 1.68rem;
    height: 0.62rem;
  }

  .hero {
    min-height: 41rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(18rem, auto);
  }

  .gallery-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    min-height: 18rem;
  }

  .gallery-card:nth-child(1),
  .gallery-card:nth-child(8) {
    min-height: 21rem;
  }

  .button {
    width: 100%;
  }
}

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