/* =================================================================
   Graham & Monica — Friuli 2027
   Shared stylesheet
   Palette drawn from Friuli: Collio vineyard green, Adriatic blue,
   Udine limestone, Tiepolo gold.
   ================================================================= */

:root {
  --stone:      #f3eee4;   /* warm limestone background */
  --stone-deep: #e7dfd0;
  --ink:        #23271f;   /* near-black, green-tinted */
  --vine:       #3f5e3a;   /* Collio vineyard green */
  --vine-deep:  #2d4429;
  --adriatic:   #38617a;   /* muted sea blue */
  --gold:       #b8893f;   /* Tiepolo / white-wine gold */
  --gold-soft:  #d8b878;
  --paper:      #fbf9f4;
  --line:       #cdbfa6;
  --shadow:     rgba(45, 68, 41, 0.12);

  --display: "Cormorant Garamond", Georgia, serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 68ch;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--stone);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; }

.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
}

a { color: var(--vine-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- Layout helpers ---------- */
.wrap { width: min(1120px, 92vw); margin-inline: auto; }
.narrow { width: min(720px, 92vw); margin-inline: auto; }
section { padding: clamp(3.5rem, 8vw, 7rem) 0; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 238, 228, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  font-family: var(--display);
  font-size: 1.35rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--gold); }
.nav-links { display: flex; gap: 1.6rem; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--vine); border-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.3s; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--stone); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 380px; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 1rem 4vw; border-bottom: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.95rem 2rem; border-radius: 2px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform 0.15s, background 0.2s, color 0.2s;
}
.btn-primary { background: var(--vine); color: var(--paper); }
.btn-primary:hover { background: var(--vine-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--vine-deep); border-color: var(--vine); }
.btn-ghost:hover { background: var(--vine); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 86vh;
  display: flex; align-items: center;
  background:
    linear-gradient(180deg, rgba(35,39,31,0.55) 0%, rgba(35,39,31,0.35) 45%, rgba(63,94,58,0.55) 100%),
    url('../images/hero-vineyard.jpg'),
    var(--vine-deep);
  background-size: cover, cover, auto;
  background-position: center, center, center;
  color: var(--paper); text-align: center;
}
.hero-inner { width: min(820px, 92vw); margin-inline: auto; padding: 4rem 0; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  margin: 1rem 0 0.6rem; font-weight: 500;
  text-shadow: 0 2px 24px rgba(0,0,0,0.3);
}
.hero .sub {
  font-family: var(--display); font-size: clamp(1.3rem, 3.5vw, 2rem);
  font-style: italic; font-weight: 400; opacity: 0.95;
}
.hero .meta {
  margin-top: 1.8rem; font-size: 0.95rem; letter-spacing: 0.04em;
  display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap;
}
.hero .meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero .cta-row { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
/* If JS is disabled or hasn't run, never hide content */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Section headings ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem,5vw,3.5rem); }
.section-head h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0.6rem 0; }
.section-head p { color: #57604f; }

/* ---------- Story timeline (signature element) ---------- */
.thread { position: relative; padding-left: 0; }
.thread-line { }
.milestone {
  display: grid; grid-template-columns: 120px 1fr; gap: 2rem;
  position: relative; padding: 2rem 0;
}
.milestone + .milestone { border-top: 1px solid var(--line); }
.milestone .year {
  font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 600; color: var(--vine); line-height: 1;
}
.milestone .year small { display: block; font-family: var(--body); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-top: 0.5rem; }
.milestone h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.milestone p { color: #4a5243; max-width: var(--measure); }
@media (max-width: 620px) {
  .milestone { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  padding: 2rem; box-shadow: 0 6px 24px var(--shadow);
}
.card .num { font-family: var(--display); font-size: 1.1rem; color: var(--gold); font-weight: 600; }
.card h3 { font-size: 1.4rem; margin: 0.4rem 0 0.6rem; }
.card p { color: #4a5243; font-size: 0.97rem; }

/* ---------- Itinerary day blocks ---------- */
.day {
  display: grid; grid-template-columns: 200px 1fr; gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}
.day + .day { border-top: 1px solid var(--line); }
.day .when { }
.day .when .date { font-family: var(--display); font-size: 1.8rem; font-weight: 600; color: var(--vine); }
.day .when .dow { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); font-weight: 600; }
.day h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.day ul { list-style: none; }
.day ul li { padding: 0.35rem 0 0.35rem 1.4rem; position: relative; color: #4a5243; }
.day ul li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
@media (max-width: 620px) { .day { grid-template-columns: 1fr; gap: 0.8rem; } }

/* ---------- Photo placeholder ---------- */
.photo {
  background: linear-gradient(135deg, var(--stone-deep), var(--line));
  border: 1px dashed var(--gold); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #8a7c5f; font-size: 0.85rem;
  min-height: 240px; padding: 1rem;
  font-style: italic;
}
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; }
.photo-grid .tall { min-height: 320px; }

/* ---------- Collage figure ---------- */
.collage {
  margin: 2rem 0 0; padding: 0.8rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 6px 24px var(--shadow);
}
.collage img { display: block; width: 100%; height: auto; border-radius: 3px; }
.collage figcaption {
  text-align: center; font-size: 0.85rem; color: #6a7060;
  margin-top: 0.8rem; font-style: italic;
}

/* ---------- Map with pin ---------- */
.flag-emblem {
  width: clamp(120px, 16vw, 180px); height: auto; display: block; margin: 0 auto 1rem;
  border-radius: 4px; box-shadow: 0 4px 16px var(--shadow);
}
.map-figure { margin: 0; }
.map-frame {
  position: relative; width: 100%;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 6px; padding: 1.2rem; box-shadow: 0 6px 24px var(--shadow);
}
.map-frame img { display: block; width: 100%; height: auto; border-radius: 3px; }
.map-pin { position: absolute; transform: translate(-50%, -100%); pointer-events: none; }

/* Coat-of-arms marker: the crest sits just above the exact point, a small
   gold dot pinpoints the city, and the label sits beside the dot. */
.map-crest {
  position: absolute; pointer-events: none;
  /* anchor the bottom-centre of this box on the coordinate */
  transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center;
}
.map-crest img {
  width: clamp(32px, 4.6vw, 54px); height: auto; display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
}
.map-crest .crest-dot {
  width: 9px; height: 9px; margin-top: 1px;
  background: var(--gold); border: 2px solid var(--paper);
  border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.map-crest .crest-label {
  position: absolute; bottom: -2px; left: calc(50% + 12px);
  font-family: var(--body); font-weight: 700; font-size: 0.8rem;
  color: var(--ink); letter-spacing: 0.02em; white-space: nowrap;
  text-shadow: 0 1px 2px var(--paper), 0 0 4px var(--paper);
}
@media (max-width: 520px) { .map-crest .crest-label { font-size: 0.68rem; left: calc(50% + 9px); } }
.map-figure figcaption {
  text-align: center; font-size: 0.85rem; color: #6a7060;
  margin-top: 1rem; font-style: italic;
}
@media (max-width: 520px) { .pin-label { font-size: 0.7rem; } .pin-dot { width: 12px; height: 12px; } }

.info-row { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.info-row h3 { font-size: 1.25rem; }
.info-row p { color: #4a5243; max-width: var(--measure); }
@media (max-width: 620px) { .info-row { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- Callout ---------- */
.callout {
  background: var(--vine); color: var(--paper);
  border-radius: 6px; padding: clamp(1.8rem, 5vw, 3rem); text-align: center;
}
.callout h2 { color: var(--paper); font-size: clamp(1.8rem,4vw,2.6rem); }
.callout p { opacity: 0.92; max-width: 560px; margin: 0.8rem auto 1.6rem; }

/* ---------- RSVP ---------- */
.rsvp-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(2rem, 6vw, 3.5rem); text-align: center; box-shadow: 0 8px 32px var(--shadow);
}
.rsvp-box .big-date { font-family: var(--display); font-size: clamp(2rem,6vw,3rem); color: var(--vine); font-weight: 600; }
.rsvp-note { font-size: 0.9rem; color: #6a7060; margin-top: 1.4rem; }

/* ---------- Footer ---------- */
.foot {
  background: var(--vine-deep); color: var(--stone);
  text-align: center; padding: 3rem 0;
}
.foot .brand { color: var(--stone); }
.foot p { opacity: 0.8; font-size: 0.88rem; margin-top: 0.6rem; }
.foot a { color: var(--gold-soft); }
.foot-emblems {
  display: flex; gap: 1.4rem; justify-content: center; align-items: center;
  margin: 1.4rem 0 0.4rem;
}
.foot-emblems img { height: 46px; width: auto; }
.foot-emblems .flag { border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.foot-credit {
  opacity: 0.55; font-size: 0.72rem; margin-top: 1.2rem; line-height: 1.5;
  max-width: 620px; margin-inline: auto;
}
.foot-credit a { color: var(--gold-soft); text-decoration: underline; }
.foot-design {
  margin-top: 1.2rem; font-size: 0.82rem; letter-spacing: 0.04em;
  opacity: 0.85; color: var(--gold-soft);
}
.foot-design a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 2px; }
.foot-design a:hover { color: var(--stone); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.lead { font-size: 1.15rem; color: #3c4436; }
