/* PowerTailor website. Colours mirror core/ui/theme/Color.kt in the app. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff") format("woff");
  font-weight: 300 700;
  font-display: swap;
}

/* Theme: follows the system unless the visitor picks one (data-theme on <html>, set in head.html).
   Every colour token is a light-dark() pair, so color-scheme alone switches the palette. */
:root {
  color-scheme: dark light;

  /*                      light      dark   */
  --ground:     light-dark(#f5f7f6, #0f1316);
  --surface-1:  light-dark(#ffffff, #171d21);
  --surface-2:  light-dark(#edf1ef, #1f272c);
  --line:       light-dark(#dde3e0, #2a343a);
  --outline:    light-dark(#8c9894, #4a575e);
  --text:       light-dark(#111615, #edf2f4);
  --muted:      light-dark(#4f5b57, #a3b0b7);

  --mint:              light-dark(#0b7a53, #5ee6a8);
  --mint-on:           light-dark(#ffffff, #0b2a1d);
  --mint-container:    light-dark(#cff2e1, #173b2c);
  --mint-on-container: light-dark(#00391f, #8ff0c3);
  --amber:              light-dark(#8a5a00, #f2b544);
  --amber-container:    light-dark(#ffe3ae, #3a2a12);
  --amber-on-container: light-dark(#3a2600, #f7cb75);
  --coral:           light-dark(#b3261e, #ff8a75);
  --coral-container: light-dark(#ffdad4, #4a1d15);

  --glow: light-dark(rgba(11, 122, 83, 0.12), rgba(94, 230, 168, 0.14));
  --shadow-color: light-dark(rgba(17, 22, 21, 0.4), rgba(0, 0, 0, 0.8));
  --shadow: 0 30px 75px -32px var(--shadow-color);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");

  --radius: 20px;
  --wrap: 1120px;
  --gutter: 20px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  transition: background-color 0.25s, color 0.25s;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 650; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--mint); color: var(--mint-on); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand b { font-weight: inherit; }
.brand span { color: var(--mint); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--surface-1); }
.site-header .btn { padding: 9px 16px; font-size: 0.92rem; }

.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  cursor: pointer; transition: color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--text); background: var(--surface-1); }
.theme-toggle svg {
  grid-area: 1 / 1; width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: rotate(-30deg) scale(0.7); transition: opacity 0.2s, transform 0.2s;
}
.theme-toggle .i-system,
.theme-toggle[data-mode="light"] .i-light,
.theme-toggle[data-mode="dark"] .i-dark { opacity: 1; transform: none; }
.theme-toggle[data-mode="light"] .i-system,
.theme-toggle[data-mode="dark"] .i-system { opacity: 0; transform: rotate(-30deg) scale(0.7); }
@media (prefers-reduced-motion: reduce) { .theme-toggle svg { transition: none; } }

@media (max-width: 1000px) { .nav { display: none; } .theme-toggle { margin-left: auto; } }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--mint); color: var(--mint-on);
  font-weight: 650; font-size: 1rem; text-decoration: none;
  padding: 14px 24px; border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 10px 30px -12px var(--mint);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px var(--mint); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-ghost {
  background: transparent; color: var(--text); box-shadow: none;
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface-1); box-shadow: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--amber-container); color: var(--amber-on-container);
  font-size: 0.92rem; font-weight: 550;
  padding: 7px 14px; border-radius: 999px;
}
.chip i { font-style: normal; opacity: 0.6; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mint); margin-bottom: 14px;
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 820px; height: 820px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 .accent { color: var(--mint); }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin: 18px 0 26px; }
.hero .tagline {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  color: var(--text); margin: 0; letter-spacing: -0.01em;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .fine { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 860px) {
  .hero { padding: 40px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero .phone { max-width: 300px; margin: 0 auto; }
}

/* ---------- Phone frames ---------- */
.phone {
  position: relative;
  border-radius: 34px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 340px;
  width: 100%;
}
.phone img { border-radius: 27px; width: 100%; aspect-ratio: 1 / 2; object-fit: cover; background: var(--surface-1); }
.phone.tilt { transform: rotate(2deg); }
@media (max-width: 860px) { .phone.tilt { transform: none; } }

.duo { display: flex; gap: 20px; align-items: flex-start; justify-content: center; }
.duo .phone { max-width: 280px; }
.duo .phone:nth-child(2) { margin-top: 56px; }
@media (max-width: 560px) {
  .duo { gap: 12px; }
  .duo .phone { border-radius: 24px; padding: 5px; }
  .duo .phone img { border-radius: 20px; }
  .duo .phone:nth-child(2) { margin-top: 32px; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
@media (max-width: 860px) { section { padding: 64px 0; } }

.feature .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.feature.flip .copy { order: 2; }
.feature .media { display: flex; justify-content: center; }
.feature .copy > p { color: var(--muted); font-size: 1.08rem; }
@media (max-width: 860px) {
  .feature .wrap { grid-template-columns: 1fr; gap: 44px; }
  .feature.flip .copy { order: 0; }
  .feature .media .phone { max-width: 300px; }
}

.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mint-container);
}
.ticks li::after {
  content: ""; position: absolute; left: 4.5px; top: 7.5px; width: 13px; height: 13px;
  background: var(--mint);
  -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat;
}
.ticks li strong { color: var(--text); }
.ticks li { color: var(--muted); }
.pro {
  display: inline-block; vertical-align: 2px; margin-left: 2px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--amber-on-container); background: var(--amber-container);
  padding: 2px 8px; border-radius: 999px;
}

/* Charger alerts list as cards */
.alerts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0; }
.alert {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; font-size: 0.96rem; color: var(--muted);
}
.alert strong { display: block; color: var(--text); margin-bottom: 2px; }
.alert .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: 2px; }
@media (max-width: 560px) { .alerts { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band { text-align: center; }
.privacy-band .wrap { max-width: 820px; }
.privacy-band .shield {
  width: 72px; height: 72px; margin: 0 auto 26px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--mint-container); color: var(--mint);
}
.privacy-band .shield svg { width: 36px; height: 36px; }
.privacy-band p { color: var(--muted); font-size: 1.12rem; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px 0 30px; padding: 0; list-style: none; }
.pills li {
  border: 1px solid var(--line); background: var(--surface-1); border-radius: 999px;
  padding: 8px 16px; font-size: 0.94rem; font-weight: 550;
}
.pills li s { color: var(--muted); text-decoration-color: var(--coral); text-decoration-thickness: 2px; }

/* ---------- Pricing ---------- */
.pricing .head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.pricing .head p { color: var(--muted); font-size: 1.08rem; }
.plan-table-wrap {
  max-width: 860px; margin: 0 auto;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.plan-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.plan-table th, .plan-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.plan-table tr:last-child td { border-bottom: 0; }
.plan-table thead th {
  font-family: var(--font-display); font-size: 1.1rem; background: var(--surface-2);
}
.plan-table th:not(:first-child), .plan-table td:not(:first-child) { text-align: center; width: 110px; white-space: nowrap; }
.plan-table thead th.pro-col { color: var(--mint); }
.plan-table td.yes::before {
  content: ""; display: inline-block; width: 22px; height: 22px; vertical-align: -6px;
  background: var(--mint);
  -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat;
}
.plan-table td.no::before { content: "–"; color: var(--outline); }
.plan-table td.val { font-weight: 600; font-size: 0.92rem; }
.plan-table tr.divider td { background: var(--surface-2); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 20px; }
@media (max-width: 560px) {
  .plan-table { font-size: 0.9rem; }
  .plan-table th, .plan-table td { padding: 12px 12px; }
  .plan-table th:not(:first-child), .plan-table td:not(:first-child) { width: 72px; }
}

.trial {
  max-width: 860px; margin: 24px auto 0;
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  background: var(--mint-container); color: var(--mint-on-container);
  border-radius: var(--radius); padding: 22px 26px;
}
.trial .big { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.trial .big small { display: block; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }
.trial p { margin: 0; }
@media (max-width: 560px) { .trial { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; }
.faq .intro p { color: var(--muted); }
@media (max-width: 860px) { .faq .wrap { grid-template-columns: 1fr; gap: 28px; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--muted); padding: 0 0 20px; margin: 0; }

/* ---------- Closing CTA ---------- */
.cta { text-align: center; }
.cta .card {
  position: relative; overflow: hidden;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 28px;
  padding: 64px 28px;
}
.cta .card::before {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%;
  background: radial-gradient(closest-side, var(--glow), transparent 75%);
  pointer-events: none;
}
.cta .card > * { position: relative; }
.cta img.icon { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 24px; }
.cta p { color: var(--muted); font-size: 1.1rem; max-width: 34em; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--muted); font-size: 0.94rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .contact a { color: var(--mint); }
.site-footer .copy { width: 100%; margin: 0; font-size: 0.86rem; }

/* ---------- Legal / prose pages ---------- */
.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: 780px; }
.doc .back { display: flex; width: fit-content; align-items: center; gap: 6px; font-size: 0.92rem; text-decoration: none; margin-bottom: 28px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.doc .meta { color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 1.55rem; margin-top: 2.2em; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 1.3em; margin: 0 0 1.2em; }
.doc li { margin-bottom: 0.5em; }
.doc li::marker { color: var(--mint); }
.doc .summary {
  background: var(--mint-container); border-radius: var(--radius); padding: 24px 28px 14px; margin: 0 0 8px;
}
.doc .summary h2 { margin-top: 0; font-size: 1.25rem; color: var(--mint-on-container); }
.doc .summary li, .doc .summary strong { color: var(--mint-on-container); }
.doc .summary li::marker { color: var(--mint-on-container); }

.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 16px; margin: 0 0 1.5em; background: var(--surface-1);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 520px; }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--muted); }
.table-wrap th { background: var(--surface-2); color: var(--text); font-weight: 650; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap.narrow table { min-width: 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Guides ---------- */
.doc .kicker { display: inline-block; margin-bottom: 14px; }
.doc .lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 10px; }
.doc h3 { font-size: 1.15rem; margin: 1.8em 0 0.5em; }
.doc ol { padding-left: 0; margin: 0 0 1.4em; list-style: none; counter-reset: step; }
.doc ol > li { position: relative; padding-left: 44px; margin-bottom: 0.9em; counter-increment: step; }
.doc ol > li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mint-container); color: var(--mint-on-container);
  font: 700 0.85rem/1 var(--font-display);
}
.doc kbd, .doc .path {
  font: 600 0.92em/1 var(--font-body); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px;
  white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.note {
  background: var(--amber-container); color: var(--amber-on-container);
  border-radius: 16px; padding: 16px 20px; margin: 0 0 1.4em;
}
.doc .note p, .doc .note strong { color: var(--amber-on-container); margin: 0; }

.helps {
  display: grid; grid-template-columns: 1fr 190px; gap: 32px; align-items: center;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 2.4em 0;
}
.doc .helps h2 { margin-top: 0; font-size: 1.35rem; }
.helps .phone { max-width: 190px; border-radius: 24px; padding: 5px; }
.helps .phone img { border-radius: 20px; }
.helps .btn { margin-top: 6px; }
.doc .helps ul { margin-bottom: 1em; }
@media (max-width: 640px) {
  .helps { grid-template-columns: 1fr; padding: 22px; }
  .helps .phone { max-width: 200px; margin: 0 auto; }
}

.guide-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-cards.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .guide-cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .guide-cards, .guide-cards.four { grid-template-columns: 1fr; } }
.guide-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.guide-card:hover { border-color: var(--mint); transform: translateY(-2px); }
.guide-card .tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mint); }
.guide-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.25; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.guide-card .more { margin-top: auto; padding-top: 8px; font-size: 0.9rem; font-weight: 600; color: var(--mint); }

.guides-band .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 32px; }
.guides-band .head h2 { margin: 0; }
.read-more { display: inline-block; margin-top: 18px; font-weight: 600; text-decoration: none; }
.read-more:hover { text-decoration: underline; }

.related { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--line); }
.doc .related h2 { margin-top: 0; font-size: 1.2rem; }
