/* TubeMakers public website - same design tokens as frontend/src/styles.css */

@font-face {
  font-family: "DM Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --bg: #d8e1de;
  --surface: #ffffff;
  --surface-soft: #f1f5f3;
  --surface-strong: #e4ebe8;
  --ink: #162322;
  --muted: #667775;
  --line: #bdcbc6;
  --teal: #148f84;
  --teal-strong: #08766d;
  --teal-soft: #e0f3f0;
  --blue: #4f78b5;
  --blue-soft: #e7eef9;
  --violet: #7566ae;
  --violet-soft: #eeebf8;
  --amber: #b47a24;
  --amber-soft: #f8eedb;
  --coral: #bd685d;
  --coral-soft: #f7e8e5;
  --success: #27865d;
  --shadow: 0 12px 32px rgba(21, 44, 40, .12);
  --sidebar: #0d1a1b;
  --brand-mark: #58c9bd;
  --font-ui: "DM Sans Variable", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d1415;
    --surface: #131d1e;
    --surface-soft: #172324;
    --surface-strong: #1d2a2b;
    --ink: #edf5f3;
    --muted: #96a8a5;
    --line: #293738;
    --teal: #38bbae;
    --teal-strong: #53cbbf;
    --teal-soft: #173b38;
    --blue: #82a9e2;
    --blue-soft: #1b2b3d;
    --violet: #a89adb;
    --violet-soft: #2c273f;
    --amber: #e1ad5a;
    --amber-soft: #3b2e19;
    --coral: #e58b7f;
    --coral-soft: #402725;
    --success: #5fc18e;
    --shadow: 0 18px 42px rgba(0, 0, 0, .24);
    --sidebar: #091112;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 430;
  line-height: 1.55;
}
a { color: var(--teal-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin-top: 2.2rem; }
h3 { font-size: 1.1rem; margin-top: 1.6rem; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { font-weight: 700; }
code { font-size: .92em; padding: .1em .35em; background: var(--surface-strong); border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 8px 12px; background: var(--surface); color: var(--ink); border-radius: 9px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 10; }

.wrap { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand__mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #071513; background: var(--brand-mark); box-shadow: 0 7px 20px rgba(25, 168, 153, .2); font-weight: 900; font-size: 1rem; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { padding: 7px 11px; color: var(--muted); border-radius: 9px; text-decoration: none; font-weight: 650; font-size: .93rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--teal-strong); background: color-mix(in srgb, var(--brand-mark) 12%, transparent); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.lang-group { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.lang { display: grid; place-items: center; width: 34px; height: 26px; border-radius: 6px; opacity: .45; transition: opacity .15s ease, background .15s ease; }
.lang:hover, .lang:focus-visible { opacity: 1; }
.lang[aria-current="true"] { opacity: 1; background: var(--teal-soft); }
.flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: 0 0 auto; }
.nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.nav-burger { display: none; width: 38px; height: 38px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 9px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .18s ease, opacity .18s ease; }
.nav-burger span { top: 17px; }
.nav-burger span::before { left: 0; top: -6px; }
.nav-burger span::after { left: 0; top: 6px; }
.nav-toggle:checked ~ .nav-burger span { background: transparent; }
.nav-toggle:checked ~ .nav-burger span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle:checked ~ .nav-burger span::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 820px) {
  .nav-burger { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 20px 14px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 12px 10px; font-size: 1rem; border-radius: 9px; }
}

/* Buttons */
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 18px; color: #fff; background: var(--teal); border: 1px solid var(--teal); border-radius: 9px; font-weight: 700; text-decoration: none; }
.button:hover { color: #fff; background: var(--teal-strong); border-color: var(--teal-strong); }
.button--ghost { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button--ghost:hover { color: var(--teal-strong); background: var(--surface-soft); border-color: var(--line); }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero__eyebrow { display: inline-block; margin-bottom: 14px; padding: 5px 11px; color: var(--teal-strong); background: var(--teal-soft); border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.hero__lead { max-width: 60ch; font-size: 1.15rem; color: var(--muted); font-weight: 480; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Panels and cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 26px; }
.panel + .panel { margin-top: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { min-width: 0; padding: 18px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; }
.card__icon { width: 34px; height: 34px; margin-bottom: 12px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 9px; font-weight: 900; }
.card--blue .card__icon { color: var(--blue); background: var(--blue-soft); }
.card--violet .card__icon { color: var(--violet); background: var(--violet-soft); }
.card--amber .card__icon { color: var(--amber); background: var(--amber-soft); }
.card--coral .card__icon { color: var(--coral); background: var(--coral-soft); }
.card h3 { margin-top: 0; font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.section { padding: 28px 0; }
.section__title { margin-top: 0; }
.notice { padding: 16px 18px; background: var(--surface-soft); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; }
.notice--amber { border-left-color: var(--amber); }
.notice p:last-child { margin-bottom: 0; }

/* Legal / long-form pages */
.page { padding: 44px 0 20px; }
.page__meta { color: var(--muted); font-size: .92rem; }
.prose { max-width: 78ch; }
.prose h2 { padding-top: .2rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .93rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.placeholder { color: var(--coral); background: var(--coral-soft); padding: 0 .3em; border-radius: 4px; font-weight: 650; }
.toc { padding: 14px 18px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; font-size: .93rem; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 24px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* Footer */
.site-footer { margin-top: 56px; padding: 34px 0 40px; background: var(--sidebar); color: #c9d6d3; }
.site-footer a { color: #e6efec; }
.site-footer a:hover { color: var(--brand-mark); }
.footer-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h4 { margin: 0 0 8px; color: #fff; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.footer-grid li { margin-bottom: 6px; }
.footer-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: #98aaa6; }
.footer-note p { margin: 0 0 .4em; }

/* Landing page: steps, pilot box, FAQ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step { position: relative; padding: 20px 18px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.step h3 { margin-top: 0; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
.step__num { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; color: #fff; background: var(--teal); border-radius: 9px; font-weight: 800; }
.step:nth-child(2) .step__num { background: var(--blue); }
.step:nth-child(3) .step__num { background: var(--violet); }
.step:nth-child(4) .step__num { background: var(--amber); }
.pilot { border-left: 5px solid var(--teal); }
.pilot p { max-width: 70ch; }
.faq { display: grid; gap: 10px; margin-bottom: 22px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 18px; }
.faq summary { padding: 14px 0; cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; color: var(--teal); font-weight: 800; font-size: 1.2rem; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.panel .grid h3 { margin-top: 0; font-size: 1.02rem; }
.panel .grid p { color: var(--muted); font-size: .95rem; }
