:root {
  --lacquer: #3a0b16;
  --lacquer-2: #4c1322;
  --lacquer-3: #5e1a2c;
  --blush: #f3d9d3;
  --blush-dim: #c9a5a2;
  --silk: #fbf0ec;
  --ink: #2b0911;
  --ink-soft: #6d4149;
  --rouge: #e0325a;
  --brass: #c9a27a;
  --atwater: #c9a27a;
  --mackay: #e7a3b0;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--lacquer);
  color: var(--blush);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; letter-spacing: -0.02em; font-style: italic; }
h3 { font-size: 1.35rem; font-weight: 500; }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--blush); color: var(--ink); padding: 8px 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 0 24px;
  background: var(--blush); color: var(--ink);
  border: 1px solid var(--blush); border-radius: 999px;
  font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--blush); border-color: rgba(243, 217, 211, .4); }
.btn-ghost:hover { background: rgba(243, 217, 211, .1); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .875rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--gutter);
  background: rgba(58, 11, 22, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(243, 217, 211, .1);
}
.mark { font: italic 500 1.6rem/1 var(--serif); letter-spacing: -0.02em; text-decoration: none; margin: 0; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: .92rem; }
.nav a { text-decoration: none; color: var(--blush-dim); transition: color .2s; }
.nav a:hover { color: var(--blush); }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 8vw, 110px) var(--gutter) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: end;
}
.hero-mark {
  font-size: clamp(5rem, 15vw, 14.5rem); line-height: .82; letter-spacing: -0.045em;
  font-weight: 400; font-style: italic;
  display: flex; flex-direction: column;
}
.hero-mark span:last-child { padding-left: .55em; color: transparent; -webkit-text-stroke: 1px var(--blush); }
.hero-mark span { opacity: 0; transform: translateY(.18em); animation: rise 1.1s cubic-bezier(.2, .7, .1, 1) forwards; }
.hero-mark span:last-child { animation-delay: .14s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-lede { font: 400 1.25rem/1.55 var(--serif); margin: 0 0 28px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.live {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-top: 1px solid rgba(243, 217, 211, .16); border-bottom: 1px solid rgba(243, 217, 211, .16);
  font-size: .95rem; min-height: 72px;
}
.live-faces { display: flex; }
.live-faces img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--lacquer); margin-left: -10px; }
.live-faces img:first-child { margin-left: 0; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--rouge); flex: none; box-shadow: 0 0 0 0 rgba(224, 50, 90, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(224, 50, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 50, 90, 0); } }

/* Schedule */
.schedule { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 96px; }
.schedule-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; margin-bottom: 28px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; }
.seg { display: inline-flex; padding: 4px; background: var(--lacquer-2); border-radius: 999px; gap: 2px; }
.seg button {
  font: 500 .9rem/1 var(--sans); color: var(--blush-dim); background: none; border: 0;
  min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.seg button small { display: block; font-size: .72rem; color: inherit; opacity: .75; margin-top: 3px; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--blush); color: var(--ink); }
.seg-quiet button[aria-pressed="true"] { background: var(--lacquer-3); color: var(--blush); }

.timeline { --start: 10; --span: 14; position: relative; }
.tl-axis, .tl-row { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; }
.tl-axis { height: 28px; font-size: .78rem; color: var(--blush-dim); }
.tl-ticks { position: relative; height: 100%; }
.tl-ticks span { position: absolute; left: calc((var(--h) - var(--start)) / var(--span) * 100%); transform: translateX(-50%); white-space: nowrap; }
.tl-ticks span:first-child { transform: none; }
.tl-ticks span:last-child { transform: translateX(-100%); }

.tl-rows { position: relative; list-style: none; margin: 0; padding: 0; }
.tl-row {
  width: 100%; padding: 12px 0; border-top: 1px solid rgba(243, 217, 211, .1);
  background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.tl-row:last-child { border-bottom: 1px solid rgba(243, 217, 211, .1); }
.tl-row:hover .tl-who img { transform: scale(1.04); }
.tl-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tl-who img { width: 56px; height: 72px; object-fit: cover; object-position: top; border-radius: 6px; transition: transform .3s; flex: none; }
.tl-name { font: italic 500 1.6rem/1 var(--serif); display: flex; align-items: center; gap: 8px; }
.tl-meta { font-size: .82rem; color: var(--blush-dim); margin-top: 6px; }
.tl-track { position: relative; height: 44px; border-radius: 999px; background: repeating-linear-gradient(90deg, rgba(243, 217, 211, .07) 0 1px, transparent 1px calc(100% / 7)); }
.tl-bar {
  position: absolute; top: 0; bottom: 0;
  left: calc((var(--from) - var(--start)) / var(--span) * 100%);
  width: calc((var(--to) - var(--from)) / var(--span) * 100%);
  border-radius: 999px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 16px; font-size: .82rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden;
}
.tl-bar[data-studio="atwater"] { background: var(--atwater); }
.tl-bar[data-studio="mackay"] { background: var(--mackay); }
.tl-bar .where { font-weight: 500; opacity: .75; }
.tl-row.is-past { opacity: .4; }
.tl-row.is-on .tl-bar { box-shadow: 0 0 0 2px var(--lacquer), 0 0 0 3px var(--rouge); }

.tl-now { position: absolute; top: -28px; bottom: 0; width: 0; pointer-events: none;
  left: calc(260px + 24px + (100% - 284px) * (var(--now) - var(--start)) / var(--span)); }
.tl-now::before { content: ""; position: absolute; top: 24px; bottom: 0; left: -1px; width: 2px; background: var(--rouge); }
.tl-now span { position: absolute; top: 0; transform: translateX(-50%); background: var(--rouge); color: #fff; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

.empty { padding: 40px 0; font: italic 1.25rem/1.5 var(--serif); color: var(--blush-dim); }
.note { font-size: .88rem; color: var(--blush-dim); margin: 20px 0 0; }

/* Light sections */
.roster, .studios, .loyalty { background: var(--silk); color: var(--ink); }
.roster > *, .studios > *, .loyalty > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.roster { padding: 96px var(--gutter); border-radius: 36px 36px 0 0; }
.studios { padding: 24px var(--gutter) 96px; }
.loyalty { padding: 24px var(--gutter) 120px; border-radius: 0 0 36px 36px; }
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 72px; align-items: end; margin-bottom: 48px; }
.section-intro p { margin: 0; max-width: 46ch; color: var(--ink-soft); font-size: 1.05rem; }
.studios .section-intro, .loyalty .section-intro { padding-top: 72px; border-top: 1px solid rgba(43, 9, 17, .12); }

/* Roster grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px; }
.card { all: unset; display: block; width: 100%; cursor: pointer; }
.card:focus-visible { outline: 2px solid var(--rouge); outline-offset: 6px; border-radius: 14px; }
.card-photo, .card-name, .card-meta, .tl-meta { display: block; }
.card-photo { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #ead0cb; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2, .7, .1, 1); }
.card:hover .card-photo img { transform: scale(1.04); }
.card-tag { position: absolute; left: 10px; top: 10px; background: var(--silk); color: var(--ink); font-size: .74rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; display: flex; align-items: center; gap: 6px; }
.card-tag .pulse { width: 7px; height: 7px; }
.card-name { font: italic 500 1.85rem/1 var(--serif); margin: 14px 0 6px; letter-spacing: -0.01em; }
.card-meta { font-size: .86rem; color: var(--ink-soft); line-height: 1.45; }

/* Metro */
.metro { margin: 0 0 40px; background: #f4e2dd; border-radius: 20px; padding: 24px 24px 16px; }
.metro svg { width: 100%; height: auto; display: block; overflow: visible; }
.metro figcaption { font-size: .8rem; color: var(--ink-soft); }
.m-green { stroke: #00a650; stroke-width: 10; stroke-linecap: round; }
.m-orange { stroke: #f08123; stroke-width: 10; stroke-linecap: round; }
.m-stn circle { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.m-stn text { font: 500 15px var(--sans); fill: var(--ink); text-anchor: middle; }
.m-pin path { fill: var(--lacquer); }
.m-pin text { font: italic 600 19px var(--serif); fill: var(--lacquer); }
.m-walk { fill: none; stroke: var(--lacquer); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }

.studio-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.studio { padding: 28px; border-radius: 20px; background: #fff; display: grid; gap: 10px; align-content: start; }
.studio h3 { font-size: 2rem; font-style: italic; display: flex; align-items: center; gap: 12px; }
.studio h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.studio p { margin: 0; color: var(--ink-soft); }
.studio .today { color: var(--ink); font-weight: 500; }

/* Loyalty ladder */
.ladder { margin: 0 0 56px; }
.ladder-track { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.ladder-track span { height: 56px; border-radius: 6px; background: #ecd3cd; }
.ladder-track span:nth-child(-n+10) { background: var(--mackay); }
.ladder-track span:nth-child(10), .ladder-track span:nth-child(20) { background: var(--lacquer); }
.ladder-track span:nth-child(n+11):nth-child(-n+19) { background: #e9b9c1; }
.ladder-marks { position: relative; height: 64px; margin-top: 12px; font-size: .85rem; color: var(--ink-soft); }
.ladder-marks span { position: absolute; left: calc(var(--at) / 20 * 100%); transform: translateX(-100%); text-align: right; white-space: nowrap; }
.ladder-marks span:first-child { transform: none; text-align: left; }
.ladder-marks b { display: block; font: italic 500 1.4rem/1.2 var(--serif); color: var(--ink); }
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 72px; }
.rules h3 { margin-bottom: 12px; }
.rules ul, .join ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rules li, .join li { padding-left: 22px; position: relative; color: var(--ink-soft); }
.rules li::before, .join li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 1px; background: currentColor; }

/* Join */
.join { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px 72px; }
.join-copy p { max-width: 48ch; color: var(--blush-dim); }
.join-copy h2 { margin-bottom: 24px; }
.join-copy h3 { margin: 32px 0 14px; }
.join li { color: var(--blush-dim); }
.apply { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; background: var(--lacquer-2); padding: clamp(20px, 3vw, 36px); border-radius: 24px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .85rem; color: var(--blush-dim); }
.field input, .field textarea {
  font: inherit; color: var(--blush); background: var(--lacquer); border: 1px solid rgba(243, 217, 211, .18);
  border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; color-scheme: dark;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blush); }
.field [aria-invalid="true"] { border-color: var(--rouge); }
.apply .btn { grid-column: 1 / -1; justify-self: start; }
.form-error { grid-column: 1 / -1; margin: 0; color: #ff8fa6; font-size: .9rem; min-height: 0; }
.form-error:empty { display: none; }

/* Footer */
.foot { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 64px; border-top: 1px solid rgba(243, 217, 211, .12); display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; color: var(--blush-dim); font-size: .9rem; }
.foot p { margin: 0; }
.foot .mark { color: var(--blush); }
.foot p:last-child { margin-left: auto; display: flex; gap: 20px; }

.callbar { display: none; }

/* Profile dialog */
dialog { border: 0; padding: 0; color: inherit; }
dialog::backdrop { background: rgba(30, 4, 10, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.profile { width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--silk); color: var(--ink); border-radius: 24px; overflow: hidden; }
.profile[open] { animation: open .35s cubic-bezier(.2, .7, .1, 1); }
@keyframes open { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); max-height: calc(100dvh - 32px); }
.p-photo { background: #ead0cb; min-height: 100%; }
.p-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.p-info { padding: clamp(24px, 4vw, 48px); overflow-y: auto; }
.p-info h2 { font-size: clamp(3rem, 6vw, 4.5rem); }
.p-age { color: var(--ink-soft); margin: 8px 0 24px; }
.p-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; margin: 0 0 24px; font-size: .95rem; }
.p-facts dt { color: var(--ink-soft); }
.p-facts dd { margin: 0; }
.p-bio { font: 400 1.12rem/1.65 var(--serif); margin: 0 0 28px; max-width: 46ch; }
.p-shifts h3 { font-size: 1.1rem; margin-bottom: 10px; }
.p-shifts ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 6px; }
.p-shifts li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; background: #fff; border-radius: 10px; font-size: .92rem; }
.p-shifts li span:last-child { color: var(--ink-soft); }
.p-none { color: var(--ink-soft); margin: 0 0 28px; }
.profile .btn { background: var(--lacquer); color: var(--blush); border-color: var(--lacquer); }
.profile .btn:hover { background: var(--lacquer-3); }
.close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--silk); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* Age gate */
.gate { width: min(460px, calc(100vw - 32px)); background: var(--lacquer-2); color: var(--blush); border-radius: 24px; padding: 40px 32px; text-align: center; }
.gate::backdrop { background: var(--lacquer); }
.gate .mark { font-size: 2.6rem; margin-bottom: 24px; color: var(--blush); }
.gate h2 { font-size: 1.6rem; font-style: normal; margin-bottom: 8px; }
.gate p { color: var(--blush-dim); }
.gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* Responsive */
@media (max-width: 1020px) {
  .nav { display: none; }
  .top .btn-small { margin-left: auto; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tl-axis, .tl-row { grid-template-columns: 210px 1fr; }
  .tl-now { left: calc(210px + 24px + (100% - 234px) * (var(--now) - var(--start)) / var(--span)); }
}
@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  .top { padding-top: 10px; padding-bottom: 10px; }
  .top .btn-small { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-lede { font-size: 1.12rem; }
  .section-intro, .rules, .studio-list, .join { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .card-name { font-size: 1.5rem; }
  .roster { padding-top: 64px; padding-bottom: 64px; border-radius: 24px 24px 0 0; }
  .join { padding: 80px var(--gutter); }
  .apply { grid-template-columns: 1fr; }

  .controls { width: 100%; }
  .seg { width: 100%; overflow-x: auto; }
  .seg button { flex: 1; }
  .tl-axis { display: none; }
  .tl-row { grid-template-columns: 1fr; gap: 12px; padding: 16px 0; }
  .tl-track { height: 38px; background: rgba(243, 217, 211, .06); }
  .tl-bar { padding: 0 12px; font-size: .78rem; }
  .tl-bar .where { display: none; }
  .tl-now { display: none; }

  .metro { padding: 16px 8px 12px; }
  .ladder-track span { height: 40px; }
  .ladder-marks b { font-size: 1.1rem; }

  /* Block, not grid: in a height-capped grid the photo's aspect-ratio box can shrink to nothing */
  .profile-body { display: block; overflow-y: auto; }
  .p-photo { aspect-ratio: 4 / 5; min-height: 0; }
  .p-info { overflow: visible; }
  .foot p:last-child { margin-left: 0; flex-wrap: wrap; }

  .callbar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(58, 11, 22, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(243, 217, 211, .12);
  }
  .callbar a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; text-decoration: none; font-weight: 600; border: 1px solid rgba(243, 217, 211, .4); }
  .callbar a:last-child { background: var(--blush); color: var(--ink); border-color: var(--blush); }
}
