/* REL8 · rel-8.ai
   Paper and ink. One serif for everything that matters, one sans for small labels. */

:root {
  --paper: #f3f1ec;
  --ink: #111110;
  --muted: #77736b;
  --night: #0c0c0b;
  --night-ink: #efede7;
  --night-muted: #8d8a83;
  --line: rgba(17, 17, 16, .14);
  --night-line: rgba(239, 237, 231, .18);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
}

*, *::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: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, p { margin: 0; }

/* ---------- header ---------- */
.head {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter);
  background: var(--paper); color: var(--ink);
  transition: background .4s ease, color .4s ease;
}
/* over a dark section the header turns dark too (set by app.js) */
.head.on-dark { background: var(--night); color: var(--night-ink); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-svg { height: 22px; width: auto; aspect-ratio: 368 / 144; display: block; }
.head nav { display: flex; gap: 28px; }
.head nav a { font-size: 14px; text-decoration: none; letter-spacing: .01em; }
.head nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; place-items: center; align-content: center;
  padding: 0 var(--gutter); text-align: center;
  position: relative;
}
/* the logo draws itself: R, E, L, then the body of the 8; the head drops in last */
.hero-logo { display: grid; justify-items: center; }
.draw { width: clamp(240px, 40vw, 560px); height: auto; aspect-ratio: 368 / 144; }
.draw path, .draw .body { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); }
.draw .dot { opacity: 0; transform: translateY(-14px); transform-box: fill-box; transform-origin: center; }
.hero.drawing .draw path, .hero.drawing .draw .body { animation: draw .7s cubic-bezier(.5, 0, .3, 1) forwards; animation-delay: var(--d, 0s); }
.hero.drawing .draw .dot { animation: drop .7s cubic-bezier(.3, 1.4, .5, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drop { to { opacity: 1; transform: none; } }
.hero-sub {
  margin-top: clamp(28px, 4vw, 44px);
  font: 400 clamp(20px, 2.2vw, 28px)/1.3 var(--serif);
  color: var(--muted);
  opacity: 0; transform: translateY(8px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.hero.ready .hero-sub { opacity: 1; transform: none; transition-delay: .4s; }
.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  opacity: 0; transition: opacity 1.2s ease .6s;
}
.hero.ready .scroll-cue { opacity: .7; }

/* ---------- scroll-driven sections ---------- */
.reveal { height: 220vh; position: relative; }
.strike { height: 320vh; position: relative; }
.sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center;
  padding: 0 var(--gutter);
}
.statement {
  max-width: 17ch;
  font: 400 clamp(40px, 6.6vw, 104px)/1.02 var(--serif);
  letter-spacing: -.015em;
}
.statement em { font-style: italic; }
.statement .w { opacity: .12; transition: opacity .25s linear; }
.statement .w.on { opacity: 1; }

/* strike-through: screens, apps, passwords */
.strike .sticky { background: var(--paper); transition: background .6s ease; }
.strike.night .sticky { background: var(--night); }
.strike-list {
  list-style: none; margin: 0; padding: 0; text-align: center;
  font: 400 clamp(64px, 12vw, 190px)/.98 var(--serif);
  letter-spacing: -.02em;
  grid-area: 1 / 1;
  transition: opacity .5s ease;
}
.strike-list span { position: relative; display: inline-block; }
.strike-list span::after {
  content: ""; position: absolute; left: -2%; top: 54%;
  height: max(3px, .045em); width: calc(104% * var(--p, 0));
  background: var(--ink);
}
.strike.night .strike-list { opacity: 0; }
.voice {
  grid-area: 1 / 1; width: 100%;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .8s ease .2s;
  color: var(--night-ink);
}
.strike.night .voice { opacity: 1; }
.wave { grid-area: 1 / 1; width: min(1100px, 100%); height: 260px; }
.voice-line {
  grid-area: 1 / 1;
  font: italic 400 clamp(64px, 11vw, 176px)/1 var(--serif);
  letter-spacing: -.02em;
  mix-blend-mode: difference;
}

/* ---------- dark sections ---------- */
.dark { background: var(--night); color: var(--night-ink); }
.kicker {
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--night-muted); margin-bottom: 36px;
}
.vision, .albert, .contact { padding: clamp(120px, 18vh, 200px) var(--gutter); }
.vision h2 {
  max-width: 19ch;
  font: 400 clamp(44px, 7vw, 112px)/1 var(--serif);
  letter-spacing: -.015em;
}
.vision-body {
  max-width: 34em; margin-top: 48px;
  font-size: clamp(17px, 1.4vw, 20px); color: var(--night-muted);
}
.albert { border-top: 1px solid var(--night-line); }
.albert-grid, .contact-grid {
  display: grid; gap: 48px 8vw;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
}
.albert h2, .contact h2 {
  font: 400 clamp(36px, 4.6vw, 72px)/1.04 var(--serif);
  letter-spacing: -.01em;
}
.albert p, .contact-body { color: var(--night-muted); font-size: 17px; max-width: 30em; }
.link-arrow {
  display: inline-flex; gap: 10px; margin-top: 28px;
  font: 400 26px/1 var(--serif); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 6px;
}
.link-arrow span { transition: transform .25s ease; }
.link-arrow:hover span { transform: translateX(6px); }

/* contact */
.contact { border-top: 1px solid var(--night-line); }
.contact-grid { align-items: start; }
.contact-body { margin-top: 28px; }
form { display: grid; gap: 22px; }
.f { display: grid; gap: 6px; }
.f span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); }
.f input, .f select, .f textarea {
  font: 400 22px/1.3 var(--serif); color: var(--night-ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--night-line);
  padding: 8px 0; border-radius: 0; outline: none; width: 100%;
  -webkit-appearance: none; appearance: none;
}
.f select { cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(-45deg, transparent 50%, currentColor 50%); background-position: right 6px center, right 0 center; background-size: 6px 6px; background-repeat: no-repeat; }
.f select option { color: #111; }
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-bottom-color: var(--night-ink); }
.consent { display: flex; gap: 12px; font-size: 14px; color: var(--night-muted); align-items: flex-start; }
.consent input { margin-top: 3px; accent-color: var(--night-ink); }
.hp { position: absolute; left: -9999px; }
.send {
  justify-self: start; cursor: pointer;
  font: 400 22px/1 var(--sans); font-family: var(--serif); font-size: 26px;
  color: var(--night); background: var(--night-ink);
  border: 0; border-radius: 999px; padding: 16px 34px;
  transition: transform .2s ease;
}
.send:hover { transform: translateY(-2px); }
.send:disabled { opacity: .5; cursor: default; transform: none; }
.form-msg { font: 400 24px/1.3 var(--serif); }

/* footer */
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 32px var(--gutter) 40px; font-size: 13px; color: var(--night-muted);
  border-top: 1px solid var(--night-line);
}
.foot nav { display: flex; gap: 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--night-ink); }

/* ---------- cookie notice ---------- */
.link-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.foot .link-btn:hover { color: var(--night-ink); }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; display: flex; justify-content: center; }
.cookie[hidden] { display: none; }
.cookie-inner {
  max-width: 760px; width: 100%;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .45);
  padding: 20px 22px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 22px; align-items: center;
}
.cookie-text { display: grid; gap: 4px; font-size: 14px; color: #3d3b37; }
.cookie-text p { margin: 0; }
.cookie-text a { color: var(--ink); }
.cookie-title { font: 400 24px/1.1 var(--serif); color: var(--ink); }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn {
  font: 500 14px/1 var(--sans); padding: 12px 20px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
}
.cookie-btn[data-choice="granted"], .cookie-btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- privacy and imprint pages ---------- */
.legal { padding: 140px var(--gutter) 120px; }
.prose { max-width: 760px; font-size: 17px; line-height: 1.6; color: #2b2a27; }
.prose h1 { font: 400 clamp(48px, 7vw, 88px)/1 var(--serif); letter-spacing: -.015em; color: var(--ink); margin: 0 0 14px; }
.prose h2 { font: 400 clamp(26px, 3vw, 34px)/1.15 var(--serif); color: var(--ink); margin: 56px 0 14px; }
.prose h3 { font: 500 17px/1.3 var(--sans); color: var(--ink); margin: 28px 0 8px; }
.prose p, .prose ul, .prose address { margin: 0 0 14px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose address { font-style: normal; border-left: 2px solid var(--ink); padding: 4px 0 4px 18px; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose code { font-size: .9em; }
.prose .meta { color: var(--muted); font-size: 15px; }
.prose .summary { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0 14px; margin: 40px 0 0; }
.prose .summary h2 { margin-top: 18px; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .head nav { gap: 18px; }
  .cookie-inner { grid-template-columns: 1fr; }
  .cookie-btn { flex: 1; }
  .albert-grid, .contact-grid { grid-template-columns: 1fr; }
  .wave { height: 180px; }
  .reveal { height: 180vh; }
  .strike { height: 260vh; }
}

/* ---------- reduced motion ----------
   The scroll-driven text stays: it only changes opacity and draws a line under your own scrolling, nothing moves.
   What goes: the logo drawing itself and its bounce. (The voice line holds still; see app.js.) */
@media (prefers-reduced-motion: reduce) {
  .statement .w { transition: none; }
  .draw path, .draw .body { stroke-dashoffset: 0; }
  .draw .dot { opacity: 1; transform: none; }
}
