/* ============================================================
   index.css — page styles for index.html (The Dorm Wall)
   Extends assets/wall.css. Do not edit wall.css.
   ============================================================ */

figure { margin: 0; }
section[id] { scroll-margin-top: 84px; }

/* decorative rotated artifacts must not create horizontal scroll */
html, body { overflow-x: clip; }

/* narrow screens: let the rail wrap instead of overflowing */
.rail .wrap { flex-wrap: wrap; row-gap: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* tidy first/last child margins inside paper artifacts */
.paper > :first-child, .folder > :first-child, .notebook > :first-child,
.indexcard > :first-child, .flyer > :first-child, .memnote > :first-child { margin-top: 0; }
.paper > :last-child, .folder > :last-child, .notebook > :last-child,
.indexcard > :last-child, .memnote > :last-child { margin-bottom: 0; }

code {
  font-family: var(--f-type); font-size: 0.85em;
  background: rgba(36,28,18,.09); padding: 0 5px; border-radius: 3px;
}

/* notebook sheets tilt like everything else on the wall */
.notebook { --tilt: 0deg; position: relative; transform: rotate(var(--tilt)); }

/* proposal sub-line (wall.css styles the card itself) */
.chat .proposal strong { display: block; }
.chat .proposal .psub { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 3px; }

/* ---------- 1. HERO ---------- */
.hero { position: relative; padding: 48px 0 72px; overflow: clip; }
/* the clanker patrols the bottom edge of the wooden nav rail — its menu-bar home */
.rail .railwalk { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.rail .railwalk .clanker-walk { width: 44px; bottom: -4px; z-index: 3; animation-delay: -9s; } /* above the tape-chip links (wrap is z-2); pointer-events:none, so clicks pass through */
.rail .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 24px 44px;
  align-items: start;
}
.hero-flyer { max-width: 680px; }
.hero-flyer h1 { font-size: clamp(2.7rem, 5.4vw, 4.8rem); }
.flyer-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 48ch; margin: 0; }
.flyer .tab:nth-child(1) { --tt: -1.5deg; }
.flyer .tab:nth-child(2) { --tt: 1deg; }
.flyer .tab:nth-child(3) { --tt: -0.5deg; }
.flyer .tab:nth-child(4) { --tt: 1.5deg; }

.hero-under {
  margin: 30px 0 0; text-align: center;
  font-size: 0.85rem; line-height: 1.8; color: rgba(247,240,221,.78);
}
.hero-under a {
  color: var(--paper); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--highlighter);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}

.hero-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; justify-items: center; padding-top: 4px; }
.hero-lap { width: 100%; max-width: 400px; }
.hero-lap .chat { font-size: 0.84rem; }
.hero-scrap { display: flex; gap: 28px; align-items: flex-start; justify-content: center; }
.hero-scrap .polaroid { width: 240px; }
.hero-scrap .polaroid .ph img { width: 100%; height: auto; }
.hero-scrap .sticker { width: 148px; margin-top: 26px; }
.hero-scrap .sticker img { width: 100%; height: auto; }
.hero-scrap .clanknote { width: 195px; margin-top: 48px; }

/* loose memes stuck on the wall flanking the memory board — each centered in
   its brown gutter (gutter spans 0 → 50%−590px, so its midpoint is 25%−295px,
   minus half the sticker's own width), bleeding off-screen at narrow widths;
   hidden below 1240px, where they'd cover notes */
.wall-meme { position: absolute; z-index: 1; margin: 0; }
.wall-meme img { width: 100%; height: auto; }
.wall-meme.m1 { width: 150px; left: calc(25% - 370px); top: 150px; }
.wall-meme.m2 { width: 185px; right: calc(25% - 387.5px); top: 120px; }
.wall-meme.m3 { width: 140px; left: calc(25% - 365px); top: 545px; }
.wall-meme.m4 { width: 130px; right: calc(25% - 360px); top: 520px; }

/* chat demo animation states (demo.js drives these) */
.chat .anim-hidden { visibility: hidden; }
.chat .anim-pop { animation: anim-pop 0.18s ease-out; }
.chat .anim-fade { animation: anim-fade 0.3s ease-out; }
.chat .anim-typing::after {
  content: ""; display: inline-block; width: 0.5em; height: 0.95em;
  margin-left: 2px; vertical-align: -0.12em;
  background: currentColor; opacity: 0.55;
  animation: anim-caret 0.75s steps(1) infinite;
}
@keyframes anim-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes anim-fade { from { opacity: 0; transform: translateY(6px); } }
@keyframes anim-caret { 50% { opacity: 0; } }

/* ---------- 2. #memory — evidence board ---------- */
.board { padding: 44px 44px 52px; }
.board-head { max-width: 640px; margin: 0 auto; padding: 26px 32px; }
.board-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.board-head p { margin: 0; color: var(--ink-soft); }

.memrow {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
  margin-top: 56px; padding-top: 96px;
}
.strings {
  position: absolute; inset: 0 0 auto 0;
  width: 100%; height: 80px;
  pointer-events: none; z-index: 2;
}
.strings path {
  fill: none; stroke: var(--string-red); stroke-width: 2.5;
  stroke-linecap: round; opacity: 0.9;
}
/* standalone pins sit above the string ends (cards' transforms make
   them stacking contexts, so pins can't live inside the memnotes) */
.memrow > .pin { top: 7px; z-index: 3; }
.memnote { padding: 24px 24px 20px; }
.memcat {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--red-ink); margin: 0 0 10px;
}
.memnote p { font-size: 0.95rem; color: var(--ink-soft); }
.memact { margin: 14px 0 0; }
.mini-btn {
  display: inline-block; font-weight: 800; font-size: 0.78rem;
  border: 2px solid var(--ink); border-radius: 5px; padding: 2px 12px;
  background: var(--highlighter); color: var(--ink); margin-right: 8px;
}
.mini-btn.ghost { background: transparent; color: var(--ink-soft); }

.board-stickies {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px;
  max-width: 660px; margin: 52px auto 0;
}
.board-stickies .sticky { margin: 0; font-size: 1.25rem; }

/* Correct / Forget, acted out on the notes themselves (pure CSS loops,
   desynced periods so they don't fire together) */
.graphite { position: relative; white-space: nowrap; }
.graphite::after {
  content: ""; position: absolute; left: -5px; right: -5px; top: 50%;
  height: 1.15em; transform: translateY(-50%);
  background:
    repeating-linear-gradient(164deg, rgba(36,28,18,.72) 0 1.5px, transparent 1.5px 4px),
    repeating-linear-gradient(14deg, rgba(36,28,18,.5) 0 1.5px, transparent 1.5px 5px);
  filter: blur(0.4px);
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  animation: graphite-scribble 7s ease-in-out infinite;
}
@keyframes graphite-scribble {
  0%, 6%    { clip-path: inset(0 100% 0 0); opacity: 0; }
  10%       { opacity: 0.95; }
  24%, 76%  { clip-path: inset(0 0 0 0); opacity: 0.95; }
  88%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}
.redpen {
  display: block; margin-top: 4px;
  font-family: var(--f-hand); font-weight: 700; font-size: 1.35rem; line-height: 1.2;
  color: var(--red-ink); transform: rotate(-1.5deg);
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  animation: redpen-write 9s ease-in-out infinite;
}
@keyframes redpen-write {
  0%, 32%   { clip-path: inset(0 100% 0 0); opacity: 0; }
  36%       { opacity: 1; }
  50%, 84%  { clip-path: inset(0 0 0 0); opacity: 1; }
  94%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* ---------- 4. #how — second demo ---------- */
.how-demo {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px;
  margin-top: 8px; align-items: start;
}
.notescard h3 { font-size: 0.95rem; margin: 0 0 4px; }
.nc-meta { font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 14px; }
.chapters { list-style: none; margin: 0; padding: 0; font-size: 0.8rem; color: var(--ink-soft); }
.chapters li { margin-bottom: 10px; line-height: 1.5; }
.chapters li:last-child { margin-bottom: 0; }
.chapters .ts { color: var(--red-ink); font-weight: 700; }

/* ---------- 5. #screen + #notes ---------- */
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.duo-col { display: grid; gap: 36px; }
.contract h2, .notebook h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.contract p, .notebook p { margin: 0 0 14px; color: var(--ink-soft); }
.contract ul, .notebook ul { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.95rem; }
.contract li, .notebook li { margin-bottom: 10px; }
.contract li:last-child, .notebook li:last-child { margin-bottom: 0; }
.contract strong { color: var(--ink); }
.mini-lap { max-width: 430px; justify-self: center; }
.mini-lap .chat { font-size: 0.85rem; }
.notescard.side { max-width: 320px; justify-self: end; margin-top: -26px; }
/* corner-tape the notes cards so the strip clears the Courier title */
.notescard .tape-right { right: -20px; top: -16px; }
.notescard .tape-left { left: -20px; top: -16px; }

/* ---------- 6. #personality ---------- */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.persona { border: 2px dashed rgba(36,28,18,.4); padding: 22px 24px; }
.persona h3 { font-size: 1.25rem; margin: 0 0 8px; }
.ptag { font-size: 1.05rem; color: var(--ink-soft); text-transform: none; letter-spacing: 0; }
.persona p { margin: 0 0 10px; font-size: 0.92rem; color: var(--ink-soft); }
.pquote { font-size: 1.3rem; color: var(--marker-blue); margin: 0; }

.petcard {
  margin-top: 44px; padding: 32px 36px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center;
}
.pet-text h3 { font-size: 1.6rem; margin: 0 0 10px; }
.pet-text p { margin: 0 0 14px; color: var(--ink-soft); }
.dots { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; padding: 0; }
.dots li {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--c); border: 2px solid rgba(36,28,18,.55);
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.petnote { font-size: 1.25rem; color: var(--ink); margin: 0; }
.pet-forms { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.pet-forms figure { margin: 0; text-align: center; }
.pet-forms img { width: 260px; height: auto; border-radius: 4px; box-shadow: var(--shadow-art); }
.pet-forms figcaption { font-size: 1.2rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- 7. #memes ---------- */
.meme-row {
  display: flex; gap: 30px; justify-content: center;
  align-items: flex-start; flex-wrap: wrap; margin-bottom: 48px;
}
.meme-row .sticker { width: 210px; }
.meme-row .sticker img { width: 100%; height: auto; }
.sticker.blank { width: 210px; display: grid; }
.blank-in {
  display: grid; place-items: center; min-height: 150px; padding: 12px;
  border: 2px dashed rgba(36,28,18,.4); border-radius: 4px;
  font-size: 1.35rem; color: var(--ink-soft); text-align: center;
}
.meme-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: start; }
.meme-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.meme-facts .sticky { margin: 0; font-size: 1.2rem; }
.meme-msg { padding: 6px; }
.meme-msg img { width: 220px; max-width: 100%; height: auto; border-radius: 8px; }
.meme-cap { text-align: center; color: rgba(247,240,221,.82); font-size: 1.25rem; margin: 36px 0 0; }

/* ---------- 8. #privacy ---------- */
.privacy-head { max-width: 720px; margin: 0 auto 58px; padding: 28px 34px; }
.privacy-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.privacy-head p { margin: 0; color: var(--ink-soft); }
.folders { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.folder-list { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.95rem; }
.folder-list li { margin-bottom: 12px; }
.folder-list li:last-child { margin-bottom: 0; }
.folder-list strong { color: var(--ink); }
.pills {
  list-style: none; display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; margin: 44px 0 0; padding: 0;
}
.pills li {
  font-family: var(--f-type); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink); background: var(--tape); padding: 6px 14px;
  clip-path: polygon(3% 12%, 98% 2%, 100% 86%, 96% 100%, 4% 94%, 0% 88%);
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
}
.privacy-link { text-align: center; margin: 28px 0 0; }
.privacy-link a {
  color: var(--paper); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--highlighter);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}

/* ---------- 9. #pricing — the quiet card ---------- */
.pricing-sec .wrap { display: flex; flex-direction: column; align-items: center; }
.price-head { text-align: center; margin-bottom: 30px; }
.price-sticky { margin: 0 0 36px; font-size: 1.5rem; max-width: 330px; text-align: center; }
.price-card { position: relative; max-width: 620px; width: 100%; }
.price-card h3 { font-size: 1.7rem; margin: 0 0 14px; }
.includes { list-style: none; margin: 0 0 24px; padding: 0; }
.includes li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--ink-soft); }
.includes li::before { content: "✓"; position: absolute; left: 0; color: var(--red-ink); font-weight: 800; }
.price-cta { text-align: center; margin: 10px 0 14px; }
.price-under { text-align: center; font-size: 0.82rem; color: var(--ink-soft); margin: 0 0 18px; }
.price-under a { color: var(--ink); text-decoration-color: var(--red-ink); font-weight: 700; }
.fineprint {
  font-size: 0.8rem; line-height: 1.6; color: var(--ink-soft);
  border-top: 2px dashed rgba(36,28,18,.3); padding-top: 14px; margin: 0;
}

/* ---------- 10. #faq — sticky accordion ---------- */
/* explicit columns: opening a question only pushes down the ones below it
   in its own column — questions never hop between columns */
.faq-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 26px; align-items: start; }
.faq-col { display: flex; flex-direction: column; }
.faq {
  margin: 0 0 24px;
  background: var(--sticky-yellow); color: var(--ink);
  padding: 16px 20px 18px; border-radius: 2px;
  box-shadow: var(--shadow-art); transform: rotate(var(--tilt, 0deg));
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s cubic-bezier(0.16,1,0.3,1);
}
.faq:hover { transform: rotate(0deg); box-shadow: var(--shadow-lift); position: relative; z-index: 3; }
.faq:nth-child(4n+2) { background: var(--sticky-pink); }
.faq:nth-child(4n+3) { background: var(--sticky-blue); }
.faq:nth-child(4n) { background: var(--sticky-green); }
.faq summary {
  font-family: var(--f-hand); font-weight: 700; font-size: 1.3rem; line-height: 1.25;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; flex: none; }
.faq[open] summary::after { content: "–"; }
.faq .a {
  background: var(--paper-white); margin: 12px -6px 0; padding: 12px 16px;
  border-radius: 2px; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.faq .a p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); }
.faq .a a { color: var(--ink); font-weight: 700; }

/* ---------- 11. finale — the wall at night ---------- */
.finale {
  position: relative; margin-top: 80px; padding: 130px 0 120px;
  text-align: center;
  background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.5));
  border-top: 3px solid rgba(0,0,0,.4);
}
.finale-in h2 {
  font-size: clamp(2.6rem, 6.5vw, 5rem); color: var(--paper);
  text-shadow: 0 3px 0 rgba(0,0,0,.35); margin-bottom: 18px;
}
.finale .lede { color: rgba(247,240,221,.85); font-size: 1.15rem; max-width: 52ch; margin: 0 auto 42px; }
.finale-cta { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 0 0 34px; }
.tape-arrow {
  position: relative; flex: none; width: 140px; height: 44px;
  background: var(--tape); transform: rotate(-6deg);
  clip-path: polygon(0 22%, 58% 22%, 58% 0, 100% 50%, 58% 100%, 58% 78%, 0 78%);
  box-shadow: 0 3px 8px rgba(0,0,0,.3);
}
.tape-arrow::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 6px, transparent 6px 12px);
}
.finale-walker { width: 84px; margin: 4px auto 20px; }
.finale .hero-under { margin-top: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .wall-meme { display: none; }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-flyer { max-width: 640px; margin: 0 auto; }
  .how-demo, .meme-grid, .petcard { grid-template-columns: 1fr; }
  .personas { grid-template-columns: repeat(2, 1fr); }
  .petcard { gap: 28px; }
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 64px; }
  .hero-scrap { flex-wrap: wrap; }
  .board { padding: 30px 20px 38px; border-width: 10px; }
  .memrow { grid-template-columns: 1fr; gap: 30px; margin-top: 40px; padding-top: 16px; }
  .strings, .memrow > .pin { display: none; }
  .board-stickies { grid-template-columns: 1fr; }
  .rail .railwalk { display: none; }
  .duo-grid { grid-template-columns: 1fr; }
  .notescard.side { justify-self: center; margin-top: 0; }
  .folders { grid-template-columns: 1fr; gap: 44px; }
  .personas { grid-template-columns: 1fr; }
  .meme-facts { grid-template-columns: 1fr; }
  .faq-cols { grid-template-columns: 1fr; }
  .finale-cta { flex-direction: column; gap: 26px; }
  .tape-arrow { transform: rotate(90deg); }
  .hero-under { font-size: 0.8rem; }
  /* calm the tilts down on small screens */
  .paper, .sticky, .polaroid, .planner, .folder, .sticker,
  .laptop, .notebook, .faq { --tilt: 0deg; }
}
