/* =========================================================
   Let's Gather Swansea - design system
   ---------------------------------------------------------
   Type scale, spacing and color are defined once here and
   reused everywhere so the page stays consistent.
   ========================================================= */

:root {
  /* ---- Color ---- */
  --green: #1f4433;          /* forest green, the flag field */
  --green-deep: #163227;     /* deeper green for the closing field */
  --green-tint: #eef0e6;     /* faint green-tinged panel on cream */
  --cream: #f4ecd6;          /* warm cream, the flag lettering */
  --cream-soft: #faf5e6;
  --ink: #22271f;            /* primary text on cream */
  --ink-soft: #5a6154;       /* secondary / label text on cream */
  --line: #ddd2b4;           /* hairline on cream */
  --line-strong: #c3b58c;
  --on-green: #f4ecd6;       /* text on green */
  --on-green-soft: #d9dcc7;  /* secondary text on green */
  --accent: #c2673a;         /* muted terracotta, used sparingly */

  /* ---- Spacing ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* ---- Fonts ---- */
  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* ---- Type scale (mobile-first, fluid) ----
     One scale used everywhere. No ad hoc font sizes in components. */
  --fs-display: clamp(2.75rem, 11vw, 6rem);   /* hero + closing */
  --fs-h2:      clamp(1.85rem, 6vw, 3rem);     /* section titles */
  --fs-h3:      clamp(1.5rem, 5.5vw, 2.1rem);  /* event names */
  --fs-lead:    clamp(1.15rem, 3.5vw, 1.4rem); /* lead paragraphs */
  --fs-body:    1.0625rem;                      /* body copy */
  --fs-small:   0.95rem;                        /* secondary copy */
  --fs-label:   0.72rem;                        /* eyebrow / label caps */

  --lh-tight: 1.0;
  --lh-snug: 1.25;
  --lh-body: 1.6;

  /* ---- Layout ---- */
  --maxw: 940px;          /* shared content container width */
  --measure: 660px;       /* readable max-width for long-form copy */
  --radius: 3px;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

a { color: inherit; }

/* Inline icons: one sane default box in px so a missing size can
   never blow out layout, regardless of surrounding font-size.
   Icons are quiet support: thin stroke, muted tone. */
svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
/* The hidden sprite must stay zero-sized. */
svg[width="0"] { width: 0; height: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.hero :focus-visible,
.why :focus-visible,
.closing :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--on-green);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--cream);
  color: var(--ink);
  padding: var(--sp-2) var(--sp-4);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- Shared type helpers ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--fs-label);
}

/* ---------- Layout ----------
   One shared content container for every section, so headings and
   content share a single left grid line down the whole page.
   Long-form copy uses a readable max-width but stays left-aligned
   to that same grid line rather than re-centering. */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
/* Readable measure for long-form text sections. Left-aligned to the
   grid, not centered, so left edges never jump between sections. */
.container.narrow > * {
  max-width: var(--measure);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: var(--lh-snug);
  letter-spacing: 0.01em;
  font-size: var(--fs-h2);
  color: var(--green);
  text-wrap: balance;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green);
  color: var(--on-green);
  border-bottom: 4px solid var(--cream);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 60px;
  padding-block: var(--sp-3);
}
.brand { text-decoration: none; display: inline-flex; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(1rem, 4.2vw, 1.3rem);
  line-height: 1;
  white-space: nowrap;
}
.site-nav { display: flex; gap: var(--sp-1); }
.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--fs-small);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { border-bottom-color: var(--on-green); }

/* Narrow screens: keep brand on one line and let the nav tuck in
   tighter so all three items fit without wrapping the header. */
@media (max-width: 480px) {
  .site-header .container { padding-inline: var(--sp-3); }
  .header-inner { gap: var(--sp-2); }
  .brand-mark { font-size: 0.95rem; letter-spacing: 0.02em; }
  .site-nav { gap: 0; }
  .site-nav a {
    padding: var(--sp-2) 0.45rem;
    letter-spacing: 0.02em;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background: var(--green);
  color: var(--on-green);
  border-bottom: 4px solid var(--cream);
}
.hero-inner {
  padding-block: clamp(var(--sp-8), 16vw, 8rem);
}
.hero-eyebrow {
  color: var(--cream);
  margin-bottom: var(--sp-5);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid rgba(244, 236, 214, 0.35);
}
.hero-eyebrow svg { width: 22px; height: 22px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.005em;
  font-size: var(--fs-display);
  max-width: 14ch;
  text-wrap: balance;
}
.hero-sub {
  margin-top: var(--sp-5);
  font-size: var(--fs-lead);
  max-width: 30ch;
  color: var(--on-green-soft);
  line-height: 1.45;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 50px;
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.12s ease, color 0.12s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  margin-top: var(--sp-6);
  background: var(--cream);
  color: var(--green);
  border: 2px solid var(--cream);
}
.btn-primary:hover { background: transparent; color: var(--on-green); }

.btn-event {
  align-self: flex-start;
  margin-top: var(--sp-2);
  background: var(--green);
  color: var(--on-green);
  border: 2px solid var(--green);
}
.btn-event:hover { background: transparent; color: var(--green); }

/* =========================================================
   Upcoming gatherings
   ========================================================= */
.gatherings { padding-block: clamp(var(--sp-8), 12vw, var(--sp-9)); }

.section-head { margin-bottom: var(--sp-7); }
.section-sub {
  margin-top: var(--sp-3);
  max-width: var(--measure);
  font-size: var(--fs-lead);
  color: var(--ink-soft);
}

/* The intro line under the gatherings heading is one continuous
   supporting sentence, styled by .section-sub above. */

.event-list {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

.event {
  display: flex;
  flex-direction: column;
  background: var(--cream-soft);
  border: 2px solid var(--ink);
  border-top: 8px solid var(--green);
  padding: var(--sp-5);
}

.event-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-3);
}
/* Activity mark: a quiet line icon, no box, matching the fact icons. */
.event-icon {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--green);
}
.event-icon svg { width: 26px; height: 26px; }
.event-name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.0;
  letter-spacing: 0.01em;
  font-size: var(--fs-h3);
  color: var(--green);
  text-wrap: balance;
  margin-right: auto;
}

/* Participation label: an icon plus text, so it reads as a
   descriptive label rather than a status light. Not clickable. */
.rsvp-flag {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-label);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.rsvp-flag svg { width: 16px; height: 16px; }
.rsvp-required { color: var(--green); }
.rsvp-open { color: var(--accent); }

/* Logistics bar: When and Where, promoted to the top of the card
   so date and place are the first thing after the event name. */
.event-logistics {
  margin: 0 0 var(--sp-4);
  display: grid;
  gap: var(--sp-2) var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  background: var(--green-tint);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.event-logistics .fact {
  border: 0;
  padding: 0;
}
.event-logistics .fact-ico { color: var(--green); }
.event-logistics dd { font-weight: 600; font-size: 1.05rem; }

.event-desc {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--ink);
  max-width: 42ch;
}

/* Fact rows: an icon column and a stacked label/value block.
   Flexbox keeps the icon aligned to the value regardless of length. */
.event-facts {
  margin: 0 0 var(--sp-4);
}
.fact {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--line);
}
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact-ico {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--line-strong);
}
.fact-ico svg { width: 20px; height: 20px; }
.fact-body { min-width: 0; }
.fact dt {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-label);
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}
.fact dd {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.4;
}
/* When and Where read strongest for scanning */
.fact-when dd,
.fact-where dd { font-weight: 600; }
.tbd { font-weight: 400; color: var(--ink-soft); white-space: nowrap; }

/* Compact local "grown-up stays" note, integrated with Who. */
.stays-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-label);
  color: var(--green);
  white-space: nowrap;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  margin-left: 0.15rem;
}

/* Concise capacity line for events where limited space is relevant. */
.capacity-note {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-label);
  color: var(--green);
  margin-bottom: var(--sp-3);
}

.event-note {
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--ink-soft);
  border-left: 3px solid var(--line-strong);
  padding-left: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.event-note + .event-note { margin-top: calc(var(--sp-2) * -1); }
/* The last note before the CTA gets a little breathing room. */
.event-note:last-of-type { margin-bottom: var(--sp-4); }

/* Open-house note reads as real participation info, not a footnote. */
.event-note-strong {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: none;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--green);
  border-left-color: var(--accent);
}

/* Drop-in details for Puzzling, shown where an RSVP button would be.
   Plain text, not a button, since this gathering needs no sign-up. */
.dropin-info {
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--ink-soft);
}

/* =========================================================
   About + Why
   ========================================================= */
.about, .why { padding-block: clamp(var(--sp-7), 10vw, var(--sp-9)); }
.about { background: var(--green-tint); }
.why { background: var(--green); color: var(--on-green); }
.why .section-title { color: var(--on-green); }

.about .section-title,
.why .section-title { margin-bottom: var(--sp-5); }

.about p, .why p {
  font-size: var(--fs-lead);
  line-height: 1.55;
}
.about p + p, .why p + p { margin-top: var(--sp-5); }
.why p { color: var(--on-green); }

/* =========================================================
   Things we're kicking around (idea tiles)
   Deliberately lighter and more compact than event cards so
   these can never be mistaken for scheduled gatherings.
   ========================================================= */
.ideas { padding-block: clamp(var(--sp-7), 10vw, var(--sp-9)); }
.ideas .section-sub {
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-6);
  max-width: 52ch;
}
.idea-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.idea {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  line-height: 1.1;
  color: var(--green);
  background: transparent;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
}
.ideas-seed {
  margin-top: var(--sp-6);
  max-width: 54ch;
  font-size: var(--fs-body);
  color: var(--ink-soft);
}

/* =========================================================
   FAQ (accessible disclosure)
   Visually secondary. Uses native details/summary with a
   plain, on-brand chevron. No SaaS rounded panels.
   ========================================================= */
.faq { padding-block: clamp(var(--sp-7), 10vw, var(--sp-9)); }
.faq .section-title { margin-bottom: var(--sp-5); }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-item { border-bottom: 1px solid var(--line-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.15rem;
  color: var(--green);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-answer { padding: 0 0 var(--sp-5); }
.faq-answer p {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  max-width: 60ch;
}
.faq-answer p + p { margin-top: var(--sp-3); }

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* =========================================================
   Closing (flag field)
   ========================================================= */
.closing {
  background: var(--green-deep);
  color: var(--on-green);
  text-align: center;
  padding-block: clamp(var(--sp-8), 18vw, 10rem);
  border-top: 4px solid var(--cream);
  border-bottom: 4px solid var(--cream);
}
.closing-lines {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.01em;
  font-size: var(--fs-display);
  text-wrap: balance;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--green);
  color: var(--on-green);
  padding-block: var(--sp-6);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}
.footer-place { font-size: var(--fs-small); color: var(--on-green-soft); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.footer-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--fs-small);
  text-decoration: none;
  padding: var(--sp-2) var(--sp-3);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* =========================================================
   Responsive
   ========================================================= */

/* Roomier interior padding once there is space. Single column stays. */
@media (min-width: 620px) {
  .container { padding-inline: var(--sp-6); }
  .event { padding: var(--sp-7); }

  /* When and Where sit side by side in the logistics bar. */
  .event-logistics {
    grid-template-columns: 1fr 1fr;
  }

  /* Secondary facts become a tidy two-column grid, still one
     label/value per cell so nothing turns into a text block. */
  .event-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--sp-6);
    border-top: 1px solid var(--line);
  }
  .event-facts .fact {
    border-top: none;
    border-bottom: none;
  }
  /* Give the second row in each column its own top divider */
  .event-facts .fact:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* =========================================================
   Motion + scroll
   ========================================================= */
html {
  scroll-behavior: smooth;
  /* Keep anchor targets clear of the sticky header. */
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
