/* electronicbrain.ai: the landing page, from the design "Landing page, Oct 30".
   The values (colours, sizes, spacing, borders, shadows) are the design's. */

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

:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --pink: #FF2E88;
  --yellow: #FFE100;
  --orange: #FF5A00;
  --chip: #ECECE6;
  --on-dark: #E6E6E1;
  --rule-dark: #3A3A3A;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
img, svg { max-width: 100%; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: #444444; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible, .footer :focus-visible { outline-color: var(--yellow); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 999px; font-weight: 600;
}
.skip:focus { top: 12px; color: var(--paper); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 88px var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 28px; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.ruled-top { border-top: 2px solid var(--ink); }
.ruled-y { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.ruled-bottom { border-bottom: 2px solid var(--ink); }

/* Headings: Archivo at its narrowest, black, upper case. */
.h1, .h2, .h-final {
  margin: 0; font-weight: 900; font-stretch: 62%; text-transform: uppercase; text-wrap: balance;
}
.h1 { font-size: clamp(52px, 7.6vw, 116px); line-height: 0.86; text-shadow: 5px 4px 0 var(--yellow); }
.h2 { max-width: 1100px; font-size: clamp(44px, 6vw, 92px); line-height: 0.88; }
.h2.big { font-size: clamp(48px, 7vw, 104px); }
.h-final { font-size: clamp(56px, 9vw, 140px); line-height: 0.84; text-shadow: 6px 5px 0 var(--yellow); }
.shadow-pink { text-shadow: 5px 4px 0 var(--pink); }

.lede { margin: 0; max-width: 760px; font-size: 20px; line-height: 1.5; text-wrap: pretty; }
.lede.strong { font-weight: 600; }
.lede.medium { font-weight: 500; }

/* Nav */
.nav { border-bottom: 2px solid var(--ink); background: var(--paper); }
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 16px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
}
/* The mark is drawn once and every logo on the page uses it. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.brand {
  display: flex; align-items: center; gap: 12px; white-space: nowrap; min-height: 44px;
  font-size: 15px; font-weight: 500; font-stretch: 125%; letter-spacing: 0.3em;
}
.nav-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-family: var(--mono); font-size: 14px;
}
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 16px 28px; border-radius: 999px;
  border: 2px solid var(--ink); font-family: var(--sans); font-size: 17px; font-weight: 600;
}
.btn-ink, .btn-ink:hover { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2A2A2A; }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--chip); color: var(--ink); }
.nav-cta { padding: 0 20px; font-size: 14px; border: 0; }

/* Hero */
.hero { background: var(--pink); border-bottom: 2px solid var(--ink); overflow-x: clip; }
.hero-inner {
  max-width: 1280px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px 56px;
}
.hero-copy { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }

/* The example cards */
.card {
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  padding: 22px 24px; display: flex; flex-direction: column; gap: 16px;
}
.card-tilted { flex: 1 1 340px; max-width: 460px; transform: rotate(1.2deg); }
@media (prefers-reduced-motion: reduce) { .card-tilted { transform: none; } }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tag {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  background: var(--chip); color: var(--ink); font-family: var(--mono); font-size: 11px;
}
.card-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.meter { height: 10px; background: var(--chip); border: 2px solid var(--ink); }
.meter > span { display: block; width: 96%; height: 100%; background: var(--pink); }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 2px solid var(--ink);
  border-radius: 999px; font-weight: 700;
}

/* The mark, screenprinted */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(96px, 25%), 1fr)); border-bottom: 2px solid var(--ink); }
.tile { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.tile svg { width: 58%; height: 58%; }

/* Grids */
.cols { display: grid; gap: 24px 56px; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.cols-wide { display: grid; gap: 40px 56px; margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 20px; }
.list-4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.list-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

.step {
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--paper);
  padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px;
}
.step.yellow { background: var(--yellow); }
.step.pink { background: var(--pink); }
.step-number { font-size: 64px; line-height: 0.8; font-weight: 900; font-stretch: 62%; }
.step-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.step-text { font-size: 16px; line-height: 1.45; }

.charter { padding: 22px 24px 10px; gap: 0; align-self: start; }
.charter .card-row { padding-bottom: 14px; }
.charter-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.charter-line {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 14px 0; border-top: 2px solid var(--ink);
}
.charter-line.start { justify-content: flex-start; gap: 8px 10px; }
.charter-name { font-size: 17px; font-weight: 700; }
.charter-state { display: flex; align-items: center; gap: 10px; }
.mode { padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 700; }
.mode.act { background: var(--pink); }
.mode.never { background: var(--ink); color: var(--paper); }
.chip { padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; }

.dark { background: var(--ink); color: var(--paper); }
.dark .eyebrow { color: var(--yellow); }
.dark .tag { background: var(--yellow); }
.point { border-top: 3px solid var(--yellow); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.point-title { font-size: 19px; font-weight: 800; }
.point-text { font-size: 16px; line-height: 1.5; color: var(--on-dark); }
.note-dark { margin: 0; max-width: 760px; font-size: 17px; line-height: 1.5; color: var(--on-dark); }

.tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tool { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; font-family: var(--mono); font-size: 14px; }

.promise { border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--pink); padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.promise-title { font-size: 20px; font-weight: 800; }
.promise-text { font-size: 16px; line-height: 1.5; }
.closing { margin: 0; max-width: 900px; font-size: 24px; font-weight: 700; line-height: 1.35; text-wrap: pretty; }

.belief { margin: 0; max-width: 1040px; text-wrap: pretty; }
.belief.lead { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; font-weight: 700; }
.belief.rest { font-size: clamp(20px, 2vw, 26px); line-height: 1.4; font-weight: 500; }

/* Footer */
.footer { background: var(--ink); color: var(--paper); }
.footer a { color: var(--paper); }
.footer a:hover { color: var(--yellow); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 64px var(--gutter) 48px; display: flex; flex-direction: column; gap: 48px; }
.footer-quote { margin: 0; max-width: 900px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; font-weight: 600; }
.footer-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  border-top: 2px solid var(--rule-dark); padding-top: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; font-stretch: 125%; letter-spacing: 0.3em; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-family: var(--mono); font-size: 14px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

.nav-signin-m { display: none; }
@media (max-width: 760px) {
  .nav-cta { display: none !important; }
  /* Sign in beside the mark, not alone on a line of its own. */
  .nav-links .nav-signin { display: none; }
  .nav-signin-m { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-family: var(--mono); font-size: 13px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 8px; font-size: 13px; }
}

/* The menu on a tablet or a phone (menu.js). The script marks the page
   has-menu before it paints; without it none of this applies and the links
   stay in the nav. The panel is the hero's pink with the headings' type: the
   links set huge in Archivo, condensed, ruled in ink, with the h1's yellow
   offset under the one you point at. */
.menu-button, .nav-cta-m { display: none; }
.site-menu[hidden] { display: none; }
@media (max-width: 1024px) {
  .has-menu .nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; }
  .has-menu .nav-inner { flex-wrap: nowrap; }
  .has-menu .nav-links, .has-menu .nav-signin-m { display: none !important; }
  .has-menu .nav-cta-m { display: inline-flex; margin-left: auto; }
  .has-menu .menu-button { display: inline-flex; }
  /* A jump from the menu lands below the nav that now stays on top. */
  .has-menu section[id] { scroll-margin-top: 84px; }
}
@media (max-width: 760px) {
  .has-menu .menu-button { margin-left: auto; }
}
.has-menu.menu-open, .has-menu.menu-open body { overflow: hidden; }

.menu-button {
  flex: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 15px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 700 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.menu-button:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--pink); }
.menu-button:active { transform: none; box-shadow: none; }
.menu-button:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.menu-open .menu-button { background: var(--ink); color: var(--paper); }
.menu-open .menu-button:hover { box-shadow: 3px 3px 0 var(--yellow); }
.menu-icon { position: relative; display: block; width: 18px; height: 12px; }
.menu-icon span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: top .3s var(--ease), transform .35s var(--spring), opacity .2s var(--ease);
}
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 5px; }
.menu-icon span:nth-child(3) { top: 10px; }
.menu-open .menu-icon span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-open .menu-icon span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu-open .menu-icon span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.site-menu {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
  background: var(--pink); color: var(--ink);
  /* A curtain from the top, the nav staying put above it. */
  clip-path: inset(0 0 100% 0); transition: clip-path .42s cubic-bezier(.7, 0, .2, 1);
}
.menu-open .site-menu { clip-path: inset(0 0 0 0); }
.site-menu-inner {
  max-width: 1280px; min-height: 100%; margin: 0 auto;
  padding: 108px var(--gutter) calc(36px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 40px;
}
.site-menu-links { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.site-menu-links li {
  border-bottom: 2px solid var(--ink);
  opacity: 0; transform: translateY(26px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.menu-open .site-menu-links li, .menu-open .site-menu-foot {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease) calc(140ms + var(--i, 0) * 60ms), transform .6s var(--spring) calc(140ms + var(--i, 0) * 60ms);
}
.site-menu-links a {
  display: flex; align-items: baseline; gap: 18px; min-height: 44px; padding: 16px 0 14px;
  font-family: var(--sans); font-weight: 900; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(46px, 11vw, 92px); line-height: .88; color: var(--ink);
  transition: transform .3s var(--ease), text-shadow .3s var(--ease);
}
.site-menu-links a:hover, .site-menu-links a:focus-visible { transform: translateX(10px); text-shadow: 5px 4px 0 var(--yellow); outline: none; }
.site-menu-num { flex: none; width: 2.2em; font: 700 13px var(--mono); letter-spacing: .06em; transform: translateY(-.35em); }
.site-menu-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px;
  opacity: 0; transform: translateY(26px); transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.site-menu-mail { display: inline-flex; align-items: center; min-height: 44px; font: 400 14px var(--mono); }
.site-menu-mark { width: 64px; height: 64px; margin-left: auto; }
.site-menu-mark .eb-b { transform-origin: 47.11px 47.83px; animation: eb-turn 14s linear infinite; }
@keyframes eb-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .site-menu, .site-menu-links li, .site-menu-foot, .menu-icon span, .menu-button { transition: none !important; }
  .site-menu-mark .eb-b { animation: none; }
}

/* The page that is not there */
.missing { min-height: calc(100vh - 80px); background: var(--pink); display: flex; align-items: center; }
.missing .wrap { width: 100%; }

/* ---------- Motion ----------
   Entrances run only with html.js (motion.js: fail-open, never without it,
   never with reduced motion). They are animations from a hidden start to
   the element's own style, so a card keeps its tilt and hovers stay free. */

:root { --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); }

@keyframes eb-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes eb-drop { from { opacity: 0; transform: translateY(-36px) rotate(-4deg); } }
@keyframes eb-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes eb-shadow { from { text-shadow: 0 0 0 transparent; } }
@keyframes eb-fill { from { width: 0; } }

.js [data-reveal]:not(.in) { opacity: 0; }
.js [data-reveal].in { animation: eb-rise .8s var(--ease) calc(var(--i, 0) * 90ms) backwards; }
/* Headings: the type rises, then its offset shadow slides out from under it. */
.js [data-reveal="head"].in, .js .h1[data-reveal].in {
  animation: eb-rise .8s var(--ease) calc(var(--i, 0) * 90ms) backwards, eb-shadow .6s var(--ease) calc(var(--i, 0) * 90ms + .35s) backwards;
}
/* Cards drop in and settle. */
.js [data-reveal="drop"].in { animation: eb-drop .9s var(--spring) calc(var(--i, 0) * 90ms) backwards; }
/* The mark tiles pop, one after another. */
.js [data-reveal="pop"].in { animation: eb-pop .6s var(--spring) calc(var(--i, 0) * 60ms) backwards; }
/* The agreement meter fills once its card has landed. */
.js .card-tilted.in .meter > span { animation: eb-fill 1.2s var(--ease) 1s backwards; }

/* Hovers and presses: the page's own language, a hard shadow that moves. */
.btn { transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-ink:hover { box-shadow: 4px 4px 0 var(--yellow); }
.hero .btn-ink:hover, #start .btn-ink:hover { box-shadow: 4px 4px 0 var(--paper); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
.nav-cta:hover { box-shadow: 3px 3px 0 var(--pink); }

.step, .promise, .card:not(.card-tilted) { transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.step:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.promise:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--pink); }
.charter:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }
.card-tilted { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card-tilted:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 12px 12px 0 var(--ink); }

.point { transition: border-color .2s var(--ease), transform .2s var(--ease); }
.point:hover { border-top-color: var(--pink); transform: translateY(-2px); }

.tile svg { transition: transform .35s var(--spring); }
.tile:hover svg { transform: rotate(-12deg) scale(1.12); }

.tool, .chip, .mode { transition: transform .2s var(--spring); }
.tool:hover { transform: rotate(-4deg) scale(1.06); }

/* Nav: a rule that draws in under the link. */
.nav-links a:not(.btn), .footer-links a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 calc(100% - 10px);
  transition: background-size .25s var(--ease), color .2s var(--ease);
}
.nav-links a:not(.btn):hover, .footer-links a:hover { background-size: 100% 2px; color: var(--ink); }
.footer-links a:hover { color: var(--yellow); }
.nav-signin { font-weight: 700; }

/* The mark is a boomerang: on hover it turns once around its centre of
   mass, where the spark sits, and the spark stays put. */
.brand .eb-b, .brand .eb-d { transform-origin: 47.11px 47.83px; }
.brand .eb-b { transition: transform .8s var(--ease); }
.brand:hover .eb-b { transform: rotate(360deg); }
.brand .eb-d { transition: transform .35s var(--spring); }
.brand:hover .eb-d { transform: scale(1.5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover, .step:hover, .promise:hover, .charter:hover, .card-tilted:hover, .tile:hover svg, .tool:hover, .point:hover, .brand:hover .eb-b, .brand:hover .eb-d { transform: none; }
}
@media print { .js [data-reveal] { opacity: 1 !important; animation: none !important; } }

/* The narrowest phones: the wordmark tightens so Sign in fits beside it. */
@media (max-width: 420px) {
  .nav .brand { font-size: 13px; letter-spacing: 0.18em; gap: 10px; }
  .nav .brand svg { width: 26px; height: 26px; }
}
