/* Loaders Studios - site styles. Load Bar look (brand option A), light "Shelf" layout.
   Rule: every colour and font comes from a token below. */

@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url("fonts/unbounded-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url("fonts/unbounded-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 400; font-display: swap; src: url("fonts/onest-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 500; font-display: swap; src: url("fonts/onest-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 600; font-display: swap; src: url("fonts/onest-latin-600-normal.woff2") format("woff2"); }

:root {
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;

  --midnight: #10143A;
  --midnight-2: #181D4D;
  --amber: #FFB224;
  --periwinkle: #8EA6FF;
  --slate: #4E5680;
  --white: #FFFFFF;
  --paper: #F7F6F2;
  --line: #E3E2DA;
  --track: #E6E8F2;
  --on-dark-soft: #C9D3FF;

  --tile-quizenshi: #2B1B5E;
  --tile-sleep: #0E2340;
  --tile-pounds: #13362B;
  --tile-site: #3A2410;

  --bg: var(--paper);
  --surface: var(--white);
  --text: var(--midnight);
  --text-soft: var(--slate);
  --accent: var(--amber);
  --on-accent: var(--midnight);
  --button: var(--midnight);
  --on-button: var(--white);
  --focus: var(--midnight);

  --radius: 24px;
  --radius-small: 14px;
  --measure: 62ch;
  --container: 1120px;
}

/* App pages use their own colours through the same token names. */
.theme-sleep {
  --bg: #0B1B33;
  --surface: #10294B;
  --text: #FFFFFF;
  --text-soft: #C6D8EE;
  --line: #2D4C77;
  --accent: #BFE3FF;
  --on-accent: #0B1B33;
  --button: #BFE3FF;
  --on-button: #0B1B33;
  --focus: #FFB224;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; overflow-wrap: break-word; min-width: 0; }
h1 { font-weight: 800; font-size: clamp(2.25rem, 5.2vw, 4.25rem); letter-spacing: -0.02em; }
h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-weight: 700; font-size: 1.15rem; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--text-soft); }

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 18px; border-radius: var(--radius-small); font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* Header and menu */
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand:hover { color: var(--text); }
.loadbar-mark { display: inline-flex; gap: 4px; }
.loadbar-mark span { width: 8px; height: 24px; border-radius: 3px; background: var(--text); }
.loadbar-mark span:last-child { background: var(--amber); }
.nav-list { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; font-weight: 500; }
.nav-list a { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.menu { display: none; }
@media (max-width: 720px) {
  .nav-wide { display: none; }
  .menu { display: block; position: relative; }
  .menu summary {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
    border: 1.5px solid var(--line); border-radius: var(--radius-small);
    font-weight: 600; cursor: pointer; list-style: none;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .nav-list {
    position: absolute; right: 0; top: 56px; z-index: 5; min-width: 220px;
    flex-direction: column; gap: 0; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small);
  }
  .menu[open] .nav-list a { padding: 0 12px; width: 100%; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px;
  border-radius: var(--radius-small); background: var(--button); color: var(--on-button);
  font-weight: 600; text-decoration: none;
  transition: transform 150ms ease, opacity 150ms ease;
}
.button:hover { color: var(--on-button); opacity: 0.9; transform: translateY(-1px); }
.button-quiet { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.button-quiet:hover { color: var(--text); }

/* Hero */
.hero { padding-block: 72px 64px; }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 24px; max-width: 46ch; font-size: 1.2rem; color: var(--text-soft); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.highlight { background: var(--amber); color: var(--midnight); padding: 0 0.2em; border-radius: 10px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Sections */
.section { padding-block: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.section-head p { color: var(--text-soft); font-size: 0.95rem; }

/* App board: each app with its stage on a load bar */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.app-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 0.7fr);
  gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.app-name { display: flex; gap: 16px; align-items: center; min-width: 0; }
.app-tile { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; }
.app-name p { color: var(--text-soft); font-size: 0.95rem; }
.app-status { text-align: right; font-weight: 600; }
.app-status a { display: inline-flex; min-height: 44px; align-items: center; }
.stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.stage { height: 18px; border-radius: 6px; background: var(--track); overflow: hidden; }
.stage.done::after {
  content: ""; display: block; height: 100%; background: var(--amber);
  transform-origin: left center; animation: fill 700ms ease-out both;
}
.stage-labels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 6px; font-size: 0.8rem; color: var(--text-soft); }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 820px) {
  .app-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .app-status { text-align: left; }
  .stage-labels { display: none; }
}

/* Studio log */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 24px; padding-block: 20px; border-top: 1px solid var(--line); }
.log time { color: var(--text-soft); font-size: 0.95rem; }
.log p { color: var(--text-soft); max-width: var(--measure); }
@media (max-width: 620px) { .log li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Family band */
.band { background: var(--midnight); color: var(--white); border-radius: var(--radius); padding: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.band p { color: var(--on-dark-soft); }
.band ul { margin: 0; padding-left: 1.2em; color: var(--on-dark-soft); display: grid; gap: 8px; }
@media (max-width: 820px) { .band { grid-template-columns: minmax(0, 1fr); padding: 32px; } }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact p { color: var(--text-soft); margin-top: 6px; }
@media (max-width: 620px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* App page */
.app-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 64px; }
.shot { aspect-ratio: 9 / 16; max-height: 480px; justify-self: center; width: 100%; max-width: 270px; border-radius: 28px; border: 1.5px dashed var(--line); display: grid; place-items: center; text-align: center; padding: 24px; color: var(--text-soft); font-size: 0.95rem; }
@media (max-width: 820px) { .app-hero { grid-template-columns: minmax(0, 1fr); } }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.features p { color: var(--text-soft); margin-top: 8px; }
@media (max-width: 820px) { .features { grid-template-columns: minmax(0, 1fr); } }
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-small); padding: 4px 20px; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 600; min-height: 52px; display: flex; align-items: center; }
.faq details p { padding-bottom: 16px; color: var(--text-soft); }

/* Legal pages */
.legal { padding-block: 56px 72px; max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.legal .updated { margin-top: 12px; color: var(--text-soft); }
.legal h2 { font-size: 1.3rem; margin-top: 40px; margin-bottom: 12px; }
.legal p, .legal li { color: var(--text); max-width: var(--measure); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; margin-top: 32px; font-size: 0.95rem; color: var(--text-soft); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .stage.done::after { animation: none; }
  .button { transition: none; }
  .button:hover { transform: none; }
}

.tile-quizenshi { background: var(--tile-quizenshi); }
.tile-sleep { background: var(--tile-sleep); }
.tile-pounds { background: var(--tile-pounds); }
.tile-site { background: var(--tile-site); }
.board .app-row:not(:first-child) .stage-labels { display: none; }
