/*
 * OrigamiTube Subscriptions landing, started from Better Playlists' landing.
 * Default look is YouTube's own dark theme; the theme picker swaps the same
 * variables the extension's themes use (palettes mirror src/shared/themes/presets.ts).
 */
:root {
  --bg: #0f0f0f; --chrome: #0f0f0f; --raised: #212121; --menu: #282828;
  --text: #f1f1f1; --muted: #aaaaaa; --faint: #717171; --accent: #ff0033; --on-accent: #ffffff;
  --radius: 12px; --radius-s: 8px;
  --font-head: Roboto, Arial, sans-serif;
  --font-body: Roboto, Arial, sans-serif;
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --tint: color-mix(in srgb, var(--accent) 16%, transparent);
  --hover: color-mix(in srgb, var(--text) 8%, transparent);
  --max: 1160px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.65;
  transition: background-color .35s ease, color .35s ease;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.15; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.4; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
section { padding: 88px 0; }
.band { background: var(--chrome); transition: background-color .35s ease; }
.section-head { max-width: 680px; margin-bottom: 40px; display: grid; gap: 12px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 13px 24px; border-radius: 999px; font: 600 1rem var(--font-body);
  text-decoration: none; background: var(--accent); color: var(--on-accent);
  border: 0; cursor: pointer; transition: transform .15s ease, filter .15s ease, background-color .35s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: var(--raised); color: var(--text); }
.btn-ghost:hover { background: var(--menu); }
.btn[aria-disabled="true"] { opacity: .7; cursor: default; transform: none; }
.btn svg { flex: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--chrome) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); transition: background-color .35s ease; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .92rem; font-weight: 500; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--hover); }
.nav .btn { padding: 9px 18px; font-size: .9rem; margin-left: 8px; }
@media (max-width: 760px) { .nav-links a.hide-sm { display: none; } }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 5fr 7fr; } }
.hero-copy { display: grid; gap: 22px; }
.hero-copy .lead { font-size: 1.12rem; color: var(--muted); max-width: 520px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.assurances { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); padding: 0; margin: 0; list-style: none; }
.assurances li { display: flex; align-items: center; gap: 6px; }
.assurances svg { color: var(--accent); flex: none; }

/* Problem → answer */
.pains { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.pain { padding: 22px; border-radius: var(--radius); border: 1px dashed var(--line); display: grid; gap: 8px; }
.pain .n { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; color: var(--accent); font-size: .85rem; }
.pain p { color: var(--muted); }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.feature { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 12px; align-content: start; transition: background-color .35s ease; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--tint); color: var(--accent); display: grid; place-items: center; }
.feature > p { color: var(--muted); font-size: .97rem; }
.feature ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .92rem; }
.feature li { display: flex; gap: 8px; }
.feature li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: .62em; flex: none; }

/* Split layout (themes) */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

/* Privacy */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.pillar { display: grid; gap: 8px; padding: 22px; border-left: 3px solid var(--accent); background: var(--raised); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.pillar p { color: var(--muted); font-size: .95rem; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Themes */
.themes-art { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.picker { display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text);
  font: 500 .85rem var(--font-body); cursor: pointer; transition: background-color .35s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(127,127,127,.35); flex: none; }

/* Pricing */
.tiers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 880px; margin: 0 auto; }
.tier { background: var(--raised); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 32px; display: grid; gap: 20px; align-content: start; }
.tier.featured { border-color: var(--accent); box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--accent) 60%, transparent); }
.price { font-family: var(--font-head); font-size: 2.8rem; font-weight: 700; line-height: 1; }
.price small { font-size: .95rem; font-weight: 400; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { color: var(--accent); flex: none; margin-top: 5px; }
.tier .btn { justify-self: start; }
.fine { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 24px; }

/* FAQ */
.faq { max-width: 780px; display: grid; gap: 10px; }
details { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 20px; transition: background-color .35s ease; }
summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { color: var(--muted); padding-bottom: 18px; }

.final { text-align: center; display: grid; gap: 20px; justify-items: center; }

/* Footer */
.footer { padding: 48px 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer h3 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }
/* Sibling products. One <li> per product; the grid wraps as the list grows.
   Keep in sync with better-sidebar-landing/theme/components/family.ts. */
.family { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.family:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.family h3 { margin-bottom: 14px; }
.family h3 a { display: inline; padding: 0; margin: 0; }
.family h3 a:hover { background: none; text-decoration: underline; }
.family ul { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.family a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: var(--radius-s); }
.family a:hover { background: var(--hover); text-decoration: none; }
.family a:hover b { text-decoration: underline; }
.family img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.family b { display: block; color: var(--text); font-weight: 600; }
.family small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.5; margin-top: 2px; }
.footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: .82rem; }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.doc .updated { color: var(--faint); font-size: .9rem; margin-bottom: 40px; }
.doc h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 86%, var(--bg)); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; display: grid; gap: 6px; margin: 12px 0; }
.doc a { color: var(--accent); }
.doc code { font: .88em ui-monospace, 'SFMono-Regular', Menlo, monospace; background: var(--raised); padding: 1px 6px; border-radius: 5px; }
.doc .summary { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 8px; }
.doc .summary p { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .94rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; gap: 16px; padding: 96px 24px; }

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

/* ---- OrigamiTube Subscriptions additions ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.hero-grid { align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 5fr 7fr; } }

/* Real screenshots in a light browser frame */
.shot {
  margin: 0; border-radius: 14px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.shot img { width: 100%; height: auto; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f1f1f1; border-bottom: 1px solid #e3e3e3; }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d4d4d4; }
.shot-bar i:nth-child(1) { background: #ff5f57; } .shot-bar i:nth-child(2) { background: #febc2e; } .shot-bar i:nth-child(3) { background: #28c840; }
.shot-bar span { margin-left: 10px; flex: 1; max-width: 320px; padding: 2px 12px; border-radius: 999px; background: #fff; color: #606060; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shot-dark { background: #1a1b26; }

/* Feature rows */
.rows { display: grid; gap: 72px; }
.row { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .row { grid-template-columns: 5fr 7fr; gap: 56px; }
  .row.flip .row-copy { order: 2; }
}
.row-copy { display: grid; gap: 14px; align-content: start; }
.row-copy h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.25; }
.row-copy > p { color: var(--muted); }
.row-copy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .96rem; }
.row-copy li { display: flex; gap: 10px; }
.row-copy li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: .62em; flex: none; }

/* Details grid */
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.details > div { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 8px; align-content: start; transition: background-color .35s ease; }
.details p { color: var(--muted); font-size: .95rem; }

/* Single free tier */
.tier.solo { max-width: 720px; margin: 0 auto; justify-items: center; text-align: left; }
.tier.solo .btn { justify-self: center; }
.checks.two-col { grid-template-columns: 1fr; width: 100%; }
@media (min-width: 640px) { .checks.two-col { grid-template-columns: 1fr 1fr; gap: 10px 28px; } }

/* Language picker (nav) and links (footer) */
.lang-pick { position: relative; display: inline-flex; align-items: center; color: var(--muted); margin-left: 4px; }
.lang-pick svg { position: absolute; left: 10px; pointer-events: none; }
.lang-pick select {
  appearance: none; -webkit-appearance: none; font: 500 .88rem var(--font-body); color: var(--text);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px 7px 34px; cursor: pointer; max-width: 150px;
}
.lang-pick select:hover { background: var(--hover); }
.lang-pick option { background: var(--menu); color: var(--text); }
/* Phones: no room for the picker in the nav; the footer language links take over. */
@media (max-width: 560px) { .lang-pick { display: none; } .nav .btn { padding: 8px 14px; font-size: .85rem; } }
.hero-grid > *, .row > *, .split > * { min-width: 0; }
.langs { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; }
.langs a[aria-current="true"] { color: var(--text); font-weight: 600; }

/* Headlines: balanced lines, and Japanese breaks between phrases, not inside words. */
h1, h2, .row-copy h3 { text-wrap: balance; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
