@font-face { font-family: Alterwave; src: url("/fonts/AlterwaveZP-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Alterwave; src: url("/fonts/AlterwaveZP-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --obsidian: #0B1014;
  --gypsum: #F4F1E8;
  --graphite: #3B4248;
  --ash: #8E959B;
  --copper: #E25A3C;
  --copper-press: #C9472B;
  --lift: #121A1F;
  --line: rgba(244, 241, 232, .12);
  --line-strong: rgba(244, 241, 232, .24);
  --soft: rgba(244, 241, 232, .72);
  --gutter: clamp(20px, 4.5vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--gypsum);
  font: 300 1rem/1.6 Poppins, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ash); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--gypsum); color: var(--obsidian); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gypsum); outline-offset: 3px; border-radius: 6px; }

.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 var(--gutter); }
.masthead { padding: 28px 0 0; }
.logo img { width: 132px; height: auto; }
.stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 112px);
  padding: clamp(40px, 8vh, 96px) 0 64px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  outline: none;
}
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: .8125rem; color: var(--ash);
  max-width: 1280px; width: 100%; margin: 0 auto;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--gypsum); }

/* Intro column */
.display {
  font: 800 clamp(2.4rem, 1.4rem + 3.4vw, 4.4rem)/.98 Alterwave, Poppins, sans-serif;
  letter-spacing: -.01em;
  margin: 0 0 24px;
  max-width: 11ch;
}
.lede { color: var(--soft); max-width: 40ch; margin: 0 0 40px; font-size: 1.0625rem; }

.types { display: grid; border-top: 1px solid var(--line); }
.type {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px;
  text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 22px 0 22px 20px; cursor: pointer; position: relative;
  transition: background-color .2s var(--ease);
}
.type::before {
  content: ""; position: absolute; left: 0; top: 24px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot, var(--copper)); opacity: .9;
}
.type:hover { background: rgba(244, 241, 232, .03); }
.type-name { font-weight: 500; font-size: 1.125rem; }
.type-len { color: var(--ash); font-variant-numeric: tabular-nums; font-size: .9375rem; }
.type-desc { grid-column: 1 / -1; color: var(--ash); font-size: .9375rem; max-width: 46ch; }
.type[aria-checked="true"] { background: var(--lift); }
.type[aria-checked="true"] .type-name { color: var(--gypsum); }
.type[aria-checked="true"]::after {
  content: ""; position: absolute; inset: -1px auto -1px -1px; width: 2px; background: var(--copper);
}

.chosen { margin-top: 32px; padding: 20px 0 0; display: grid; gap: 6px; color: var(--soft); }
.chosen strong { color: var(--gypsum); font-weight: 500; }

/* Right panel */
.panel { min-height: 520px; }
.placeholder {
  height: 100%; min-height: 420px; display: grid; place-items: center; text-align: center;
  border: 1px dashed var(--line); border-radius: 20px; color: var(--ash); padding: 24px;
}

.pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.month { font: 700 1.5rem/1.1 Alterwave, Poppins, sans-serif; margin: 0; letter-spacing: .01em; }
.month-nav { display: flex; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: none; border: 1px solid var(--line-strong); cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover:not(:disabled) { border-color: var(--gypsum); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.pick-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: .75rem; color: var(--ash); text-align: center; padding: 0 0 8px; font-weight: 400; }
.day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  font-variant-numeric: tabular-nums; font-size: .9375rem; border: 0; background: none; padding: 0;
  color: var(--graphite); position: relative; min-width: 36px;
}
.day.open { color: var(--gypsum); background: rgba(244, 241, 232, .06); cursor: pointer; font-weight: 400; }
.day.open:hover { background: rgba(244, 241, 232, .14); }
.day.today::after { content: ""; position: absolute; bottom: 18%; width: 4px; height: 4px; border-radius: 50%; background: var(--ash); }
.day[aria-selected="true"] { background: var(--gypsum); color: var(--obsidian); font-weight: 500; }
.day[aria-selected="true"]::after { background: var(--obsidian); }
.cal.loading .day.open { opacity: .4; }

.day-head { margin-bottom: 16px; min-height: 92px; }
.day-num {
  font: 800 clamp(3.4rem, 2.4rem + 3vw, 5.2rem)/.9 Alterwave, Poppins, sans-serif;
  display: block; font-variant-numeric: tabular-nums;
}
.day-word { color: var(--soft); font-size: 1rem; display: block; margin-top: 8px; }
.slot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow: auto; padding-right: 4px; scrollbar-width: thin; }
.slot {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 13px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: none; cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 400; transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.slot:hover { border-color: var(--gypsum); }
.slot .go { opacity: 0; font-size: .875rem; color: var(--obsidian); transition: opacity .15s var(--ease); }
.slot[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); color: #fff; }
.slot[aria-pressed="true"] .go { opacity: 1; color: #fff; }
.empty-note { color: var(--ash); font-size: .9375rem; }

.tz-row { display: flex; align-items: center; gap: 10px; margin-top: 28px; font-size: .9375rem; flex-wrap: wrap; }
.tz { position: relative; }
.tz-btn {
  background: none; border: 0; border-bottom: 1px solid var(--line-strong); padding: 4px 2px; cursor: pointer;
}
.tz-btn::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translate(-2px, -2px); margin-left: 10px; }
.tz-pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 5; width: min(340px, 86vw);
  background: #161E24; border: 1px solid var(--line-strong); border-radius: 14px; padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.tz-search { width: 100%; background: var(--obsidian); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
#tzList { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow: auto; }
#tzList li { padding: 9px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: .875rem; }
#tzList li span { color: var(--ash); font-variant-numeric: tabular-nums; }
#tzList li[aria-selected="true"], #tzList li.active { background: rgba(244, 241, 232, .08); }

/* Details form */
.details { max-width: 560px; }
.back {
  background: none; border: 0; padding: 0 0 0 18px; color: var(--ash); cursor: pointer; position: relative; margin-bottom: 20px;
}
.back::before { content: ""; position: absolute; left: 2px; top: 50%; width: 7px; height: 7px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-50%) rotate(45deg); }
.back:hover { color: var(--gypsum); }
.step-title { font: 700 1.75rem/1.1 Alterwave, Poppins, sans-serif; margin: 0 0 28px; }
.field { margin: 0 0 22px; border: 0; padding: 0; }
.field > label, .field > legend { display: block; font-size: .9375rem; margin-bottom: 8px; color: var(--soft); padding: 0; }
.field .opt { color: var(--ash); font-size: .8125rem; margin-left: 6px; }
.input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 10px 0; font-size: 1.0625rem; font-weight: 400; border-radius: 0;
}
.input:focus { outline: none; border-bottom-color: var(--gypsum); }
.input::placeholder { color: var(--graphite); }
textarea.input { resize: vertical; min-height: 96px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; }
textarea.input:focus { border-color: var(--gypsum); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .9375rem; font-weight: 400;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.chip input:hover + span { border-color: var(--gypsum); }
.chip input:checked + span { background: var(--gypsum); color: var(--obsidian); border-color: var(--gypsum); }
.chip input:focus-visible + span { outline: 2px solid var(--gypsum); outline-offset: 2px; }
.field.invalid .input { border-color: var(--copper); }
.field .err { color: #F08A72; font-size: .8125rem; margin-top: 6px; }
.ts { margin: 8px 0 18px; min-height: 65px; }
.form-error { color: #F08A72; margin: 0 0 16px; }

.cta {
  background: var(--copper); color: #fff; border: 0; border-radius: 999px; padding: 15px 30px;
  font-weight: 500; font-size: 1rem; cursor: pointer; transition: background-color .15s var(--ease);
}
.cta:hover { background: var(--copper-press); }
.cta:disabled { opacity: .6; cursor: progress; }
.ghost {
  background: none; border: 1px solid var(--line-strong); color: var(--gypsum); border-radius: 999px; padding: 14px 26px; cursor: pointer; font-weight: 400;
}
.ghost:hover { border-color: var(--gypsum); }
.link-btn { background: none; border: 0; color: var(--ash); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--gypsum); }

/* Done / manage */
.done h2 { font: 800 clamp(2.2rem, 1.6rem + 2vw, 3.4rem)/1 Alterwave, Poppins, sans-serif; margin: 0 0 20px; }
.done p { color: var(--soft); max-width: 48ch; }
.summary { margin: 32px 0; border-top: 1px solid var(--line); }
.summary div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--ash); }
.summary dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cancel-box { margin-top: 24px; max-width: 480px; }

@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .display { max-width: 14ch; }
  .lede { margin-bottom: 28px; }
  .panel { min-height: 0; }
  .placeholder { min-height: 160px; }
}
@media (max-width: 640px) {
  .pick-body { grid-template-columns: 1fr; }
  .day-head { min-height: 0; display: flex; align-items: baseline; gap: 12px; }
  .day-num { font-size: 2.6rem; }
  .day-word { margin: 0; }
  .slot-list { max-height: none; grid-template-columns: 1fr 1fr; }
  .slot { justify-content: center; }
  .slot .go { display: none; }
  .summary div { grid-template-columns: 1fr; gap: 2px; }
}

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

/* ---------- Motion ----------
   One page-load sequence, then motion only in answer to the visitor:
   steps slide in, months slide the way you navigate, times arrive in order,
   the date rolls, the confirmation draws its check. All off under reduced motion. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes from-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes from-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes roll { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }

.display, .lede, .types, .panel { opacity: 0; }
body.ready .display { animation: rise .7s var(--ease) both; }
body.ready .lede { animation: rise .7s .08s var(--ease) both; }
body.ready .types { animation: rise .7s .16s var(--ease) both; }
body.ready .panel { animation: fade .8s .24s var(--ease) both; }
@media (scripting: none) { .display, .lede, .types, .panel { opacity: 1; } }

.enter { animation: rise .42s var(--ease) both; }
.cal.from-right { animation: from-right .38s var(--ease) both; }
.cal.from-left { animation: from-left .38s var(--ease) both; }
.fade-in { animation: fade .4s var(--ease) both; }
.day-num.roll { animation: roll .45s var(--ease) both; }
.stagger { animation: rise .36s calc(var(--i, 0) * 28ms) var(--ease) both; }
.rise { animation: rise .6s .25s var(--ease) both; }
.done > p, .done > .summary, .done > .actions { animation: rise .6s .35s var(--ease) both; }

.type::after { transform-origin: top; transition: transform .3s var(--ease); }
.type[aria-checked="true"]::after { animation: grow .35s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.slot { transition: border-color .15s var(--ease), background-color .2s var(--ease), transform .15s var(--ease); }
.slot:active { transform: scale(.98); }
.day.open { transition: background-color .15s var(--ease), transform .15s var(--ease); }
.day.open:active { transform: scale(.92); }
.cta:active { transform: scale(.98); }

.check { width: 56px; height: 56px; margin-bottom: 20px; animation: pop .5s var(--ease) both; }
.check circle { fill: none; stroke: var(--copper); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s .1s var(--ease) forwards; }
.check path { fill: none; stroke: var(--gypsum); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .35s .55s var(--ease) forwards; }

@media (prefers-reduced-motion: reduce) {
  .display, .lede, .types, .panel { opacity: 1; }
  .check circle, .check path { stroke-dashoffset: 0; }
}
