:root {
  --night: #07130e;
  --forest: #0d281c;
  --moss: #527a23;
  --acid: #a6ff2e;
  --ember: #ffb21a;
  --cream: #f6f0d6;
  --red: #e12a28;
  --ink: #0a100b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body {
  margin: 0;
  color: var(--cream);
  background: var(--night);
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.topbar {
  position: fixed; z-index: 40; top: 0; left: 0; width: 100%; min-height: 78px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 4vw;
  background: linear-gradient(180deg, rgba(3,12,8,.82), transparent); backdrop-filter: blur(7px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .08em; width: max-content; }
.brand-mark {
  display: grid; place-items: center; width: 38px; aspect-ratio: 1; border-radius: 50%;
  color: var(--ink); background: var(--acid); border: 3px solid #d8ff8a; box-shadow: 0 0 24px rgba(166,255,46,.32);
  font-family: Georgia, serif; font-size: 1.35rem;
}
nav { display: flex; gap: clamp(18px,4vw,54px); font-size: .8rem; letter-spacing: .15em; font-weight: 800; text-transform: uppercase; }
nav a { opacity: .76; }
nav a:hover { opacity: 1; color: var(--acid); }
.mini-knit { justify-self: end; padding: 11px 18px; border: 1px solid rgba(255,255,255,.3); border-radius: 99px; font-size: .72rem; font-weight: 900; letter-spacing: .12em; }

.panel { position: relative; min-height: 100svh; overflow: hidden; }
.hero {
  display: flex; align-items: center; padding: 110px 6vw 70px;
  background: var(--night) url("assets/robincoon-hero.png") 50% 50% / cover no-repeat;
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,15,10,.98) 0%, rgba(4,15,10,.72) 31%, rgba(4,15,10,.06) 68%), linear-gradient(0deg, rgba(4,15,10,.5), transparent 35%); }
.hero-copy { position: relative; z-index: 2; width: min(650px, 48vw); }
.eyebrow, .chapter { font-weight: 900; letter-spacing: .18em; font-size: .78rem; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--acid); }
.eyebrow span { width: 34px; height: 3px; background: var(--red); }
h1 { margin: 22px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(4.7rem, 10.8vw, 11.5rem); line-height: .68; letter-spacing: -.075em; font-weight: 900; text-shadow: 0 8px 40px rgba(0,0,0,.35); }
h1 span { display: block; }
h1 span:last-child { color: var(--acid); margin-left: .28em; font-style: italic; }
.ticker { display: inline-block; margin: 34px 0 0; transform: rotate(-3deg); padding: 8px 16px; color: var(--ink); background: var(--ember); font-size: clamp(1.1rem,2vw,1.6rem); font-weight: 1000; letter-spacing: .1em; box-shadow: 6px 6px 0 var(--red); }
.intro { max-width: 480px; font-family: Georgia, serif; font-size: clamp(1rem,1.6vw,1.3rem); line-height: 1.6; color: rgba(246,240,214,.83); }
.actions { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 28px; }

.knit-button {
  --btn: #5b7f24; position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 24px;
  min-width: 220px; min-height: 64px; padding: 17px 21px; border: 5px solid #263713; border-radius: 17px;
  color: #fffde7; background-color: var(--btn);
  background-image: repeating-linear-gradient(120deg, transparent 0 6px, rgba(255,255,255,.1) 7px 9px, transparent 10px 15px), repeating-linear-gradient(60deg, rgba(0,0,0,.13) 0 2px, transparent 3px 9px);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), inset 0 -7px 14px rgba(0,0,0,.22), 0 9px 0 #19270e, 0 18px 35px rgba(0,0,0,.25);
  font-weight: 1000; font-size: .83rem; letter-spacing: .11em; transition: transform .18s, filter .18s, box-shadow .18s;
}
.knit-button::before { content: ""; position: absolute; inset: -4px; border: 2px dashed rgba(236,255,198,.5); border-radius: 13px; pointer-events: none; }
.knit-button b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cream); color: var(--ink); font-size: 1rem; }
.knit-button.secondary { --btn: #273b25; border-color: #71824f; box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), inset 0 -7px 14px rgba(0,0,0,.22), 0 9px 0 #121d12, 0 18px 35px rgba(0,0,0,.25); }
.knit-button:hover { transform: translateY(-3px) rotate(-1deg); filter: brightness(1.15); box-shadow: inset 0 0 0 2px rgba(255,255,255,.2), inset 0 -7px 14px rgba(0,0,0,.2), 0 12px 0 #19270e, 0 22px 42px rgba(0,0,0,.32); }
.knit-button:active { transform: translateY(6px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.2), inset 0 -7px 14px rgba(0,0,0,.2), 0 3px 0 #19270e; }
.knit-button:focus-visible, .ca-card:focus-visible, a:focus-visible { outline: 3px solid var(--ember); outline-offset: 5px; }

.scroll-cue { position: absolute; z-index: 2; right: 4vw; bottom: 32px; display: flex; align-items: center; gap: 14px; font-size: .65rem; font-weight: 900; letter-spacing: .18em; writing-mode: vertical-rl; }
.scroll-cue i { display: block; width: 2px; height: 58px; background: linear-gradient(var(--acid), transparent); animation: pulse 1.8s infinite; }

.manifesto { display: grid; place-items: center; background: var(--acid); color: var(--ink); isolation: isolate; }
.manifesto::before { content: ""; position: absolute; width: 70vw; height: 70vw; border: 2px solid rgba(7,19,14,.15); border-radius: 50%; box-shadow: 0 0 0 7vw rgba(7,19,14,.04), 0 0 0 14vw rgba(7,19,14,.04); }
.marquee { position: absolute; top: 4.5rem; width: 110%; transform: rotate(-2deg); background: var(--red); color: white; border-block: 3px solid var(--ink); overflow: hidden; white-space: nowrap; }
.marquee div { width: max-content; padding: 11px 0; font: 900 .82rem/1 "Arial Narrow", sans-serif; letter-spacing: .2em; animation: marquee 18s linear infinite; }
.manifesto-inner { position: relative; z-index: 2; width: min(1100px, 88vw); padding: 130px 0 80px; }
.chapter { color: var(--red); }
.manifesto h2, .code h2 { margin: 18px 0; font-family: Georgia, serif; font-size: clamp(4rem,9vw,9rem); line-height: .83; letter-spacing: -.055em; }
.manifesto h2 em, .code h2 em { color: var(--red); font-weight: inherit; }
.manifesto-note { display: grid; grid-template-columns: minmax(90px,1fr) minmax(260px,460px); gap: 35px; align-items: start; margin-left: auto; max-width: 700px; }
.manifesto-note p { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; line-height: 1.55; }
.stitch-line { margin-top: 12px; border-top: 4px dashed var(--ink); }
.leaf-stamp { position: absolute; right: 7vw; bottom: 6vh; width: 110px; height: 110px; display: grid; place-items: center; border: 5px double var(--ink); border-radius: 50%; transform: rotate(12deg); font: 900 4rem/1 Georgia,serif; opacity: .25; }

.lore { display: flex; justify-content: flex-end; align-items: center; padding: 120px 7vw; background: var(--night) url("assets/robincoon-lore.png") center / cover no-repeat; }
.lore-shade { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 25%, rgba(5,16,12,.45) 50%, rgba(5,16,12,.95) 100%); }
.lore-card { position: relative; z-index: 2; width: min(590px,48vw); padding: clamp(28px,4vw,56px); background: rgba(8,22,16,.72); border: 1px solid rgba(246,240,214,.25); border-radius: 42px 8px 42px 8px; backdrop-filter: blur(14px); box-shadow: 24px 24px 0 rgba(166,255,46,.11); }
.lore-card::after { content:""; position:absolute; inset:11px; border:2px dashed rgba(166,255,46,.22); border-radius:32px 4px 32px 4px; pointer-events:none; }
.lore h2 { margin: 15px 0 25px; font: 900 clamp(3.1rem,6vw,6.4rem)/.88 Georgia,serif; letter-spacing:-.055em; }
.lore-card > p:not(.chapter) { font: 1.1rem/1.7 Georgia,serif; color: rgba(246,240,214,.84); }
.signature { margin-top: 30px; color: var(--acid); font-size: .72rem; font-weight: 900; letter-spacing: .16em; }

.code { min-height: 110svh; padding: 120px 5vw 0; display: flex; flex-direction: column; justify-content: space-between; text-align: center; background: radial-gradient(circle at 50% 45%, #1e4c2e 0, #0c2117 35%, #050c08 72%); }
.code::before { content:""; position:absolute; inset:0; opacity:.14; background-image: repeating-linear-gradient(45deg,transparent 0 12px,rgba(166,255,46,.2) 13px 15px,transparent 16px 25px); mask-image: radial-gradient(circle,black,transparent 72%); }
.code-wrap { position:relative; z-index:2; width:min(1000px,92vw); margin:0 auto 100px; }
.code h2 { font-size:clamp(3.5rem,8vw,8rem); }
.code h2 em { color:var(--acid); }
.code-lead { max-width:520px; margin:25px auto 38px; color:rgba(246,240,214,.7); font:1.1rem/1.6 Georgia,serif; }
.ca-card { position:relative; width:min(820px,100%); min-height:130px; display:grid; grid-template-columns:1fr auto; gap:8px 20px; align-items:center; margin:0 auto; padding:28px 78px 28px 35px; text-align:left; cursor:pointer; color:var(--cream); background:#101b14; border:3px solid var(--acid); border-radius:18px; box-shadow:8px 8px 0 var(--acid), 20px 20px 50px rgba(0,0,0,.38); }
.ca-card::before { content:""; position:absolute; inset:8px; border:1px dashed rgba(166,255,46,.32); border-radius:10px; }
.ca-label { grid-column:1/-1; color:var(--ember); font-size:.7rem; font-weight:900; letter-spacing:.18em; }
.ca-value { position:relative; z-index:1; overflow:hidden; text-overflow:ellipsis; font:900 clamp(1.05rem,2.4vw,1.8rem)/1.3 ui-monospace,Consolas,monospace; letter-spacing:.03em; white-space:nowrap; }
.copy-icon { position:absolute; right:30px; font-size:2rem; color:var(--acid); }
.centered { justify-content:center; margin-top:42px; }
footer { position:relative; z-index:2; display:grid; grid-template-columns:1fr auto 1fr; align-items:end; gap:25px; width:100%; padding:35px 1vw 24px; border-top:1px solid rgba(246,240,214,.2); text-align:left; }
.footer-brand { font:900 1.2rem/1 Georgia,serif; }
.footer-brand span { color:var(--acid); margin-left:8px; }
footer p { margin:0; font-size:.62rem; letter-spacing:.15em; opacity:.48; }
footer a { justify-self:end; font-size:.7rem; font-weight:900; letter-spacing:.12em; color:var(--acid); }

.toast { position:fixed; z-index:100; left:50%; bottom:30px; transform:translate(-50%,120px); padding:16px 22px; color:var(--ink); background:var(--acid); border:3px solid var(--ink); box-shadow:5px 5px 0 var(--ember); font-size:.76rem; font-weight:1000; letter-spacing:.12em; opacity:0; transition:.3s; }
.toast.show { transform:translate(-50%,0); opacity:1; }
.reveal { opacity:0; transform:translateY(24px); transition:opacity .8s ease,transform .8s ease; }
.reveal.visible { opacity:1; transform:none; }

@keyframes marquee { to { transform:translateX(-50%); } }
@keyframes pulse { 50% { opacity:.3; transform:scaleY(.65); } }

@media (max-width: 780px) {
  .topbar { grid-template-columns:1fr auto; min-height:66px; padding:10px 18px; }
  .brand { font-size:.8rem; }
  .brand-mark { width:32px; }
  nav { display:none; }
  .mini-knit { padding:9px 12px; font-size:.62rem; }
  .hero { align-items:flex-end; padding:100px 22px 90px; background-position:64% center; }
  .hero-shade { background:linear-gradient(0deg,rgba(4,15,10,.98) 0%,rgba(4,15,10,.67) 45%,rgba(4,15,10,.06) 78%); }
  .hero-copy { width:100%; }
  .eyebrow { font-size:.66rem; }
  h1 { font-size:clamp(4.1rem,21vw,7.1rem); }
  .ticker { margin-top:24px; }
  .intro { font-size:1rem; max-width:85%; }
  .actions { display:grid; grid-template-columns:1fr; }
  .knit-button { width:100%; min-width:0; }
  .scroll-cue { display:none; }
  .manifesto-inner { padding:120px 0 70px; }
  .manifesto h2,.code h2 { font-size:clamp(3.1rem,17vw,5.2rem); }
  .manifesto-note { grid-template-columns:1fr; gap:18px; margin-top:45px; }
  .manifesto-note p { font-size:1.05rem; }
  .leaf-stamp { width:75px;height:75px;font-size:2.4rem;bottom:3vh; }
  .lore { align-items:flex-end; padding:90px 18px 55px; background-position:32% center; }
  .lore-shade { background:linear-gradient(0deg,rgba(5,16,12,.98) 0%,rgba(5,16,12,.63) 55%,transparent 83%); }
  .lore-card { width:100%; padding:27px 24px; border-radius:30px 6px 30px 6px; }
  .lore h2 { font-size:clamp(2.8rem,14vw,4.5rem); }
  .lore-card > p:not(.chapter) { font-size:1rem; }
  .code { padding:100px 18px 0; }
  .code-wrap { width:100%; }
  .ca-card { min-height:112px; padding:22px 54px 22px 22px; box-shadow:5px 5px 0 var(--acid); }
  .copy-icon { right:20px;font-size:1.5rem; }
  footer { grid-template-columns:1fr; text-align:center; padding:28px 10px; }
  footer a { justify-self:center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
