/* Direction B · Shoebox.
   Default = everything stacked vertically and readable (no JS / reduced motion).
   html.motion = objects land on a table, the chapter slides sideways. */

:root {
  --desk: #e7dfd0;
  --desk-2: #ddd3c1;
  --ink: #1f1b16;
  --ink-2: #5d564b;
  --paper: #fbf8f1;
  --pen: #2a46b8;          /* ballpoint blue */
  --red: #c8321e;          /* stamp + label tape */
  --hl: #ffe45c;           /* highlighter */
  --serif: "Newsreader", Georgia, serif;
  --type: "Courier Prime", "Courier New", monospace;
  --tape: "Archivo", "Arial Narrow", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --shadow: 0 1px 1px rgba(40, 30, 10, .12), 0 8px 18px -6px rgba(40, 30, 10, .35), 0 30px 40px -24px rgba(40, 30, 10, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); overflow-x: hidden;
  background: radial-gradient(140% 90% at 30% 20%, var(--desk), var(--desk-2));
  background-attachment: fixed;
  font: 400 19px/1.45 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--hl); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 56px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; }

.grain {
  position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  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='.7' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bar { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); font: 400 14px/1 var(--type); }
.bar a { text-decoration: none; }
.bar-name span { color: var(--ink-2); }
.bar-fast { background: var(--paper); padding: 9px 13px; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.bar-fast:hover { background: var(--hl); }

/* ---------- objects ---------- */
.tape {
  display: inline-block; position: relative;
  padding: .22em .55em .2em;
  font: 800 clamp(1.5rem, 5.2vw, 4.4rem)/1 var(--tape); font-stretch: 85%; letter-spacing: .09em;
  color: #f4f1ea; background: #151515;
  background-image: linear-gradient(180deg, rgba(255,255,255,.14), transparent 40%, rgba(0,0,0,.25));
  text-shadow: 0 -1px 0 rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.35); /* embossed */
  box-shadow: var(--shadow);
  clip-path: polygon(0 4%, 1.5% 0, 98.5% 0, 100% 4%, 100% 96%, 98.5% 100%, 1.5% 100%, 0 96%);
}
.tape.t3, .tape.t-next { background-color: var(--red); }

.card {
  background: var(--paper); box-shadow: var(--shadow); padding: 26px 28px 24px 52px; position: relative;
  background-image: linear-gradient(90deg, transparent 36px, rgba(200,50,30,.35) 36px 37.5px, transparent 37.5px),
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(42,70,184,.16) 27px 28px);
  font: 400 17px/28px var(--type);
}
.card p { margin: 0; }

.polaroid { margin: 0; background: #fdfcf8; padding: 12px 12px 0; box-shadow: var(--shadow); width: min(300px, 70vw); }
.polaroid .ph {
  aspect-ratio: 1; display: grid; place-items: center; text-align: center; padding: 16px;
  background: repeating-linear-gradient(45deg, #cfc6b5 0 10px, #c7bead 10px 20px);
  font: 400 13px/1.4 var(--type); color: #4d463b;
}
.polaroid figcaption { font: italic 400 21px/1 var(--serif); padding: 14px 6px 18px; color: #2b2721; }

.obj { position: absolute; display: none; }
.sd path { fill: #1d1d1f; } .sd rect { fill: #c9a24b; } .sd text { fill: #ddd; font: 700 13px var(--tape); text-anchor: middle; }
.screw rect:first-child { fill: var(--red); } .screw rect + rect, .screw path { fill: #9a9a9a; }

/* ---------- 1. opening ---------- */
.intro { min-height: 100vh; min-height: 100svh; padding: 110px var(--gutter) 60px; display: grid; gap: 34px; align-content: center; justify-items: start; }
.tapes { margin: 0; display: grid; gap: 14px; justify-items: start; }
.t1 { transform: rotate(-2.2deg); }
.t2 { transform: rotate(1.2deg) translateX(.6em); }
.t3 { transform: rotate(-.8deg) translateX(.2em); }
.intro-card { max-width: 440px; transform: rotate(1deg); }
.ways { display: grid; gap: 6px; margin-top: 14px; }
.ways a { text-decoration: none; }
.ways a:hover { background: var(--hl); }
.ways small { color: var(--ink-2); }
.intro-pol { transform: rotate(-4deg); }

html.motion .intro { display: block; position: relative; height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
html.motion .tapes { position: absolute; left: var(--gutter); top: 17vh; }
html.motion .intro-card { position: absolute; left: calc(var(--gutter) + 3vw); bottom: 9vh; width: min(440px, 80vw); }
html.motion .intro-pol { position: absolute; right: 6vw; top: 40vh; width: min(270px, 24vw); }
html.motion .obj { display: block; filter: drop-shadow(0 6px 6px rgba(40,30,10,.3)); }
html.motion .sd { width: 46px; right: 33vw; bottom: 16vh; transform: rotate(18deg); }
html.motion .screw { width: 220px; right: 6vw; bottom: 12vh; transform: rotate(-24deg); }

/* ---------- 2. the chapter ---------- */
.chapter { padding: 40px var(--gutter) 80px; }
.track { display: grid; gap: 80px; }
.item { position: relative; }

.typed { font: 400 15px/1 var(--type); letter-spacing: .04em; color: var(--ink-2); margin: 0; }
.age { margin: 0; font: 300 clamp(9rem, 26vw, 22rem)/.8 var(--serif); letter-spacing: -.05em; font-variation-settings: "opsz" 72; }
.age span { color: var(--red); }
.lede { margin: 18px 0 0; font: italic 400 clamp(1.4rem, 2.6vw, 2.2rem)/1.15 var(--serif); max-width: 18ch; }

.words p { margin: 0 0 .6em; font: 400 clamp(1.8rem, 4.2vw, 3.6rem)/1.08 var(--serif); letter-spacing: -.015em; max-width: 16ch; font-variation-settings: "opsz" 72; }
.hl { color: inherit; background: linear-gradient(transparent 12%, var(--hl) 12% 88%, transparent 88%) no-repeat 0 0 / 100% 100%; padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.forum { display: grid; gap: 28px; }
.print {
  background: #fff; width: min(520px, 88vw); padding: 18px 20px 14px; box-shadow: var(--shadow); transform: rotate(-1.6deg);
  font: 400 13px/1.45 Verdana, Tahoma, sans-serif; color: #222;
}
.print-h { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: #777; border-bottom: 2px solid #f5a623; padding-bottom: 6px; }
.print h3 { margin: 10px 0 8px; font-size: 15px; color: #1a4d8f; }
.post { border-top: 1px solid #e3e3e3; padding: 8px 0; display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.post b { color: #1a4d8f; font-size: 12px; }
.post p { margin: 0; }
.post.me { background: rgba(255, 228, 92, .45); margin: 0 -8px; padding: 8px; }
.print-f { margin: 8px 0 0; font: 400 10px var(--type); color: #999; }
.note-side p { margin: 0 0 .7em; max-width: 26ch; font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.3; }
.note-side p:first-child { font: 500 clamp(1.8rem, 3.6vw, 3rem)/1 var(--serif); }

.brick { display: grid; gap: 22px; justify-items: start; }
.pol-brick { transform: rotate(3deg); }
.screen-photo { background: #050505 !important; position: relative; overflow: hidden; }
.screen-photo::after { /* phone-screen-photographed look: scanlines + glare */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px), radial-gradient(70% 50% at 70% 20%, rgba(255,255,255,.14), transparent 60%);
}
.fb { text-align: left; font: 400 12px/1.45 "Courier New", monospace; color: #e8e8e8; filter: blur(.3px); }
.fb p { margin: 0; }
.sticky {
  background: #ffe873; width: 190px; padding: 18px 16px 22px; box-shadow: 0 10px 18px -8px rgba(40,30,10,.45); transform: rotate(-5deg);
  font: 700 17px/1.25 var(--tape); font-stretch: 75%; color: var(--pen); letter-spacing: .02em;
}
.sticky span { display: block; margin-top: 8px; font-weight: 500; text-decoration: underline wavy; }
.big-line { margin: 0; font: 500 clamp(2.4rem, 6vw, 5.4rem)/.95 var(--serif); letter-spacing: -.03em; max-width: 12ch; font-variation-settings: "opsz" 72; }

.cable-item { display: grid; gap: 16px; }
.cable { width: min(640px, 92vw); overflow: visible; }
.c-main { fill: none; stroke: #2a2a2a; stroke-width: 10; stroke-linecap: round; }
.c-plug { fill: #b9b9b9; stroke: #777; }
.c-wire { fill: none; stroke: #2c2c2c; stroke-width: 3; }
.c-wire.red { stroke: var(--red); }
.c-blob { fill: #c7c3bb; stroke: #8f8a80; }
.pen { fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pen-t { fill: var(--pen); font: 700 26px var(--tape); font-stretch: 75%; }
.pen-t.small { font: italic 400 18px var(--serif); }
.cap { margin: 0; max-width: 32ch; font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.3; }

.reborn { display: grid; gap: 24px; justify-items: start; }
.pol-reborn { transform: rotate(-2deg); }
.screen-photo.ok { background: radial-gradient(120% 70% at 80% 110%, rgba(255,110,40,.6), transparent 60%), #0b0605 !important; }
.home { display: grid; gap: 6px; color: #fff; font-family: "Helvetica Neue", Arial, sans-serif; }
.clk { font-weight: 200; font-size: 56px; line-height: 1; }
.sub { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }

.guy-card { width: min(520px, 90vw); transform: rotate(.8deg); padding-bottom: 40px; }
.guy-k { color: var(--ink-2); }
.guy-t { font: 500 clamp(1.7rem, 3.2vw, 2.5rem)/1.1 var(--serif) !important; margin: 4px 0 14px !important; }
.guy-card ul { margin: 0; padding: 0; list-style: none; }
.guy-card li::before { content: "– "; }
.stamp {
  display: inline-block; margin-top: 22px !important; padding: 8px 16px 6px;
  font: 800 clamp(1.8rem, 3.4vw, 2.6rem)/1 var(--tape) !important; font-stretch: 80%; text-transform: uppercase; letter-spacing: .04em;
  color: var(--red); border: 4px solid var(--red); border-radius: 6px; transform: rotate(-7deg);
  mix-blend-mode: multiply; opacity: .9;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 1.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.next { display: grid; gap: 16px; justify-items: start; }
.t-next { transform: rotate(-1.5deg); font-size: clamp(1.3rem, 3.4vw, 2.6rem); }
.next-s { margin: 0; max-width: 30ch; font-style: italic; font-size: 1.2rem; }

/* motion: the chapter becomes one long table that slides sideways */
html.motion .chapter { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
html.motion .track {
  display: flex; align-items: center; gap: clamp(60px, 9vw, 160px);
  height: 100%; width: max-content; padding: 0 12vw 0 var(--gutter);
}
html.motion .item { flex: none; }
html.motion .opener { width: min(560px, 80vw); }
html.motion .words { width: min(640px, 82vw); }
html.motion .forum { grid-template-columns: auto 1fr; align-items: center; width: min(980px, 150vw); }
html.motion .brick { grid-template-columns: auto auto; align-items: end; }
html.motion .brick .sticky { margin-left: -60px; margin-bottom: 60px; z-index: 2; }
html.motion .brick .big-line { grid-column: 1 / -1; }
html.motion .next { width: min(520px, 80vw); }

/* ---------- short ---------- */
.short { padding: 14vh var(--gutter); display: grid; justify-items: center; }
.short-card { width: min(760px, 100%); padding: 40px 36px 36px 60px; }
.short h2 { margin: 0 0 18px; font: 400 15px/1 var(--type); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.short-lede { font: 500 clamp(1.4rem, 2.6vw, 2.1rem)/1.2 var(--serif) !important; margin-bottom: 26px !important; }
.short dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
.short dt { color: var(--ink-2); }
.short dd { margin: 0; }
.short-cta { margin-top: 26px !important; display: flex; gap: 12px; flex-wrap: wrap; }
.short-cta a { text-decoration: none; padding: 10px 16px; border: 2px solid var(--ink); background: #fff; }
.short-cta a:first-child { background: var(--ink); color: var(--paper); }
.short-note { margin-top: 26px !important; font-size: 12px !important; color: var(--ink-2); }

@media (max-width: 760px) {
  .bar-name span { display: none; }
  html.motion .tapes { top: 14vh; }
  html.motion .intro-pol { right: -8vw; top: auto; bottom: 36vh; width: 44vw; }
  html.motion .intro-card { left: var(--gutter); right: var(--gutter); width: auto; bottom: 5vh; padding: 18px 16px 16px 44px; font-size: 15px; line-height: 26px; }
  html.motion .sd, html.motion .screw { display: none; }
  html.motion .forum { grid-template-columns: 1fr; width: 86vw; }
  html.motion .print { width: 86vw; font-size: 12px; }
  .post { grid-template-columns: 1fr; gap: 2px; }
  html.motion .brick { grid-template-columns: auto; }
  html.motion .brick .sticky { position: absolute; right: -10px; top: -20px; margin: 0; }
  .polaroid { width: min(260px, 64vw); }
  .short dl { grid-template-columns: 1fr; }
  .short dd { margin-bottom: 10px; }
  .short-card { padding: 28px 20px 26px 50px; }
}
