/* Chilterns Light Network site styles.
   Tokens mirror the CLN design system: https://claude.ai/artifact/CcJ14NekUNYj3MC3Rw7wot (project/tokens.json).
   Layout follows the CLN Homepage canvas: https://claude.ai/artifact/XKCmnQ2yyAoyB4YJGtBiin */

:root {
  --forest: #365838;
  --forest-hover: #314f32;
  --leaf: #50744f;
  --leaf-hover: #486847;
  --sage: #9fb08c;
  --pale-green: #e2f0e0;
  --mist: #f3f9f2;
  --cream: #faf9ee;
  --surface: #ffffff;
  --ink: #111111;
  --ink-muted: #4d4d4d;
  --on-dark: #ffffff;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;

  --space-1: 8px;
  --space-2: 15px;
  --space-3: 20px;
  --space-4: 30px;
  --radius-sm: 13px;
  --radius-md: 22px;
  --radius-pill: 9999px;
  --sheet-xl: 1140px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--surface); }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
a { color: var(--leaf); }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.band--forest :focus-visible, .org-bar :focus-visible, .site-footer :focus-visible { outline-color: var(--on-dark); }
address { font-style: normal; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 16px; border-radius: var(--radius-sm); z-index: 10; }
.skip-link:focus { left: 8px; }

/* Layout helpers */
.sheet { max-width: var(--sheet-xl); margin: 0 auto; }
.band { padding: 72px max(20px, env(safe-area-inset-left, 0px)); }
.band--surface { background: var(--surface); }
.band--cream { background: var(--cream); }
.band--pale { background: var(--pale-green); }
.band--forest { background: var(--forest); color: var(--on-dark); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-2); }
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1 1 auto; min-width: 0; }
.intro { display: flex; flex-direction: column; gap: var(--space-1); max-width: 65ch; }
.intro--with-image { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px 40px; max-width: none; }
.intro--with-image > .stack-sm { flex: 1 1 360px; min-width: 0; max-width: 65ch; }
.intro__image { width: 140px; flex: none; mix-blend-mode: multiply; }
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split__main { flex: 999 1 520px; min-width: 0; }
.split__main p, .memorial__text p { max-width: 65ch; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* Type */
.eyebrow { font-family: var(--font-heading); font-weight: 600; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--leaf); }
.h-section { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: clamp(28px, 4vw, 36px); line-height: 1.2; text-wrap: balance; }
.h-page { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: 30px; line-height: 1.2; }
.h-card { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--forest); }
.h-fact { margin: 0; font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--forest); }
.lead { font-size: 18px; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
.strong { font-weight: 600; }
.quote { font-style: italic; font-size: 18px; }
.empty { font-style: italic; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 28px; border-radius: var(--radius-pill); border: 2px solid transparent; font: 600 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color .2s; }
.btn--primary { background: var(--leaf); color: var(--on-dark); }
.btn--primary:hover { background: var(--leaf-hover); color: var(--on-dark); }
.btn--outline { background: transparent; color: var(--leaf); border-color: var(--leaf); }
.btn--outline:hover { background: var(--mist); color: var(--forest); }
.btn--outline-dark { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--outline-dark:hover { background: var(--surface); color: var(--forest); }
.btn--on-dark { background: var(--on-dark); color: var(--forest); }
.btn--on-dark:hover { background: var(--pale-green); color: var(--forest); }
.btn--neutral { background: var(--surface); color: var(--ink); border-color: var(--ink-muted); }
.btn--neutral:hover { background: var(--mist); color: var(--ink); }
.btn--danger { background: var(--forest); color: var(--on-dark); }
.btn--danger:hover { background: var(--forest-hover); color: var(--on-dark); }

/* Header */
.site-header { background: var(--surface); padding: 16px 20px; border-bottom: 1px solid var(--pale-green); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-header__logo img { height: 56px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-weight: 600; font-size: 15px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--leaf); text-decoration: underline; }

/* Hero */
.hero { padding-block: 64px; }
.hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.hero__text .lead { max-width: 34em; }
.hero__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 5.5vw, 72px); line-height: 1.1; letter-spacing: clamp(2px, .6vw, 10px); color: var(--forest); text-wrap: balance; }
.hero__photo { flex: 1 1 440px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.hero__photo img { width: 100%; aspect-ratio: 1200 / 715; object-fit: cover; border-radius: var(--radius-md); }
.hero__photo figcaption { font-size: 14px; color: var(--ink-muted); }
.meet-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--pale-green); border-radius: var(--radius-sm); padding: 15px 20px; max-width: 34em; }
.meet-card__badge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--forest); color: var(--on-dark); line-height: 1; flex: none; }
.meet-card__day { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.meet-card__time { font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.meet-card__title { font-family: var(--font-heading); font-size: 18px; }

/* Values panel */
.values { flex: 1 1 300px; min-width: 0; align-self: flex-start; background: var(--sage); color: var(--ink); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.values__head { display: flex; align-items: center; gap: var(--space-2); }
.values__head img { width: 80px; border-radius: var(--radius-sm); flex: none; }
.values__head h3 { margin: 0; font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 1.2; }
.values__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.values__list li { display: flex; gap: 12px; align-items: baseline; }
.values__list li::before { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--forest); flex: none; }

/* Cards */
.cards { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.card { flex: 1 1 320px; min-width: 0; background: var(--surface); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: 12px; }
.card--pale { background: var(--pale-green); }
.card--wide { flex: 2 1 460px; }
.card--row { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px 30px; }
.card--row > img { width: 120px; height: 120px; object-fit: contain; flex: none; }
.card--row > .stack-sm { flex: 1 1 260px; min-width: 0; }

/* Posters */
.posters { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-start; }
.poster { flex: 1 1 400px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.poster__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1); }
.poster img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--pale-green); }
.poster__empty { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); background: var(--mist); border: 2px dashed var(--sage); color: var(--ink-muted); text-align: center; padding: var(--space-4); }

/* Meetup notes */
.notes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.note { display: flex; flex-wrap: wrap; gap: 15px 30px; background: var(--surface); border-radius: var(--radius-md); padding: var(--space-4); }
.note__date { flex: 0 0 150px; font-family: var(--font-heading); font-weight: 600; color: var(--forest); }
.note__body { flex: 999 1 400px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.note__title { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: 24px; line-height: 1.2; }
.note__text { max-width: 65ch; overflow-wrap: anywhere; }
.note__text p + p { margin-top: var(--space-1); }
.note__author { font-size: 14px; color: var(--ink-muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* Memorial */
.memorial { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.memorial__photo { flex: 1 1 280px; max-width: 380px; min-width: 0; border-radius: var(--radius-md); }
.memorial__text { flex: 999 1 460px; min-width: 0; }

/* Visit */
.gallery { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gallery__main { flex: 2 1 460px; min-width: 0; height: 320px; object-fit: cover; border-radius: var(--radius-md); }
.gallery__side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.gallery__side img { width: 100%; height: 152px; object-fit: cover; border-radius: var(--radius-sm); }

/* Membership */
.tiers { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.tier { flex: 1 1 220px; min-width: 0; border: 1px solid var(--pale-green); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); color: var(--pale-green); }
.tier__label { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.tier__price { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1.1; color: var(--on-dark); }
.tier--light { background: var(--surface); color: var(--ink-muted); border-color: var(--surface); }
.tier--light .tier__label, .tier--light .tier__price { color: var(--forest); }
.band--forest .small { color: var(--pale-green); }

/* Footer */
.site-footer { background: var(--forest); color: var(--on-dark); padding: 48px 20px; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer__inner > img { height: 56px; width: auto; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.site-footer__nav a { color: var(--on-dark); }
.site-footer__nav a.site-footer__quiet { color: var(--pale-green); }
.site-footer__small { flex-basis: 100%; font-size: 14px; color: var(--pale-green); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; flex: 0 1 200px; min-width: 0; }
.field--wide { flex: 1 1 300px; }
.field label { font-weight: 600; font-size: 15px; }
.field input:not([type="file"]), .field textarea, .field select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--ink-muted); border-radius: var(--radius-sm); font: inherit; background: var(--surface); color: var(--ink); width: 100%; }
.field textarea { resize: vertical; }
.field input[type="file"] { font: inherit; font-size: 15px; }
.field--error input, .field--error textarea { border: 2px solid var(--forest); }
.field__error { font-size: 14px; font-weight: 600; color: var(--forest); }
.field__error::before { content: "Problem: "; }
.field-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.status { background: var(--pale-green); border-radius: var(--radius-sm); padding: 12px 20px; font-weight: 600; }

/* Organiser pages */
body.organiser { background: var(--cream); }
.org-sheet { max-width: 1000px; margin: 0 auto; }
.org-bar { background: var(--forest); color: var(--on-dark); padding: 12px 20px; }
.org-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.org-bar__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-family: var(--font-heading); font-weight: 600; font-size: 18px; }
.org-bar__brand img { height: 40px; width: auto; }
.org-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.org-bar__actions > a { color: var(--on-dark); font-weight: 600; }
.org-bar__actions form { margin: 0; }
.org-main { padding: 40px 20px 64px; display: flex; flex-direction: column; gap: 40px; }
.org-columns { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.org-columns > .panel { flex: 1 1 400px; }
.panel { min-width: 0; background: var(--surface); border-radius: var(--radius-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.panel > .btn, .panel form .btn { align-self: flex-start; }
.panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1); }
.poster-form { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-start; }
.poster-form .field { flex: 1 1 auto; }
.poster-thumb { flex: none; width: 120px; border-radius: 8px; border: 1px solid var(--pale-green); }
.poster-thumb--empty { aspect-ratio: 3 / 4; background: var(--mist); border: 2px dashed var(--sage); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; color: var(--ink-muted); padding: 8px; }
.note-rows { margin: 0; padding: 0; list-style: none; }
.note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 15px 0; border-top: 1px solid var(--pale-green); }
.note-row time { flex: 0 0 150px; font-weight: 600; color: var(--forest); }
.note-row form { margin: 0; }
.note-row--confirm { background: var(--cream); padding-inline: 12px; border-radius: var(--radius-sm); }
.key-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.key-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-md); padding: 40px 30px; display: flex; flex-direction: column; gap: var(--space-3); }
.key-card > img { height: 48px; width: auto; align-self: flex-start; }
.key-card .field { flex: none; }
