/* CheatWall site. Identity: studious, bold, handmade. Signature: posters pinned to a pegboard wall. */
:root {
  --paper: #f3ede2;
  --surface: #fbf8f2;
  --ink: #15171c;
  --ink-2: #4b4f58;
  --line: #ddd3c2;
  --peg: rgba(21, 23, 28, 0.09);
  --accent: #d9381e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(217, 56, 30, 0.12);
  --tape: rgba(255, 246, 214, 0.78);
  --code-bg: #15171c;
  --code-ink: #f1ece2;
  --shadow: 0 1px 2px rgba(21, 23, 28, 0.08), 0 12px 32px -12px rgba(21, 23, 28, 0.28);
  --shadow-lift: 0 2px 4px rgba(21, 23, 28, 0.1), 0 28px 60px -18px rgba(21, 23, 28, 0.42);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111317; --surface: #1a1d23; --ink: #eee7da; --ink-2: #aeb2bb; --line: #2b2f37;
    --peg: rgba(238, 231, 218, 0.07); --accent: #ff6a47; --accent-ink: #15171c; --accent-soft: rgba(255, 106, 71, 0.14);
    --tape: rgba(238, 231, 218, 0.16); --code-bg: #0b0c0f; --code-ink: #eee7da;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -12px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 30px 64px -18px rgba(0, 0, 0, 0.85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111317; --surface: #1a1d23; --ink: #eee7da; --ink-2: #aeb2bb; --line: #2b2f37;
  --peg: rgba(238, 231, 218, 0.07); --accent: #ff6a47; --accent-ink: #15171c; --accent-soft: rgba(255, 106, 71, 0.14);
  --tape: rgba(238, 231, 218, 0.16); --code-bg: #0b0c0f; --code-ink: #eee7da;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -12px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 30px 64px -18px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--peg) 1.4px, transparent 1.6px);
  background-size: 26px 26px;
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--body);
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.3rem/1 var(--display); letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 1rem; }
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav .gh { color: var(--ink); border: 1.5px solid var(--line); display: inline-flex; align-items: center; gap: 8px; }
.nav .gh svg { width: 18px; height: 18px; }
.mode { border: 0; background: transparent; color: var(--ink-2); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.mode:hover { color: var(--ink); background: var(--accent-soft); }
.mode svg { width: 20px; height: 20px; }
.mode .moon { display: none; }
:root[data-theme="dark"] .mode .sun { display: none; }
:root[data-theme="dark"] .mode .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mode .sun { display: none; } :root:not([data-theme="light"]) .mode .moon { display: block; } }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; font-variation-settings: "SOFT" 50, "WONK" 1; }
h1 { font-size: clamp(2.75rem, 7.2vw, 5.6rem); line-height: 0.98; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; }
h3 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.01em; }
.eyebrow { font: 500 0.8rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 18px; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-2); max-width: 34rem; margin: 26px 0 0; }
section { padding: clamp(72px, 11vw, 140px) 0 0; }
.section-head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head p { color: var(--ink-2); margin: 18px 0 0; font-size: 1.2rem; }

/* Red-pen underline: the headline's hand-drawn mark */
.pen { position: relative; white-space: nowrap; }
.pen svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.36em; overflow: visible; }
.pen path { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 0; }
.js .pen path { stroke-dashoffset: 520; animation: draw 0.9s 0.35s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px; font: 600 1.05rem/1 var(--body); text-decoration: none; border: 2px solid var(--ink); transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--accent); }
.btn.primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.btn.primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }
.btn.ghost { color: var(--ink); background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); }
.fine { margin: 18px 0 0; color: var(--ink-2); font-size: 0.95rem; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0 0; }
.hero-grid { display: grid; gap: clamp(44px, 6vw, 72px); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 0.92fr 1.08fr; } }

/* Browser frame, taped to the wall */
.frame { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lift); transform: rotate(0.6deg); }
.frame::before, .frame::after { content: ""; position: absolute; top: -14px; width: 92px; height: 28px; background: var(--tape); box-shadow: 0 1px 2px rgba(0,0,0,.08); backdrop-filter: blur(1px); }
.frame::before { left: 22px; transform: rotate(-6deg); }
.frame::after { right: 22px; transform: rotate(5deg); }
.chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.chrome i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.chrome span { margin-left: 10px; flex: 1; font: 500 0.78rem/1 var(--mono); color: var(--ink-2); background: var(--paper); border-radius: 7px; padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen { aspect-ratio: 16 / 9; background: #f7f4ee; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }
.frame-note { margin: 22px 0 0; font-size: 0.9rem; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; }
.frame-note svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: clamp(64px, 9vw, 110px); }
@media (min-width: 820px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts div { background: var(--surface); padding: 22px 22px 20px; }
.facts b { display: block; font: 600 clamp(1.6rem, 3vw, 2.1rem)/1.05 var(--display); letter-spacing: -0.02em; }
.facts span { color: var(--ink-2); font-size: 0.95rem; }

/* Steps */
.steps { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step .num { font: 600 3.2rem/0.9 var(--display); color: var(--accent); font-variation-settings: "SOFT" 100, "WONK" 1; }
.step h3 { margin: 16px 0 8px; }
.step p { margin: 0 0 22px; color: var(--ink-2); font-size: 1.02rem; }
.shot { margin-top: auto; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--paper); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* The wall: pinned posters */
.wall { display: grid; gap: 34px; grid-template-columns: 1fr; padding: 20px 0 10px; }
@media (min-width: 700px) { .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.pin { position: relative; margin: 0; cursor: pointer; transform: rotate(var(--tilt, -2deg)); transition: transform .35s cubic-bezier(.3,1.4,.5,1), filter .35s; filter: drop-shadow(0 18px 22px rgba(21,23,28,.22)); -webkit-tap-highlight-color: transparent; }
.pin:nth-child(2) { --tilt: 1.6deg; margin-top: 26px; }
.pin:nth-child(3) { --tilt: -1deg; margin-top: 8px; }
.pin img { width: 100%; height: auto; border-radius: 4px; background: var(--surface); }
.pin::before { content: ""; position: absolute; top: -10px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; z-index: 2; background: radial-gradient(circle at 35% 32%, #ff8a70 0 22%, var(--accent) 48%, #8f1f0d 100%); box-shadow: 0 3px 4px rgba(0,0,0,.35); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.pin:hover, .pin:focus-visible, .pin.up { transform: rotate(0deg) translateY(-10px) scale(1.02); filter: drop-shadow(0 30px 34px rgba(21,23,28,.32)); }
.pin:hover::before, .pin:focus-visible::before, .pin.up::before { transform: translateY(-6px) scale(1.12); }
.pin figcaption { margin-top: 14px; font: 500 0.82rem/1.3 var(--mono); color: var(--ink-2); text-align: center; letter-spacing: .02em; }
.wall-note { text-align: center; color: var(--ink-2); font-size: 0.95rem; margin: 34px auto 0; max-width: 36rem; }

/* Features */
.features { display: grid; gap: 22px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card h3 { margin: 18px 0 8px; font-size: 1.3rem; }
.card p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.card .icon { width: 44px; height: 44px; color: var(--accent); }
.card .crop { order: -1; margin: -26px -26px 4px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: #fff; }
.card .crop img { width: 100%; height: 100%; object-fit: cover; }
.card .trio { order: -1; margin: -26px -26px 4px; padding: 20px 26px 0; border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; display: flex; gap: 12px; align-items: flex-end; justify-content: center; overflow: hidden; background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; }
.card .trio img { width: 30%; height: auto; border-radius: 3px 3px 0 0; box-shadow: var(--shadow); transition: transform .25s ease; }
.card:hover .trio img:nth-child(1) { transform: translateY(-6px) rotate(-2deg); }
.card:hover .trio img:nth-child(2) { transform: translateY(-10px); }
.card:hover .trio img:nth-child(3) { transform: translateY(-6px) rotate(2deg); }

/* Install */
.install { display: grid; gap: 22px; }
.install > * { min-width: 0; }
@media (min-width: 960px) { .install { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.block + .block { margin-top: 22px; }
.block h3 { font-size: 1.2rem; margin-bottom: 6px; }
.block p { margin: 0 0 14px; color: var(--ink-2); font-size: 1rem; }
.code { position: relative; }
pre { margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 50px 20px 18px; overflow-x: auto; font: 0.92rem/1.7 var(--mono); }
pre .c { color: #9a9488; }
pre .p { color: var(--accent); user-select: none; }
.copy { position: absolute; top: 10px; right: 10px; font: 600 0.8rem/1 var(--body); padding: 8px 11px; border-radius: 8px; border: 1px solid rgba(241,236,226,.25); background: rgba(241,236,226,.08); color: var(--code-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s; }
.copy:hover { background: rgba(241,236,226,.18); }
.copy svg { width: 14px; height: 14px; }
.copy.done { background: var(--accent); border-color: var(--accent); color: #fff; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 5px; }
pre code { background: none; padding: 0; font-size: inherit; }
.needs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.needs li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; }
.block .sub { margin-top: 30px; }
.block .sub + p { margin-top: 6px; }
.needs svg { flex: none; width: 20px; height: 20px; color: var(--accent); margin-top: 3px; }

/* FAQ */
.faq { max-width: 50rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative; font: 600 1.25rem/1.35 var(--display); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: -6px 0 24px; color: var(--ink-2); max-width: 44rem; }

/* Closing band */
.closing { margin-top: clamp(80px, 11vw, 140px); background: var(--ink); color: var(--paper); border-radius: 22px; padding: clamp(40px, 7vw, 80px); position: relative; overflow: hidden; }
.closing::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(243,237,226,.08) 1.4px, transparent 1.6px); background-size: 26px 26px; pointer-events: none; }
.closing h2 { max-width: 16ch; position: relative; z-index: 1; }
.closing p { color: color-mix(in srgb, var(--paper) 75%, transparent); max-width: 34rem; position: relative; z-index: 1; margin: 18px 0 0; }
.closing .cta { position: relative; z-index: 1; }
.closing .btn { border-color: var(--paper); }
.closing .btn.primary { background: var(--paper); color: var(--ink); }
.closing .btn.ghost { color: var(--paper); }
.closing .btn.ghost:hover { background: rgba(243,237,226,.1); }

/* Footer */
footer { padding: 56px 0 48px; margin-top: 40px; color: var(--ink-2); font-size: 0.95rem; }
footer .wrap { display: grid; gap: 18px; }
@media (min-width: 820px) { footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
footer p { margin: 0; }
footer .legal { margin-top: 14px; max-width: 40rem; }
footer .brand { color: var(--ink); text-decoration: none; }
footer a { color: var(--ink); text-underline-offset: 3px; }
footer .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Scroll reveals, only with JS and only when motion is welcome */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .pen path { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; }
  .pin, .frame { transform: none; }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .frame { transform: none; }
  .frame::before, .frame::after { width: 64px; height: 22px; top: -11px; }
  .btn { width: 100%; justify-content: center; }
  pre { font-size: 0.84rem; }
}
