/* JEMAbits: mist and pine with an ocean-blue accent; the logo is "JEMA" typed in a rounded outline
   chip, then "bits" (Logo 4 B, 2026-11-04).
   Picked 2026-11-04 (docs/prototypes.md, decisions.md). No web fonts: a rounded system stack. */

:root {
  --bg: #eef2ef;
  --paper: #fbfcfa;
  --ink: #183230;
  --sub: #566966;
  --rule: #cfd9d4;
  --accent: #2a6f97;
  --soft: #d6e6f1;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Hiragino Maru Gothic ProN",
    "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: clamp(22px, 5vw, 56px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #122020;
    --paper: #182a29;
    --ink: #e6efeb;
    --sub: #9fb3ae;
    --rule: #2c4341;
    --accent: #7cc0e8;
    --soft: #1d3446;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* The logo: "JEMA" in a rounded outline chip, then "bits" */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  font: 900 1.75rem/1 var(--display);
}

.logo__chip {
  display: inline-flex;
  padding: 0.04em 0.26em 0.1em;
  border: 0.1em solid var(--ink);
  border-radius: 0.32em;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.logo__l {
  display: inline-block;
}

.logo__bits {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
}

.top__contact {
  font-weight: 600;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 2px solid var(--rule);
}

/* Hero */
.hero {
  padding-block: clamp(40px, 9vw, 112px) clamp(56px, 9vw, 120px);
}

.hero__logo {
  margin: 0 0 clamp(28px, 5vw, 48px);
}

.logo--big {
  font-size: clamp(3rem, 9vw, 6rem);
}

h1 {
  margin: 0;
  max-width: 16ch;
  font: 900 clamp(2.75rem, 7vw, 5.25rem) / 1.03 var(--display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.lede {
  margin: 24px 0 0;
  max-width: 46ch;
  color: var(--sub);
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

/* Footer */
.foot {
  margin-top: auto;
  padding: 22px 0 36px;
  border-top: 1px solid var(--rule);
  color: var(--sub);
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
}

.foot p {
  margin: 0;
}

.foot a {
  padding: 10px 0;
}

/* Privacy and terms */
.doc {
  max-width: 64ch;
  padding-block: clamp(40px, 7vw, 72px) clamp(56px, 8vw, 96px);
  line-height: 1.65;
}

.doc h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
}

.doc .updated {
  margin: 12px 0 0;
  color: var(--sub);
}

.doc .intro {
  margin: 28px 0 0;
  font-size: 1.25rem;
}

.doc h2 {
  margin: 36px 0 8px;
  font: 800 1.375rem/1.3 var(--display);
}

.doc p {
  margin: 0;
}

/* Motion: the hero logo types J-E-M-A, then "bits" slides in, then the headline rises word by word. */
@keyframes chip-in { from { opacity: 0; transform: scale(0.92); } }
@keyframes type-in {
  0% { opacity: 0; transform: translateY(0.25em) scale(0.6); }
  70% { opacity: 1; transform: scale(1.12); }
}
@keyframes slide-in { from { opacity: 0; transform: translateX(-0.3em); } }
@keyframes word-in { from { opacity: 0; transform: translateY(0.45em); filter: blur(6px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } }

@media (prefers-reduced-motion: no-preference) {
  .logo--big .logo__chip { animation: chip-in 0.45s ease-out both; }
  .logo--big .logo__l { animation: type-in 0.38s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
  .logo--big .logo__l:nth-child(1) { animation-delay: 0.35s; }
  .logo--big .logo__l:nth-child(2) { animation-delay: 0.55s; }
  .logo--big .logo__l:nth-child(3) { animation-delay: 0.75s; }
  .logo--big .logo__l:nth-child(4) { animation-delay: 0.95s; }
  .logo--big .logo__bits { display: inline-block; animation: slide-in 0.6s ease-out 1.25s both; }
  h1 .w { display: inline-block; animation: word-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  h1 .w:nth-child(1) { animation-delay: 1.55s; }
  h1 .w:nth-child(2) { animation-delay: 1.63s; }
  h1 .w:nth-child(3) { animation-delay: 1.71s; }
  h1 .w:nth-child(4) { animation-delay: 1.79s; }
  h1 .w:nth-child(5) { animation-delay: 1.87s; }
  h1 .w:nth-child(6) { animation-delay: 1.95s; }
  h1 .w:nth-child(7) { animation-delay: 2.03s; }
  .lede { animation: rise-in 0.8s ease-out 2.3s both; }
}
