@font-face { font-family: "Dry Brush"; src: url(/fonts/dry-brush.woff2) format("woff2"); font-display: swap; } /* certificate name only; web licence needed, see docs/LAUNCH.md */
@font-face { font-family: "Bebas Neue"; src: url(/fonts/bebas-neue.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Caveat Brush"; src: url(/fonts/caveat-brush.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Archivo"; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Archivo"; src: url(/fonts/archivo-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --wood: #2a1c13;
  --wood-2: #412d21;
  --yellow: #f8d708;
  --yellow-soft: #fbe55a;
  --blue: #004878;
  --blue-2: #0b5f96;
  --ochre: #6b4c22;        /* darkened from logo ochre #906c3c for contrast on yellow */
  --ink: #23170f;          /* body text on yellow */
  --cream: #fbf4e4;        /* body text on wood */
  --cream-dim: #e6d9bf;
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --brush: "Caveat Brush", cursive;
  --body: "Archivo", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wood); color: var(--cream); font: 400 1.0625rem/1.6 var(--body); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--yellow); color: var(--wood); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.yellow :focus-visible { outline-color: var(--blue); }
a { color: inherit; text-underline-offset: .2em; }
strong { font-weight: 700; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--yellow); color: var(--wood); padding: 10px 14px; font-weight: 700; border-radius: 6px; }
.skip:focus { top: 12px; }

/* ---- materials from Joe's deck ---- */
.wood { background: var(--wood) url(/img/wood.webp) center / cover; }
.yellow { background: var(--yellow) url(/img/yellow.webp) center / cover; color: var(--ink); }

/* ---- type ---- */
.h { font: 400 clamp(2.4rem, 7vw, 4.75rem)/.92 var(--display); letter-spacing: .01em; color: var(--yellow); margin: 0 0 .45em; text-wrap: balance; }
.h--ochre { color: var(--ochre); }
.tilt { transform: rotate(-2deg); transform-origin: left center; }
p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }

/* ---- buttons ---- */
.btn { --bg: var(--yellow); --fg: var(--wood); display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 52px; padding: .7em 1.5em .55em; border: 0; border-radius: 999px; background: var(--bg); color: var(--fg); font: 400 1.4rem/1 var(--display); letter-spacing: .04em; text-decoration: none; cursor: pointer; box-shadow: 0 6px 18px -6px rgb(0 0 0 / .45); transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s; }
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 12px 24px -8px rgb(0 0 0 / .5); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn--yellow:hover { --bg: var(--yellow-soft); }
.btn--blue { --bg: var(--blue); --fg: #fff; }
.btn--blue:hover { --bg: var(--blue-2); }
.btn--ghost { --bg: transparent; --fg: var(--cream); box-shadow: inset 0 0 0 2px var(--cream); }
.btn--ghost:hover { --bg: rgb(251 244 228 / .1); box-shadow: inset 0 0 0 2px var(--cream); }
.btn--big { font-size: clamp(1.7rem, 5vw, 2.4rem); padding: .8em 2em .65em; }

/* ==== The site: built from Joe's Keynote "SWFC Website V001" ====
   On desktop every section is laid out in Keynote slide units: the deck is 1058 x 595, so
   calc(N * var(--u)) is "N points on the slide" scaled to the window. Positions, sizes, fonts
   and colours are read straight out of the deck. Below 900px wide the slides stack for phones. */
:root {
  --u: calc(100vw / 1058);
  --k-yellow: #fff60f;      /* Keynote: slide 2 heading, HOME active */
  --k-gold: #f9db13;        /* Keynote: Better Together / 39 Coastal Nations headings */
  --k-ochre: #5e401a;       /* Keynote: headings and active menu on yellow */
  --k-joe: #76501e;         /* Keynote: "JOE PISTORIUS" */
  --k-head: Helvetica, "Helvetica Neue", Arial, sans-serif;  /* the deck uses Helvetica-Oblique */
  --k-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
.site { font-family: var(--k-body); }
.site p { max-width: none; }
.k { font: italic 400 max(15px, calc(14 * var(--u)))/1.85 var(--k-body); }
.k-h { display: block; font: italic 400 max(21px, calc(21 * var(--u)))/1.25 var(--k-head); letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.k-tilt { transform: rotate(-2deg); }
.about__text, .mission__text, .joe__text, .news__text, .nations__text, .donate__text { padding-inline: calc(4 * var(--u)); } /* Keynote's text-box inset */
.k-shadow { text-shadow: 0 1px 3px rgb(0 0 0 / .55); }
.k b { font-weight: 700; }
.slide { position: relative; }
.slide { overflow: clip; } /* the 2° tilt pokes tall text blocks out sideways */
.slide > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- menu and small logo: on every slide but Home, like the deck ---- */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; pointer-events: none; }
.bar a { pointer-events: auto; }
.bar__logo { position: absolute; left: calc(12 * var(--u)); top: calc(5 * var(--u)); width: calc(186 * var(--u)); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.bar.is-past .bar__logo { opacity: 1; visibility: visible; }
.bar ul { position: absolute; right: calc(39 * var(--u)); top: calc(28 * var(--u)); display: flex; gap: calc(22 * var(--u)); margin: 0; padding: 0; list-style: none; }
.bar nav a { display: block; padding: 4px 0; font: 700 max(13px, calc(14 * var(--u)))/1.2 var(--k-body); color: #fff; text-decoration: none; text-shadow: 0 3px 6px rgb(0 0 0 / .45); }
.bar nav a[aria-current] { color: var(--k-yellow); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.bar[data-tone="yellow"] nav a[aria-current] { color: var(--k-ochre); }
.bar[data-tone="gold"] nav a[aria-current] { color: var(--k-gold); }

/* ---- slide 1: Home ---- */
.home { height: 100svh; min-height: calc(595 * var(--u)); background: var(--wood) url(/img/wood.webp) center / cover; }
.home__logo { position: absolute; left: calc(145 * var(--u)); top: calc(19 * var(--u)); width: auto; height: calc(556 / 595 * 100%); max-width: none; }

/* ---- slide 2: About ---- */
.about { height: calc(595 * var(--u)); color: #fff; }
.about__text { position: absolute; left: calc(331 * var(--u)); top: calc(168 * var(--u)); width: calc(528 * var(--u)); text-align: center; }
.about__text .k-h { color: var(--k-yellow); }

/* ---- slides 3 and 4: About, continued (one long yellow page on the web) ---- */
.mission { background: var(--yellow) url(/img/yellow.webp) center / cover; color: #000; padding: calc(58 * var(--u)) 0 calc(90 * var(--u)) calc(263 * var(--u)); }
.mission__text { width: calc(528 * var(--u)); text-align: justify; hyphens: manual; }
.mission__text p { margin: 0 0 1.85em; }
.mission__text .lbl { color: var(--k-ochre); font-weight: 700; }
.mission__text ul { margin: 0 0 1.85em; padding-left: 1.3em; }
.mission__text li { margin-bottom: 1.85em; }
.mission__text .quote { color: var(--k-ochre); font-weight: 700; }

/* ---- slide 6: Joe ---- */
.joe { height: calc(595 * var(--u)); color: #000; }
.joe__text { position: absolute; left: calc(558 * var(--u)); top: calc(90 * var(--u)); width: calc(434 * var(--u)); text-align: justify; }
.joe__text .k-h { color: var(--k-joe); text-align: left; }
.joe__text .k-h span { color: #fff; }
.joe__photo-m { display: none; }

/* ---- slide 7: Better Together ---- */
.news { height: calc(595 * var(--u)); background: var(--wood) url(/img/wood.webp) center / cover; color: #fff; }
.news__text { position: absolute; left: calc(264 * var(--u)); top: calc(168 * var(--u)); width: calc(528 * var(--u)); text-align: center; }
.news__text .k-h { color: var(--k-gold); }
.news__box { position: absolute; left: calc(307 * var(--u)); top: calc(303 * var(--u)); width: calc(444 * var(--u)); }

/* the white box from the deck, holding the sign-up form */
.signup { display: flex; align-items: stretch; min-height: max(52px, calc(54 * var(--u))); background: #fff; border-radius: calc(12 * var(--u) + 4px); overflow: hidden; }
.signup input:not([name=website]) { flex: 1 1 0; min-width: 0; border: 0; padding: 0 1em; font: italic 400 max(15px, calc(14 * var(--u))) var(--k-body); color: #000; background: none; }
.signup input + input { border-left: 1px solid #d8d2c4; }
.signup input::placeholder { color: #6e6e6e; }
.signup input:focus { outline: none; background: #fff8cc; }
.signup input[aria-invalid="true"] { background: #ffe2d9; }
.signup button { flex: none; border: 0; padding: 0 1.1em; background: none; color: var(--k-ochre); font: 700 max(13px, calc(14 * var(--u))) var(--k-body); cursor: pointer; }
.signup button:hover { text-decoration: underline; }
.signup button[disabled] { opacity: .6; cursor: progress; }
.signup:focus-within { box-shadow: 0 0 0 3px var(--k-gold); }
.signup__msg { margin: .8em 0 0; color: #ffd2c2; font: 700 max(14px, calc(13 * var(--u))) var(--k-body); text-align: center; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.signup__msg:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.welcome { outline: none; text-align: center; }
.welcome p { margin: 0 auto 1em; }
.cert-frame { margin: 0 auto 16px; max-width: min(320px, 70vw); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .8); transform: rotate(-1.5deg); }
.cert-frame svg { display: block; width: 100%; height: auto; }
.news.is-joined { height: auto; min-height: calc(595 * var(--u)); padding: calc(303 * var(--u)) 0 48px; }
.news.is-joined .news__box { position: relative; left: auto; top: auto; margin: 0 auto; }

/* ---- slide 8: 39 Coastal Nations ---- */
.nations { height: calc(595 * var(--u)); color: #fff; }
.nations__pin { position: absolute; left: calc(306 * var(--u)); top: calc(291 * var(--u)); width: calc(75 * var(--u)); }
.nations__text { position: absolute; left: calc(545 * var(--u)); top: calc(82 * var(--u)); width: calc(528 * var(--u)); text-align: center; }
.nations__text .k-h { color: var(--k-gold); }
.nations__list { position: absolute; left: calc(683 * var(--u)); top: calc(200 * var(--u)); margin: 0; padding: 0; list-style: none; font: 400 max(14px, calc(14 * var(--u)))/1 var(--k-body); }
.nations__list li { display: flex; align-items: center; gap: calc(17 * var(--u)); height: calc(25 * var(--u)); min-height: 22px; }
.nations__list li::before { content: ""; flex: none; width: max(11px, calc(12 * var(--u))); height: max(11px, calc(12 * var(--u))); border: 1.5px solid #fff; border-radius: 2px; }
.nations__list li.on::before { background: var(--k-gold); }
.nations__list i { font-style: italic; }

/* ---- slides 9 to 14: Gallery ---- */
.gallery img { width: 100%; aspect-ratio: 1058 / 595; object-fit: cover; }

/* ---- slide 15: Donate ---- */
.donate { height: calc(595 * var(--u)); background: var(--yellow) url(/img/yellow.webp) center / cover; color: #000; }
.donate__text { position: absolute; left: calc(263 * var(--u)); top: calc(168 * var(--u)); width: calc(528 * var(--u)); text-align: center; }
.donate__text .k-h { color: var(--k-ochre); }
.donate__box { position: absolute; left: calc(307 * var(--u)); top: calc(303 * var(--u)); width: calc(444 * var(--u)); min-height: max(52px, calc(54 * var(--u))); display: grid; place-items: center; background: #fff; border-radius: calc(12 * var(--u) + 4px); color: var(--k-ochre); font: 700 max(15px, calc(16 * var(--u))) var(--k-body); text-decoration: none; }
.donate__box:hover { text-decoration: underline; }

/* ---- phones: the slides stack ---- */
@media (max-width: 899px) {
  :root { --u: calc(100vw / 600); }
  .bar__logo { left: 8px; top: 6px; width: 64px; }
  .bar ul { right: 12px; top: 14px; gap: 10px; }
  .bar nav a { font-size: 12.5px; }
  .k { font-size: 16px; line-height: 1.7; }
  .k br.d { display: none; }
  .k-h { font-size: 20px; }
  .slide { height: auto !important; }
  .about__text, .joe__text, .news__text, .nations__text, .donate__text, .news__box, .donate__box, .nations__list { position: relative; left: auto; top: auto; width: auto; }
  .home { min-height: 100svh; display: grid; place-items: center; }
  .home__logo { position: static; width: 86vw; height: auto; }
  .about { min-height: 100svh; display: grid; align-items: start; }
  .about > .bg { object-position: 62% 50%; }
  .about__text { margin: 120px 20px 40px; }
  .mission { padding: 90px 20px 56px; }
  .mission__text { width: auto; text-align: left; }
  .mission__text, .joe__text { transform: none; } /* a long block tilted 2° runs off a phone screen */
  .joe { background: var(--yellow) url(/img/yellow.webp) center / cover; }
  .joe > .bg { display: none; }
  .joe__photo-m { display: block; width: 100%; }
  .joe__text { padding: 28px 20px 56px; text-align: left; }
  .news { padding: 110px 20px 72px; }
  .news__box { margin-top: 28px; }
  .signup { flex-direction: column; border-radius: 16px; }
  .signup input:not([name=website]) { min-height: 52px; }
  .signup input + input { border-left: 0; border-top: 1px solid #d8d2c4; }
  .signup button { min-height: 52px; border-top: 1px solid #d8d2c4; }
  .news.is-joined { padding: 110px 20px 72px; }
  .news.is-joined .news__box { margin-top: 28px; }
  .nations { padding-bottom: 56px; background: var(--wood) url(/img/wood.webp) center / cover; }
  .nations > .bg { position: relative; height: auto; aspect-ratio: 1058 / 595; }
  .nations__pin { left: calc(306 / 1058 * 100vw); top: calc(291 / 1058 * 100vw); width: calc(75 / 1058 * 100vw); }
  .nations__text { padding: 24px 20px 0; }
  .nations__list { margin: 20px auto 0; width: fit-content; }
  .nations__list li { gap: 14px; height: 26px; }
  .donate { padding: 100px 20px 80px; }
  .donate__box { margin: 28px auto 0; max-width: 444px; border-radius: 16px; }
}

[hidden] { display: none !important; }
