/*
 * Jovvy's page on haulx.net.
 *
 * Tokens come from the app (lib/config/tokens.dart, palettes.dart, theme.dart):
 * warm paper, ink, a soft serif (Fraunces, SOFT 60, opsz 96, weight 500) for
 * display and Inter for text, radii 8 / 14 / 22, 48px touch targets. Only the
 * accent, tint and deep colors change with the palette, exactly as in the app;
 * terracotta is Jovvy's own.
 */

:root {
  --paper: #fbf8f3;
  --surface: #ffffff;
  --ink: #1f1b16;
  --ink-muted: #645d54;
  --line: #e8e2d8;
  --accent: #a8502f;
  --tint: #f6e9e2;
  --deep: #5e2b18;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.display {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 60, "opsz" 96;
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.overline {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.muted { color: var(--ink-muted); }

/* ---------------------------------------------------------------- header */

.jv-top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.jv-mark {
  font-size: 32px;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.jv-nav { display: flex; gap: 4px; }

.jv-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-muted);
}

.jv-nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ hero */

.jv-hero { padding: 48px 0 32px; }

.jv-hero .hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.jv-hero h1 {
  margin-top: 16px;
  font-size: clamp(40px, 6.2vw, 68px);
}

.jv-hero .lede {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 18px;
  color: var(--ink-muted);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
}

.chip.on { background: var(--tint); border-color: transparent; transition: background 0.2s; }

.chip .live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: background 0.2s;
}

/* The event card: what a guest sees on the day. */

.event {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 400px;
  margin-left: auto;
}

.cover {
  padding: 28px 24px 24px;
  color: #ffffff;
  background: linear-gradient(160deg, var(--accent), var(--deep));
  transition: background 0.2s;
}

.cover .overline { color: rgba(255, 255, 255, 0.82); }
.cover .names { margin-top: 10px; font-size: 34px; }
.cover .venue { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }

.event-body { padding: 20px 24px 24px; }

.now {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--tint);
  transition: background 0.2s;
}

.now .title { margin-top: 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }
.now .where { font-size: 14px; color: var(--ink-muted); }

.timeline { list-style: none; margin: 18px 0 0; padding: 0; }

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 0 0 16px 22px;
  font-size: 14px;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}

.timeline li.done::before { background: var(--accent); }

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  bottom: -3px;
  width: 2px;
  background: var(--line);
}

.timeline time { color: var(--ink-muted); font-weight: 500; font-size: 13px; padding-top: 1px; }
.timeline b { font-weight: 600; }

/* -------------------------------------------------------------- sections */

.jv-section { padding: 72px 0 0; }

.jv-section h2 {
  margin-top: 10px;
  font-size: clamp(30px, 4.2vw, 40px);
  max-width: 20ch;
}

.jv-section .intro {
  margin-top: 14px;
  max-width: 58ch;
  color: var(--ink-muted);
}

.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0 0;
}

.point { display: flex; align-items: center; gap: 16px; }

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--deep);
  transition: background 0.2s, color 0.2s;
}

.icon svg { width: 22px; height: 22px; }

.point b,
.card h3,
.moment h3 { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }

.point span { font-size: 14px; color: var(--ink-muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}

.card .icon { margin-bottom: 16px; }
.card p { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--ink-muted); }

.moments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.moment { padding: 24px 24px 0 0; }
.moment + .moment { padding-left: 24px; border-left: 1px solid var(--line); }
.moment .display { margin: 8px 0 10px; font-size: 24px; line-height: 1.15; }
.moment p { font-size: 14px; line-height: 1.4; color: var(--ink-muted); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.checks li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.checks b { display: block; font-weight: 600; }
.checks span { font-size: 14px; color: var(--ink-muted); }

/* Palette picker */

.palettes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.palette {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.palette:hover { border-color: var(--ink-muted); }
.palette[aria-pressed="true"] { border-color: var(--accent); border-width: 2px; padding: 7.5px 13.5px 7.5px 7.5px; }

.swatch {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sw) 50%, var(--sw-deep) 50%);
  box-shadow: 0 0 0 4px var(--sw-tint);
  margin: 4px;
}

/* Finale */

.finale {
  margin-top: 72px;
  padding: 48px;
  border-radius: var(--r-lg);
  background: var(--tint);
  text-align: center;
  transition: background 0.2s;
}

.finale h2 { margin: 0 auto; }
.finale p { margin: 12px auto 0; max-width: 52ch; color: var(--ink-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  margin-top: 24px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn-filled { background: var(--accent); color: #ffffff; transition: background 0.2s; }
.btn-filled:hover { background: var(--deep); }
.btn-outlined { background: transparent; color: var(--ink); border: 1.5px solid var(--line); background: var(--surface); margin-left: 8px; }
.btn-outlined:hover { border-color: var(--ink-muted); }

/* ---------------------------------------------------------------- footer */

.jv-foot {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 24px 0 44px;
  font-size: 14px;
  color: var(--ink-muted);
}

.jv-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}

.jv-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.jv-foot a { text-decoration: none; }
.jv-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 860px) {
  .jv-hero .hero-grid,
  .split { grid-template-columns: 1fr; gap: 36px; }
  .event { margin: 0; max-width: none; }
  .points { grid-template-columns: 1fr; gap: 16px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .moments { grid-template-columns: 1fr; }
  .moment,
  .moment + .moment { padding: 20px 0; border-left: 0; }
  .moment + .moment { border-top: 1px solid var(--line); }
  .palettes { grid-template-columns: 1fr 1fr; }
  .jv-section { padding-top: 56px; }
  .finale { padding: 36px 24px; margin-top: 56px; }
}

@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .btn-outlined { margin-left: 0; }
  .jv-nav a.wide { display: none; }
}

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