/* Avodah Creatives — main stylesheet
   Palette "Studio Light": paper + ink, with six bright colours — one for every kind of creative.
   Colours are always fills with ink on top (never coloured text on paper), so contrast holds.
   One typeface (Archivo variable). The only shape language is the logo's 60° stroke. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F7F5F0;
  --ink: #15131F;
  --body: #3B3947;
  --muted: #5F5C6B;
  --photo: #E8E4DC;
  --hair: rgba(21, 19, 31, 0.12);
  --rule: rgba(21, 19, 31, 0.85);

  --ember: #FF6B3D;
  --sun: #FFC83D;
  --bloom: #FF8FC7;
  --lilac: #B79CFF;
  --sky: #5AB0FF;
  --mint: #3DD9A0;
  --on-lilac-soft: #3A2F5C;

  --wrap: 1360px;
  --gutter: 48px;
  --header-h: 92px;
  --bar-h: 64px;

  --tan60: 0.5774;
  --ease-out: cubic-bezier(.16, .84, .24, 1);
  --ease-wipe: cubic-bezier(.7, 0, .2, 1);
  --ease-ui: cubic-bezier(.2, .7, .1, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--paper);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--sun); color: var(--ink); }

html.menu-open { overflow: hidden; }

img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.display {
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.caps {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* A marker-style colour bar under a word (used for emphasis in headings) */
.mark-under {
  font-style: normal;
  background: linear-gradient(to top, transparent 0.08em, var(--c, var(--ember)) 0.08em, var(--c, var(--ember)) 0.3em, transparent 0.3em);
}

/* ---------- Buttons & links ---------- */

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .35s ease;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -30%;
  width: 160%;
  z-index: -1;
  background: var(--sun);
  transform: translateX(-102%) skewX(-30deg);
  transition: transform .5s var(--ease-ui);
}
.btn--sm { min-height: 44px; padding: 0 20px; }
.btn--wide { justify-content: space-between; width: 100%; min-height: 56px; padding: 0 22px; }
.btn--wide::before { background: var(--paper); }

.arrow { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease-ui); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-bottom: 2px solid var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.link-arrow .arrow { width: 16px; height: 16px; }

@media (hover: hover) {
  .btn:hover::before { transform: translateX(0) skewX(-30deg); }
  .btn:hover { color: var(--ink); }
  .btn:hover .arrow, .link-arrow:hover .arrow, .join-bar:hover .arrow { transform: translateX(5px); }
}
.btn:focus-visible::before { transform: translateX(0) skewX(-30deg); }
.btn:focus-visible { color: var(--ink); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--hair); }

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px 40px;
  animation: fade .8s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}
.brand-lockup { height: 38px; width: auto; aspect-ratio: 1866 / 457; }
.brand-mark { display: none; height: 28px; width: auto; aspect-ratio: 588 / 455; }

.env-tag { display: none; }
html[data-env="uat"] .env-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  background: var(--sun);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.nav ul { display: flex; flex-wrap: wrap; gap: 6px 30px; font-size: 15px; font-weight: 500; }
.nav a {
  text-decoration: none;
  padding-bottom: 5px;
  background: linear-gradient(var(--ember), var(--ember)) no-repeat 0 100% / 0% 3px;
  transition: background-size .35s var(--ease-ui);
}
.nav a:hover, .nav a:focus-visible, .nav a[aria-current="page"] { background-size: 100% 3px; }

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 8px;
  margin-right: -8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: end;
  gap: 48px 72px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.motto {
  font-size: clamp(56px, 10vw, 148px);
  line-height: 0.88;
  cursor: default;
}
.motto .line { display: block; overflow: hidden; padding: 0 0 .14em .34em; margin: 0 0 -.14em -.34em; }
.motto .line > span { display: block; animation: rise 1s var(--ease-out) both; }
.motto .line:nth-child(1) > span { animation-delay: .12s; }
.motto .line:nth-child(2) > span { animation-delay: .24s; }
.motto .line:nth-child(3) > span { animation-delay: .36s; }

/* Create → Connect → Belong: one word at a time comes to full colour while the others stay faded, on a loop.
   Palette "Clay & Olive": Create = clay, Connect = olive, Belong = ochre.
   Enabled by main.js; without it (or with reduced motion) all three show in full colour. */
.w {
  display: inline-block;
  white-space: nowrap;
  color: var(--wc);
  -webkit-text-stroke: 0.05em var(--stroke, transparent);
  paint-order: stroke fill;
}
.w--create  { --wc: #9A4A2E; --wc-dim: rgba(154, 74, 46, 0.22); }
.w--connect { --wc: #55603A; --wc-dim: rgba(85, 96, 58, 0.22); }
.w--belong  { --wc: #A68930; --wc-dim: rgba(166, 137, 48, 0.22); }
.motto.is-glow-ready .w { color: var(--wc-dim); -webkit-text-stroke-color: var(--stroke-dim, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .motto.is-risen .w { animation: turn 4.5s ease-in-out infinite both; }
  .motto.is-risen .w--connect { animation-delay: 1.5s; }
  .motto.is-risen .w--belong { animation-delay: 3s; }
  .motto.is-paused .w { animation-play-state: paused; }
}
@keyframes turn {
  0%, 40%, 100% { color: var(--wc-dim); -webkit-text-stroke-color: var(--stroke-dim, transparent); }
  8%, 30% { color: var(--wc); -webkit-text-stroke-color: var(--stroke, transparent); }
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 6px;
  animation: up .9s var(--ease-out) .75s both;
}
.hero-intro h1 { font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.hero-intro p { font-size: 18px; color: var(--body); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 6px; }

.band {
  --band-h: clamp(320px, 43vw, 760px);
  height: var(--band-h);
  background: var(--photo);
  clip-path: polygon(calc(var(--band-h) * var(--tan60)) 0, 100% 0, 100% 100%, 0 100%);
  animation: band 1.3s var(--ease-wipe) .45s both;
}

/* ---------- Statement ---------- */

.statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 40px 96px;
  padding-top: 160px;
  padding-bottom: 104px;
}
.statement-grid h2 { font-size: clamp(30px, 3vw, 42px); line-height: 1.12; letter-spacing: -0.01em; }
.statement-grid p { font-size: clamp(22px, 2.1vw, 30px); line-height: 1.38; letter-spacing: -0.005em; color: var(--body); }

/* ---------- Every kind of creative ---------- */

.crafts { padding-bottom: 136px; }
.crafts-label { color: var(--muted); margin-bottom: 28px; }
.craft-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.18em 0.5em;
  font-size: clamp(34px, 5vw, 72px);
  font-weight: 600;
  line-height: 1.12;
}
.craft { position: relative; isolation: isolate; padding: 0 0.06em; white-space: nowrap; }
.craft::before {
  content: "";
  position: absolute;
  left: -0.08em; right: -0.04em;
  bottom: 0.04em;
  height: 0.2em;
  z-index: -1;
  background: var(--c);
  transform-origin: left bottom;
  transform: skewX(-30deg) scaleX(1);
  transition: height .45s var(--ease-ui), transform .7s var(--ease-wipe);
}
.craft:nth-child(6n+1) { --c: var(--ember); }
.craft:nth-child(6n+2) { --c: var(--sun); }
.craft:nth-child(6n+3) { --c: var(--bloom); }
.craft:nth-child(6n+4) { --c: var(--lilac); }
.craft:nth-child(6n+5) { --c: var(--sky); }
.craft:nth-child(6n+6) { --c: var(--mint); }
.craft--more { color: var(--muted); font-weight: 500; }
.craft--more::before { display: none; }
@media (hover: hover) {
  .craft:hover::before { height: 0.86em; }
}
/* Bars sweep in, one after another, when the list scrolls into view (enabled by main.js) */
.crafts-ready .craft::before { transform: skewX(-30deg) scaleX(0); }
.crafts-ready .craft-list.is-in .craft::before { transform: skewX(-30deg) scaleX(1); }

/* ---------- Four invitations ---------- */

.invites { padding-bottom: 160px; }
.invite-list { border-bottom: 1px solid var(--rule); }
.invite { position: relative; border-top: 1px solid var(--rule); }
.invite:nth-child(1) { --c: var(--sun); }
.invite:nth-child(2) { --c: var(--bloom); }
.invite:nth-child(3) { --c: var(--sky); }
.invite:nth-child(4) { --c: var(--mint); }

.invite-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 360px;
  align-items: center;
  gap: 12px 32px;
  min-height: 120px;
  padding: 20px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.invite-num { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; }
.invite-mark {
  display: inline-block;
  width: 0;
  height: 8px;
  background: var(--c);
  opacity: 0;
  transform: skewX(-30deg);
  transition: width .4s var(--ease-ui), opacity .3s ease;
}
.invite-text {
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.02;
  opacity: .5;
  transition: opacity .4s ease, transform .5s var(--ease-ui);
}
.invite.is-active .invite-mark { width: 22px; opacity: 1; }
.invite.is-active .invite-text { opacity: 1; transform: translateX(16px); }

.invite-panel {
  position: absolute;
  top: 50%;
  right: 0;
  width: 360px;
  height: 200px;
  margin-top: -100px;
  z-index: 2;
  pointer-events: none;
  visibility: hidden;
}
.invite.is-active .invite-panel { visibility: visible; }
.invite-panel > div { height: 100%; }
.invite-photo {
  --ph: 200px;
  --lines: 2;
  --lh: 1.06;
  --fs: 27px;
  /* Text is centred in the shape; its left edge clears the 60° cut at the top of a centred block of --lines lines. */
  --pad-l: calc((var(--ph) / 2 + var(--lines) * var(--lh) * var(--fs) / 2) * var(--tan60) + 12px);
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--c);
  clip-path: polygon(calc(var(--ph) * var(--tan60)) 0, 100% 0, 100% 100%, 0 100%);
}
.invite.is-active .invite-photo { animation: pop .6s var(--ease-wipe) both; }
.invite-say,
.invite-slides li {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pad-l);
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink);
  font-size: var(--fs);
  font-stretch: 125%;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--lh);
  text-wrap: balance;
}
.invite-slides, .invite-count { display: none; }
.invite-count {
  position: absolute; top: 16px; right: 20px;
  color: var(--ink); opacity: .7;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}
/* Slides take over once main.js is running (and motion is welcome) */
.slides-ready .invite-say { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; left: 0; bottom: 0; }
.slides-ready .invite-slides, .slides-ready .invite-count { display: block; }
.invite-slides li { opacity: 0; transform: translateY(0.45em); }
.invite-slides li.is-on { opacity: 1; transform: none; transition: opacity .4s ease .2s, transform .55s var(--ease-ui) .2s; }
.invite-slides li.is-off { opacity: 0; transform: translateY(-0.35em); transition: opacity .2s ease, transform .3s var(--ease-ui); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Closing / next gathering (lilac band) ---------- */

.closing {
  position: relative;
  overflow: hidden;
  background: var(--lilac);
  color: var(--ink);
}
.closing-mark {
  position: absolute;
  right: -140px;
  bottom: -200px;
  height: 760px;
  width: auto;
  aspect-ratio: 588 / 455;
  color: var(--ink);
  opacity: .1;
  will-change: transform;
}
.closing-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: end;
  gap: 64px 96px;
  padding-top: 160px;
  padding-bottom: 160px;
}
.closing h2 { font-size: clamp(48px, 7vw, 104px); line-height: 0.92; }
.closing-copy p { margin-top: 28px; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.4; color: var(--on-lilac-soft); }
.closing-details { display: flex; flex-direction: column; gap: 22px; }
.closing-details h3 { color: var(--on-lilac-soft); }
.details { border-bottom: 1px solid rgba(21, 19, 31, 0.3); }
.details > div { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid rgba(21, 19, 31, 0.3); }
.details dt { flex: 0 0 72px; padding-top: 3px; color: var(--on-lilac-soft); }
.details dd { font-size: 17px; font-weight: 500; }
.closing-details .btn { margin-top: 6px; }

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  padding-top: 40px;
  padding-bottom: 36px;
  font-size: 14px;
}
.footer-brand { margin-right: auto; color: var(--ink); }
.footer-brand svg { height: 26px; width: auto; aspect-ratio: 1866 / 457; }
.site-footer .nav ul { font-size: 14px; gap: 8px 24px; font-weight: 400; }
.copyright { color: var(--muted); }

/* ---------- Pinned join bar (mobile + tablet) ---------- */

.join-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  height: var(--bar-h);
  padding: 0 20px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background-color .35s ease, color .35s ease;
}
.join-bar .arrow { color: var(--sun); }
html.menu-open .join-bar { background: var(--paper); color: var(--ink); }
html.menu-open .join-bar .arrow { color: var(--ink); }

/* ---------- Menu overlay (sun) ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--sun);
  color: var(--ink);
  overflow-y: auto;
  padding-bottom: calc(var(--bar-h) + 24px);
}
.menu[hidden] { display: none; }
.menu.is-opening { animation: menu-in .6s var(--ease-wipe) both; }
.menu.is-closing { animation: menu-out .42s var(--ease-wipe) both; }

.menu-top { min-height: 60px; display: flex; align-items: center; justify-content: space-between; }
.menu-top svg { height: 28px; width: auto; aspect-ratio: 588 / 455; color: var(--ink); }
.menu-close {
  min-height: 44px; padding: 0 8px; margin-right: -8px;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
.menu-list { margin-top: 28px; border-bottom: 1px solid rgba(21, 19, 31, 0.25); }
.menu-list li { border-top: 1px solid rgba(21, 19, 31, 0.25); }
.menu-list a {
  display: flex; align-items: center; gap: 14px;
  min-height: 68px;
  text-decoration: none;
  font-stretch: 125%; font-weight: 600; font-size: 32px; letter-spacing: -0.02em;
}
.menu-list a[aria-current="page"]::after {
  content: ""; width: 22px; height: 8px; background: var(--ink); transform: skewX(-30deg);
}
.menu.is-opening .menu-list li { animation: up .6s var(--ease-out) both; }
.menu.is-opening .menu-list li:nth-child(1) { animation-delay: .26s; }
.menu.is-opening .menu-list li:nth-child(2) { animation-delay: .32s; }
.menu.is-opening .menu-list li:nth-child(3) { animation-delay: .38s; }
.menu.is-opening .menu-list li:nth-child(4) { animation-delay: .44s; }
.menu.is-opening .menu-list li:nth-child(5) { animation-delay: .50s; }
.menu.is-opening .menu-list li:nth-child(6) { animation-delay: .56s; }

/* ---------- Scroll reveal (enabled by main.js) ---------- */

.reveal-ready .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s var(--ease-out); }
.reveal-ready .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes band {
  from { clip-path: polygon(calc(var(--band-h) * var(--tan60)) 0, calc(var(--band-h) * var(--tan60)) 0, 0 100%, 0 100%); }
  to { clip-path: polygon(calc(var(--band-h) * var(--tan60)) 0, 100% 0, 100% 100%, 0 100%); }
}
@keyframes pop {
  from { clip-path: polygon(calc(var(--ph) * var(--tan60)) 0, calc(var(--ph) * var(--tan60)) 0, 0 100%, 0 100%); }
  to { clip-path: polygon(calc(var(--ph) * var(--tan60)) 0, 100% 0, 100% 100%, 0 100%); }
}
@keyframes menu-in {
  from { clip-path: polygon(-130% 0, 0% 0, -125% 100%, -130% 100%); }
  to { clip-path: polygon(-130% 0, 225% 0, 100% 100%, -130% 100%); }
}
@keyframes menu-out {
  from { clip-path: polygon(-130% 0, 225% 0, 100% 100%, -130% 100%); }
  to { clip-path: polygon(-130% 0, 0% 0, -125% 100%, -130% 100%); }
}

/* ---------- Tablet & mobile ---------- */

@media (max-width: 1024px) {
  :root { --gutter: 32px; --header-h: 72px; }
  .nav--main, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .join-bar { display: flex; }
  body { padding-bottom: var(--bar-h); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 56px; }
  .hero-intro { max-width: 520px; }
  .hero-intro .btn { display: none; } /* the pinned bar carries the join link */
  .statement-grid { grid-template-columns: minmax(0, 1fr); padding-top: 112px; padding-bottom: 72px; gap: 28px; }
  .crafts { padding-bottom: 96px; }
  .closing-grid { grid-template-columns: minmax(0, 1fr); padding-top: 112px; padding-bottom: 112px; gap: 48px; }
  .closing-details { max-width: 420px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --header-h: 60px; }
  .brand-lockup { display: none; }
  .brand-mark { display: block; }
  .motto { font-size: clamp(44px, 14.4vw, 72px); line-height: 0.9; }
  .hero-grid { padding-top: 36px; padding-bottom: 40px; gap: 28px; }
  .hero-intro { gap: 18px; }
  .hero-intro h1 { font-size: 21px; }
  .hero-intro p { font-size: 16px; }
  .band { --band-h: 360px; }
  .statement-grid { padding-top: 88px; padding-bottom: 56px; gap: 24px; }
  .statement-grid h2 { font-size: 30px; }
  .statement-grid p { font-size: 21px; line-height: 1.4; }
  .crafts { padding-bottom: 80px; }
  .craft-list { font-size: clamp(22px, 7.5vw, 34px); gap: 0.22em 0.45em; }
  .motto .line { padding-left: 0.3em; margin-left: -0.3em; }
  .invites { padding-bottom: 88px; }
  .invite-btn { grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; padding: 22px 0; }
  .invite-num { font-size: 12px; }
  .invite-text { font-size: 30px; line-height: 1.05; }
  .invite.is-active .invite-text { transform: none; }
  .invite-panel {
    position: static;
    width: auto; height: auto; margin: 0;
    visibility: hidden;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .5s var(--ease-ui), visibility 0s linear .5s;
  }
  .invite.is-active .invite-panel { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
  .invite-panel > div { height: auto; overflow: hidden; min-height: 0; }
  .invite-photo { --ph: 190px; --fs: clamp(22px, 7vw, 30px); height: 190px; margin-bottom: 22px; }
  .closing-grid { padding-top: 96px; padding-bottom: 88px; gap: 40px; }
  .closing h2 { font-size: 50px; line-height: 0.94; }
  .closing-copy p { margin-top: 20px; font-size: 19px; }
  .closing-mark { right: -120px; bottom: -110px; height: 420px; }
  .details dt { flex-basis: 64px; }
  .details dd { font-size: 16px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 24px; padding-top: 40px; padding-bottom: 48px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 40px; padding: 48px 0; }
.nf .brand { margin: 0; }
.nf-title { font-size: clamp(40px, 7vw, 96px); line-height: 0.98; max-width: 12ch; }

/* Cascade timing for the activity bars */
.crafts-ready .craft-list.is-in .craft:nth-child(2)::before { transition-delay: .08s; }
.crafts-ready .craft-list.is-in .craft:nth-child(3)::before { transition-delay: .16s; }
.crafts-ready .craft-list.is-in .craft:nth-child(4)::before { transition-delay: .24s; }
.crafts-ready .craft-list.is-in .craft:nth-child(5)::before { transition-delay: .32s; }
.crafts-ready .craft-list.is-in .craft:nth-child(6)::before { transition-delay: .40s; }
.crafts-ready .craft-list.is-in .craft:nth-child(7)::before { transition-delay: .48s; }
.crafts-ready .craft-list.is-in .craft:nth-child(8)::before { transition-delay: .56s; }
.crafts-ready .craft-list.is-in .craft:nth-child(9)::before { transition-delay: .64s; }
.crafts-ready .craft-list.is-in .craft:nth-child(10)::before { transition-delay: .72s; }
.crafts-ready .craft-list.is-in .craft:nth-child(11)::before { transition-delay: .80s; }
.crafts-ready .craft-list.is-in .craft:nth-child(12)::before { transition-delay: .88s; }
.crafts-ready .craft-list.is-in .craft:hover::before { transition-delay: 0s; }

/* ---------- Hero: next gathering line ---------- */
.next-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  align-self: flex-start;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.next-tag {
  padding: 4px 8px;
  background: var(--mint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.next-line > span:last-child {
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 0% 2px;
  padding-bottom: 2px;
  transition: background-size .35s var(--ease-ui);
}
.next-line:hover > span:last-child, .next-line:focus-visible > span:last-child { background-size: 100% 2px; }

/* ---------- The next gathering (event) ---------- */
.event { padding-bottom: 160px; }
.event-grid {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: start;
  gap: 56px 96px;
}
.event-poster { position: relative; margin: 0; isolation: isolate; }
.event-poster::before {
  content: "";
  position: absolute;
  inset: 28px -28px -28px 28px;
  z-index: -1;
  background: var(--mint);
  clip-path: polygon(calc(100% * 0.18) 0, 100% 0, 100% 100%, 0 100%);
}
.event-poster img { width: 100%; height: auto; }
.event-info { display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.event-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; color: var(--muted); }
.countdown { padding: 4px 8px; background: var(--sun); color: var(--ink); font-size: 11px; font-weight: 700; }
.countdown[hidden] { display: none; }
.event-date { font-size: clamp(44px, 5.6vw, 84px); line-height: 0.95; }
.event-tagline { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; line-height: 1.15; }
.event-desc { font-size: 19px; color: var(--body); max-width: 34em; }
.event-expect h3 { color: var(--muted); margin-bottom: 12px; }
.event-expect ul { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.event-expect li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-stretch: 125%;
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.01em;
}
.event-expect li::before { content: ""; width: 22px; height: 8px; transform: skewX(-30deg); background: var(--c, var(--mint)); flex: none; }
.event-expect li:nth-child(1) { --c: var(--ember); }
.event-expect li:nth-child(2) { --c: var(--sun); }
.event-expect li:nth-child(3) { --c: var(--sky); }
.event-guest { font-size: 17px; color: var(--body); }
.event-guest .caps { color: var(--muted); margin-right: 6px; }
.event-guest strong { color: var(--ink); font-weight: 700; }
.event-details { border-bottom: 1px solid var(--rule); }
.event-details > div { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid var(--rule); }
.event-details dt { flex: 0 0 72px; padding-top: 3px; color: var(--muted); }
.event-details dd { display: flex; flex-direction: column; gap: 2px; font-size: 17px; font-weight: 500; }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 6px; }
.event-note { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

.closing-cta { width: 100%; }

@media (max-width: 1024px) {
  .event { padding-bottom: 112px; }
  .event-grid { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .event-poster { max-width: 480px; }
}
@media (max-width: 760px) {
  .event { padding-bottom: 88px; }
  .event-grid { gap: 52px; }
  .event-poster { margin-right: 20px; }
  .event-poster::before { inset: 18px -18px -18px 18px; }
  .event-desc { font-size: 17px; }
}
@media (max-width: 1024px) {
  .event-actions .btn, .closing-cta { display: none; } /* the pinned bar carries the join link */
}

/* Mid-size screens: the six links no longer fit on one line beside the logo and button,
   so the header switches to the Menu button (the header CTA stays until 1024px). */
@media (max-width: 1200px) {
  .nav--main { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
}

/* ---------- FAQ ---------- */
.faq { padding-bottom: 160px; }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 32px 96px;
  align-items: start;
}
.faq-head { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-head h2 { font-size: clamp(48px, 7vw, 104px); line-height: 0.92; }
.faq-list { border-bottom: 1px solid var(--rule); }
.faq-item { border-top: 1px solid var(--rule); }
.faq-item:nth-child(6n+1) { --c: var(--ember); }
.faq-item:nth-child(6n+2) { --c: var(--sun); }
.faq-item:nth-child(6n+3) { --c: var(--bloom); }
.faq-item:nth-child(6n+4) { --c: var(--lilac); }
.faq-item:nth-child(6n+5) { --c: var(--sky); }
.faq-item:nth-child(6n+6) { --c: var(--mint); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q {
  position: relative;
  font-stretch: 125%;
  font-weight: 600;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: transform .4s var(--ease-ui);
}
.faq-q::before {
  content: "";
  position: absolute;
  left: -34px; top: 0.5em;
  width: 0; height: 8px;
  background: var(--c);
  transform: skewX(-30deg) translateY(-50%);
  transition: width .4s var(--ease-ui);
}
.faq-item[open] .faq-q, .faq-item summary:hover .faq-q { transform: translateX(34px); }
.faq-item[open] .faq-q::before, .faq-item summary:hover .faq-q::before { width: 22px; }
.faq-icon { position: relative; flex: none; width: 22px; height: 22px; transition: transform .4s var(--ease-ui); }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 56px 26px 0; display: flex; flex-direction: column; gap: 12px; font-size: 18px; color: var(--body); max-width: 44em; }
.faq-a a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.faq-tag { color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
/* Smooth open/close where supported */
:root { interpolate-size: allow-keywords; }
.faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease-ui), content-visibility .45s allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }

@media (max-width: 1024px) {
  .faq { padding-bottom: 112px; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq-head { position: static; }
}
@media (max-width: 760px) {
  .faq { padding-bottom: 88px; }
  .faq-head h2 { font-size: 50px; }
  .faq-q::before { display: none; }
  .faq-item[open] .faq-q, .faq-item summary:hover .faq-q { transform: none; }
  .faq-a { padding-right: 0; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-item::details-content { transition: none; }
}

/* ---------- Community photo in the hero band ----------
   The photo fills the band edge to edge; only the empty top-left corner of the room sits behind the 60° cut.
   As the cut opens, the photo settles from a slight zoom. */
.band--photo { margin: 0; position: relative; overflow: hidden; }
.band--photo picture { display: block; height: 100%; }
.band-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
@media (prefers-reduced-motion: no-preference) {
  .band-photo { animation: band-settle 2.4s var(--ease-wipe) .45s backwards; } /* no transform left behind, so it renders at full sharpness */
}
@keyframes band-settle { from { transform: scale(1.07); } to { transform: none; } }
@media (max-width: 760px) {
  .band-photo { object-position: 58% 40%; }
}

/* ---------- Spots left (live count from /api/slots) ---------- */
.slots {
  flex-basis: 100%;
  display: grid;
  gap: 10px;
  max-width: 440px;
  margin-bottom: 4px;
  animation: fade .6s ease both;
}
.slots[hidden] { display: none; }
.slots-text {
  margin: 0;
  justify-self: start;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.slots[data-state="low"] .slots-text,
.slots[data-state="full"] .slots-text,
.slots[data-state="closed"] .slots-text { padding: 4px 8px; }
.slots[data-state="low"] .slots-text { background: var(--sun); }
.slots[data-state="full"] .slots-text,
.slots[data-state="closed"] .slots-text { background: var(--ink); color: var(--paper); }
.slots-meter {
  position: relative;
  display: block;
  height: 6px;
  overflow: hidden;
  background: var(--hair);
}
.slots-meter[hidden] { display: none; }
.slots-fill {
  position: absolute;
  inset: 0;
  background: var(--mint);
  transform-origin: 0 50%;
  transform: scaleX(var(--taken, 0));
  transition: transform 1.2s var(--ease-out);
}
.slots[data-state="low"] .slots-fill { background: var(--ember); }

/* Register links once the gathering is full or registration is closed:
   the event button steps aside (the badge says why); the pinned bar stays as a quiet notice. */
.btn.is-unavailable { display: none; }
.join-bar.is-unavailable { background: var(--photo); color: var(--muted); }
.join-bar.is-unavailable .arrow { display: none; }

/* Pinned bar: "9 left" tag when spots run low */
.join-bar-label { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.join-bar-slots {
  padding: 3px 7px;
  background: var(--sun);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.join-bar-slots[hidden] { display: none; }
@media (max-width: 359px) {
  .join-bar-slots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slots { animation: none; }
  .slots-fill { transition: none; }
}
