/* Hallmark · genre: atmospheric · macrostructure: Photographic · tone: luxury · anchor hue: 75 (gold)
 * theme: custom (vibe: "warm black stage, cover gold, quiet") · paper oklch(13% 0.010 60) · accent oklch(80% 0.105 80) gold
 * fonts: Cormorant Garamond 500 + Instrument Sans 400 · axes: dark / classical-serif / warm
 * enrichment: none (real photograph) · nav: none (single fold) · footer: Ft2 inline single line
 * Hallmark · pre-emit critique: P5 H4 E4 S5 R5 V4
 */
@import url("tokens.css");

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

html, body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Stage: one photograph, full bleed ---------- */
.stage {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

/* Phones: photo fills the top 80% so the face stays clear of the list below */
.stage__photo {
  position: absolute;
  inset: 0 0 auto;
  height: 80%;
  z-index: -2;
  margin: 0;
  -webkit-mask-image: linear-gradient(to bottom, var(--color-paper) 62%, transparent);
  mask-image: linear-gradient(to bottom, var(--color-paper) 62%, transparent);
}
.stage__photo picture { display: contents; }

.stage__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 40%;
  display: block;
  opacity: 0;
  transform: scale(1.04);
  animation: lights-up var(--dur-reveal) var(--ease-out) 200ms forwards;
}

/* Legibility veils: top for the wordmark, bottom for the list */
.stage::before,
.stage::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  z-index: -1;
  pointer-events: none;
}
.stage::before {
  top: 0;
  height: 30%;
  background: linear-gradient(to bottom, var(--color-veil), var(--color-veil-0));
}
.stage::after {
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top, var(--color-veil), var(--color-veil-0));
}

@keyframes lights-up {
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Wordmark ---------- */
.mark {
  padding: max(var(--space-xl), env(safe-area-inset-top)) var(--space-lg) 0;
  text-align: center;
  opacity: 0;
  animation: fade var(--dur-long) var(--ease-out) 1400ms forwards;
}

.mark__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-size: var(--text-mark);
  letter-spacing: 0.42em;
  /* optical centring: tracking adds trailing space after the last letter */
  margin-inline-end: -0.42em;
  color: var(--color-accent);
  line-height: 1.05;
}

.mark__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  color: var(--color-accent);
}
.mark__rule::before,
.mark__rule::after {
  content: "";
  width: clamp(3rem, 12vw, 9rem);
  height: var(--rule-hair);
  background: var(--color-rule);
}
.mark__rule svg { width: 0.6rem; height: 0.6rem; flex: none; }

/* ---------- Bottom: line + private list + footer ---------- */
.foot {
  grid-row: 3;
  padding: 0 var(--space-lg) max(var(--space-lg), env(safe-area-inset-bottom));
  display: grid;
  gap: var(--space-xl);
  opacity: 0;
  animation: fade var(--dur-long) var(--ease-out) 1900ms forwards;
}

.list { max-width: 26rem; }

.list__line {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-size: var(--text-lg);
  line-height: 1.2;
  color: var(--color-ink);
  overflow-wrap: anywhere;
  min-width: 0;
}

.list__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: var(--rule-hair) solid var(--color-muted);
  transition: border-color var(--dur-short) var(--ease-out);
}
.list__form:focus-within { border-color: var(--color-accent); }
.list__form[data-state="error"] { border-color: var(--color-error); }

.list__input {
  min-width: 0;
  padding: var(--space-sm) 0;
  border: 0;
  border-radius: var(--radius-none);
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: var(--text-base);
}
.list__input::placeholder { color: var(--color-muted); opacity: 1; }
.list__input:focus { outline: none; }
.list__input:focus-visible { outline: none; }

.list__button {
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  border: 0;
  background: transparent;
  color: var(--color-accent);
  font: inherit;
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.list__button:hover { color: var(--color-accent-2); }
.list__button:active { transform: translateY(1px); }
.list__button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.list__button:disabled { color: var(--color-muted); cursor: default; }
.list__form[data-state="loading"] .list__button { color: var(--color-muted); }

.list__note {
  min-height: 1.4em;
  margin: var(--space-xs) 0 0;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  color: var(--color-muted);
}
.list__note[data-tone="error"] { color: var(--color-error); }
.list__note[data-tone="done"]  { color: var(--color-accent); }

.list__trap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-xs) var(--space-lg);
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.colophon p { margin: 0; white-space: nowrap; }
.colophon__date { color: var(--color-ink); }

.colophon a {
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-micro) var(--ease-out);
}
.colophon a:hover { color: var(--color-accent); }
.colophon a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes fade { to { opacity: 1; } }

/* ---------- Larger screens: list bottom-left, colophon spans ---------- */
@media (min-width: 48rem) {
  .stage__photo { inset: 0; height: auto; -webkit-mask-image: none; mask-image: none; }
}

@media (min-width: 60rem) {
  .stage__photo img { object-position: 50% 35%; }
  .foot { padding-inline: var(--space-2xl); padding-bottom: var(--space-xl); }
  .stage::after { height: 45%; }
}

@media (prefers-reduced-motion: reduce) {
  .stage__photo img { transform: none; animation: fade 150ms linear forwards; }
  .mark, .foot { animation: fade 150ms linear forwards; }
  *, *::before, *::after { transition-duration: 150ms !important; }
}
