/* =============================================================================
 *  NAG27 — Cape Winelands theme
 *  Plain CSS, no build step. Colours/typography driven by custom properties.
 * ========================================================================== */

:root {
  /* palette */
  --green-900: #1f3322;
  --green-800: #28412a;
  --green-700: #33502f;
  --green-600: #46603f;
  --gold-600:  #b88a32;
  --gold-500:  #c89b46;
  --gold-200:  #e9c79a;
  --terra-600: #b5562f;
  --cream-100: #faf6ec;
  --cream-200: #f3ebd9;
  --cream-300: #ece0c6;
  --ink-900:   #23231f;
  --ink-700:   #45463f;
  --ink-500:   #6b6c62;
  --white:     #fffdf8;

  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(35,35,31,.08), 0 1px 2px rgba(35,35,31,.06);
  --shadow-md: 0 10px 30px rgba(35,35,31,.10), 0 2px 8px rgba(35,35,31,.06);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cream-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--terra-600); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; color: var(--ink-900); margin: 0 0 .4em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--green-700); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* focus visibility */
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bg: var(--green-700); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .7em 1.4em; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--green-800); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-large { font-size: 1.05rem; padding: .85em 1.8em; }
.btn-small { padding: .5em 1.05em; font-size: .9rem; }
.btn-ghost { --bg: transparent; --fg: var(--green-700); border-color: var(--green-600); box-shadow: none; }
.btn-ghost:hover { --bg: var(--green-700); --fg: #fff; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, .85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--cream-300);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6em; text-decoration: none; color: var(--ink-900); font-weight: 600; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  background: var(--green-700); color: var(--gold-200); border-radius: 10px;
  font-family: var(--font-display); font-size: .9rem; letter-spacing: .02em;
}
.brand-text { font-family: var(--font-display); font-size: 1.15rem; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink-700); font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--green-700); }
.nav-links .btn { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink-900); border-radius: 2px; transition: .2s; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-scene { position: absolute; inset: 0; z-index: -1; }
.hero-svg { width: 100%; height: 100%; min-height: 540px; object-fit: cover; }
.hero-content {
  padding-top: clamp(48px, 9vw, 96px);
  padding-bottom: clamp(180px, 26vw, 300px);
  text-align: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 600;
  color: var(--green-800); margin: 0 0 1rem;
}
.hero-title { font-size: clamp(2.6rem, 8.5vw, 5.4rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: .25em; }
.hero-year { color: var(--terra-600); }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--ink-700); max-width: 38ch; margin: 0 auto 1.2rem; }
.hero-meta { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .6em; font-weight: 600; color: var(--green-800); margin-bottom: 1.8rem; }
.hero-meta .dot { color: var(--gold-600); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.hero-deadline { margin-top: 1.4rem; color: var(--ink-700); font-size: .95rem; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(56px, 9vw, 104px); }
.section-tint { background: var(--cream-200); border-block: 1px solid var(--cream-300); }
.section-head { max-width: 60ch; margin-bottom: 2.4rem; }
.kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 700; color: var(--gold-600); margin: 0 0 .7rem; }
.section-lead { font-size: 1.1rem; color: var(--ink-700); }
.muted { color: var(--ink-500); }

.prose-grid { display: grid; gap: 1.2rem; max-width: 64ch; font-size: 1.08rem; color: var(--ink-700); }
.prose-grid strong { color: var(--ink-900); }

/* feature row */
.feature-row { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(3, 1fr); }
.feature {
  background: var(--white); border: 1px solid var(--cream-300); border-radius: var(--radius);
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow-sm);
}
.feature-ico { font-size: 1.8rem; display: block; margin-bottom: .6rem; }
.feature h3 { margin-bottom: .3em; }
.feature p { margin: 0; color: var(--ink-700); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.timeline li {
  background: var(--white); border: 1px solid var(--cream-300); border-left: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 180px 1fr; gap: 1rem; align-items: start;
}
.timeline .t-time { font-weight: 700; color: var(--green-700); font-family: var(--font-display); font-size: 1.05rem; }
.timeline .t-title { font-weight: 600; margin: 0 0 .2em; }
.timeline .t-detail { margin: 0; color: var(--ink-700); }

/* venue */
.venue-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.venue-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.4rem; margin: 1.6rem 0; }
.venue-facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-600); font-weight: 700; }
.venue-facts dd { margin: .15rem 0 0; font-weight: 600; color: var(--ink-900); }
.venue-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.venue-svg { width: 100%; height: auto; }

/* ---------------------------------------------------------------- RSVP */
.section-rsvp { background: linear-gradient(180deg, var(--green-700), var(--green-800)); color: var(--cream-100); }
.section-rsvp .kicker { color: var(--gold-200); }
.section-rsvp h2 { color: #fff; }
.section-rsvp .section-lead { color: rgba(255,253,248,.85); }
.section-rsvp .section-lead strong { color: var(--gold-200); }
.rsvp-wrap { max-width: 760px; }

.rsvp-form {
  background: var(--white); color: var(--ink-900);
  border-radius: 20px; padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: var(--shadow-md);
  display: grid; gap: 1.4rem;
}
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset legend { font-weight: 600; font-size: 1.05rem; margin-bottom: .7rem; padding: 0; color: var(--ink-900); }

.radio-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.radio-row-tight { grid-template-columns: repeat(3, minmax(0,1fr)); }
.radio-card {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1.5px solid var(--cream-300); border-radius: var(--radius-sm); padding: .8rem .6rem;
  cursor: pointer; font-weight: 500; transition: .15s; background: var(--cream-100);
}
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card:hover { border-color: var(--green-600); }
.radio-card:has(input:checked) { border-color: var(--green-700); background: #eef3ea; box-shadow: inset 0 0 0 1px var(--green-700); }
.radio-card:has(input:focus-visible) { outline: 3px solid var(--gold-500); outline-offset: 2px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink-700); }
.req { color: var(--terra-600); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink-900);
  background: var(--cream-100); border: 1.5px solid var(--cream-300); border-radius: var(--radius-sm);
  padding: .7rem .85rem; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(70,96,63,.18); }
.field textarea { resize: vertical; }
.field input[aria-invalid="true"] { border-color: var(--terra-600); box-shadow: 0 0 0 3px rgba(181,86,47,.16); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .4rem; }
.form-note { margin: 0; font-size: .95rem; }
.form-note.error { color: var(--terra-600); font-weight: 600; }
.form-note.ok { color: var(--green-700); font-weight: 600; }

/* success */
.rsvp-success {
  background: var(--white); color: var(--ink-900); border-radius: 20px;
  padding: clamp(2rem, 5vw, 3.2rem); text-align: center; box-shadow: var(--shadow-md);
}
.success-ico {
  width: 64px; height: 64px; margin: 0 auto 1rem; display: grid; place-items: center;
  background: var(--green-700); color: #fff; border-radius: 50%; font-size: 2rem;
}
.rsvp-success h3 { font-size: 1.6rem; }
.rsvp-success .btn-ghost { margin-top: 1.4rem; }

/* ---------------------------------------------------------------- FAQ */
.faq-list { display: grid; gap: .9rem; }
.faq-item {
  background: var(--white); border: 1px solid var(--cream-300); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.4rem; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-600); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.4rem 1.2rem; color: var(--ink-700); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--green-900); color: var(--cream-200); padding-block: 2.6rem 1.6rem; margin-top: auto; }
.site-footer a { color: var(--gold-200); }
.site-footer .muted { color: rgba(243,235,217,.6); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.6rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 .2rem; color: #fff; }
.footer-contact { text-align: right; }
.footer-fine { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid rgba(243,235,217,.15); font-size: .9rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; }
  .venue-grid { grid-template-columns: 1fr; gap: 2rem; }
  .timeline li { grid-template-columns: 1fr; gap: .3rem; }
  .footer-contact { text-align: left; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream-100); border-bottom: 1px solid var(--cream-300);
    padding: .5rem 24px 1rem; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: .2rem 0; }
  .nav-links .btn { margin-top: .5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .radio-row { grid-template-columns: 1fr; }
  .venue-facts { grid-template-columns: 1fr; }
}
