/* ===================================================================
   Andreas & Despo — Wedding site
   Design: warm limestone paper + antique gold + deep olive
   (the olive nods to Olea, the reception venue — Greek for "olive")
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Playfair+Display:ital,wght@0,500;0,600;1,500&family=Alex+Brush&display=swap');

/* ===================================================================
   Theme system — 4 earthy beige/brown palettes, switchable via
   [data-theme] on <html>. Default theme is "4" (Oat & Espresso).
   Each theme sets the same variable names, so the rest of the CSS
   never needs to know which palette is active.
   =================================================================== */

:root,
[data-theme="4"] {
  /* 4 — Oat & Espresso (default) */
  --paper: #faf6ee;
  --paper-deep: #ede2cd;
  --ink: #2b2018;
  --ink-soft: #5a4632;
  --accent: #a08360;
  --accent-dark: #5a4632;
  --line: #e2d3b4;
  --white: #fffdf8;
}

[data-theme="1"] {
  /* 1 — Linen & Cocoa */
  --paper: #f3ece0;
  --paper-deep: #e8dcc7;
  --ink: #3a2e22;
  --ink-soft: #5c4632;
  --accent: #a9835c;
  --accent-dark: #5c4632;
  --line: #d9c4a1;
  --white: #fdf9f2;
}

[data-theme="2"] {
  /* 2 — Sand & Taupe */
  --paper: #f6f1e8;
  --paper-deep: #e3d8c4;
  --ink: #2e2a22;
  --ink-soft: #4a4133;
  --accent: #8c7d68;
  --accent-dark: #4a4133;
  --line: #d7cab0;
  --white: #fbf8f2;
}

[data-theme="3"] {
  /* 3 — Latte & Terracotta-brown */
  --paper: #f5ece1;
  --paper-deep: #e6d2ba;
  --ink: #3d2a1c;
  --ink-soft: #6e4a30;
  --accent: #b17a4f;
  --accent-dark: #6e4a30;
  --line: #dfbf9a;
  --white: #fdf6ee;
}

:root {
  /* aliases kept so the rest of the stylesheet reads naturally */
  --olive: var(--accent);
  --olive-dark: var(--accent-dark);
  --gold: var(--accent);
  --gold-light: var(--accent);

  --script: 'Alex Brush', cursive;
  --display: 'Playfair Display', serif;
  --body: 'Cormorant Garamond', serif;

  --max-w: 720px;
  --edge: 1.5rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

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

body::before {
  /* subtle paper grain */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(171,138,69,0.05), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(107,114,80,0.06), transparent 45%);
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
  color: var(--olive-dark);
}

.eyebrow {
  font-family: var(--body);
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--gold);
}

section {
  position: relative;
  z-index: 1;
  padding: 4.5rem var(--edge) 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.divider {
  display: flex;
  justify-content: center;
  margin: 2.25rem 0;
}
.divider svg { width: 140px; height: 34px; }
.divider path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 1.4s ease;
}
.divider.in-view path { stroke-dashoffset: 0; }

/* ---------- Language toggle ---------- */
.lang-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.9rem var(--edge) 0;
  gap: 0;
}
.lang-toggle-inner {
  display: flex;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(45,42,31,0.08);
}
.lang-toggle button {
  border: none;
  background: transparent;
  font-family: var(--body);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  white-space: nowrap;
}
.lang-toggle button.active {
  background: var(--olive);
  color: var(--white);
}

/* ---------- Theme switcher ---------- */
.theme-toggle {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}
.theme-toggle select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--body);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 2.2rem 0.6rem 1.2rem;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(45,42,31,0.08);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0L5 6L10 0Z' fill='%235b5642'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.theme-toggle select:focus-visible,
.lang-toggle button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: none;
  padding: 3rem var(--edge);
  background:
    linear-gradient(180deg, rgba(246,241,228,0) 60%, var(--paper) 100%),
    var(--paper);
  overflow: hidden;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-names {
  font-family: var(--script);
  font-size: clamp(3.6rem, 14vw, 6.5rem);
  color: var(--gold);
  line-height: 1.05;
  opacity: 0;
  animation: fade-up 1.2s ease forwards 0.5s;
}
.hero-amp {
  font-family: var(--script);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--olive);
  display: block;
  margin: -0.3rem 0;
  opacity: 0;
  animation: fade-up 1.2s ease forwards 0.8s;
}

.hero-sub {
  margin-top: 1.75rem;
  opacity: 0;
  animation: fade-up 1.2s ease forwards 1.1s;
}
.hero-date {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--ink);
}
.hero-place {
  margin-top: 0.35rem;
  font-style: italic;
  color: var(--ink-soft);
}

.hero-scroll {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive);
  opacity: 0.7;
}

/* ---------- Invitation card ---------- */
.invite-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 18px 40px -22px rgba(45,42,31,0.35);
}
.invite-card .eyebrow { display: block; margin-bottom: 0.75rem; }
.invite-lede {
  font-size: 1.3rem;
  line-height: 1.65;
  color: var(--ink);
}
.invite-families {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-style: italic;
  color: var(--ink-soft);
}
.invite-families .fam-label {
  display: block;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

/* ---------- Getting-ready box ---------- */
.ready-card {
  margin-top: 1.5rem;
  text-align: left;
}
.ready-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}
.ready-label-text {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.ready-icon-img {
  height: 30px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.ready-timeline {
  margin-top: 1.5rem;
}
.ready-timeline .t-item { padding: 0.85rem 0; }

/* ---------- Timeline ---------- */
.timeline {
  margin-top: 2.5rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 62px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.t-item {
  display: grid;
  grid-template-columns: 62px 40px 1fr;
  column-gap: 0.9rem;
  align-items: start;
  padding: 1.1rem 0;
}
.t-time {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--gold);
  text-align: right;
  padding-top: 0.15rem;
  padding-right: 0.6rem;
}
.t-dot {
  width: 40px;
  display: flex;
  justify-content: center;
  padding-top: 0.35rem;
}
.t-dot span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--olive);
  display: block;
  box-shadow: 0 0 0 4px var(--paper);
}
.t-body h3 { font-size: 1.15rem; margin-bottom: 0.2rem; color: var(--ink); }
.t-body p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Locations ---------- */
.loc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 26px -20px rgba(45,42,31,0.4);
}
.loc-info {
  padding: 1.2rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.loc-label {
  display: block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-style: normal;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.loc-info h3 { font-size: 1.15rem; }
.loc-info p { margin: 0.15rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.btn-outline {
  border: 1px solid var(--olive);
  color: var(--olive-dark);
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { background: var(--olive); color: var(--white); }

/* ---------- Adults only notice ---------- */
.notice {
  text-align: center;
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 1.4rem 1.2rem;
  background: rgba(171,138,69,0.06);
}
.notice p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--olive-dark);
}

/* ---------- Calendar buttons ---------- */
.cal-buttons {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.75rem;
}
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--olive);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  flex: 1 1 210px;
  max-width: 260px;
  text-align: center;
}
.btn-solid:hover { background: var(--olive-dark); transform: translateY(-1px); }
.btn-solid.gold { background: var(--gold); }
.btn-solid.gold:hover { background: #8f7136; }

/* ---------- Downloads ---------- */
.downloads {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}
.download-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 4px;
  padding: 1rem 1.3rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 190px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.download-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 20px -16px rgba(45,42,31,0.5);
}
.download-card svg { flex-shrink: 0; color: var(--gold); }
.download-card .dl-title { font-family: var(--display); font-size: 1rem; }
.download-card .dl-sub { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 3rem var(--edge) 3.5rem;
  color: var(--ink-soft);
}
footer .hero-names { font-size: clamp(2.2rem, 8vw, 3rem); margin-bottom: 0.5rem; opacity: 1; animation: none; }
footer .hero-names .hero-amp { display: inline; margin: 0 0.3rem; opacity: 1; animation: none; font-size: 0.6em; }
.contact-row {
  display: flex;
  gap: 1.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  font-family: var(--display);
  font-size: 1.35rem;
}
.contact-row a { text-decoration: none; color: var(--olive-dark); font-weight: 600; }
.contact-row a:hover { color: var(--gold); }
.rsvp-note { margin-top: 1.5rem; font-style: italic; font-size: 0.95rem; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  section { padding: 6rem var(--edge) 5rem; }
  body { font-size: 20px; }
}

@media (max-width: 380px) {
  .t-item { grid-template-columns: 50px 30px 1fr; }
  .t-time { font-size: 0.92rem; }
}
