/* Farewell — single stylesheet. Earthy Hillside palette. */

:root {
  --olive:      #5C6B3C;
  --olive-dk:   #44512B;
  --olive-lt:   #7C8B5A;
  --terracotta: #C4704A;
  --terracotta-dk: #A4593A;
  --stone:      #B8A88A;
  --stone-lt:   #D9CCAE;
  --cream:      #F5F0E8;
  --cream-dk:   #ECE3D2;
  --ink:        #2A2A2A;
  --ink-lt:     #5A5A50;
  --muted:      #8A8275;
  --danger:     #B23A3A;
  --ok:         #4A7B3E;
  --shadow:     0 2px 14px rgba(50, 40, 20, 0.08);
  --radius:     14px;
  --radius-sm:  8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  color: var(--olive-dk);
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; color: var(--ink); margin-bottom: 0.4rem; }
p  { margin: 0 0 1em; }
a  { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }
.small { font-size: 0.875rem; }
.quiet { color: var(--muted); }
.error { background: #fae5e5; color: var(--danger); padding: 0.6em 1em; border-radius: var(--radius-sm); border-left: 3px solid var(--danger); }
.ok    { background: #e7f0e0; color: var(--ok);     padding: 0.6em 1em; border-radius: var(--radius-sm); border-left: 3px solid var(--ok); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 760px; }

/* ---------- HERO ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero__photos { position: absolute; inset: 0; z-index: 0; }
.hero__photo {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 64s linear infinite;
}
@keyframes heroFade {
  0%   { opacity: 0; transform: scale(1.05); }
  3%   { opacity: 1; }
  12%  { opacity: 1; transform: scale(1.0); }
  15%  { opacity: 0; }
  100% { opacity: 0; }
}
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,20,10,0.35) 0%, rgba(20,15,10,0.6) 70%, rgba(20,15,10,0.78) 100%);
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: 760px; padding: 5rem 1.5rem 4rem;
  margin: 0 auto;
  text-align: center;
}
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.78rem; opacity: 0.85;
  margin: 0 0 1.2rem;
}
.hero__title {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.hero__title span { color: var(--stone-lt); font-style: italic; }
.hero__meta { margin: 1.4rem 0 0.5rem; display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 0.45em 0.95em;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  font-size: 0.92rem;
  backdrop-filter: blur(4px);
}
.hero__hosts { margin-top: 0.5rem; opacity: 0.92; font-size: 1.05rem; }
.hero__hosts strong { font-family: 'Playfair Display', serif; font-weight: 600; }
.hero__countdown {
  margin: 1.6rem auto 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  opacity: 0.93;
}
.hero__countdown span { font-weight: 600; color: var(--stone-lt); }
.hero__cta { margin-top: 1.8rem; }

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 2px 10px rgba(196,112,74,0.35);
}
.btn--primary:hover { background: var(--terracotta-dk); }
.btn--ghost {
  background: rgba(255,255,255,0.12);
  color: inherit;
  border: 1.5px solid currentColor;
}
.btn--ghost:hover { background: rgba(255,255,255,0.2); }
.section .btn--ghost {
  background: transparent;
  color: var(--olive-dk);
  border-color: var(--olive);
}
.section .btn--ghost:hover { background: var(--cream-dk); }
.btn--small {
  padding: 0.4em 0.9em;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
}
.btn--danger { background: #f1d6d6; color: var(--danger); border: 1px solid #d8a9a9; }
.btn--danger:hover { background: #e8b9b9; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- SECTIONS ---------- */

.section { padding: 4rem 0; }
.section--story  { background: var(--cream); }
.section--arrival { background: var(--cream-dk); }
.section--rsvp   { background: var(--cream); }
.section--lists  { background: var(--cream-dk); }
.section--share  { background: var(--cream); text-align: center; }

.story { font-size: 1.08rem; line-height: 1.7; color: var(--ink-lt); }
.story strong { color: var(--olive-dk); }

.arrival-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem;
}
@media (max-width: 760px) { .arrival-grid { grid-template-columns: 1fr; } }
.arrival-grid__notes h3 { margin-top: 1.4rem; }
.arrival-grid__notes h3:first-child { margin-top: 0; }
.rt {
  background: rgba(255,255,255,0.55);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--olive-lt);
  color: var(--ink-lt);
  font-size: 0.96rem;
}
.map-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.map-actions .btn { font-size: 0.86rem; padding: 0.5em 1em; }

/* Weather card */
.weather { margin-top: 1.4rem; }
.weather__row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.weather__day {
  flex: 1 1 110px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--stone-lt);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  text-align: center;
  font-size: 0.85rem;
}
.weather__day--event {
  background: var(--olive); color: #fff;
  border-color: var(--olive);
  transform: scale(1.04);
}
.weather__day .d { font-weight: 600; }
.weather__day .t { font-size: 1rem; margin: 0.2rem 0; }
.weather__day .p { font-size: 0.78rem; opacity: 0.85; }

/* ---------- FORMS ---------- */

.card {
  background: #fff;
  padding: 1.8rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--stone-lt);
  margin-bottom: 1.5rem;
}
.form .field, .field { display: block; margin-bottom: 1.1rem; }
.field > span { display: block; font-weight: 600; margin-bottom: 0.3em; color: var(--ink); }
input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%;
  padding: 0.7em 0.9em;
  border: 1.5px solid var(--stone-lt);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(92,107,60,0.12);
}
textarea { resize: vertical; min-height: 80px; }
.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}
.field--span-2 { grid-column: 1 / -1; }

.field--radio { padding: 0.6rem 0; border: 0; }
.field--radio legend { font-weight: 600; margin-bottom: 0.5em; padding: 0; }
.radio, .check {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.55em 1em;
  margin: 0.25em 0.5em 0.25em 0;
  background: var(--cream);
  border: 1.5px solid var(--stone-lt);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.96rem;
  transition: background 0.12s, border-color 0.12s;
}
.radio input, .check input { margin: 0; }
.radio:has(input:checked), .check:has(input:checked) {
  background: var(--olive); color: #fff; border-color: var(--olive);
}
.check.inline { background: transparent; border: 0; padding: 0; font-size: 0.86rem; }

.form__actions { margin-top: 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form__status { color: var(--muted); font-size: 0.92rem; }
.form__status.ok { background: transparent; padding: 0; border: 0; color: var(--ok); }
.form__status.error { background: transparent; padding: 0; border: 0; color: var(--danger); }

/* Honeypot */
.hp { position: absolute; left: -9999px; }

/* ---------- MENU CARDS ---------- */

.menu-section { margin-bottom: 1.5rem; }
.menu-section h4 {
  margin: 0 0 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.84rem;
  color: var(--olive);
}
.menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}
.menu-item {
  position: relative;
  padding: 0.8rem 0.9rem;
  border: 1.5px solid var(--stone-lt);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.menu-item:hover { border-color: var(--olive); }
.menu-item.is-picked {
  border-color: var(--terracotta);
  background: rgba(196,112,74,0.08);
}
.menu-item.is-covered {
  opacity: 0.65;
}
.menu-item.is-covered:not(.is-picked) {
  background: rgba(92,107,60,0.05);
}
.menu-item__label { font-weight: 600; display: block; }
.menu-item__portions {
  display: block;
  font-size: 0.78rem;
  color: var(--terracotta);
  font-weight: 500;
  margin-top: 0.15em;
}
.menu-item__bar {
  margin-top: 0.4em;
  height: 4px; border-radius: 2px;
  background: var(--stone-lt);
  overflow: hidden;
}
.menu-item__bar span {
  display: block; height: 100%;
  background: var(--olive-lt);
  transition: width 0.3s ease;
}
.menu-item.is-covered .menu-item__bar span { background: var(--olive); }
.menu-item__count {
  font-size: 0.78rem; color: var(--muted);
  display: flex; justify-content: space-between;
  margin-top: 0.3em;
}
.menu-item__check {
  position: absolute; top: 0.4rem; right: 0.5rem;
  color: var(--olive); font-weight: bold;
  display: none;
}
.menu-item.is-covered .menu-item__check { display: inline; }

/* ---------- POST-RSVP ---------- */
.post-rsvp { margin-top: 1.5rem; }
.card--confirm { border-left: 4px solid var(--olive); }
.check-mark { color: var(--ok); }

/* ---------- LISTS (carpool, guestbook) ---------- */

.carpool-list, .gb-list { list-style: none; padding: 0; margin: 0; }
.carpool-list li, .gb-list li {
  background: #fff;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--stone);
  box-shadow: var(--shadow);
}
.carpool-list .tag {
  display: inline-block;
  font-size: 0.74rem;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  margin-right: 0.5em;
  background: var(--cream-dk);
  color: var(--ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.carpool-list .tag--offer { background: var(--olive); color: #fff; }
.carpool-list .tag--need  { background: var(--terracotta); color: #fff; }
.carpool-list__action {
  margin-top: 0.6rem;
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
}
.carpool-list__action .btn { padding: 0.35em 0.9em; }
.gb-list .gb-msg { font-style: italic; color: var(--ink-lt); }
.gb-list .gb-img { display: block; max-width: 100%; margin-top: 0.5rem; border-radius: var(--radius-sm); }

/* ---------- SHARE ---------- */
.share-grid { display: inline-flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; margin: 1rem 0 2rem; }
.qr { margin-top: 1.5rem; }
.qr img { background: #fff; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--stone-lt); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--olive-dk);
  color: var(--cream);
  padding: 3rem 0 2rem;
  text-align: center;
}
.footer a { color: var(--stone-lt); }

/* ---------- ADMIN ---------- */

.admin { background: var(--cream); }
.admin__bar {
  background: var(--olive-dk); color: #fff;
  padding: 0.9rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.admin__bar h1 { color: #fff; margin: 0; font-size: 1.4rem; }
.admin__bar nav a { color: var(--stone-lt); margin-left: 1rem; font-weight: 600; }

.admin .container { padding-bottom: 4rem; }
.admin .card { border: 1px solid var(--stone-lt); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.stat {
  background: var(--cream); padding: 1rem;
  border-radius: var(--radius-sm); border-left: 3px solid var(--stone);
}
.stat--ok      { border-left-color: var(--ok); }
.stat--primary { border-left-color: var(--terracotta); background: rgba(196,112,74,0.06); }
.stat__n {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--olive-dk);
  line-height: 1;
}
.stat--primary .stat__n { color: var(--terracotta-dk); }

.t { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.t th, .t td { padding: 0.55rem 0.6rem; text-align: left; border-bottom: 1px solid var(--cream-dk); vertical-align: top; }
.t th { background: var(--cream); font-weight: 600; }
.t .row--full     { background: rgba(92,107,60,0.06); }
.t .row--low      { background: rgba(196,112,74,0.06); }
.t .row--inactive { opacity: 0.45; background: var(--cream); }
.bar { background: var(--stone-lt); height: 8px; border-radius: 4px; overflow: hidden; min-width: 90px; }
.bar span { display: block; height: 100%; background: var(--olive); transition: width 0.2s; }
.row--low .bar span { background: var(--terracotta); }

.att--yes   { color: var(--ok);        font-weight: 600; }
.att--no    { color: var(--muted); }
.att--maybe { color: var(--terracotta); font-weight: 600; }

form.inline { display: inline-flex; gap: 0.4em; align-items: center; }

.msgs { list-style: none; padding: 0; }
.msgs li { background: var(--cream); padding: 0.8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 0.6rem; }
.msgs li p { margin: 0.3rem 0 0.5rem; }

details > summary { cursor: pointer; padding: 0.5em 0; color: var(--olive); font-weight: 600; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .section { padding: 2.5rem 0; }
  .card { padding: 1.3rem; }
  .hero__inner { padding: 3.5rem 1.2rem 2.5rem; }
  .admin__bar { padding: 0.7rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
}
