

/* ==========================================================================
   Pad-OSK site theme layer
   one accent, two themes, no layering of patches
   light is the default; [data-theme="dark"] opts into the dark shell
   ========================================================================== */

:root{
  color-scheme: light;
  --bg:#ffffff;
  --bg-soft:#f7f8fa;
  --surface:#ffffff;
  --surface-2:#f6f7f9;
  --surface-3:#eff2f5;
  --line:rgba(16,24,40,.10);
  --line-2:rgba(16,24,40,.18);
  --text:#14161a;
  --text-2:#4b5462;
  --muted:#79828f;
  --accent:#d94f16;
  --accent-2:#c2410c;
  --amber:#96660a;
  --ok:#17794a;
  --accent-wash:rgba(217,79,22,.07);
  --accent-line:rgba(217,79,22,.26);
  --code-bg:#f7f8fa;
  --code-line:#e2e5ea;
  --code-fg:#1b1f26;
  --code-dim:#78828f;
  --code-copy-bg:rgba(16,24,40,.05);
  --code-copy-fg:#5a6472;
  --code-copy-line:rgba(16,24,40,.12);
  --inline-fg:#b34310;
  --inline-bg:rgba(217,79,22,.08);
}

:root[data-theme="dark"]{
  color-scheme: dark;
  --bg:#0b0d10;
  --bg-soft:#0e1116;
  --surface:#12161c;
  --surface-2:#161b22;
  --surface-3:#1b212a;
  --line:rgba(255,255,255,.08);
  --line-2:rgba(255,255,255,.16);
  --text:#eef2f7;
  --text-2:#c3ccd8;
  --muted:#8b95a3;
  --accent:#e95420;
  --accent-2:#ff7a4d;
  --amber:#ffd479;
  --ok:#5fd68a;
  --accent-wash:rgba(233,84,32,.10);
  --accent-line:rgba(233,84,32,.32);
  --code-bg:#07090c;
  --code-line:rgba(255,255,255,.16);
  --code-fg:#cfd8e3;
  --code-dim:#6c7a89;
  --code-copy-bg:rgba(255,255,255,.05);
  --code-copy-fg:#8b95a3;
  --code-copy-line:transparent;
  --inline-fg:#ffc2ab;
  --inline-bg:rgba(233,84,32,.12);
}

body{background:var(--bg);color:var(--text)}
body::before{background:none}
:root[data-theme="dark"] body::before{
  background:
    radial-gradient(880px 520px at 74% -18%, rgba(233,84,32,.05), transparent 64%),
    radial-gradient(1100px 700px at 50% 110%, rgba(233,84,32,.03), transparent 72%);
}

/* ---------- header ---------- */
.site-header{border-bottom:1px solid var(--line)}
.site-header.scrolled{
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(12px) saturate(140%);
  -webkit-backdrop-filter:blur(12px) saturate(140%);
  border-bottom-color:var(--line);
}
:root[data-theme="dark"] .site-header{border-bottom-color:transparent}
:root[data-theme="dark"] .site-header.scrolled{background:rgba(9,11,14,.78)}

.brand{color:var(--text)}
.brand .brand-sub{color:var(--muted)}
.nav-links a{color:var(--text-2)}
.nav-links a:hover{color:var(--text)}
.lang-btn{border-color:var(--line-2);color:var(--text-2);background:transparent}
.lang-btn:hover{border-color:var(--text);color:var(--text)}

.theme-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;padding:0;
  border:1px solid var(--line-2);border-radius:9px;
  background:transparent;color:var(--text-2);cursor:pointer;
  transition:border-color .18s ease,color .18s ease;
}
.theme-btn:hover{border-color:var(--text);color:var(--text)}
.theme-btn svg{width:16px;height:16px}
.theme-btn .i-sun{display:none}
:root[data-theme="dark"] .theme-btn .i-sun{display:block}
:root[data-theme="dark"] .theme-btn .i-moon{display:none}

/* ---------- buttons ---------- */
.btn-primary{background:var(--accent);color:#fff;box-shadow:none}
.btn-primary:hover{background:#e0561d;transform:none;box-shadow:none}
:root[data-theme="dark"] .btn-primary{background:#e95420;color:#190a05}
:root[data-theme="dark"] .btn-primary:hover{background:#f0602b}

.btn-ghost{background:rgba(16,24,40,.03);border-color:var(--line-2);color:var(--text)}
.btn-ghost:hover{background:rgba(16,24,40,.06);border-color:var(--line-2)}
:root[data-theme="dark"] .btn-ghost{background:rgba(255,255,255,.04)}
:root[data-theme="dark"] .btn-ghost:hover{background:rgba(255,255,255,.08)}

/* ---------- hero ---------- */
.hero{padding-top:clamp(44px,6.6vw,88px);padding-bottom:clamp(42px,6.4vw,84px)}
@media (min-width:981px){
  .hero-grid{grid-template-columns:1fr 1.06fr;gap:clamp(22px,3.4vw,48px)}
  .hero-visual{margin-right:-6vw}
}
.hero h1{
  font-size:clamp(2.2rem,4.4vw,3.6rem);
  line-height:1.09;letter-spacing:-.045em;font-weight:800;margin-bottom:20px;
  color:var(--text);
}
html[lang="en"] .hero h1{font-size:clamp(2rem,4vw,3.2rem);line-height:1.02;letter-spacing:-.04em}

.hl{
  color:var(--accent-2);
  background:none;
  -webkit-background-clip:border-box;background-clip:border-box;
}

.kicker{
  background:var(--accent-wash);border-color:var(--accent-line);color:var(--accent-2);
}
.kicker .dot{background:var(--accent);box-shadow:none}

.hero .lead,.lead{color:var(--text-2)}
html[lang="en"] .hero .lead{max-width:58ch}
.hero-note{color:var(--muted);opacity:1}
.hero-note b{color:var(--text-2)}

.hero-tip{
  background:var(--accent-wash);border-color:var(--accent-line);color:var(--accent-2);
}
.hero-tip svg{color:var(--accent)}
a.hero-tip:hover{background:rgba(217,79,22,.12);border-color:var(--accent-line);color:var(--accent-2)}
:root[data-theme="dark"] a.hero-tip:hover{background:rgba(233,84,32,.17)}

.chip{background:var(--surface);border-color:var(--line-2);color:var(--muted)}
.chip b{color:var(--text)}

/* the keyboard shot: flat dark canvas, no glow, no float */
.shot-frame{
  border:0;padding:10px;border-radius:18px;
  background:var(--code-bg);
  box-shadow:0 22px 46px -30px rgba(0,0,0,.45);
  filter:none;
}
.shot-frame img{border-radius:11px;display:block;width:100%;height:auto;animation:none}
.shot-frame::after{display:none}
.shot-cap{padding:12px 2px 0;color:var(--muted)}
.shot-cap .led i{background:var(--accent);box-shadow:none}

/* ---------- sections ---------- */
h2{font-size:clamp(1.75rem,3.5vw,2.5rem);letter-spacing:-.03em;line-height:1.16;color:var(--text)}
html[lang="en"] h2{letter-spacing:-.036em}
.section{padding-block:clamp(68px,9vw,128px)}
.hero + .section{padding-top:clamp(20px,3vw,36px)}
.section-head{margin-bottom:clamp(32px,4.4vw,52px)}
.eyebrow{color:var(--accent-2)}
.eyebrow::before{background:var(--accent)}

/* ---------- cards ---------- */
.card,.dl-card,.feature,.step{
  background:var(--surface);border-color:var(--line);box-shadow:none;
  transition:border-color .18s ease;
}
.card:hover,.dl-card:hover,.feature:hover{border-color:var(--line-2);background:var(--surface);transform:none}
.card h3,.feature h3,.step h3{color:var(--text)}
.card p,.feature p{color:var(--text-2)}

/* ---------- tables / code ---------- */
table{border-color:var(--line)}
th{background:var(--surface-2);color:var(--text-2)}
td{color:var(--text-2)}
tbody tr:hover td{background:var(--surface-2)}
td code,th code{color:var(--accent-2);background:var(--accent-wash)}
.code{background:var(--code-bg);border-color:var(--line-2)}
pre{color:#cfd8e3}
.copy{background:rgba(255,255,255,.05);color:#8b95a3}

/* ---------- footer ---------- */
footer{background:var(--bg-soft);border-top-color:var(--line)}


/* the hero headline accent was declared with a compound selector in site.css,
   so a bare .hl rule could not win - match its specificity instead */
.hero h1 .hl{
  color:var(--accent-2);
  background:none;
  -webkit-background-clip:border-box;background-clip:border-box;
  -webkit-text-fill-color:currentColor;
}


/* --------------------------------------------------------------------------
   the terminal strip and the shot canvas follow the theme
   light: paper-white bar, dark type  /  dark: the shell's own dark strip
   -------------------------------------------------------------------------- */
:root{
  --term-bg:#f6f7f9;
  --term-line:#e2e5ea;
  --term-text:#1b1f26;
  --term-dim:#79828f;
  --term-shadow:0 10px 24px -20px rgba(16,24,40,.45);
  --shot-bg:#f5f6f8;
  --shot-line:#e2e5ea;
  --shot-shadow:0 18px 40px -28px rgba(16,24,40,.5);
}

:root[data-theme="dark"]{
  --term-bg:#12161c;
  --term-line:rgba(255,255,255,.16);
  --term-text:#cfd8e3;
  --term-dim:#8b95a3;
  --term-shadow:0 14px 34px -20px rgba(0,0,0,.95);
  --shot-bg:#07090c;
  --shot-line:rgba(255,255,255,.16);
  --shot-shadow:0 22px 46px -30px rgba(0,0,0,.85);
}

.demo-term{
  background:var(--term-bg);
  border-color:var(--term-line);
  color:var(--term-text);
  box-shadow:var(--term-shadow);
}
.demo-cmd{color:var(--term-text)}
.demo-led i:nth-child(1){background:#e0665c}
.demo-led i:nth-child(2){background:#e3b341}
.demo-led i:nth-child(3){background:#57ab5a}

.shot-frame{
  background:var(--shot-bg);
  border:1px solid var(--shot-line);
  box-shadow:var(--shot-shadow);
}
.shot-frame img{border-radius:9px}


/* --------------------------------------------------------------------------
   palette pairing: the graphic inverts with the theme so it always has
   contrast against the page - graphite on paper, pale on the dark shell
   -------------------------------------------------------------------------- */
/* .shot-frame img{display:block} outranks a bare class selector,
   so these have to carry the same ancestry to actually win */
.shot-frame img.shot-pale{display:none}
.shot-frame img.shot-graphite{display:block}
:root[data-theme="dark"] .shot-frame img.shot-graphite{display:none}
:root[data-theme="dark"] .shot-frame img.shot-pale{display:block}


/* --------------------------------------------------------------------------
   code blocks: on paper they are a quiet grey slab, on the dark shell they
   keep the terminal look. comments stay deliberately low-contrast.
   -------------------------------------------------------------------------- */
.code{
  background:var(--code-bg);
  border-color:var(--code-line);
}
.code pre{color:var(--code-fg)}
.code .c{color:var(--code-dim)}
.copy{background:var(--code-copy-bg);color:var(--code-copy-fg);border-color:var(--code-copy-line)}
.copy:hover{background:var(--accent-wash);color:var(--accent-2);border-color:var(--accent-line)}
.copy.done{color:var(--ok);border-color:rgba(23,121,74,.45)}

/* inline code keeps the accent language but has to stay legible on paper;
   the higher-specificity resets inside .code pre are untouched */
code,
.prose code,
td code,th code,
.lead code,.card p code,.step p code,.panel p code{
  color:var(--inline-fg);
  background:var(--inline-bg);
}
