/* ECHO web app. Concept: the analog archive of a digital future.
   Square corners, 2px lines, no UI shadows (only paper casts one). No decorative motion. */

@font-face { font-family: "Stencil"; src: url(../fonts/saira-stencil-one.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Orb"; src: url(../fonts/orbitron-light.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "Plex"; src: url(../fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(../fonts/plex-mono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Hand"; src: url(../fonts/inkfree.ttf) format("truetype"); font-display: swap; }

:root {
  --void: #0b2226; --void-2: #081a1d; --paper: #ebe0c6; --ink: #2a2520; --graphite: #3d3d3f;
  --rust: #b4552a; --signal: #8fe6e4; --sand: #ecdfc2; --dim: #6f9c9c; --note: #e9d98f;
  --gutter: clamp(16px, 5vw, 72px);
  --beam-x: calc(100vw - var(--gutter) - 2px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
  min-height: 100vh; background: var(--void); color: var(--sand);
  font: 400 15px/1.65 "Plex", ui-monospace, monospace; overflow-x: hidden; position: relative;
}
/* film grain, same recipe as the campaign graphics */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .14; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .8 0 0 0 0 .8 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* the motif: one thin vertical beam, kept in the right gutter so it never crosses text */
.beam { position: fixed; top: 0; bottom: 0; left: var(--beam-x); width: 2px; background: #d9fbf8; opacity: .75; z-index: 0; pointer-events: none; }
main, header.bar, footer.foot { position: relative; z-index: 1; }

a { color: var(--signal); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--sand); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.orb { font-family: "Orb", "Plex", monospace; letter-spacing: .06em; text-transform: uppercase; }
.st  { font-family: "Stencil", "Orb", sans-serif; line-height: .9; font-weight: 400; }
.hand { font-family: "Hand", "Segoe Print", cursive; color: var(--graphite); }
.dim { color: var(--dim); }

/* ---------- top bar ---------- */
.bar {
  display: flex; align-items: baseline; gap: 24px; padding: 22px var(--gutter) 0;
  padding-right: calc(var(--gutter) + 24px);
}
.bar .logo { font-family: "Stencil"; font-size: 30px; color: var(--sand); border: 0; line-height: 1; }
.bar nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.bar nav a { font-family: "Orb"; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border: 0; }
.bar nav a[aria-current], .bar nav a:hover { color: var(--signal); }

/* ---------- buttons: square, line, no fill until hover ---------- */
.btn {
  display: inline-block; font: 400 15px/1 "Orb", monospace; letter-spacing: .08em; text-transform: uppercase;
  color: var(--signal); background: transparent; border: 2px solid var(--signal); padding: 15px 20px 14px;
  cursor: pointer; border-radius: 0;
}
.btn:hover:not(:disabled) { background: var(--signal); color: var(--void); }
.btn:disabled { opacity: .35; cursor: default; }
.link-btn { font: inherit; background: none; border: 0; border-bottom: 1px solid currentColor; color: var(--dim); cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--signal); }

/* ---------- paper ---------- */
.paper {
  position: relative; background: var(--paper); color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23a)'/%3E%3C/svg%3E");
  box-shadow: 0 1px 0 rgba(0,0,0,.25), 0 10px 22px -8px rgba(0,0,0,.55);
}
.note { background-color: var(--note); }
.note .hand { font-size: 30px; line-height: 1.2; }

.stamp {
  display: inline-block; font-family: "Stencil"; color: var(--rust); border: 3px solid var(--rust);
  padding: 6px 12px 3px; line-height: 1; letter-spacing: .02em; transform: rotate(-4deg); opacity: .9;
}

/* ===================================================== LANDING */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 80px);
  padding: clamp(28px, 5vh, 64px) calc(var(--gutter) + 32px) 40px var(--gutter); align-items: start;
}
.hero h1 { font-size: clamp(52px, 7.2vw, 112px); color: var(--sand); margin-bottom: 22px; }
.hero h1 span { display: block; }
.hero .lede { max-width: 34em; font-size: 16px; }
.hero .lede p + p { margin-top: 14px; }
.hero .count { font-family: "Orb"; color: var(--signal); font-size: clamp(15px, 1.6vw, 19px); letter-spacing: .05em; margin-top: 26px; }
.hero .book { position: relative; justify-self: end; width: min(100%, 400px); margin-top: 10px; }
.hero .book img { display: block; width: 100%; height: auto; transform: rotate(2.2deg); box-shadow: 0 30px 50px -24px rgba(0,0,0,.9); }
.hero .book .stamp { position: absolute; left: -26px; bottom: 34px; background: var(--paper); font-size: 22px; }

/* trailer: full width, never cropped (letterbox blends into the void) */
.reel { position: relative; margin-top: 18px; background: var(--void-2); border-top: 2px solid var(--signal); border-bottom: 2px solid var(--signal); }
.reel video { display: block; width: 100%; height: auto; max-height: calc(100svh - 90px); aspect-ratio: 16 / 9; object-fit: contain; background: var(--void-2); }
.reel-sound { position: absolute; left: var(--gutter); bottom: 18px; background: rgba(8,26,29,.82); font-size: 13px; padding: 12px 16px 11px; }
.reel-sound:hover:not(:disabled) { background: var(--signal); }

/* two ways in: get the book (Kickstarter now, Amazon later) or play */
.ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; align-items: stretch; max-width: 620px; }
.cta-get { display: flex; align-items: center; font-family: "Stencil"; font-size: clamp(22px, 2.4vw, 30px); line-height: 1; color: var(--sand);
  background: var(--rust); border: 2px solid var(--rust); padding: 20px 24px 17px; }
.cta-get:hover { background: transparent; color: var(--rust); }
.cta-date { display: flex; align-items: center; font-family: "Orb"; font-size: 15px; letter-spacing: .05em; color: var(--sand);
  border: 2px solid rgba(236,223,194,.35); padding: 16px 20px; }
.cta-play { display: grid; gap: 6px; min-width: 220px; color: var(--sand); border: 2px solid var(--signal); background: var(--void-2); padding: 16px 22px 14px; }
.cta-play:hover { background: #0d2c31; color: var(--sand); }
.cta-play .orb { font-size: 12px; }
.cta-play .st { font-size: clamp(44px, 5vw, 64px); color: var(--signal); }

/* 22 voices: text and one line from an Echo */
.voices-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px 64px; align-items: center; max-width: 1080px; }
.voices-grid .lede p + p { margin-top: 14px; }
.quote { padding: 34px 30px 28px; transform: rotate(-1.4deg); }
.quote p { font-weight: 600; font-size: clamp(18px, 2vw, 23px); line-height: 1.45; }
.quote footer { margin-top: 16px; font-family: "Orb"; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--rust); }

/* inside the book: the real spreads */
.spreads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 1240px; }
.spreads img { display: block; width: 100%; height: auto; }
.spreads figcaption { margin-top: 10px; font-size: 12px; color: var(--dim); }
.inside-note { margin-top: 22px; max-width: 40em; }

.cols { columns: 2 320px; column-gap: 56px; max-width: 1080px; }
.cols p { break-inside: avoid; margin-bottom: 16px; }


.section { padding: 64px calc(var(--gutter) + 32px) 64px var(--gutter); }
.section h2 { font-size: clamp(38px, 5.4vw, 72px); color: var(--sand); margin-bottom: 26px; }


/* how to receive: a typed sheet with a pencil margin */
.sheet { max-width: 760px; padding: 44px clamp(22px, 5vw, 64px) 40px; transform: rotate(-.5deg); }
.sheet ol { list-style: none; counter-reset: s; font-size: 15px; line-height: 1.6; }
.sheet li { counter-increment: s; display: grid; grid-template-columns: 2.2em 1fr; padding: 8px 0; }
.sheet li::before { content: counter(s, decimal-leading-zero); font-family: "Plex"; font-weight: 600; color: var(--rust); }
.sheet li b { font-family: "Plex"; font-weight: 600; }
.sheet .margin { position: absolute; right: -190px; top: -20px; transform: rotate(6deg); padding: 16px 20px; width: 210px; }

.launch { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; }
.launch .date { font-size: clamp(48px, 8vw, 110px); color: var(--signal); }
.launch p { max-width: 30em; }

.foot { padding: 40px calc(var(--gutter) + 32px) 48px var(--gutter); border-top: 1px solid rgba(111,156,156,.35);
  display: flex; flex-wrap: wrap; gap: 14px 36px; font-size: 14px; color: var(--dim); }
.foot a { color: var(--dim); }
.foot .privacy { flex-basis: 100%; }

/* ===================================================== DECODER */
.decoder-wrap { padding: clamp(28px, 7vh, 80px) calc(var(--gutter) + 32px) 40px var(--gutter); position: relative; max-width: 1240px; }
.panel { position: relative; border: 2px solid var(--signal); background: var(--void-2); padding: clamp(22px, 4vw, 44px); max-width: 900px; min-height: 480px; display: flex; flex-direction: column; }
.panel .head { font-size: clamp(14px, 2vw, 22px); color: var(--dim); padding-right: 0; }
.panel .head .who { white-space: nowrap; }
.panel .head .sep { display: inline-block; width: 1.4em; }
.pending { margin-top: 14px; }
.pending .stamp { font-size: 15px; transform: rotate(-2deg); }

/* slots: one per letter, a real input lies on top so phone keyboards work */
.slots-field { position: relative; margin: clamp(40px, 9vh, 84px) 0 0; max-width: 100%; }
.slots { display: flex; flex-wrap: nowrap; gap: clamp(5px, 1.6vw, 18px); align-items: flex-end; min-height: 56px; }
.slot { flex: 0 1 46px; min-width: 10px; height: clamp(36px, 6vw, 54px); border-bottom: 4px solid var(--sand);
  font: 400 clamp(18px, 4.2vw, 40px)/1 "Orb", monospace; color: var(--sand); text-align: center; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; }
.slot.extra { border-bottom-color: var(--dim); color: var(--dim); }
.cursor { flex: 0 0 3px; width: 3px; height: clamp(38px, 6.4vw, 56px); background: var(--signal); align-self: flex-end; margin-bottom: 0; }
.slots-field input {
  position: absolute; inset: -10px 0; width: 100%; opacity: 0; font-size: 16px; /* 16px stops iOS zoom */
  border: 0; background: transparent; color: transparent; caret-color: transparent; cursor: text;
}
.slots-field:not(.focus) .cursor { opacity: .45; }

.state-ok .slot { border-bottom-color: var(--signal); color: var(--signal); }
.state-bad .slots { animation: jolt .38s steps(2) 1; }
.state-bad .slot { border-bottom-color: var(--rust); color: var(--rust); }
@keyframes jolt { 0% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .state-bad .slots { animation: none; } }

.transmit { margin-top: 36px; align-self: flex-start; }
.status { min-height: 1.6em; margin-top: 18px; font-family: "Orb"; letter-spacing: .05em; font-size: 15px; }
.status.ok { color: var(--signal); }
.status.bad { color: var(--rust); }
.next { margin-top: 14px; }
.any { margin-top: 6px; font-size: 13px; max-width: 34em; }

.panel .foot-line { margin-top: auto; padding-top: 44px; font-size: clamp(12px, 1.5vw, 17px); color: var(--dim); }

.sticky { position: absolute; right: calc(var(--gutter) + 40px); top: clamp(10px, 4vh, 40px); width: 290px; padding: 30px 26px 34px; transform: rotate(5deg); z-index: 2; }
.sticky .hand { font-size: 34px; }

/* progress: 22 marks, no numbers */
.strip { display: grid; grid-template-columns: repeat(22, minmax(0, 1fr)); gap: 4px; max-width: 900px; margin-top: 14px; }
.strip i { height: 6px; background: rgba(111,156,156,.3); }
.strip i.done { background: var(--sand); }
.strip i.here { background: var(--signal); }

.hints { max-width: 900px; margin-top: 36px; }
.hints h3 { font-family: "Orb"; font-weight: 400; font-size: 13px; letter-spacing: .08em; color: var(--dim); margin-bottom: 12px; }
.hints ol { list-style: none; max-width: 640px; }
.hints li { padding: 12px 16px; margin-bottom: 10px; border-left: 2px solid var(--signal); background: rgba(143,230,228,.06); }
.hints .none { color: var(--dim); font-size: 14px; }

/* finale placeholder */
.finale p { max-width: 36em; margin-top: 14px; }

/* ===================================================== RECEIVERS / ARCHIVE */
.page { padding: clamp(36px, 8vh, 88px) calc(var(--gutter) + 32px) 64px var(--gutter); max-width: 1180px; }
.page h1 { font-size: clamp(46px, 7.6vw, 110px); color: var(--sand); margin-bottom: 22px; }
.page .intro { max-width: 38em; }
.names { columns: 3 220px; column-gap: 40px; margin-top: 36px; font-size: 15px; }
.names li { list-style: none; padding: 5px 0; break-inside: avoid; border-bottom: 1px solid rgba(111,156,156,.25); }
.empty { margin-top: 36px; max-width: 420px; padding: 26px 24px; transform: rotate(-1.2deg); }
.empty .hand { font-size: 26px; line-height: 1.25; }
.logos { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 30px; }
.logos img { height: 64px; width: auto; background: var(--paper); padding: 10px; }

.gate { margin-top: 32px; max-width: 520px; }
.gate .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.files { margin-top: 32px; max-width: 760px; }
.files li { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(111,156,156,.35); }

/* ===================================================== SMALL SCREENS */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .book { justify-self: start; width: min(72%, 320px); order: -1; }
  .voices-grid { grid-template-columns: minmax(0, 1fr); }
  .spreads { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: relative; right: auto; top: auto; margin: 0 0 -18px auto; width: 230px; padding: 18px 18px 22px; }
  .sticky .hand { font-size: 26px; }

}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .bar { gap: 14px; flex-wrap: wrap; }
  .bar nav { gap: 14px; }
  .hero, .section, .decoder-wrap, .page, .foot { padding-right: calc(var(--gutter) + 18px); }
  .panel { min-height: 0; }
  .reel-sound { position: static; margin: 12px var(--gutter); font-size: 12px; padding: 10px 12px 9px; }
  .slots-field { margin-top: 36px; }
  .transmit { width: 100%; font-size: 13px; padding: 14px 10px 13px; }
  .panel .foot-line { padding-top: 32px; }
  .panel .head .who { white-space: normal; display: block; margin-top: 6px; }
  .panel .head .sep { display: none; }
  .hero .book .stamp { left: auto; right: -8px; bottom: 18px; font-size: 18px; }
  .cta-get, .cta-date, .cta-play { flex: 1 1 100%; }
}
@media (max-width: 1180px) {
  .sheet .margin { position: relative; right: auto; top: auto; margin: 24px -8px 0 auto; }
}

/* legal pages */
.legal { max-width: 860px; }
.legal h2 { font-family: "Orb"; font-weight: 400; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); margin: 34px 0 10px; }
.legal p, .legal li { max-width: 40em; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 8px; }
