/**
 * TubeMake — shared stylesheet for every static page on tubemake.com.
 *
 * One file so the sales page, Terms and Privacy cannot drift apart visually; a customer who clicks
 * "Terms" and lands on a page that looks like a different company has already started doubting.
 *
 * Layout pages use `.wrap`; legal/text pages add `class="doc"` to <body> for the narrower measure
 * and the reading rhythm that goes with it.
 */

:root {
  /* Surfaces, darkest to lightest. */
  --bg: #0b1020;
  --bg-elev: #0f1730;
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Text, brightest to dimmest. */
  --text: #e7ecf5;
  --text-2: #d7deec;
  --muted: #9aa7bd;
  --dim: #71809b;

  --brand: #3b82f6;
  --brand-2: #60a5fa;
  --brand-3: #a78bfa;
  --ok: #4ade80;
  --err: #f87171;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

  /* The page gutter, shared by the header, every section and the footer so nothing sits a few
     pixels off from the thing above it. */
  --gutter: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
/* Anchored sections would otherwise land under the sticky header. */
section[id] { scroll-margin-top: 90px; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 620px at 50% -12%, #16264f 0%, rgba(11, 16, 32, 0) 60%) no-repeat,
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 780px; }

/* ─────────────────────────  Header  ───────────────────────── */

/* Sticky, because the primary CTA has to stay one click away no matter how far down the page a
   reader has scrolled — that single change is usually worth more than anything else on the page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  margin-right: 9px;
}
.logo .mark svg { width: 16px; height: 16px; }
.logo .dot { color: var(--brand-2); font-size: 14px; font-weight: 700; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .15s;
}
.site-nav a:hover { color: var(--text); }

/* ─────────────────────────  Buttons  ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-primary { color: #fff; background: var(--brand); }
.btn-primary:hover { background: #2f6fe0; }

.btn-ghost { color: var(--text); background: var(--card); border-color: var(--border); }
.btn-ghost:hover { background: var(--card-2); border-color: var(--border-strong); }

.btn-lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: var(--r-sm); }

/* ─────────────────────────  Shared bits  ───────────────────────── */

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-2);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 6px 13px;
  border-radius: var(--r-full);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 14px;
}

.section-head { max-width: 660px; margin: 0 auto 44px; text-align: center; }
.section-head h2 {
  font-size: clamp(25px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.grad {
  background: linear-gradient(92deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
}

/* ─────────────────────────  Footer  ───────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 40px 0 48px;
}
.site-footer .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 34px 60px;
  justify-content: space-between;
}
.site-footer .about { max-width: 320px; }
.site-footer .about p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.site-footer nav { display: flex; flex-direction: column; gap: 10px; }
.site-footer nav .head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2px;
}
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}
.site-footer nav a:hover { color: var(--text); }
.site-footer .legal {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  color: var(--dim);
  font-size: 13px;
}

/* ─────────────────────────  Document pages (Terms, Privacy)  ───────────────────────── */

body.doc { line-height: 1.68; }
body.doc .doc-title {
  margin-top: 26px;
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
}
body.doc .updated { color: var(--muted); font-size: 14px; margin-top: 8px; }
body.doc .card { padding: 26px 28px; margin-top: 22px; }
body.doc h2 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
body.doc h2:first-child { margin-top: 0; }
body.doc h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
body.doc p { color: var(--text-2); margin: 10px 0; }
body.doc ul, body.doc ol { margin: 10px 0 10px 22px; }
body.doc li { color: var(--text-2); margin: 7px 0; }
body.doc strong { color: var(--text); }
body.doc a { color: var(--brand-2); }
body.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
body.doc .muted { color: var(--muted); font-size: 14px; }
/* Anchor list at the top of a long legal page: readers scan for the one clause they care about. */
body.doc .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 20px;
}
body.doc .toc a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px 13px;
}
body.doc .toc a:hover { color: var(--text); border-color: var(--border-strong); }

/* ─────────────────────────  Responsive  ───────────────────────── */

@media (max-width: 760px) {
  .site-nav { gap: 16px; }
  /* Section links go; the CTA and the sign-in link are the two that earn their place on a phone. */
  .site-nav .only-wide { display: none; }
  .site-footer .cols { gap: 28px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
