/* =========================================================================
   Smart Throttle Controller — public site styles
   Theme: light "control panel / thermostat" look.
   Signature element: the circular MODE DIAL (hero + nav logo), reused as
   the visual thread that ties the hero, the mode cards and the guide page
   together — this app is basically a thermostat for your laptop.
   ========================================================================= */

:root {
  /* --- surfaces --- */
  --bg: #f4f8fb;
  --bg-soft: #eaf1f7;
  --surface: #ffffff;
  --surface-line: #e1e9ef;

  /* --- ink --- */
  --ink: #16232b;
  --ink-muted: #5b6b73;
  --ink-faint: #8a99a1;

  /* --- brand (matches the real app's "ON" SeaGreen) --- */
  --brand: #2e8b57;
  --brand-dark: #1f6b41;
  --brand-soft: #e3f3ea;

  /* --- 4 modes, same order the app cycles through: D -> O -> G -> B --- */
  --c-default: #3b82f6;
  --c-default-soft: #e7f0fe;
  --c-office: #14b8a6;
  --c-office-soft: #e2f7f4;
  --c-gaming: #fb5607;
  --c-gaming-soft: #ffe9df;
  --c-battery: #22c55e;
  --c-battery-soft: #e6f9ec;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;
  --shadow-card: 0 1px 2px rgba(22, 35, 43, 0.04), 0 10px 24px -12px rgba(22, 35, 43, 0.14);
  --shadow-pop: 0 24px 60px -20px rgba(22, 35, 43, 0.28);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-muted); }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #cfe9d9;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ----------------------------- buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-s);
  padding: 14px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(46, 139, 87, .55);
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 16px 28px -10px rgba(31, 107, 65, .55); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--surface-line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 8px; }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ------------------------------- nav ----------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 248, 251, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}
.nav-brand .mini-dial { width: 30px; height: 30px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-menu-btn { display: none; }

/* --------------------------- language switch ---------------------------- */
.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
}
.lang-opt {
  padding: 8px 10px;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .15s ease, background .15s ease;
}
a.lang-opt:hover { color: var(--brand-dark); background: var(--brand-soft); }
.lang-opt.is-active { color: #fff; background: var(--brand); cursor: default; }
.lang-switch .lang-divider { width: 1px; align-self: stretch; background: var(--surface-line); }

@media (max-width: 780px) {
  .nav-links { display: none; }
}

/* ------------------------------- hero ----------------------------------- */
.hero {
  padding: 72px 0 56px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  margin-top: 16px;
}
.hero h1 .accent { color: var(--brand); }
.hero-sub {
  font-size: 17px;
  max-width: 46ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-faint);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 16px; height: 16px; color: var(--brand); }

/* ---------------------------- the DIAL ---------------------------------- */
.dial-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dial {
  --size: 340px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    var(--c-default) 0deg 90deg,
    var(--c-office) 90deg 180deg,
    var(--c-gaming) 180deg 270deg,
    var(--c-battery) 270deg 360deg
  );
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dial::before {
  /* punch the donut hole */
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: var(--bg);
}
.dial-center {
  position: relative;
  z-index: 2;
  width: calc(var(--size) - 92px);
  height: calc(var(--size) - 92px);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px;
}
.dial-center svg { width: 40px; height: 40px; color: var(--ink-faint); }
.dial-center .dial-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.dial-center .dial-mode {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  transition: color .3s ease;
}
.dial-pointer {
  position: absolute;
  inset: 0;
  animation: dial-sweep 12s infinite;
  transform-origin: 50% 50%;
}
.dial-pointer .dot {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--surface), 0 2px 6px rgba(0,0,0,.25);
}

@keyframes dial-sweep {
  0%, 18%   { transform: rotate(45deg); }
  25%, 43%  { transform: rotate(135deg); }
  50%, 68%  { transform: rotate(225deg); }
  75%, 93%  { transform: rotate(315deg); }
  100%      { transform: rotate(405deg); }
}

.mini-dial {
  border-radius: 50%;
  background: conic-gradient(
    var(--c-default) 0deg 90deg,
    var(--c-office) 90deg 180deg,
    var(--c-gaming) 180deg 270deg,
    var(--c-battery) 270deg 360deg
  );
  position: relative;
}
.mini-dial::before {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  .dial-pointer { animation: none; transform: rotate(45deg); }
}

/* --------------------------- generic sections ---------------------------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------- "what it does" grid -------------------------- */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .trio { grid-template-columns: 1fr; } }

.trio-card, .step-card, .info-card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-m);
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.trio-card .icon, .step-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.trio-card .icon svg, .step-card .icon svg { width: 22px; height: 22px; }
.trio-card h3, .step-card h3 { font-size: 17px; }
.trio-card p, .step-card p { font-size: 14.5px; margin-bottom: 0; }

/* --------------------------- how it works steps -------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step-card { position: relative; }
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .06em;
}

/* ------------------------------ mode cards -------------------------------- */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .modes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .modes-grid { grid-template-columns: 1fr; } }

.mode-card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-m);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--mode-color, var(--brand));
  transition: transform .2s ease, box-shadow .2s ease;
}
.mode-card:hover, .mode-card.is-active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
}
.mode-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mode-soft, var(--brand-soft));
  color: var(--mode-color, var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.mode-card .icon svg { width: 22px; height: 22px; }
.mode-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mode-color, var(--brand));
}
.mode-card h3 { font-size: 18px; margin: 4px 0 8px; }
.mode-card p { font-size: 14px; margin-bottom: 0; }

.mode-card[data-mode="DEFAULT"] { --mode-color: var(--c-default); --mode-soft: var(--c-default-soft); }
.mode-card[data-mode="OFFICE"]  { --mode-color: var(--c-office);  --mode-soft: var(--c-office-soft); }
.mode-card[data-mode="GAMING"]  { --mode-color: var(--c-gaming);  --mode-soft: var(--c-gaming-soft); }
.mode-card[data-mode="BATTERY"] { --mode-color: var(--c-battery); --mode-soft: var(--c-battery-soft); }

/* ------------------------------ video window ------------------------------ */
.video-shell {
  background: linear-gradient(180deg, #0f1b22, #16232b);
  border-radius: var(--radius-l);
  padding: 10px;
  box-shadow: var(--shadow-pop);
}
.video-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #cbd5db;
  font-family: var(--font-mono);
  font-size: 12px;
}
.video-titlebar .dot { width: 10px; height: 10px; border-radius: 50%; }
.video-titlebar .dot.r { background: #ff5f57; }
.video-titlebar .dot.y { background: #febc2e; }
.video-titlebar .dot.g { background: #28c840; }
.video-titlebar .path { margin-left: 8px; opacity: .7; }

.video-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0b1216;
}
.video-frame img.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .78;
}
.video-frame video, .video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.video-play .ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, background .2s ease;
}
.video-play:hover .ring { transform: scale(1.08); background: rgba(255,255,255,.22); }
.video-play svg { width: 30px; height: 30px; color: #fff; margin-left: 4px; }
.video-play .label {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: #e8eef1;
  font-size: 13px;
  font-family: var(--font-mono);
  background: rgba(0,0,0,.35);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ------------------------------ CTA band --------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: var(--radius-l);
  padding: 48px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0; font-size: 26px; }
.cta-band p { color: rgba(255,255,255,.85); margin: 6px 0 0; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: none; }
.cta-band .btn-primary:hover { background: #f2fff8; }

/* -------------------------------- footer ---------------------------------- */
.footer {
  border-top: 1px solid var(--surface-line);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; color: var(--ink-muted); }
.footer-links a:hover { color: var(--brand-dark); }

/* ================================ GUIDE PAGE =============================== */
.guide-hero { padding: 56px 0 36px; }
.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) { .guide-layout { grid-template-columns: 1fr; } }

.guide-toc {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.guide-toc a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
}
.guide-toc a:hover { color: var(--ink); background: var(--bg-soft); }
.guide-toc a.active { color: var(--brand-dark); border-left-color: var(--brand); background: var(--brand-soft); }

.guide-section { scroll-margin-top: 90px; padding-bottom: 52px; border-bottom: 1px solid var(--surface-line); margin-bottom: 52px; }
.guide-section:last-child { border-bottom: none; margin-bottom: 0; }
.guide-section h2 { font-size: 24px; }
.guide-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-m);
  overflow: hidden;
  font-size: 14.5px;
}
.task-table th, .task-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-line);
}
.task-table th { background: var(--bg-soft); font-family: var(--font-display); font-size: 13px; }
.task-table tr:last-child td { border-bottom: none; }
.task-table .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.task-table .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.p-default { background: var(--c-default-soft); color: #1d4ed8; }
.pill.p-office  { background: var(--c-office-soft);  color: #0f766e; }
.pill.p-gaming  { background: var(--c-gaming-soft);  color: #c2410c; }
.pill.p-battery { background: var(--c-battery-soft); color: #15803d; }

.toggle-demo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  padding: 6px;
  margin: 6px 0 18px;
}
.toggle-demo .knob {
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-line);
  position: relative;
  transition: background .2s ease;
}
.toggle-demo .knob::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .2s ease;
}
.toggle-demo.on .knob { background: var(--brand); }
.toggle-demo.on .knob::after { transform: translateX(16px); }
.toggle-demo span { font-size: 13px; font-family: var(--font-mono); color: var(--ink-muted); }

.lang-demo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 18px;
}
.lang-demo button {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--surface-line);
  background: var(--surface);
  padding: 8px 14px;
  cursor: pointer;
}
.lang-demo button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.info-card { border-left: 4px solid var(--brand); }
.info-card.warn { border-left-color: #f59e0b; }
.info-card h4 { margin: 0 0 8px; font-size: 15px; font-family: var(--font-display); }
.info-card p:last-child { margin-bottom: 0; }

.methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 700px) { .methods-grid { grid-template-columns: 1fr; } }
.method-card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-m);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.method-card .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  background: var(--brand);
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.method-card h4 { margin: 2px 0 4px; font-size: 14.5px; }
.method-card p { font-size: 13.5px; margin: 0; }
.kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--surface-line);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 6px;
}

.tuning-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.tuning-grid th, .tuning-grid td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--surface-line);
  text-align: center;
}
.tuning-grid th:first-child, .tuning-grid td:first-child { text-align: left; }
.tuning-grid th { background: var(--bg-soft); font-family: var(--font-mono); font-weight: 600; font-size: 12px; }
.tuning-grid tr:last-child td { border-bottom: none; }

details.info-card summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}
details.info-card summary::-webkit-details-marker { display: none; }
details.info-card summary::after {
  content: "＋";
  float: right;
  color: var(--brand);
}
details.info-card[open] summary::after { content: "－"; }
details.info-card p { margin-top: 10px; }
