:root {
  --silk: #ead4cc;
  --silk-deep: #c9a39c;
  --blush: #b07a7e;
  --room: #2a181c;
  --velvet: #0e090b;
  --ink: #1a1012;
  --mint: #8fd4c8;
  --mint-deep: #5eaea2;
  --gold: #d4b06a;
  --gold-hot: #f0d48a;
  --cream: #f6ece4;
  --fog: rgba(28, 16, 18, 0.52);
  --gutter: clamp(1.25rem, 6.5vw, 7.5rem);
  --sans: "Outfit", system-ui, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --step: clamp(0.9rem, 0.82rem + 0.35vw, 1.05rem);
  --display: clamp(2.4rem, 1.1rem + 5.4vw, 5.6rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--velvet);
}

html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--step);
  line-height: 1.45;
  background: var(--velvet);
  letter-spacing: 0.01em;
}

img { max-width: 100%; height: auto; display: block; }
button, a { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold-hot);
  outline-offset: 3px;
}

::selection {
  background: var(--mint);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--cream);
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.82  0 0 0 0 0.76  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* sticky mark */
.mark {
  position: fixed;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  box-shadow: 0 0 0 1px rgba(212, 176, 106, 0.45), 0 8px 24px rgba(0, 0, 0, 0.4);
}
.mark img { width: 100%; height: 100%; object-fit: cover; }
body.is-scrolled .mark {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.notice {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  z-index: 25;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(18, 10, 12, 0.88);
  border: 1px solid rgba(212, 176, 106, 0.35);
  color: var(--cream);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  backdrop-filter: blur(12px);
}
.notice[hidden] { display: none; }

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.kicker.center { text-align: center; }

.sec-head {
  padding: 0 var(--gutter) 2.4rem;
  max-width: 42rem;
}
.sec-head.on-dark { position: relative; z-index: 1; }
.sec-head h2,
.frost h1,
.last-line,
.mirror-title {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3rem);
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.lede {
  margin: 0.85rem 0 0;
  max-width: 28rem;
  color: rgba(246, 236, 228, 0.7);
  font-weight: 300;
}

/* buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.45rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7ebe3, #e2c7bb);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid rgba(212, 176, 106, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}
.pill:hover { filter: brightness(1.06); transform: translateY(-1px); }
.pill.compact { min-height: 42px; padding: 0.55rem 1.1rem; font-size: 0.78rem; }

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 16, 18, 0.22);
  color: var(--ink);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.ghost:hover { background: rgba(26, 16, 18, 0.06); }
.ghost.is-wait,
button.is-wait {
  cursor: not-allowed;
  opacity: 0.72;
}

/* ========== 1. LOCK ========== */
.lock {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  background: #c9a39c;
}
.lock-media {
  position: absolute;
  inset: 0;
}
.lock-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 48%;
  filter: blur(3.5px) saturate(0.98);
  transform: scale(1.04);
}
.lock-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 16, 18, 0.12) 0%, transparent 28%, rgba(26, 16, 18, 0.18) 58%, rgba(14, 9, 11, 0.72) 100%);
}
.lock-stamp {
  position: absolute;
  top: 1.3rem;
  left: var(--gutter);
  z-index: 2;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(246, 236, 228, 0.82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.frost {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: clamp(1.4rem, 6vh, 3.2rem);
  width: min(32rem, calc(100% - 2 * var(--gutter)));
  display: flex;
  background: rgba(18, 10, 12, 0.42);
  border: 1px solid rgba(246, 236, 228, 0.16);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.frost-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1.2rem, 2.4vw, 1.8rem) clamp(1.2rem, 2.4vw, 1.9rem) clamp(1.3rem, 2.4vw, 1.9rem);
  width: 100%;
}
.lock-glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  border: 1px solid rgba(212, 176, 106, 0.55);
  color: var(--gold-hot);
}
.frost h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 0.94;
  color: var(--cream);
}
.frost-bio {
  margin: 0 0 1.25rem;
  color: rgba(246, 236, 228, 0.78);
  font-weight: 300;
  max-width: 20rem;
}
.frost .pill { align-self: flex-start; }

/* ========== 2. PROFILE ========== */
.profile {
  position: relative;
  z-index: 3;
  background:
    linear-gradient(180deg, #f0ddd6 0%, #e4c7bf 100%);
  color: var(--ink);
  padding: clamp(1.6rem, 4vw, 2.4rem) var(--gutter);
}
.profile-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.who {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  min-width: 0;
}
.who-copy {
  min-width: 0;
  flex: 1;
}
.avatar-wrap {
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-hot), var(--mint));
}
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ead4cc;
}
.name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
}
.name-row h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}
.verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--mint-deep);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.verified svg { color: var(--mint); flex: 0 0 auto; }
.handle {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(26, 16, 18, 0.55);
}
.bio {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: rgba(26, 16, 18, 0.82);
  overflow-wrap: anywhere;
}

.stats {
  display: flex;
  margin: 0;
  gap: 0;
}
.stats > div {
  padding: 0 1.35rem;
  border-left: 1px solid rgba(26, 16, 18, 0.14);
}
.stats dt {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 16, 18, 0.5);
}
.stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-style: italic;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.actions .ghost.is-wait {
  max-width: 14rem;
  color: rgba(26, 16, 18, 0.55);
  border-style: dashed;
}

/* ========== 3. VAULT ========== */
.vault {
  padding: clamp(4.5rem, 10vw, 7.5rem) var(--gutter);
  background:
    radial-gradient(ellipse at 50% 0%, #1c1216, var(--velvet) 60%);
}
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.7rem, 1.4vw, 1.15rem);
}
.tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1a1012;
  border-radius: 2px;
  isolation: isolate;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) saturate(0.9) brightness(0.78);
  transform: scale(1.08);
  transition: filter 0.55s var(--ease), transform 0.7s var(--ease), brightness 0.55s;
}
.tile-lock {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 46%, rgba(14, 9, 11, 0.08), rgba(14, 9, 11, 0.28));
}
.tile-lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(240, 212, 138, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(14, 9, 11, 0.18);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0d48a' stroke-width='1.4'><rect x='5' y='11' width='14' height='10' rx='2'/><path d='M8 11V8a4 4 0 018 0v3'/></svg>")
    center / 18px no-repeat;
}
.tile-copy {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.95rem;
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--cream);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.tile:hover img,
.tile:focus-visible img,
.tile.is-open img {
  filter: blur(0) saturate(1) brightness(0.92);
  transform: scale(1.02);
}
.tile:hover .tile-lock,
.tile:focus-visible .tile-lock,
.tile.is-open .tile-lock { opacity: 0.15; }
.tile:hover .tile-copy,
.tile:focus-visible .tile-copy,
.tile.is-open .tile-copy {
  opacity: 1;
  transform: none;
}

/* ========== 4. CURVE ROOM ========== */
.curve {
  position: relative;
  padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  min-height: 100svh;
  overflow: hidden;
  background: #120c10;
}
.curve-bg {
  position: absolute;
  inset: 0;
}
.curve-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.38) saturate(0.85);
}
.curve-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 9, 11, 0.35), rgba(14, 9, 11, 0.55) 70%, #0e090b);
}
.curve-stage {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  padding: 0 var(--gutter) 1rem;
  -webkit-overflow-scrolling: touch;
}
.tease {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
}
.body-fill { fill: url(#bodyFill); }
.body-line {
  stroke: url(#curveGold);
  stroke-width: 2.4;
  stroke-linecap: round;
  fill: none;
}
.tease-label {
  fill: var(--gold-hot);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.18em;
}
.grad-door text {
  fill: var(--gold-hot);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.waiting {
  position: absolute;
  right: clamp(1.2rem, 6vw, 5.5rem);
  bottom: 0.4rem;
  margin: 0;
  width: min(120px, 16vw);
  opacity: 0.8;
  pointer-events: none;
}
.waiting img {
  width: 100%;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
}
.waiting figcaption {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(246, 236, 228, 0.55);
  text-align: center;
}

/* ========== 5. HOUSE RULES / VANITY ========== */
.rules {
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter);
  background:
    radial-gradient(ellipse at 50% 30%, #3a2228, #140e10 72%);
}
.vanity {
  width: min(560px, 100%);
  margin: 1.6rem auto 0;
  padding: 0.7rem;
  background: linear-gradient(180deg, #2a1c18, #161012);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px #8a6a3a,
    0 0 0 8px #1a1210,
    0 40px 90px rgba(0, 0, 0, 0.5);
}
.bulb-row,
.bulb-col {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
.bulb-col { flex-direction: column; padding: 0.3rem; }
.bulb-row span,
.bulb-col span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff4d2, #e8c77b 42%, #a67c32 78%);
  box-shadow: 0 0 14px rgba(232, 199, 123, 0.65);
  animation: glow 3.6s ease-in-out infinite;
}
.bulb-row span:nth-child(odd),
.bulb-col span:nth-child(even) { animation-delay: -1.4s; }

@keyframes glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

.vanity-mid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
}
.glass {
  position: relative;
  min-height: 28rem;
  padding: 2.4rem 1.6rem 2rem;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(210, 190, 184, 0.22), rgba(40, 24, 28, 0.38));
  border: 1px solid rgba(246, 236, 228, 0.12);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 12%, rgba(255, 255, 255, 0.18), transparent 46%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='f'><feTurbulence baseFrequency='0.9' numOctaves='3'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  opacity: 0.55;
  pointer-events: none;
}
.mirror-title {
  position: relative;
  margin: 0 0 1.8rem;
  text-align: center;
  font-size: 2.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.mirror-title::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 1px;
  margin: 0.7rem auto 0;
  background: var(--blush);
}
.glass ul {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.glass li {
  display: grid;
  grid-template-columns: 5.6rem 1fr;
  gap: 0.8rem;
  align-items: baseline;
  border-bottom: 1px solid rgba(246, 236, 228, 0.08);
  padding-bottom: 0.7rem;
}
.glass li span {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 236, 228, 0.5);
}
.glass li b,
.glass li a,
.glass li button {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--cream);
  text-align: left;
}
.glass li a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(212, 176, 106, 0.5);
}
.glass li button.is-wait {
  opacity: 1;
  cursor: not-allowed;
  color: var(--gold-hot);
}

/* ========== 6. DOOR ========== */
.door {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background: #2a181c;
}
.door-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(14, 9, 11, 0.55) 70%, rgba(14, 9, 11, 0.82));
}
.door-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 0 1.4rem 4.5rem;
  text-align: center;
}
.last-line {
  margin: 0;
  font-size: clamp(1.8rem, 1.1rem + 3vw, 3.4rem);
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
}
.plate {
  margin-top: 0.8rem;
  min-width: 16rem;
  padding: 0.85rem 1.4rem 0.95rem;
  border-radius: 2px;
  background:
    linear-gradient(180deg, #2a2220, #161210);
  box-shadow:
    inset 0 1px 0 rgba(232, 199, 123, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 0 1px #3a3028;
  display: grid;
  gap: 0.2rem;
  letter-spacing: 0.34em;
}
.plate span {
  font-size: 0.58rem;
  color: rgba(232, 199, 123, 0.7);
}
.plate strong {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--gold-hot);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  .frost {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(28, 16, 18, 0.12), rgba(28, 16, 18, 0.82));
    border: 0;
    border-top: 1px solid rgba(246, 236, 228, 0.16);
    box-shadow: none;
  }
  .frost-inner {
    padding: 1.25rem 1.2rem 1.55rem;
  }
  .frost h1 { font-size: clamp(2.1rem, 8vw, 3.2rem); }
  .lock-photo { object-position: 50% 42%; }
  .lock-stamp { left: 1.1rem; }

  .profile-inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .who { width: 100%; }
  .stats { width: 100%; }
  .stats > div:first-child { padding-left: 0; border-left: 0; }
  .actions { width: 100%; justify-content: flex-start; }

  .grid { grid-template-columns: 1fr 1fr; }
  .tease { min-width: 0; }
  .curve-stage { overflow-x: visible; }
  .waiting {
    position: static;
    width: 96px;
    margin: 0.2rem auto 0;
    opacity: 0.75;
  }
  .door-copy { padding-bottom: 2.4rem; }
}

@media (max-width: 560px) {
  .avatar-wrap { width: 72px; height: 72px; }
  .stats { width: 100%; }
  .stats > div { padding: 0 0.8rem; }
  .glass { min-height: 0; padding: 1.6rem 1rem 1.4rem; }
  .glass li { grid-template-columns: 4.6rem 1fr; }
  .mark { width: 36px; height: 36px; }
}

html.is-stack .lock,
html.is-stack .door,
html.is-stack .curve {
  height: 900px;
  min-height: 900px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lock-photo,
  .tile img,
  .mark,
  .tile-copy { transition: none; }
  .bulb-row span,
  .bulb-col span { animation: none; }
  .pill:hover { transform: none; }
}
