/* Landing site for AI Quota Monitor. Same tokens as the extension (theme.css). */
:root {
  --bg: #0c0e13; --panel: #14171f; --panel-2: #1b1f29; --line: #262b37;
  --txt: #e6e9ef; --txt-dim: #8b93a3; --txt-faint: #5b6373; --track: #20242f;
  --cool: #22c1a4; --warm: #e8b339; --hot: #f0593f;
  --glow-a: #1d2540; --glow-b: #2a1c1a;
  --shadow: 0 30px 80px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.25);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f8; --panel: #ffffff; --panel-2: #eef0f4; --line: #dde1e8;
    --txt: #171a21; --txt-dim: #5b6373; --txt-faint: #8b93a3; --track: #e4e7ed;
    --cool: #149c86; --warm: #c48f13; --hot: #dc4a30;
    --glow-a: #dfe6ff; --glow-b: #ffe8dc;
    --shadow: 0 30px 80px rgba(20,24,40,.18), 0 2px 6px rgba(20,24,40,.12);
    color-scheme: light;
  }
  :root:not([data-theme="dark"]) .mark img.mono { filter: none; }
}
:root[data-theme="light"] {
  --bg: #f4f5f8; --panel: #ffffff; --panel-2: #eef0f4; --line: #dde1e8;
  --txt: #171a21; --txt-dim: #5b6373; --txt-faint: #8b93a3; --track: #e4e7ed;
  --cool: #149c86; --warm: #c48f13; --hot: #dc4a30;
  --glow-a: #dfe6ff; --glow-b: #ffe8dc;
  --shadow: 0 30px 80px rgba(20,24,40,.18), 0 2px 6px rgba(20,24,40,.12);
  color-scheme: light;
}
:root[data-theme="light"] .mark img.mono { filter: none; }

* { box-sizing: border-box; }
.hero > *, .grid > *, .screens > *, .steps > *, .privacy > * { min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--txt); background: var(--bg); line-height: 1.55;
  background-image: radial-gradient(900px 600px at 85% -5%, var(--glow-a) 0%, transparent 60%), radial-gradient(700px 500px at 0% 30%, var(--glow-b) 0%, transparent 60%);
  background-repeat: no-repeat; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.mono { font-family: var(--mono); }
.muted { color: var(--txt-dim); }
.small { font-size: 13px; color: var(--txt-dim); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: .01em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav { display: flex; gap: 18px; margin-left: auto; font-size: 14px; }
.nav a { color: var(--txt-dim); text-decoration: none; }
.nav a:hover { color: var(--txt); }
.iconbtn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--txt); display: grid; place-items: center; cursor: pointer; }
.iconbtn svg { width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--txt-faint); }
.btn.primary { background: var(--txt); color: var(--bg); border-color: var(--txt); }
.btn.primary:hover { opacity: .92; }
.btn svg { width: 16px; height: 16px; }
.btn.sm { padding: 7px 12px; font-size: 13px; }

/* hero */
.hero { padding-top: 64px; padding-bottom: 56px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-dim); }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.08; margin: 14px 0 18px; letter-spacing: -.02em; }
.lede { font-size: 19px; color: var(--txt-dim); margin: 0 0 26px; max-width: 520px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta .small { width: 100%; }
.shot { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; background: var(--panel); }
.shot img { display: block; width: 100%; }
.hero .shot { max-width: 420px; margin-left: auto; }

/* marks (inside the hero, under the CTA) */
.marks { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.marks .label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 12px; }
.markgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.mark { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--txt-dim); white-space: nowrap; }
.mark span { width: 30px; height: 30px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.mark img { width: 18px; height: 18px; object-fit: contain; }
.mark img.mono { filter: invert(.92); }
.mark span.tiled { background: var(--tile, var(--panel-2)); }
.mark span.tiled img { width: calc(var(--s, .7) * 30px); height: calc(var(--s, .7) * 30px); }

/* sections */
section { padding-top: 104px; padding-bottom: 24px; }
section h2 { font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.015em; margin: 0 0 10px; }
section .sub { color: var(--txt-dim); margin: 0 0 34px; font-size: 17px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; flex: none; }
.card .ic svg { width: 18px; height: 18px; }
.card h3 { margin: 0; font-size: 16px; }
.card p { margin: 0; color: var(--txt-dim); font-size: 14px; }

.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.screens figure { margin: 0; }
.screens figcaption { margin-top: 12px; font-size: 14px; color: var(--txt-dim); }
.screens figcaption b { color: var(--txt); display: block; margin-bottom: 2px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 64px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 20px; width: 30px; height: 30px; border-radius: 9px; background: var(--txt); color: var(--bg); font-family: var(--mono); font-weight: 700; display: grid; place-items: center; }
.step h3 { margin: 2px 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--txt-dim); font-size: 14px; }

.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--txt-dim); }
.checks li svg { flex: none; width: 20px; height: 20px; color: var(--cool); margin-top: 2px; }
.checks li b { color: var(--txt); }
.settings-shot { max-width: 560px; }

.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--txt-dim); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--txt-dim); margin: 10px 0 0; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 13px; color: var(--txt-dim); }
footer .row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-bottom: 16px; }
footer .links { display: flex; gap: 18px; margin-left: auto; }
footer button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--txt-dim); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
footer button.link:hover { color: var(--txt); }
footer p { margin: 6px 0; }

/* modals */
dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--txt); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 8px 22px 26px; overflow: auto; max-height: calc(100vh - 140px); font-size: 15px; }
.modal-body h2 { font-size: 20px; margin: 18px 0 8px; }
.modal-body h3 { font-size: 15px; margin: 22px 0 6px; }
.modal-body p, .modal-body li { color: var(--txt-dim); }
.modal-body strong { color: var(--txt); }
.modal-body code { font-family: var(--mono); font-size: 13px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.modal-body a { color: var(--txt); }
.addr { line-height: 1.7; }
.addr a { color: var(--txt); font-family: var(--mono); font-size: 14px; }
.contact-mail { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--txt); text-decoration: none; margin: 8px 0 14px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero .shot { margin: 0; max-width: 400px; }
  .grid, .screens, .steps, .privacy { grid-template-columns: 1fr; }
  .nav { display: none; }
  section { padding-top: 72px; }
}
@media (max-width: 560px) {
  .cta .btn { width: 100%; justify-content: center; }
  .markgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top .brand span { display: none; }
}
