/* Layout for the public site (M14), laid out as the owner's canvas boards 01 (landing page) and
   31 (Terms) since M17 Task 12. Colours, type, buttons, badges and the focus ring come from
   /tokens.css and /studio.css, which every page loads first; this file sets layout only and uses
   tokens for everything else (no hex). Where the canvas uses a size no token has, the px value is
   written here as the canvas has it. One breakpoint, at 800px; below it everything stacks and
   wraps so a 390px phone never scrolls sideways. */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-wrap: anywhere;
}

/* The canvas's 1040px row plus its 32px sides (16px on a phone); the landing page's is 1120px. */
.wrap {
  width: 100%;
  max-width: 1104px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.landing .wrap {
  max-width: 1184px;
}

/* Skip link: first on every page, shown when it has focus. */
.skip {
  position: absolute;
  top: var(--space-2);
  left: var(--space-4);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  background: var(--paper-200);
  color: var(--ink);
  border: var(--border-ink);
  border-radius: var(--radius-md);
}

.skip:not(:focus) {
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Navigation, button and action links are 44px targets (DESIGN_SYSTEM §9). A link inside a
   sentence (a paragraph, the legal text, the footer's "Contact:") stays an ordinary inline link,
   so it wraps with the text; the buttons (.b1, .b2, .b3) are 44px in studio.css. */
.site-header a,
.site-footer nav a,
.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-header {
  border-bottom: var(--border-hair);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-3);
}

.site-header .brand {
  margin-right: auto;
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.site-header nav {
  gap: var(--space-3);
}

.landing .site-header .wrap {
  gap: var(--space-2) var(--space-4);
}

.landing .site-header nav {
  gap: var(--space-1);
}

.landing .site-header .brand {
  font-size: 28px;
  line-height: 32px;
}

.site-main {
  flex: 1;
}

/* ---------- Landing page (board 01, the selling-points page since M30) ---------- */

/* The announcement bar above the header: ink, paper text, a marigold link. */
.announce {
  padding: 9px var(--space-4);
  background: var(--ink);
  color: var(--paper-100);
  text-align: center;
  font-size: 14px;
  line-height: 20px;
}

.announce a {
  color: var(--marigold);
  font-weight: 600;
}

.landing .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper-100);
}

/* A section's kicker: the canvas's mono capitals in marigold ink. */
.kick {
  font: 500 13px/16px var(--font-mono);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--marigold-ink);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
  padding-block: 64px var(--space-12);
}

.hero-words {
  display: flex;
  flex: 1 1 440px;
  flex-direction: column;
  gap: var(--space-6);
  min-width: 0;
}

.hero h1 {
  font-size: 40px;
  line-height: 42px;
}

.hl {
  padding: 0 10px;
  border-radius: 10px;
  background: var(--marigold);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.tag {
  align-self: flex-start;
  background: var(--marigold-tint);
  color: var(--marigold-ink);
}

.lead {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.hero-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  color: var(--ink-muted);
}

/* The try box (the app's TryBox, web/src/pages/try/try.css, drawn again for the static page). */
.trybox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--paper-200);
  border: var(--border-ink);
  box-shadow: 4px 4px 0 var(--ink-shadow);
}

.trybox[hidden],
[data-try-fallback][hidden] {
  display: none;
}

.try-label {
  font-weight: 700;
  font-size: 15px;
}

.try-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.try-field {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 52px;
  font-size: 16px;
}

.try-go {
  flex: 1 1 100%;
  min-height: 52px;
  padding: 0 22px;
  font-size: 16px;
}

.try-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
}

.try-chip {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li,
.ok-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.ticks li::before,
.ok-line::before {
  content: "✓";
  color: var(--peacock-ink);
  font-weight: 700;
}

/* The hero's side: the paper the sketch appears on, with three stickers round it. */
.hero-side {
  position: relative;
  flex: 0 1 380px;
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4) var(--space-4);
}

.stk {
  position: absolute;
  z-index: 3;
  padding: 6px 12px;
  background: var(--paper-200);
  border: var(--border-ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink-shadow);
  font: 600 14px/18px var(--font-body);
  white-space: nowrap;
  transition: transform var(--t-base) var(--e-spring);
}

.stk-1 {
  top: 0;
  left: 0;
  transform: rotate(-5deg);
}

.stk-2 {
  top: 44%;
  right: 0;
  transform: rotate(4deg);
  background: var(--marigold-tint);
}

.stk-3 {
  bottom: var(--space-4);
  left: 0;
  transform: rotate(-3deg);
  background: var(--peacock-tint);
}

.paper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 420px;
  padding: var(--space-6) 18px 18px;
  border: var(--border-ink);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--ink-shadow);
  background-color: var(--paper-000);
  background-image: var(--paper-grid);
  background-size: 20px 20px;
}

.paper[hidden] {
  display: none;
}

.paper-note {
  margin: 0;
  color: var(--ink-muted);
  text-align: center;
}

.player {
  width: 100%;
  padding: var(--space-3);
  border-radius: 24px;
}

.player > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--aspect-reel);
  object-fit: cover;
  border-radius: var(--radius-md);
}

.sticker {
  position: absolute;
  top: -14px;
  left: var(--space-4);
  transform: rotate(-4deg);
  padding: 2px 10px;
  border-radius: 6px;
  border: var(--border-ink);
  background: var(--marigold-tint);
  font-weight: 600;
  font-size: 13px;
}

/* The pencil sketch: ink-muted lines on paper (the app's SketchFigure). */
.sketch {
  width: 180px;
  height: 240px;
  max-width: 100%;
}

.sketch-lines {
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sketch-top {
  fill: var(--paper-000);
}

.sketch-face {
  fill: var(--paper-100);
}

.sketch-bindi {
  fill: var(--coral);
  stroke: none;
}

/* The drawn sketch's lines draw in, the chips pop in turn; reduced motion stills both
   (studio.css's prefers-reduced-motion rule). */
.sketch.drawn .sketch-lines path,
.sketch.drawn .sketch-lines circle {
  stroke-dasharray: 420;
  animation: sketch-draw 1.3s steps(14) both;
}

@keyframes sketch-draw {
  from {
    stroke-dashoffset: 420;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.try-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.try-found {
  animation: pop var(--t-enter) var(--e-spring) backwards;
}

.try-found:nth-child(2) {
  animation-delay: 120ms;
}

.try-found:nth-child(3) {
  animation-delay: 240ms;
}

.try-found:nth-child(n + 4) {
  animation-delay: 360ms;
}

.try-save {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.try-again {
  font-size: 13px;
}

/* Sections: a kicker and heading over the content, 28px apart. */
.block {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-block: 64px;
}

.block-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
}

.row-head {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  max-width: none;
  gap: var(--space-4);
}

/* Market stats (only with the owner's confirmed figures and sources). */
.dark-band {
  background: var(--ink);
  color: var(--paper-100);
}

.stats-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-block: 44px;
}

.stats-lead {
  max-width: 820px;
  font: 700 26px/32px var(--font-display);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-6);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 2px solid var(--marigold);
}

.num {
  font: 800 48px/1 var(--font-display);
}

.stat .num {
  color: var(--marigold-ink);
}

.stat-source {
  color: var(--ink-muted);
}

/* The old way vs the new: a table; on a phone each row stacks, its cells labelled. */
.compare {
  width: 100%;
  border-collapse: collapse;
  border-radius: 20px;
  overflow: hidden;
}

.compare th,
.compare td {
  padding: 14px var(--space-4);
  border-bottom: var(--border-hair);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 22px;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: 0;
}

.compare thead th {
  color: var(--ink-muted);
}

.compare thead .ours {
  background: var(--marigold-tint);
  color: var(--ink);
}

.compare td {
  color: var(--ink-muted);
}

.compare td.ours {
  background: var(--paper-000);
  color: var(--ink);
  font-weight: 600;
}

.compare thead {
  display: none;
}

.compare tr,
.compare th,
.compare td {
  display: block;
}

.compare td::before {
  content: attr(data-label);
  display: block;
  font: 500 12px/16px var(--font-mono);
  color: var(--ink-muted);
}

/* Ten feature cards in columns of at least 340px (one on a phone). */
.feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 22px;
}

.feat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: 20px;
  background: var(--paper-200);
  border: var(--border-ink);
  box-shadow: 3px 3px 0 var(--ink-shadow);
  transition:
    transform var(--t-quick) var(--e-out),
    box-shadow var(--t-quick) var(--e-out);
}

.feat > p {
  color: var(--ink-muted);
}

.feat-num {
  color: var(--marigold-ink);
}

.feat h3 {
  font: 700 21px/26px var(--font-display);
}

.vis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 190px;
  padding: 14px;
  border-radius: 14px;
  background-color: var(--paper-100);
  background-image: var(--paper-dots);
  background-size: 14px 14px;
}

.vis > img {
  width: 120px;
  height: auto;
  aspect-ratio: var(--aspect-reel);
  object-fit: cover;
  border: var(--border-ink);
  border-radius: var(--radius-md);
}

.vis-col {
  flex-direction: column;
  flex-wrap: nowrap;
}

.vis-left {
  align-items: stretch;
}

.vis-dark {
  background: var(--stage);
  color: var(--on-stage);
}

.vis-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.vis-quote {
  padding: 8px 10px;
  border: var(--border-hair);
  border-radius: 10px;
  background: var(--paper-200);
  font-size: 14px;
}

.bd.dark {
  background: var(--ink);
  color: var(--paper-100);
}

.cast {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cast li:last-child {
  color: var(--ink-muted);
}

.caption-sample {
  font: 800 26px/32px var(--font-display);
  color: var(--paper-000);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-align: center;
}

.caption-sample.hi {
  line-height: 36px;
  color: var(--marigold);
}

.hook-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.hook-tag {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper-100);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.beats,
.cal {
  display: flex;
  gap: 4px;
}

.beats > span {
  width: 22px;
  height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.beats > .on {
  background: var(--marigold);
  border-color: var(--ink);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-self: stretch;
}

.cal > span {
  height: 26px;
  border: var(--border-hair);
  border-radius: 6px;
  background: var(--paper-200);
}

.cal > .on {
  background: var(--peacock);
  border: var(--border-ink);
}

.cal > .next {
  background: var(--marigold);
  border: var(--border-ink);
}

.platform {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 10px;
  border: var(--border-hair);
  border-radius: 10px;
  background: var(--paper-200);
}

.platform > strong {
  flex: 1;
}

/* A band on paper-000 between hairlines (How it works). */
.band {
  background: var(--paper-000);
  border-block: var(--border-hair);
}

.band > .wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-block: 64px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-6);
}

.step-num {
  font: 800 48px/1 var(--font-display);
  color: var(--marigold);
  -webkit-text-stroke: 2px var(--ink);
}

.steps h3 {
  font: 700 21px/26px var(--font-display);
}

.steps p {
  color: var(--ink-muted);
}

.step-time {
  color: var(--peacock-ink);
}

/* The owner's example episode and frames: columns of at least 160px, each 9:16. */
.episode-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 340px;
}

.episode {
  width: 100%;
  height: auto;
  aspect-ratio: var(--aspect-reel);
  border: var(--border-ink);
  border-radius: var(--radius-md);
  background: var(--stage);
}

.episode-title {
  color: var(--ink-muted);
}

.frames {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-4);
}

.shot {
  margin: 0;
  padding: 6px;
  border: var(--border-ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink-shadow);
  background: var(--paper-200);
}

.frames img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--aspect-reel);
  object-fit: cover;
  border-radius: var(--radius-md);
}

.who {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 18px;
}

.who-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 20px;
  border-radius: 20px;
}

.who-card p {
  color: var(--ink-muted);
}

.who-eg {
  color: var(--marigold-ink);
}

/* Quotes (only with the owner's real quotes). */
.quotes-band {
  background: var(--marigold-tint);
  border-block: var(--border-ink);
}

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
  padding-block: 56px;
}

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 22px;
}

.quote p {
  font: 700 20px/26px var(--font-display);
}

.quote footer {
  color: var(--ink-muted);
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 22px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 28px;
  background: var(--paper-200);
  border: var(--border-hair);
  border-radius: 20px;
}

.plan.inked {
  border: var(--border-ink);
  box-shadow: 6px 6px 0 var(--ink-shadow);
}

.plan-flag {
  top: -16px;
  right: 20px;
  transform: rotate(3deg);
  background: var(--marigold);
}

.price .per {
  color: var(--ink-muted);
}

.yearly {
  font-weight: 600;
  color: var(--peacock-ink);
}

.plan ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.plan .b2 {
  margin-top: auto;
}

.tax {
  color: var(--ink-muted);
}

.faq {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  padding-block: 0 64px;
}

.faq-head {
  display: flex;
  flex: 1 1 280px;
  flex-direction: column;
  gap: 10px;
}

.faq-head p {
  color: var(--ink-muted);
}

.faq-list {
  flex: 2 1 320px;
  min-width: 0;
}

.faq-list details {
  border-bottom: var(--border-hair);
}

.faq-list summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  line-height: 24px;
}

.faq-list details p {
  margin: 0 0 18px;
  color: var(--ink-muted);
}

.closing {
  background: var(--marigold);
  border-top: var(--border-ink);
}

.closing-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  padding-block: 64px;
}

.closing-words {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 14px;
}

.closing h2 {
  font-size: 36px;
  line-height: 40px;
}

.closing p {
  font-size: 18px;
  line-height: 27px;
}

.closing .on-paper {
  background: var(--paper-200);
}

/* ---------- 404, Terms and Privacy (board 31) ---------- */

/* The canvas's 1040px main with 32px sides, words 20px apart, 40px below the header. */
.page,
.legal {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1040px;
  padding-block: 40px 0;
}

.page > *,
.legal > * {
  max-width: 736px;
}

.legal-body {
  display: grid;
  gap: var(--space-3);
}

.legal section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
  border-bottom: var(--border-hair);
}

/* A fact the owner has not supplied yet: marked so it is seen on staging. */
.owner-missing {
  padding: 0 var(--space-1);
  background: var(--marigold-tint);
  color: var(--ink);
  border-radius: var(--radius-sm);
}

.site-footer {
  margin-top: var(--space-12);
  border-top: var(--border-hair);
  background: var(--paper-000);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-4);
}

.site-footer p {
  color: var(--ink-muted);
}

@media (min-width: 800px) {
  .wrap {
    padding-inline: var(--space-8);
  }

  .hero h1 {
    font-size: 64px;
    line-height: 64px;
  }

  .try-row {
    flex-wrap: nowrap;
  }

  .try-go {
    flex: none;
  }

  .stk-1 {
    left: -14px;
  }

  .stk-2 {
    right: -18px;
  }

  .stk-3 {
    left: -26px;
  }

  .compare thead {
    display: table-header-group;
  }

  .compare tr {
    display: table-row;
  }

  .compare th,
  .compare td {
    display: table-cell;
  }

  .compare td::before {
    content: none;
  }

  .closing h2 {
    font-size: 56px;
    line-height: 58px;
  }

  .feat:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink-shadow);
  }

  .stk:hover {
    transform: rotate(0) scale(1.05);
  }
}
