/* MassBuilder-sidan, i appens egen stil: Chalk i mörkt läge (Slate) och Paper on paper i ljust, med
   färgerna ur ~/Code/PunchSet/Design/chalk-tokens.json och styles/paper.json och appens typsnitt. */

@font-face { font-family: "Familjen Grotesk"; src: url("/fonts/familjen-grotesk.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Spline Sans Mono"; src: url("/fonts/spline-sans-mono.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Shadows Into Light"; src: url("/fonts/shadows-into-light.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira Stencil One"; src: url("/fonts/saira-stencil-one.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  /* Paper on paper: Chalks färger på linjerat papper, korten fästa med häftklamrar */
  --paper: #eef0ec;
  --card: #fbfbf8;
  --line: #d3d8d1;
  --perf: #c4cac3;
  --ink: #1c1f22;
  --ink-muted: #5e646a;
  --ball: #2448b5;
  --ball-wash: #e4e9f6;
  --stamp: #c23a2b;
  --pen-red: #c8282e;
  --rule: rgba(36, 72, 181, 0.12);
  --staple: #8c9298;
  --staple-shine: #eef1f4;
  --corner: rgba(28, 31, 34, 0.26);
  --hole: inset 0 2px 5px rgba(28, 31, 34, 0.35), inset 0 0 0 1px #c4cac3;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .12 0 0 0 0 .13 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --sans: "Familjen Grotesk", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pen: "Shadows Into Light", "Spline Sans Mono", cursive;
  --stencil: "Saira Stencil One", "Familjen Grotesk", sans-serif;
}
@media (prefers-color-scheme: dark) {
  /* Chalk i mörkt läge, Slate: inga skuggor, inga linjer */
  :root {
    --paper: #121517;
    --card: #1c2023;
    --line: #2f3539;
    --perf: #3b4246;
    --ink: #eceee9;
    --ink-muted: #a3aaa5;
    --ball: #7090ff;
    --ball-wash: #1e2744;
    --stamp: #ff7f6b;
    --pen-red: #ff5e5b;
    --rule: transparent;
    --hole: inset 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 0 0 1px #3b4246;
    --grain: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 17px/1.5 var(--sans);
  background-color: var(--paper);
  background-image: var(--grain), repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px);
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; text-decoration-color: var(--ball); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ball); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Överst */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.back { font: 500 13px/1 var(--mono); letter-spacing: 0.04em; text-decoration: none; padding: 12px 0; }
.lang { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }

/* Kort på papperet: häftklammer och ett hörn som lyfter, bara i ljust läge */
.sheet { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.sheet::before {
  content: ""; position: absolute; top: -3px; left: 26px; width: 30px; height: 6px; border-radius: 3px;
  background: linear-gradient(to bottom, var(--staple-shine), var(--staple)); transform: rotate(-4deg);
  box-shadow: 0 1px 1px rgba(28, 31, 34, 0.3);
}
.sheet::after {
  content: ""; position: absolute; z-index: -1; right: 8px; bottom: 6px; width: 46%; height: 24px;
  box-shadow: 0 6px 8px var(--corner); transform: rotate(2deg);
}
@media (prefers-color-scheme: dark) { .sheet::before, .sheet::after { content: none; } }

/* Överst: vad appen är */
.hero { padding-top: 18px; }
.app-id { display: flex; align-items: center; gap: 12px; }
.app-id img { width: 52px; height: 52px; border-radius: 22.37%; }
.app-id span { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.hero h1 { font-size: clamp(40px, 11.5vw, 80px); line-height: 1.0; font-weight: 700; letter-spacing: -0.035em; margin: 22px 0 0; max-width: 11em; text-wrap: balance; }
.lede { font-size: 19px; line-height: 1.5; max-width: 33em; margin: 18px 0 0; }
.film { margin: 28px -20px 0; padding: 0; border-width: 1px 0; border-radius: 0; }
.film video, .film img { width: 100%; height: auto; aspect-ratio: 1280 / 548; background: #f4f3ee; }
.film .still { display: none; }
@media (prefers-reduced-motion: reduce) { .film video.motion { display: none; } .film .still { display: block; } }
@media (min-width: 720px) { .film { margin: 32px 0 0; padding: 10px; border-width: 1px; border-radius: 8px; } .film video, .film img { border-radius: 4px; } }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 26px; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 52px; width: auto; }
.store-text { display: inline-flex; align-items: center; min-height: 52px; padding: 0 20px; border-radius: 10px; background: #000; color: #fff; font-weight: 600; text-decoration: none; border: 1px solid #a6a6a6; }
.terms { margin: 14px 0 0; font: 400 13.5px/1.6 var(--mono); color: var(--ink-muted); max-width: 44em; }

/* Avsnitten */
.part { padding-top: 64px; }
.kicker { font: 500 12px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ball); margin: 0 0 10px; }
h2 { font-size: clamp(30px, 7.6vw, 46px); line-height: 1.06; font-weight: 700; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
.part > p, .intro-text { font-size: 18px; line-height: 1.55; max-width: 34em; margin: 14px 0 0; }

/* Det som finns i appen: ett stansat hål för varje rad, som i passet */
.features { list-style: none; margin: 24px 0 0; padding: 6px 18px; display: grid; column-gap: 32px; }
@media (min-width: 760px) { .features { grid-template-columns: 1fr 1fr; padding: 10px 26px; } }
.features li { position: relative; padding: 14px 0 14px 38px; border-top: 1.5px dashed var(--perf); line-height: 1.45; }
.features li:first-child { border-top: 0; }
@media (min-width: 760px) { .features li:nth-child(2) { border-top: 0; } }
.features li::before { content: ""; position: absolute; left: 0; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); box-shadow: var(--hole); }
.features li.on::before { background: var(--ball); box-shadow: none; }
.features b { font-weight: 700; }
.soon { display: inline-block; font: 500 10.5px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ball); border: 1.5px solid currentColor; border-radius: 4px; padding: 3px 5px 2px; margin: 0 6px 0 0; vertical-align: 2px; white-space: nowrap; }

/* Stegen */
.ladder { display: grid; gap: 24px; margin-top: 24px; align-items: start; }
@media (min-width: 860px) { .ladder { grid-template-columns: minmax(280px, 340px) 1fr; gap: 40px; } }
.reel { margin: 0; padding: 10px; }
.reel video { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 4px; background: #1a120d; }
.reel figcaption, .grow figcaption { font: 400 13px/1.5 var(--mono); color: var(--ink-muted); padding: 10px 4px 2px; }
@media (max-width: 859px) { .reel { max-width: 360px; } }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px; }
.step { padding: 18px 18px 16px; }
.step h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -0.015em; }
.step h3::before {
  counter-increment: step; content: counter(step); flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; font: 600 14px/1 var(--mono); color: var(--ball); background: var(--paper); box-shadow: var(--hole);
}
.step:nth-child(2) h3::before { background: var(--ball-wash); }
.step:nth-child(3) h3::before { background: color-mix(in srgb, var(--ball) 45%, var(--card)); color: var(--card); box-shadow: none; }
.step:nth-child(4) h3::before { background: var(--ball); color: var(--card); box-shadow: none; }
.step p { margin: 8px 0 0; }
.step .in-app { margin-top: 12px; padding-top: 10px; border-top: 1.5px dashed var(--perf); font-size: 15.5px; color: var(--ink-muted); }
.step .in-app b { color: var(--ink); font-weight: 600; }
/* Kopplingens adress (/massbuilder/connector/), att markera och kopiera: sajten har inga skript, alltså ingen knapp. */
.step .address { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--ball-wash); font: 500 14.5px/1.45 var(--mono); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.step .address code { font: inherit; }

.building { margin-top: 20px; padding: 22px 20px 20px; }
.stamp {
  display: inline-block; font: 400 24px/1 var(--stencil); letter-spacing: 0.05em; text-transform: uppercase; color: var(--stamp);
  border: 2.5px solid currentColor; border-radius: 4px; padding: 6px 10px 4px; transform: rotate(-4deg); margin: 0 0 6px 2px;
}
.building p { margin: 12px 0 0; }
.building ul { margin: 10px 0 0; padding-left: 20px; }
.building li { margin: 6px 0; }
.pen { font: 400 25px/1.25 var(--pen); color: var(--ball); margin: 16px 0 0; transform: rotate(-1.5deg); transform-origin: left center; }
.pen a { text-decoration-thickness: 1px; }

/* Build: filmen om trädet och vad varje del står för */
.tree { display: grid; gap: 24px; margin-top: 24px; align-items: start; }
@media (min-width: 860px) { .tree { grid-template-columns: minmax(320px, 440px) 1fr; gap: 40px; } }
.grow { margin: 0; padding: 10px; }
.grow video, .grow img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 4px; background: var(--paper); }
.grow .still { display: none; }
@media (prefers-reduced-motion: reduce) { .grow video.motion { display: none; } .grow .still { display: block; } }
@media (max-width: 859px) { .grow { max-width: 460px; } }
.tree .building { margin-top: 0; }
.parts { margin: 14px 0 4px; }
.parts div { padding: 10px 0; border-top: 1.5px dashed var(--perf); }
.parts div:first-child { border-top: 0; }
.parts dt { display: inline; font-weight: 700; }
.parts dd { display: inline; margin: 0; }

/* Resten av berättelsen och feedback */
.next { padding: 22px 20px 20px; margin-top: 22px; }
.next h2 { font-size: clamp(26px, 6.4vw, 36px); }
.next p { margin: 12px 0 0; max-width: 36em; }
.story-links { display: flex; flex-wrap: wrap; gap: 6px 24px; font-weight: 600; }
.mail { display: inline-flex; align-items: center; margin-top: 18px; padding: 13px 18px; border-radius: 10px; background: var(--ink); color: var(--card); font-weight: 600; text-decoration: none; }

/* Sidfoten */
.foot { margin-top: 80px; border-top: 1.5px dashed var(--perf); padding-top: 18px; padding-bottom: 40px; color: var(--ink-muted); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 2px 20px; color: var(--ink); margin-bottom: 10px; }
.foot nav a { padding: 8px 0; }
.foot p { margin: 0; max-width: 42em; }
