/* Kubbord website. One family of tokens; light and dark. */
:root {
  --paper: #ffffff;
  --ink: #1f2440;
  --muted: #59607d;
  --cabinet: #3d5a98;      /* painted cupboard blue */
  --cabinet-deep: #2c4477;
  --mustard: #e3a72f;
  --wood: #c98b52;
  --shelf: #f3efe6;
  --line: #e2e5ef;
  --focus: #e3a72f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161a2c; --ink: #eef0f8; --muted: #a8aecb; --cabinet: #6f8fd6;
    --cabinet-deep: #4d6bb0; --shelf: #22273f; --line: #2c3250;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 18px/1.6 "Atkinson Hyperlegible", system-ui, sans-serif;
}
a { color: var(--cabinet); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: "Young Serif", Georgia, serif; font-weight: 400; line-height: 1.15; margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Young Serif", Georgia, serif; font-size: 24px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.lang { font-size: 16px; color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 32px 0 56px; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); letter-spacing: -0.01em; }
.hero p.lede { font-size: 21px; color: var(--muted); max-width: 30ch; margin: 20px 0 28px; }
.play { display: inline-flex; align-items: center; gap: 12px; background: var(--cabinet); color: #fff; text-decoration: none;
  padding: 14px 22px; border-radius: 14px; font-size: 18px; font-weight: 700; min-height: 56px; }
.play small { display: block; font-weight: 400; font-size: 13px; opacity: .85; }
.play[aria-disabled="true"] { background: var(--cabinet-deep); cursor: default; }
.note-under { font-size: 15px; color: var(--muted); margin-top: 12px; }

/* The cupboard */
.cupboard { width: 100%; max-width: 420px; justify-self: center; }
.cupboard .door { transform-box: fill-box; transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .4s; }
.cupboard .door.left { transform-origin: left center; }
.cupboard .door.right { transform-origin: right center; }
.cupboard.open .door { transform: scaleX(0.16); }
@media (prefers-reduced-motion: reduce) { .cupboard .door { transition: none; } }

/* Ways in */
.ways { border-top: 1px solid var(--line); padding: 48px 0; }
.ways h2, .story h2 { font-size: clamp(28px, 4vw, 38px); max-width: 22ch; }
.ways-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.way svg { width: 48px; height: 48px; color: var(--cabinet); }
.way h3 { font-size: 22px; margin: 12px 0 6px; }
.way p { margin: 0; color: var(--muted); }

/* Story sections */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding: 48px 0; border-top: 1px solid var(--line); }
.story p { color: var(--muted); max-width: 46ch; }
.notice { background: var(--shelf); border-radius: 22px; padding: 18px 20px; max-width: 400px; justify-self: center;
  border-left: 6px solid var(--mustard); }
.notice .app { font-size: 14px; color: var(--muted); }
.notice strong { display: block; margin: 4px 0; font-size: 18px; }
.notice .acts { display: flex; gap: 18px; margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--cabinet); flex-wrap: wrap; }
.month { justify-self: center; text-align: left; }
.month .big { font-family: "Young Serif", Georgia, serif; font-size: clamp(34px, 5vw, 48px); color: var(--cabinet); }
.month p { margin: 4px 0; }

/* Bands and the loop */
.band { border-top: 1px solid var(--line); padding: 48px 0; }
.band h2 { font-size: clamp(28px, 4vw, 38px); max-width: 24ch; }
.intro { color: var(--muted); max-width: 60ch; margin: 14px 0 0; }
.loop { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 0; margin: 32px 0 0; }
.loop li { counter-increment: step; position: relative; padding-top: 52px; }
.loop li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--cabinet); color: #fff; font-family: "Young Serif", Georgia, serif; font-size: 20px; display: grid; place-items: center; }
.loop li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 48px; right: -20px; height: 2px; background: var(--line); }
.loop h3, .rec h3 { font-size: 22px; margin: 0 0 6px; }
.loop p, .rec p { margin: 0; color: var(--muted); }
.ways-grid { grid-template-columns: repeat(3, 1fr); }
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; margin-top: 28px; }
.soon { display: inline-block; vertical-align: middle; font-family: "Atkinson Hyperlegible", system-ui, sans-serif; font-size: 13px;
  font-weight: 700; color: var(--ink); background: var(--mustard); border-radius: 999px; padding: 2px 10px; margin-left: 6px; letter-spacing: 0; }
.notice.waste { border-left-color: var(--cabinet); }
.plan { border-collapse: collapse; width: 100%; max-width: 760px; margin-top: 24px; font-size: 17px; }
.plan th, .plan td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plan thead th { font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: 20px; }
.plan tbody th { font-weight: 400; }
.plan td { width: 9em; }
.yes { color: var(--cabinet); font-weight: 700; font-size: 20px; }
.no { color: var(--muted); }
.small { font-size: 15px; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 760px; }
.faq summary { cursor: pointer; font-size: 20px; font-weight: 700; list-style-position: outside; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Plain pages (legal, support) */
.page { max-width: 720px; margin: 0 auto; padding: 8px 16px 64px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); margin: 16px 0 6px; }
.page h2 { font-size: 24px; margin: 36px 0 8px; }
.page .meta { color: var(--muted); font-size: 15px; }
.page .short { background: var(--shelf); border-radius: 16px; padding: 14px 18px; margin: 20px 0; }
.page li { margin: 6px 0; }
.page table { border-collapse: collapse; width: 100%; font-size: 16px; }
.page th, .page td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }

@media (max-width: 960px) and (min-width: 761px) {
  .loop, .rec-grid, .ways-grid { grid-template-columns: repeat(2, 1fr); }
  .loop li::after { display: none; }
}
@media (max-width: 760px) {
  .hero, .story { grid-template-columns: 1fr; }
  .ways-grid, .rec-grid { grid-template-columns: 1fr; gap: 24px; }
  .loop { grid-template-columns: 1fr; gap: 22px; }
  .loop li:not(:last-child)::after { display: none; }
  .plan td { width: auto; }
  .cupboard { max-width: 320px; }
  .hero { padding-top: 8px; }
}
