/* ==========================================================================
   Exea Labs — Bay Area Workshop
   White ground, black text, teal accents, coastal motifs.
   ========================================================================== */

/* ---------- Tokens & base ----------------------------------------------- */

:root {
  --ink: #0B0B0C;
  --ink-soft: #3D4243;
  --ink-mute: #6B7274;
  --paper: #FFFFFF;
  --mist: #F5F7F7;
  --sand: #FAF8F4;
  --teal: #0E7C75;
  --teal-deep: #075E58;
  --teal-wash: #E6F2F1;
  --teal-soft: #C9E4E1;
  --rule: #E2E6E6;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 44px);
  --measure: 1100px;
  --radius: 5px;
  --header-h: 66px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-deep); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

[id] { scroll-margin-top: 90px; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(170%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { flex: none; border-radius: 7px; }

.brand b {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand em {
  display: block;
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 28px; }

.nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 0;
  transition: color .18s var(--ease);
}

.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--teal);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 9px 12px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

/* ---------- Buttons ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }

.btn-ghost { color: var(--ink); border: 1px solid var(--rule); background: var(--paper); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Hero -------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFD 38%, #EAF4F3 72%, #DCEEEC 100%);
  border-bottom: 1px solid var(--rule);
}

.hero .wrap {
  position: relative;
  z-index: 3;
  padding-block: clamp(52px, 8vw, 92px) clamp(150px, 23vw, 300px);
  max-width: 940px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 20px;
}

.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--teal); }

.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 20px; }

.hero .lede {
  font-size: clamp(1.05rem, 2.1vw, 1.24rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 30px;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.hero-meta span { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }

.hero-meta span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
}

.hero-scene { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; pointer-events: none; }
.hero-scene svg { display: block; width: 100%; height: auto; }

/* ---------- Page head --------------------------------------------------- */

.page-head {
  position: relative;
  overflow: hidden;
  background: var(--sand);
  border-bottom: 1px solid var(--rule);
}

.page-head .wrap {
  position: relative;
  z-index: 2;
  padding-block: clamp(44px, 6vw, 76px);
  max-width: 820px;
}

.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: 16px; }

.page-head p {
  font-size: clamp(1rem, 1.9vw, 1.13rem);
  color: var(--ink-soft);
  max-width: 34em;
}

.page-head .head-art {
  position: absolute;
  right: 0; bottom: 0;
  width: min(380px, 42vw);
  z-index: 1;
  pointer-events: none;
}

.org-mark {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--rule);
}

/* ---------- Sections ---------------------------------------------------- */

.section { padding-block: clamp(52px, 7vw, 86px); }
.section--mist { background: var(--mist); }
.section--sand { background: var(--sand); }
.section--wash { background: var(--teal-wash); }
.section--tight { padding-block: clamp(36px, 5vw, 56px); }

.section--center { text-align: center; }
.section--center .wrap { max-width: 640px; }
.section--center p { color: var(--ink-soft); }
.section--center .btn-row { justify-content: center; }

.section h2 { font-size: clamp(1.65rem, 3.4vw, 2.2rem); margin-bottom: 16px; }

.section .intro {
  font-size: 1.04rem;
  color: var(--ink-soft);
  max-width: 38em;
  margin-bottom: 34px;
}

/* ---------- Facts ------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0;
}

.fact { background: var(--paper); padding: 24px 22px; }

.fact dt {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 8px;
}

.fact dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

.fact dd a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.head-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 20px;
  font-size: 0.93rem;
  font-weight: 500;
}

.fact small {
  display: block;
  font-family: var(--sans);
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--ink-mute);
  margin-top: 5px;
  line-height: 1.5;
}

/* ---------- Rule-separated list ----------------------------------------- */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  max-width: 46em;
}

.list li {
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
}

.list b {
  display: block;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.list span { color: var(--ink-soft); font-size: 0.95rem; }

.list--numbered { counter-reset: step; }

.list--numbered li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 16px;
  row-gap: 0;
}

.list--numbered li b,
.list--numbered li span { grid-column: 2; }

.list--numbered li::before {
  grid-row: 1 / span 2;
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal);
  padding-top: 3px;
}

/* ---------- Checklist --------------------------------------------------- */

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; max-width: 44em; }

.checklist li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  align-items: start;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.checklist li::before {
  content: "\2713";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px; height: 19px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--teal-wash);
  border: 1.5px solid var(--teal);
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.checklist b { color: var(--ink); font-weight: 600; }

/* ---------- Stats ------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.stat {
  text-align: center;
  padding: 26px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--teal-deep);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}

/* ---------- Cards ------------------------------------------------------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 26px;
}

.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

.avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--teal-wash);
  border: 1px solid var(--teal-soft);
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  flex: none;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 72px; height: 72px; }

.avatar.is-empty::after {
  content: attr(data-initials);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--teal-deep);
}

/* ---------- Note -------------------------------------------------------- */

.note {
  margin-top: 26px;
  padding: 16px 20px;
  background: var(--teal-wash);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

/* ---------- Split & signup card ----------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}

.split--wide { grid-template-columns: 1.2fr .8fr; }

@media (min-width: 921px) {
  .split .sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}

.signup-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: 0 1px 3px rgba(11, 11, 12, .05), 0 12px 32px -20px rgba(11, 11, 12, .22);
}

.signup-card .btn { width: 100%; padding-block: 16px; }

.mini-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 12px;
  font-size: 0.91rem;
}

.mini-facts li { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-soft); }
.mini-facts b { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding-block: 30px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  justify-content: space-between;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.footer-links a:hover { color: var(--teal-deep); }

.footer-note { margin: 0; color: var(--ink-mute); font-size: 0.84rem; }

/* ---------- Motion ------------------------------------------------------ */

/* Hidden start states live behind .js so a failed script cannot blank the page. */
.js [data-anim] { opacity: 0; }
.js [data-anim="up"] { transform: translateY(20px); }
.js [data-anim="hero"] { transform: translateY(24px); }
.js [data-anim="fade"] { transform: none; }

.js [data-anim].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

/* ---------- Coastal scene ------------------------------------------------
   The scene loops on CSS alone, with no JavaScript involved.

   Wave bands scroll by exactly one tile width per cycle. `--tile` carries that
   width so the same keyframe serves both the 1440-wide hero and the 420-wide
   page-head art; getting it wrong slides a band clean off screen.
   ------------------------------------------------------------------------- */

.wave-band {
  --tile: 1440px;
  will-change: transform;
  animation: drift var(--drift, 48s) linear infinite;
}

/* Distance reads as speed: the horizon crawls, the shorebreak moves. */
.wave-band--1 { --drift: 96s; }
.wave-band--2 { --drift: 64s; }
.wave-band--3 { --drift: 42s; }
.wave-band--4 { --drift: 27s; }

/* The about/sign-up page-head art reuses these bands inside a 420-wide viewBox. */
.head-art .wave-band { --tile: 420px; }

@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(var(--tile) * -1)); }
}

/* Foam rides its own band, so it needs no drift of its own — just a slow breathe
   so the crest line is not a dead stroke. The far band stays fainter. */
.foam {
  --foam-lo: .18;
  --foam-hi: .46;
  opacity: .32;             /* the value that stands when the loop is switched off */
  animation: foam 11s ease-in-out infinite alternate;
}
.wave-band--4 .foam {
  --foam-lo: .45;
  --foam-hi: .85;
  opacity: .65;
  animation-duration: 7.5s;
  animation-delay: -3s;
}

@keyframes foam {
  from { opacity: var(--foam-lo); }
  to   { opacity: var(--foam-hi); }
}

/* Two circles, two jobs. The halo breathes; the disc holds steady so the sun
   never looks like it is flickering. */
.sun-glow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  opacity: .26;
  animation: halo 11s ease-in-out infinite;
}

@keyframes halo {
  0%, 100% { opacity: .2;  transform: scale(1); }
  50%      { opacity: .34; transform: scale(1.06); }
}

.cloud { will-change: transform; }
.cloud--1 { animation: driftCloud 96s linear infinite; }
.cloud--2 { animation: driftCloud 134s linear infinite; animation-delay: -48s; }
.cloud--3 { animation: driftCloud 112s linear infinite; animation-delay: -84s; }

@keyframes driftCloud {
  from { transform: translateX(-280px); }
  to   { transform: translateX(1580px); }
}

/* Sunlight on the water: a slow swell of brightness, not a blink. */
.glint {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  opacity: 0;
  animation: glint 9s ease-in-out infinite;
}
.glint:nth-child(2) { animation-duration: 11s;   animation-delay: -2.6s; }
.glint:nth-child(3) { animation-duration: 7.5s;  animation-delay: -5.1s; }
.glint:nth-child(4) { animation-duration: 12.5s; animation-delay: -1.3s; }
.glint:nth-child(5) { animation-duration: 8.5s;  animation-delay: -6.4s; }

@keyframes glint {
  0%, 100% { opacity: 0;   transform: scaleX(.55); }
  50%      { opacity: .55; transform: scaleX(1); }
}

/* Palms. The trunk base is the local origin, so rotating about the bbox bottom
   pivots within a fraction of a pixel of where the trunk meets the sand. */
.palm-body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sway 11s ease-in-out infinite alternate;
}
.palm--2 .palm-body { animation-duration: 13.5s; animation-delay: -4.2s; }
.palm--3 .palm-body { animation-duration: 9.8s;  animation-delay: -6.7s; }
.palm--4 .palm-body { animation-duration: 15s;   animation-delay: -2.1s; }

/* Fronds lag the trunk on deliberately unrelated periods, so the crown never
   pulses in unison the way a single shared duration makes it. */
.frond { transform-box: fill-box; animation: frond 7.3s ease-in-out infinite alternate; }
.frond--r  { transform-origin: 0% 50%;   animation-duration: 6.7s;  animation-delay: -1.9s; }
.frond--l  { transform-origin: 100% 50%; animation-duration: 8.1s;  animation-delay: -4.3s; }
.frond--u  { transform-origin: 50% 100%; animation-duration: 9.4s;  animation-delay: -2.8s; }
.frond--dr { transform-origin: 0% 0%;    animation-duration: 7.9s;  animation-delay: -5.6s; }
.frond--dl { transform-origin: 100% 0%;  animation-duration: 10.2s; animation-delay: -3.4s; }

@keyframes sway  { from { transform: rotate(-1deg); }   to { transform: rotate(1.2deg); } }
@keyframes frond { from { transform: rotate(-2deg); }   to { transform: rotate(2.2deg); } }

/* Birds: `fly` moves the group, `flap` squashes the wings inside it, so the two
   transforms never overwrite each other. */
.bird { --alt: 0px; will-change: transform; animation: fly 44s ease-in-out infinite; }
.bird--2 { --alt: 42px;  animation-duration: 58s; animation-delay: -21s; }
.bird--3 { --alt: -24px; animation-duration: 51s; animation-delay: -37s; }

.bird-wing {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flap 1.1s ease-in-out infinite alternate;
}
.bird--2 .bird-wing { animation-duration: 0.9s; animation-delay: -0.4s; }
.bird--3 .bird-wing { animation-duration: 1.3s; animation-delay: -0.7s; }

@keyframes flap {
  from { transform: scaleY(.55); }
  to   { transform: scaleY(1.15); }
}

/* An eased arc across the sky, rather than a hard V at the midpoint. `--alt`
   spreads the three birds over different altitudes on the one shared path. */
@keyframes fly {
  0%   { transform: translate(-200px, calc(126px + var(--alt))); }
  25%  { transform: translate(240px,  calc(104px + var(--alt))); }
  50%  { transform: translate(700px,  calc(88px  + var(--alt))); }
  75%  { transform: translate(1170px, calc(108px + var(--alt))); }
  100% { transform: translate(1620px, calc(122px + var(--alt))); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-anim] { opacity: 1; transform: none; transition: none; }
  .wave-band, .foam, .cloud, .sun-glow, .glint,
  .palm-body, .frond, .bird, .bird-wing { animation: none !important; }
  /* Without the loop the glints would stay at opacity 0, so pin them visible. */
  .glint { opacity: .4; }
}

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 920px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .split--wide { grid-template-columns: 1fr; }
  .page-head .head-art { opacity: .6; width: min(300px, 44vw); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .nav-toggle { display: inline-block; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 18px;
    box-shadow: 0 18px 30px -24px rgba(11, 11, 12, .4);
  }

  .nav.open { display: flex; }

  .nav a { padding: 13px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { color: var(--teal-deep); font-weight: 600; }

  .grid-2 { grid-template-columns: 1fr; }

  .palm--3 { display: none; }
}

@media (max-width: 460px) {
  .facts, .stats { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
