/* Olive grove and raw linen. Olive marks anything she picks; the one thing she
   does not get to know is inverted into a solid olive block instead of taking
   a colour of its own. */

:root {
  --linen:      #E9E0CD;
  --paper:      #F4EEE0;
  --line:       #D2C8AE;
  --ink:        #23291A;
  --sage:       #5F604A;
  --olive:      #57622F;
  --olive-deep: #39421F;
  --khaki:      #C6BE8C;

  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --text:    "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --gutter: 1.5rem;
  --rail:   1.375rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 300;
  letter-spacing: 0.01em;
}

main {
  max-width: 27rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
}

/* --- type ---------------------------------------------------------------- */

h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3rem, 18vw, 4.75rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  color: var(--olive-deep);
  margin: 0 0 0.85rem;
}

h2 {
  font-family: var(--text);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1rem; max-width: 34ch; }

.lede   { color: var(--sage); font-size: 1.0625rem; }
.quiet  { color: var(--sage); font-size: 0.875rem; }
.date   { font-family: var(--display); font-style: italic; color: var(--sage);
          font-size: 1.0625rem; margin: 0 0 1.75rem; }

/* --- login --------------------------------------------------------------- */

.gate { display: flex; flex-direction: column; justify-content: center;
        min-height: calc(100svh - 6rem); }

.gate h1 { margin-bottom: 1.25rem; }

.field { position: relative; margin: 1.75rem 0 1rem; }

input[type="password"] {
  width: 100%;
  padding: 0.95rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.3em;
}

input[type="password"]:focus {
  outline: none;
  border-bottom-color: var(--olive);
}

input[type="password"]::placeholder {
  color: var(--line);
  letter-spacing: 0.2em;
  font-size: 1.125rem;
}

.error {
  color: #8C3A1E;
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}

/* --- buttons ------------------------------------------------------------- */

button { font-family: var(--text); cursor: pointer; }

.go {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--olive);
  color: var(--linen);
  border: 0;
  border-radius: 2px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.go:disabled { background: var(--line); color: var(--sage); cursor: not-allowed; }

.back {
  background: none;
  border: 0;
  color: var(--sage);
  padding: 1rem 0;
  font-size: 0.9375rem;
}

.actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.75rem; }
.actions .go { flex: 1; }

/* --- wizard -------------------------------------------------------------- */

.progress { display: flex; gap: 4px; margin-bottom: 2.25rem; }
.progress span {
  flex: 1; height: 2px; background: var(--line);
  transition: background 240ms ease;
}
.progress span.done { background: var(--olive); }

.step { display: none; }
.step.active { display: block; }

.choices { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.choices li { margin: 0 0 0.625rem; }

.choice {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 1.05rem 1.125rem;
  text-align: left;
  background: var(--paper);
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0 2px 2px 0;
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease;
}

.choice[aria-pressed="true"] {
  border-left-color: var(--olive);
  background: #EAE6D2;
}

.choice .glyph {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--olive-deep);
  font-variant-numeric: lining-nums;
  min-width: 3.9rem;
}

.choice .label { font-size: 1.0625rem; }
.choice .sub   { display: block; color: var(--sage); font-size: 0.875rem; line-height: 1.4; }

/* stacked variant: the gift options read as blocks, not times */
.choice.block { flex-direction: column; align-items: stretch; gap: 0.25rem; }
.choice.block .label { font-family: var(--display); font-size: 1.375rem; color: var(--olive-deep); }

/* --- review -------------------------------------------------------------- */

.review { list-style: none; margin: 1.75rem 0; padding: 0; }
.review li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
.review .k { color: var(--sage); font-size: 0.9375rem; }
.review .v { font-family: var(--display); font-size: 1.125rem; text-align: right;
             color: var(--olive-deep); }

/* --- timeline ------------------------------------------------------------ */

.timeline { list-style: none; margin: 2.25rem 0 0; padding: 0 0 0 var(--rail);
            position: relative; }

.timeline li { position: relative; margin-bottom: 2.1rem; }

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--rail) + 1px);
  top: 0.55rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--linen);
  border: 1px solid var(--sage);
}

/* One rail segment per gap, so the line ends exactly at the final entry. */
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--rail) + 5px);
  top: 1.5rem;
  bottom: -2.1rem;
  width: 1px;
  background: var(--line);
}

.when {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  color: var(--olive-deep);
  display: block;
  margin-bottom: 0.3rem;
}

.when.soft {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--sage);
  letter-spacing: 0.02em;
}

.timeline .what { font-size: 1.0625rem; margin: 0 0 0.15rem; }
.timeline .why  { color: var(--sage); font-size: 0.9375rem; margin: 0; max-width: 30ch; }

/* The secret is the one inverted block on the page. That is its whole marker. */
.timeline li.secret {
  background: var(--olive-deep);
  color: var(--linen);
  margin-left: calc(-1 * var(--rail));
  padding: 1.05rem 1.2rem 1.15rem var(--rail);
  border-radius: 2px;
}

.timeline li.secret::before { display: none; }
.timeline li.secret::after  { display: none; }

.timeline li.secret .when { color: var(--linen); }
.timeline li.secret .what { color: var(--khaki); font-style: italic; }
.timeline li.secret .why  { color: #BDBB9C; }

/* --- part two ------------------------------------------------------------ */

.locked {
  margin-top: 1rem;
  padding: 1.4rem 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 2px;
}

.locked h2 { font-family: var(--display); font-size: 1.5rem; color: var(--olive-deep);
             margin-bottom: 0.3rem; }
.locked p  { margin: 0; }

.countdown {
  font-family: var(--display);
  color: var(--olive);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
  display: block;
}

/* --- results (host only) -------------------------------------------------- */

.raw { font-family: var(--text); }
.raw dt { color: var(--sage); font-size: 0.8125rem; margin-top: 1rem; }
.raw dd { margin: 0.15rem 0 0; font-family: var(--display); font-size: 1.375rem;
          color: var(--olive-deep); }

/* --- focus & motion ------------------------------------------------------- */

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

.reveal { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reveal:nth-of-type(2) { animation-delay: 110ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(0.6rem); }
  to   { opacity: 1; transform: none; }
}

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

/* --- photos --------------------------------------------------------------- */

.shot { margin: 0 0 1.6rem; }

/* Photos are cropped square and face-aware by convert_photos.py, so nothing
   is cropped again here. Changing this risks cutting a face. */
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
}
