/* ==========================================================================
   BRAINCOPIA. A statement surreal magazine.
   Sticker aesthetic: thick ink borders, hard offset shadows, no blur,
   rounded-square corners, per-card colour theming.
   ========================================================================== */

/* --------------------------------------------------------------- TOKENS */
:root {
  /* Braincopia's own palette. Violet is the brand, deep violet its shadow,
     green and yellow the two signals, pink the accent that only appears on
     ink. The -ink variants are the same hues pulled dark enough to read as
     text on paper, which the display versions are not. */
  --violet:     #5B0ECC;
  --deep:       #3D0999;
  --green:      #24B574;
  --yellow:     #FFD600;
  --pink:       #FF90E8;
  --orange:     #FF751F;   /* Wear Your's own orange, sampled from their mark */
  --green-ink:  #14724A;

  /* Semantic, deliberately outside the brand set: an error is not a colour
     the magazine gets to style. */
  --error:    #B3261E;
  --error-bg: #FCECEA;

  --ink:    #1C1C1C;
  --paper:  #F7F4EE;
  --cream:  #FFFFFF;
  --line:   rgba(28, 28, 28, 0.14);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-heading: 'Archivo', system-ui, sans-serif;
  --font-body:    'Archivo', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, monospace;

  --border-w: 2.5px solid var(--ink);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 7px 7px 0 var(--ink);
  --shadow-lg: 11px 11px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);

  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 44px);
  --header-h: 74px;

  --card-color: var(--violet);   /* overridden per card inline */
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }

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

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--yellow); color: var(--ink); padding: 12px 20px;
  font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase;
  border: var(--border-w); border-radius: var(--radius-sm);
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: 1420px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 110px) 0; }

/* ----------------------------------------------------------- TYPE SCALE */
.eyebrow {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--card-color);
  margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: .95; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 7.4vw, 6.2rem); text-transform: uppercase; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); text-transform: uppercase; }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); text-transform: uppercase; }
h4 { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
p { max-width: 62ch; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.55; font-weight: 500; }
.mono { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }

/* -------------------------------------------------------------- BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: .98rem;
  letter-spacing: .02em; text-decoration: none; cursor: pointer;
  padding: 15px 28px; border: var(--border-w); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { background: var(--violet); color: var(--cream); }
.btn-yellow  { background: var(--yellow); }
.btn-ink     { background: var(--ink);    color: var(--paper); }
.btn-block   { width: 100%; }
.btn-sm      { padding: 10px 18px; font-size: .86rem; }

/* --------------------------------------------------------------- CARDS */
.card {
  background: var(--cream);
  border: var(--border-w); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.card-hover:hover { transform: translate(-4px, -4px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.card-hover:nth-child(even):hover { transform: translate(-4px, -4px) rotate(.6deg); }

.tag {
  display: inline-block; font-family: var(--font-mono); font-size: .66rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--cream);
}

/* --------------------------------------------------------------- HEADER */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: var(--paper); border-bottom: var(--border-w);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
/* The mark is already a violet disc with its own edge. Nothing is drawn
   around it: no border, no tile, no shadow. */
.brand-mark { width: 46px; height: 46px; object-fit: contain; }
.brand-word { display: block; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.brand-sub { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; opacity: .62; }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-list a {
  display: block; text-decoration: none; padding: 9px 14px;
  font-family: var(--font-heading); font-weight: 600; font-size: .93rem;
  border: 2px solid transparent; border-radius: var(--radius-sm);
}
.nav-list a:hover { border-color: var(--ink); background: var(--cream); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle { display: none; padding: 11px 14px; }
.mobile-nav { display: none; border-top: var(--border-w); background: var(--cream); }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav a {
  display: block; text-decoration: none; padding: 15px var(--gutter);
  font-family: var(--font-heading); font-weight: 700; border-bottom: 1px solid var(--line);
}

/* -------------------------------------------------------------- MARQUEE */
.marquee {
  background: var(--ink); color: var(--paper);
  border-bottom: var(--border-w); overflow: hidden; white-space: nowrap;
}
.marquee-track { display: inline-flex; animation: slide 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  display: inline-block; padding: 13px 0;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
}
.marquee span::after { content: '✦'; color: var(--yellow); margin: 0 26px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ----------------------------------------------------------------- HERO
   The film runs behind the masthead copy. The video is laid out taller than
   the hero so no edge is ever uncovered, and a two-axis scrim keeps the type
   legible over whatever frame happens to be on screen. */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(480px, 78vh, 780px);
  display: flex; align-items: flex-end;
  background: var(--ink); border-bottom: var(--border-w);
  padding: clamp(84px, 11vh, 124px) 0 clamp(34px, 5vh, 58px);
}
.hero-video {
  position: absolute; left: 0; top: -8%;
  width: 100%; height: 116%;
  object-fit: cover; display: block; z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(16,10,28,.90) 0%, rgba(16,10,28,.64) 40%, rgba(16,10,28,.12) 72%, transparent 100%),
    linear-gradient(to top,   rgba(16,10,28,.92) 0%, rgba(16,10,28,.58) 34%, rgba(16,10,28,.14) 68%, rgba(16,10,28,.38) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; color: var(--cream); }
.hero h1 { color: var(--cream); }
.hero .lede { color: rgba(255,255,255,.90); }
.hero-stats { border-top-color: rgba(255,255,255,.34); }
.hero-stats div { color: rgba(255,255,255,.74); opacity: 1; }
.hero-stats strong { color: var(--cream); }
@media (prefers-reduced-motion: reduce) { .hero-video { top: 0; height: 100%; } }

.hero-chant {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--yellow);
  min-height: 1.4em; margin-bottom: 20px;
}
.hero-chant span { display: inline-block; animation: chantIn .5s ease both; }
@keyframes chantIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero h1 { margin-bottom: 22px; max-width: 16ch; }
.rotator {
  display: inline-block; position: relative;
  background: var(--yellow); border: var(--border-w); border-radius: var(--radius-sm);
  padding: 0 .18em; box-shadow: var(--shadow-sm); transform: rotate(-1.2deg);
}
.hero .lede { margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 38px; padding-top: 24px; border-top: var(--border-w); }
.hero-stats div { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 2.1rem; letter-spacing: .02em; opacity: 1; margin-top: 4px; }

/* --------------------------------------------------- SECTION FURNITURE */
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .lede { margin-top: 14px; }
/* ----------------------------------------------------------------- GRID */
.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ------------------------------------------------------------- FOUNDER
   The one place on the page that speaks in the first person, so it gets a
   dark ground and a slower measure than anything around it. */
.founder { background: var(--ink); color: var(--paper); border-block: var(--border-w); }
.founder .eyebrow { color: var(--yellow); }
.founder h2 { color: var(--paper); max-width: 20ch; }
/* The letter and the picture of it. The plate is small at source, so the
   column is capped near its native width rather than blown up soft. */
.founder-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  gap: clamp(30px, 5vw, 68px); align-items: start;
}
.founder-plate { margin: 0; }
.founder-plate img {
  width: 100%; height: auto;
  border: var(--border-w); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.founder-body {
  margin-top: clamp(26px, 3.4vw, 44px);
  display: grid; gap: 20px; max-width: 62ch;
}
.founder-body p {
  color: rgba(247, 244, 238, .84);
  font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.75;
}
.founder-body .founder-close {
  color: var(--yellow);
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(1.14rem, 2vw, 1.42rem); line-height: 1.45;
  margin-top: 6px;
}

/* ------------------------------------------------------------- SULAYMA
   A full-bleed yellow band she stands on rather than a panel she sits
   inside. Figure left, words right, at every width: on a phone the two
   columns just get tighter, they do not stack. Her PNG ships close to
   native size because her outlines are thin, and any pre-scaling here is
   weight the browser can never put back. */
.ambassador { background: var(--yellow); border-block: var(--border-w); overflow: hidden; }
.ambassador-inner {
  display: grid; grid-template-columns: auto 1fr;
  gap: clamp(22px, 5vw, 72px); align-items: end;
  padding-top: clamp(40px, 6vw, 76px);
}
.ambassador-figure { height: clamp(340px, 44vw, 580px); width: auto; align-self: end; }
.ambassador-copy { align-self: center; padding-bottom: clamp(40px, 6vw, 76px); }
.ambassador-copy .lede { margin-bottom: 14px; }
@media (max-width: 700px) {
  .ambassador-inner { gap: 18px; padding-top: 34px; }
  .ambassador-figure { height: clamp(300px, 82vw, 400px); }
  .ambassador-copy { padding-bottom: 34px; }
  .ambassador-copy h2 { font-size: clamp(1.45rem, 7.4vw, 2.4rem); }
  .ambassador-copy .lede { font-size: 1rem; }
  .ambassador-copy p { font-size: .92rem; }
}

/* ---------------------------------------------------------------- FORMS
   These lived inside the cart drawer, under a checkout sub-heading, because
   the checkout was the only form on the site when they were written. The
   cart is gone and the brief is not, so they sit on their own now. */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font-family: var(--font-body); font-size: 1rem;
  border: var(--border-w); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink);
}
.field textarea { min-height: 84px; resize: vertical; }
.form-error {
  display: none; margin-bottom: 14px; padding: 12px 14px;
  border: var(--border-w); border-radius: var(--radius-sm);
  background: var(--error-bg); color: var(--error); font-size: .9rem; font-weight: 600;
}
.form-error.show { display: block; }

/* --------------------------------------------------------------- FOOTER */
.site-footer { background: var(--ink); color: var(--paper); border-top: var(--border-w); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding: clamp(44px, 6vw, 76px) 0 44px; }
.site-footer .brand-word { color: var(--paper); }
.footer-slogan { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.2rem); text-transform: uppercase; line-height: 1; margin: 20px 0 16px; color: var(--yellow); }
.footer-body { font-size: .92rem; color: rgba(247,244,238,.72); }
.site-footer h4 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--pink); margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(247,244,238,.82); text-decoration: none; font-size: .94rem; }
.site-footer a:hover { color: var(--yellow); }
.footer-bar {
  border-top: 1px solid rgba(247,244,238,.2); padding: 18px 0 30px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: rgba(247,244,238,.6);
}
.footer-credit { display: inline-flex; align-items: center; gap: 8px; }
.footer-credit img { width: 22px; height: 22px; object-fit: contain; }

/* ------------------------------------------------------- SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-group > *:nth-child(1) { transition-delay: .00s; }
.reveal-group > *:nth-child(2) { transition-delay: .07s; }
.reveal-group > *:nth-child(3) { transition-delay: .14s; }
.reveal-group > *:nth-child(4) { transition-delay: .21s; }
.reveal-group > *:nth-child(5) { transition-delay: .28s; }
.reveal-group > *:nth-child(6) { transition-delay: .35s; }

/* ----------------------------------------------------------- RESPONSIVE */
@media (max-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .founder-grid { grid-template-columns: 1fr; }
  .founder-plate { max-width: 380px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-list { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
}

/* ------------------------------------------------- REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
