/* TV Remote: Cast & Mirror — website. Graphite / Amber tokens from the design kit (v2). */
:root {
  --bg: #111214;
  --surface: #202226;
  --raised: #2b2e33;
  --text: #f5f6f8;
  --text-2: #b6bcc6;
  --accent: #ffb24a;
  --on-accent: #111214;
  --border: #3b3e44;
  --success: #74da8b;
  --radius: 20px;
  --radius-s: 12px;
  --gutter: 20px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.container { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }

/* Draft banner (only when owner data is missing) */
.draft { background: #4a2f12; color: #ffd9a3; font-size: 14px; padding: 10px var(--gutter); text-align: center; }
mark.todo { background: #4a2f12; color: #ffd9a3; padding: 0 4px; border-radius: 4px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(17, 18, 20, 0.86); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid rgba(59, 62, 68, 0.6); }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; color: var(--text-2); font-size: 15px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.lang summary::-webkit-details-marker { display: none; }
.lang[open] summary, .lang summary:hover { color: var(--text); }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); min-width: 160px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.lang li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; }
.lang li a:hover, .lang li a[aria-current="true"] { background: var(--raised); }
@media (max-width: 760px) {
  .site-header .container { flex-wrap: wrap; padding-block: 8px; }
  .nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding-inline: calc(var(--gutter) - 10px); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .lang { margin-left: auto; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 24px; border-radius: 16px; font-weight: 600; font-size: 17px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--raised); }
.btn[aria-disabled="true"] { background: var(--surface); color: var(--text-2); border-color: var(--border); cursor: default; }
.btn svg { width: 22px; height: 22px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 14px; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.eyebrow svg { width: 20px; height: 20px; flex: none; }
/* Any inline UI icon without an explicit size */
svg[aria-hidden="true"] { width: 22px; height: 22px; flex: none; }
.hero .lead { font-size: 20px; color: var(--text-2); max-width: 34ch; }
.hero-art { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(255, 178, 74, 0.10), 0 20px 60px rgba(0, 0, 0, 0.6); }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(17, 18, 20, 0.55)); }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; gap: 32px; } .hero { padding-top: 32px; } }
@media (max-width: 560px) { .hero .actions .btn { flex: 1 1 100%; } }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--text-2); font-size: 19px; }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* Compatibility strip */
.compat { padding: 8px 0 24px; }
.compat .surface { padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.compat strong { color: var(--text-2); font-weight: 600; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.chip svg { width: 20px; height: 20px; color: var(--accent); }
.compat p { width: 100%; margin: 0; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { padding: 24px; }
.card .icon { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 178, 74, 0.12); display: grid; place-items: center; color: var(--accent); margin-bottom: 16px; }
.card .icon svg { width: 26px; height: 26px; }
.card p { color: var(--text-2); margin: 0; }
@media (max-width: 560px) {
  .card { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 20px; }
  .card .icon { grid-row: span 2; margin-bottom: 0; }
  .card h3 { margin-top: 2px; }
}

/* Showcase rows */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 28px 0; }
.showcase:nth-child(even) .showcase-art { order: 2; }
.showcase h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.showcase p { color: var(--text-2); font-size: 19px; }
@media (max-width: 820px) { .showcase { grid-template-columns: 1fr; gap: 16px; } .showcase:nth-child(even) .showcase-art { order: 0; } }
.art-stack { position: relative; }
.brand-tile { position: absolute; transform: translate(-50%, -50%) rotate(-12deg); aspect-ratio: 1; border-radius: 20%; background: #202226; border: 1.5px solid #8e6b3f; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 178, 74, 0.18); display: grid; place-items: center; padding: 3.2%; }
.brand-tile img { width: 100%; height: 100%; object-fit: contain; }

/* Screens gallery */
.screens { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 20px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.screens figure { margin: 0; scroll-snap-align: start; }
.screens img { border-radius: 30px; }
.screens figcaption { color: var(--text-2); font-size: 14px; margin-top: 12px; text-align: center; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 24px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 16px; }
.step p { color: var(--text-2); margin: 0; }

/* Pro panel */
.pro { padding: 32px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; background: linear-gradient(135deg, #2a2116, var(--surface) 60%); border-color: rgba(255, 178, 74, 0.45); }
.pro ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pro li { display: flex; gap: 12px; align-items: flex-start; }
.pro li svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 2px; }
@media (max-width: 820px) { .pro { grid-template-columns: 1fr; padding: 24px; } }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; color: var(--accent); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); padding-bottom: 18px; margin: 0; }

/* Document pages (privacy, help, support) */
.doc { padding: 40px 0 64px; }
.doc .container { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.doc .toc { position: sticky; top: 88px; padding: 20px; }
.doc .toc h2 { font-size: 15px; color: var(--text-2); text-transform: none; margin-bottom: 10px; }
.doc .toc ol, .doc .toc ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; }
.doc .toc a { color: var(--text); text-decoration: none; }
.doc .toc a:hover { color: var(--accent); }
.doc article { max-width: 760px; }
.doc article h2 { font-size: 24px; margin-top: 36px; scroll-margin-top: 88px; }
.doc article h3 { scroll-margin-top: 88px; }
.doc article ul, .doc article ol { padding-left: 22px; margin: 0 0 14px; }
.doc article li { margin-bottom: 8px; }
.doc .lead { font-size: 19px; color: var(--text-2); }
@media (max-width: 900px) { .doc .container { grid-template-columns: 1fr; gap: 24px; } .doc .toc { position: static; } }

.help-article { padding: 24px; margin-bottom: 16px; }
.help-article h3 { margin-bottom: 8px; }
.help-article ol { margin: 0; }
.help-group { margin-top: 32px; }
.help-group:first-child { margin-top: 0; }

.contact-card { padding: 28px; margin-bottom: 16px; }

/* Contact form */
.contact-form { display: grid; gap: 18px; margin: 20px 0 8px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 15px; }
.field label .muted { font-weight: 400; }
@media (max-width: 900px) { .support-doc .toc { order: 2; } }
@media (max-width: 560px) { .contact-form .btn { width: 100%; } }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; font: inherit; font-size: 17px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input::placeholder, .field textarea::placeholder { color: #7d838d; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field [aria-invalid="true"] { border-color: #ff7a6b; }
.field .hint { color: var(--text-2); font-size: 14px; }
.contact-form .actions { margin: 0; }
.contact-form .btn:disabled { opacity: 0.6; cursor: progress; }
.contact-form > p { margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status, .form-result { padding: 14px 16px; border-radius: 14px; font-size: 15px; border: 1px solid var(--border); background: var(--raised); }
.form-status.success, .form-result.success { border-color: rgba(116, 218, 139, 0.5); background: rgba(116, 218, 139, 0.10); }
.form-status.error, .form-result.error { border-color: rgba(255, 122, 107, 0.5); background: rgba(255, 122, 107, 0.10); }
.form-result { display: none; }
.form-result:target { display: block; }

/* 404 */
.not-found { padding: 96px 0 120px; }
.quick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.quick-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; min-height: 56px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; color: var(--text); text-decoration: none; }
.quick-list a:hover { background: var(--raised); }
.quick-list a::after { content: "›"; color: var(--text-2); font-size: 22px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--text-2); font-size: 14px; }
.site-footer .container { display: grid; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
