/* Tokens */
:root {
  --bg: #f5ead8;        /* page ground */
  --surface: #ebddc5;   /* cards */
  --text: #201e1d;
  --accent: #c67139;    /* terracotta */
  --accent-2: #7a8a5e;  /* sage */
  /* tints and deeps */
  --accent-100: #fff2eb; --accent-200: #ffe1d0; --accent-300: #ffc6a5;
  --accent-600: #b2622d; --accent-700: #8c491a; --accent-800: #643312;
  --sage-100: #f0fae1; --sage-200: #e1eecc; --sage-300: #ccdbb2;
  --sage-500: #8fa073; --sage-700: #56633f; --sage-800: #3d472b;
  --neutral-600: #82796a; --neutral-800: #474238;
  --mustard: #e8c23a;   /* only used inside the hot dog SVG and stripe */
  --font-heading: "Caprasimo", serif;
  --font-body: "Figtree", sans-serif;
  --radius-pill: 999px; --radius-card: 32px; --radius-frame: 56px;
  --shadow-sm: 0 1px 2px rgb(46 43 37 / .14);
  --shadow-md: 0 3px 10px rgb(46 43 37 / .16);
  --edge: clamp(20px, 5vw, 72px);   /* page gutter */
  --max: 1100px;
}

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

html {
  background: var(--bg);
  overflow-x: clip;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
}

::selection { background: var(--accent-200); color: var(--accent-800); }

p { margin: 0 0 16px; }

a {
  color: var(--accent-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  border-radius: 8px;
}
a:hover { color: var(--accent-800); }
a:active { color: var(--text); }

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

button, input, textarea, select { font: inherit; color: inherit; }

[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Hot dog typography */
h1, h2, h3, .brand, .card-title, summary, .countdown, .dog-total {
  font-family: var(--font-heading);
  font-weight: 400;
  color: transparent;
  background: repeating-linear-gradient(90deg,
    var(--accent-600) 0 .55em,
    var(--accent-300) .55em .72em,
    transparent .72em .8em);
  background-size: .8em 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1.5px var(--accent-800);
}

:where(h1, h2, h3, .brand, .card-title, summary, .countdown, .dog-total) :where(svg, .faq-plus, .no-stripe) {
  color: var(--text);
  -webkit-text-stroke: 0;
}

@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  h1, h2, h3, .brand, .card-title, summary, .countdown, .dog-total {
    color: var(--accent-700);
    background: none;
    -webkit-text-stroke: 0;
  }
}

h1 {
  margin: 0 0 28px -0.028em;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.02;
}
h2 { margin: 0 0 16px; font-size: 34px; line-height: 1.12; }
h3 { margin: 0 0 12px; font-size: 24px; line-height: 1.2; }

.h1--page { font-size: clamp(40px, 5.5vw, 64px); line-height: 1.06; }

/* Layout primitives */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--edge); }
.wrap--narrow { max-width: 720px; }
.section { padding: 56px 0 84px; }

.kicker {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-700);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-600); color: var(--bg); }
.btn:active { background: var(--accent-700); color: var(--bg); }
.btn:disabled { background: var(--neutral-600); cursor: default; }

.btn--ghost { background: transparent; border-color: var(--accent); color: var(--accent-700); }
.btn--ghost:hover { background: var(--accent-100); color: var(--accent-700); }
.btn--ghost:active { background: var(--accent-200); color: var(--accent-800); }

.btn--small { padding: 6px 14px; font-size: 13px; }

/* Forms */
.field { display: grid; gap: 6px; margin: 0 0 18px; }
.field label, .field-label { font-size: 14px; font-weight: 600; }

.input {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: 1.5px solid var(--sage-300);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}
.input::placeholder { color: var(--neutral-600); opacity: 1; }
.input:hover { border-color: var(--sage-500); }
.input:focus-visible { border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--accent-700); }
textarea.input { border-radius: 22px; resize: vertical; }

.field-error { margin: 0; font-size: 14px; font-weight: 600; color: var(--accent-800); }

/* Cards */
.card { padding: 20px; border-radius: var(--radius-card); background: var(--surface); }
.card p { margin: 0; font-size: 14px; line-height: 1.5; }
.card-kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-title { margin: 6px 0 8px; font-size: 20px; line-height: 1.2; }

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.tag--sage { background: var(--sage-100); border-color: var(--sage-300); color: var(--sage-800); }
.tag--neutral { background: var(--surface); color: var(--neutral-800); }
.tag--accent { background: var(--accent-100); color: var(--accent-800); }
.tag--outline { background: transparent; border-color: var(--accent); color: var(--accent-700); }

/* Hot dog svg */
.hotdog {
  display: inline-block;
  width: 1.6em;
  height: auto;
  aspect-ratio: 64 / 28;
  vertical-align: middle;
}
.hotdog--spin { animation: dogspin 3s linear infinite; }
.hotdog--spin-back { animation: dogspin 2s linear infinite reverse; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 56px;
  padding: 0 var(--edge);
  background: var(--bg);
}
.nav-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-dog {
  display: block;
  flex: none;
  width: 40px;
  height: auto;
  aspect-ratio: 64 / 28;
  animation: dogbob 1.2s ease-in-out infinite;
}
.brand { font-size: 18px; line-height: 1.2; white-space: nowrap; }

.nav-links ul { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 2px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--accent-700); }
.nav-links a:active { color: var(--accent-800); }

.nav-rsvp { margin-left: auto; padding: 8px 20px; font-size: 14px; }

@media (max-width: 679px) {
  .nav { flex-wrap: wrap; row-gap: 0; }
  .nav-links { order: 3; flex-basis: 100%; padding-bottom: 8px; }
}
@media (max-width: 479px) {
  .nav-links { display: none; }
}

/* Tickers */
.ticker {
  min-height: 37px;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--accent-700);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ticker-track { display: flex; width: max-content; animation: dogrun 6s linear infinite; }
.ticker--reverse .ticker-track { animation-direction: reverse; }
.ticker-group { display: flex; gap: 40px; padding-right: 40px; }

/* Top */
.top { position: relative; }
.sage-circle {
  position: absolute;
  z-index: -1;
  top: -140px;
  right: calc(-40px - (100vw - 100%) / 2);
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: var(--sage-200);
  pointer-events: none;
}
@media (max-width: 479px) {
  .sage-circle { width: 280px; height: 280px; }
}

.h1-line { display: block; }
.h1-line--small { margin-top: .35em; font-size: .5em; line-height: 1.3; }
.h1-line--small .hotdog { margin-left: .25em; }

.intro { max-width: 46ch; margin: 0 0 32px; font-size: 18px; }
.countdown { min-height: 1.3em; margin: 0 0 8px; font-size: 26px; line-height: 1.3; }
.dog-total { margin: 0; font-size: 18px; line-height: 1.3; }

/* The hot dogs */
.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Story */
.story { display: grid; grid-template-columns: 7fr 4fr; gap: 56px; align-items: start; }
.timeline { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--sage-300); }
.timeline li { position: relative; padding: 0 0 28px 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline p { margin: 0; font-size: 17px; }
.timeline .timeline-date { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--neutral-600); }

.story-photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-frame);
  overflow: hidden;
  background: var(--surface);
}
.story-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.6) contrast(.85) brightness(1.1);
}

@media (max-width: 879px) {
  .story { grid-template-columns: 1fr; gap: 32px; }
  .story-photo { order: -1; max-width: 420px; }
}

/* The day */
.day { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.slots { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.slot {
  display: flex;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.slot:hover { background: var(--accent-100); }
.slot:active, .slot.is-active { background: var(--accent-200); }
.slot-time { flex: none; width: 56px; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot-what { flex: 1; }
.slot-place { flex: none; font-size: 13px; color: var(--neutral-600); }

.map {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  border-radius: 40px;
  overflow: hidden;
  background: var(--sage-100);
}
.map.leaflet-container { background: var(--sage-100); font-family: var(--font-body); }
.map .leaflet-tile-pane { filter: saturate(.5) sepia(.15) brightness(1.05); }
.map a { color: var(--accent-700); }

.pin { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--sage-500); }
.pin.is-active { background: var(--accent); box-shadow: 0 0 0 6px var(--accent-200); }

.map .map-label {
  padding: 4px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.map .map-label::before { display: none; }
.map .map-label.is-active { background: var(--accent-200); }

.map .leaflet-top.leaflet-left .leaflet-control { margin: 20px 0 0 20px; }
.map .leaflet-control-zoom.leaflet-bar {
  display: grid;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  box-shadow: none;
}
.map .leaflet-control-zoom.leaflet-bar a {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font: 600 20px/36px var(--font-body);
  text-indent: 0;
  box-shadow: var(--shadow-sm);
}
.map .leaflet-control-zoom.leaflet-bar a:hover { background: var(--accent-100); }
.map .leaflet-control-zoom.leaflet-bar a:active { background: var(--accent-200); }
.map .leaflet-control-zoom.leaflet-bar a.leaflet-disabled { background: var(--surface); color: var(--neutral-600); }

.map .leaflet-control-attribution {
  margin: 0 32px 12px 0;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--neutral-800);
  font-size: 11px;
  line-height: 1.5;
}

.map-spot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  translate: -9px -50%;
}
.map-spot--flip { flex-direction: row-reverse; translate: 9px -50%; }

@media (max-width: 879px) {
  .day { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 479px) {
  .slot { flex-wrap: wrap; row-gap: 2px; border-radius: 24px; }
  .slot-what { flex-basis: calc(100% - 72px); }
  .slot-place { flex-basis: 100%; padding-left: 72px; }
  .map .map-label { width: max-content; max-width: 150px; border-radius: 14px; white-space: normal; }
}

/* Getting there & staying */
.stay { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 48px; }
.stay h2 { font-size: 24px; line-height: 1.2; }
.stay p, .stay li { font-size: 16px; line-height: 1.6; color: var(--neutral-800); }
.stay p { margin: 0; }
.hotels { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hotel-note { color: var(--neutral-600); }

/* Guestbook */
.guestbook { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.entries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.entry:nth-child(even) { margin-top: 18px; }
.card .entry-text { font-size: 15px; }
.card .entry-who { margin-top: 10px; font-size: 11px; color: var(--neutral-600); }
.entries-closed { grid-column: 1 / -1; margin: 0; font-size: 16px; color: var(--neutral-800); }

.form-status { margin: 16px 0 0; font-size: 16px; }
.form-status:empty { display: none; }
.form-status--done { margin-top: 0; font-size: 17px; }

@media (max-width: 879px) {
  .guestbook { grid-template-columns: 1fr; gap: 32px; }
}

/* Photos */
.photos { columns: 3; column-gap: 20px; margin: 0; padding: 0; list-style: none; }
.photos li { margin: 0 0 20px; break-inside: avoid; }
.photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  filter: saturate(.6) contrast(.85) brightness(1.1);
}
@media (max-width: 879px) { .photos { columns: 2; } }
@media (max-width: 479px) { .photos { columns: 1; } }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.faq details { padding: 18px 24px; border-radius: 24px; }
.faq details:hover { background: var(--accent-100); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 14px;
  font-size: 20px;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-plus {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage-200);
  color: var(--sage-800);
  font: 600 18px/1 var(--font-body);
  transition: transform .2s;
}
.faq details[open] .faq-plus { transform: rotate(45deg); }
.faq details p {
  max-width: 56ch;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-800);
}

/* RSVP patch */
.rsvp-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px clamp(24px, 4vw, 64px);
  border-radius: var(--radius-frame);
  background: var(--sage-100);
}
.rsvp-panel h2 { font-size: 34px; }
.rsvp-panel p:last-child { margin-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }

@media (max-width: 719px) {
  .rsvp-panel { grid-template-columns: 1fr; gap: 28px; }
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 13px;
  color: var(--neutral-600);
}
.footer p { margin: 0; }
.footer-side { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* Hot dog layers */
.dog-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.dog-layer--deep { z-index: -3; }
.dog-layer--drift { z-index: -2; }
.dog-layer--front { z-index: 4; }

.dog {
  position: absolute;
  display: block;
  height: auto;
  aspect-ratio: 64 / 28;
  will-change: transform;
  animation: dogfall 8s linear infinite;
}
.dog-layer--deep .dog { top: -60px; opacity: .5; }
.dog-layer--front .dog { top: -40px; opacity: 1; }
.dog-layer--drift .dog {
  opacity: .7;
  animation-name: dogdrift;
  animation-timing-function: ease-in-out;
  transition: translate .35s ease-out, scale .35s ease-out;
}

/* Keyframes */
@keyframes dogfall {
  from { transform: translateY(0) rotate(0); }
  to { transform: translateY(110vh) rotate(720deg); }
}
@keyframes dogdrift {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(60px, -40px) rotate(90deg); }
  50% { transform: translate(-30px, 50px) rotate(180deg); }
  75% { transform: translate(-70px, -20px) rotate(270deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}
@keyframes dogbob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}
@keyframes dogspin {
  to { rotate: 360deg; }
}
@keyframes dogrun {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Reduced motion */
html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after { animation-play-state: paused !important; }
html.reduced-motion .dog-layer--deep,
html.reduced-motion .dog-layer--front { display: none; }
html.reduced-motion .dog-layer--drift .dog { opacity: .35; transition: none; }
html.reduced-motion .ticker-track { animation: none; padding-left: var(--edge); }
html.reduced-motion .faq-plus,
html.reduced-motion .map .leaflet-zoom-animated,
html.reduced-motion .map .leaflet-tile,
html.reduced-motion .map .leaflet-pane { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) *,
  html:not(.force-motion) *::before,
  html:not(.force-motion) *::after { animation-play-state: paused !important; }
  html:not(.force-motion) .dog-layer--deep,
  html:not(.force-motion) .dog-layer--front { display: none; }
  html:not(.force-motion) .dog-layer--drift .dog { opacity: .35; transition: none; }
  html:not(.force-motion) .ticker-track { animation: none; padding-left: var(--edge); }
  html:not(.force-motion) .faq-plus,
  html:not(.force-motion) .map .leaflet-zoom-animated,
  html:not(.force-motion) .map .leaflet-tile,
  html:not(.force-motion) .map .leaflet-pane { transition: none !important; }
}

/* RSVP page */
.rsvp [hidden] { display: none; }

.lookup { margin-top: 8px; }
.lookup .field { margin-bottom: 0; }
.lookup-row { display: flex; flex-wrap: wrap; gap: 12px; }
.lookup-row .input { flex: 1 1 220px; width: auto; }

.rsvp-result h2 { margin: 48px 0 24px; }
.rsvp-result h2:focus { outline: none; }
.rsvp-result > p { max-width: 56ch; color: var(--neutral-800); }

.rsvp-status { margin-top: 20px; font-size: 16px; color: var(--neutral-800); }
.rsvp-status:empty { display: none; }
.rsvp-status p { max-width: 56ch; margin: 0; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }

.guest { min-width: 0; margin: 0 0 24px; padding: 24px; border: 0; }
.guest > legend { float: left; width: 100%; margin: 0 0 16px; padding: 0; font-size: 24px; }
.guest-body { clear: both; }
.guest .guest-declined,
.guest .rsvp-note { font-size: 16px; line-height: 1.6; color: var(--neutral-800); }
.guest .rsvp-note { margin-bottom: 18px; }
.guest-details > :last-child { margin-bottom: 0; }

.choice { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.choice > legend { margin: 0 0 8px; padding: 0; }
.choice .field-error { margin-top: 8px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1.5px solid var(--sage-300);
  border-radius: 28px;
  background: var(--bg);
}

.pill { position: relative; display: inline-flex; }
.pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pill label {
  display: block;
  padding: 8px 16px;
  border: 1.5px solid var(--sage-300);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.4;
}
.segmented .pill label { padding: 8px 20px; border-color: transparent; background: transparent; font-weight: 600; }
.pill input:hover + label { background: var(--accent-100); }
.pill input:active + label { background: var(--accent-200); }
.pill input:checked + label { border-color: var(--accent); background: var(--accent-200); color: var(--accent-800); }
.pill input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill input:disabled { cursor: default; }

.choice[aria-invalid="true"] .segmented,
.choice[aria-invalid="true"] .pills label { border-color: var(--accent-700); }

.field-hint { margin-left: 6px; font-weight: 400; color: var(--neutral-800); }
.input--number { width: 120px; }

.rsvp-actions { margin-top: 32px; }
