/* Niamh & Conor wedding site
   Palette: forest green on bone paper, single accent, light theme locked
   Type: EB Garamond (display) + Outfit (body) */

:root {
  --paper: #f7f5f0;
  --paper-deep: #efece4;
  --ink: #26332b;
  --ink-soft: #55635a;
  --green: #2c4636;
  --green-deep: #1d3126;
  --line: rgba(38, 51, 43, 0.16);
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 68px; }

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; }

h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

.amp { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Navigation ---------- */

#nav-sentinel { position: absolute; top: 0; height: 90px; width: 1px; }

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  color: #fff;
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.nav-monogram {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
}

.nav-links { display: flex; gap: clamp(1.1rem, 3vw, 2.2rem); }

.nav-links a {
  color: inherit;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 33, 27, 0.72) 0%, rgba(24, 33, 27, 0.18) 45%, rgba(24, 33, 27, 0.05) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 0 clamp(1.25rem, 5vw, 4rem) clamp(3rem, 8vh, 5.5rem);
  max-width: 900px;
}

.hero-eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 400;
  margin-bottom: 1.1rem;
}

.hero-names {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 34ch;
  margin-bottom: 1.8rem;
  opacity: 0.95;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.85rem 1.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:active { transform: translateY(1px); }

.btn-light { background: var(--paper); color: var(--green-deep); }
.btn-light:hover { background: #fff; }

.btn-dark { background: var(--green); color: #fdfcf9; }
.btn-dark:hover { background: var(--green-deep); }

/* ---------- Countdown ---------- */

.countdown {
  background: var(--green-deep);
  color: #f2f0e9;
  text-align: center;
  padding: clamp(3rem, 7vw, 4.5rem) 1.25rem;
}

.countdown-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 1.8rem;
  opacity: 0.8;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem);
  flex-wrap: wrap;
}

.countdown-unit { display: flex; flex-direction: column; min-width: 72px; }

.countdown-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-word {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.75;
}

.countdown-done {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-style: italic;
}

/* ---------- Our Story ---------- */

.story {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3rem);
}

.story-media img { width: 100%; height: auto; }

.story-text h2 { margin-bottom: 1.6rem; }

.story-text p { max-width: 58ch; margin-bottom: 1.15rem; color: var(--ink-soft); }

.story-text p:last-child { margin-bottom: 0; color: var(--ink); font-weight: 400; }

/* ---------- The Day ---------- */

.day {
  background: var(--paper-deep);
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3rem);
}

.day > h2, .day-intro { text-align: center; }

.day-intro {
  color: var(--ink-soft);
  margin: 0.9rem auto 0;
  max-width: 48ch;
}

.day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1050px;
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
}

.day-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1.4rem;
}

.day-item h3 { font-size: 1.75rem; margin-bottom: 0.35rem; }

.day-venue { font-weight: 500; color: var(--green); margin-bottom: 0.6rem; }

.day-item p:last-child { color: var(--ink-soft); max-width: 48ch; }

.day-notes {
  max-width: 720px;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
  border-top: 1px solid var(--line);
}

.day-note {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.day-note dt { font-weight: 500; color: var(--green); }

.day-note dd { color: var(--ink-soft); }

.day-note a { color: var(--green); }

/* ---------- Gallery ---------- */

.gallery {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3rem);
}

.gallery h2 { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 110px;
  gap: clamp(0.8rem, 2vw, 1.4rem);
}

.gallery-grid figure { overflow: hidden; }

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-grid figure:hover img { transform: scale(1.04); }

.g1 { grid-column: span 5; grid-row: span 5; }
.g2 { grid-column: span 7; grid-row: span 3; }
.g3 { grid-column: span 7; grid-row: span 2; }
.g4 { grid-column: span 4; grid-row: span 3; }
.g5 { grid-column: span 4; grid-row: span 3; }
.g6 { grid-column: span 4; grid-row: span 3; }

/* ---------- Guestbook ---------- */

.guestbook {
  background: var(--green-deep);
  color: #f2f0e9;
  padding: clamp(4.5rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3rem);
}

.guestbook-head { max-width: 1250px; margin: 0 auto; }

.guestbook-head p { max-width: 52ch; margin-top: 0.9rem; opacity: 0.85; }

.guestbook-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  max-width: 1250px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
}

.field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.4rem; }

.field label { font-size: 0.92rem; font-weight: 400; letter-spacing: 0.02em; }

.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  padding: 0.8rem 1rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid #d9e3d4;
  outline-offset: 2px;
}

.field-error { font-size: 0.85rem; color: #f3c8b8; }

.guestbook .btn-dark { background: var(--paper); color: var(--green-deep); }
.guestbook .btn-dark:hover { background: #fff; }

.form-success { margin-top: 1rem; font-size: 0.95rem; color: #cfe0c7; }

.guestbook-messages ol { list-style: none; }

.guestbook-messages li {
  border-top: 1px solid rgba(242, 240, 233, 0.22);
  padding: 1.3rem 0;
}

.guestbook-messages li:first-child { border-top: none; padding-top: 0.2rem; }

.gb-msg-text {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.5;
  margin-bottom: 0.55rem;
}

.gb-msg-meta { font-size: 0.88rem; opacity: 0.72; }

.guestbook-empty { opacity: 0.8; }

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.25rem;
}

.footer-names { font-family: var(--serif); font-size: 2rem; margin-bottom: 0.4rem; }

.footer-date { color: var(--ink-soft); font-size: 0.95rem; }

.footer-credit {
  margin-top: 2.2rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.75;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-grid img { transition: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .nav-links a:not(:last-child) { display: none; }

  .story { grid-template-columns: 1fr; }

  .day-grid { grid-template-columns: 1fr; }

  .day-note { grid-template-columns: 1fr; gap: 0.2rem; }

  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }

  .gallery-grid figure { grid-column: auto; grid-row: auto; }

  .gallery-grid img { aspect-ratio: 4 / 3; height: auto; }

  .g1 img { aspect-ratio: 3 / 4; }

  .g1 { grid-column: span 2; }

  .guestbook-grid { grid-template-columns: 1fr; }
}
