/* IGramAPI landing page. System fonts only, no frameworks, no inline styles (strict CSP). */
:root {
  --ink: #12142a;
  --ink-2: #4a4f68;
  --ink-3: #6b7088;
  --bg: #ffffff;
  --soft: #f6f6fb;
  --line: #e4e5f0;
  --accent: #c6226e;
  --accent-2: #7b2fa8;
  --good: #0a7a4b;
  --dark: #0c0e1f;
  --dark-2: #151833;
  --code: #0f1226;
  --grad: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 78%, #515bd4 100%);
  --btn: linear-gradient(135deg, #c6226e, #7b2fa8);
  --radius: 16px;
  --shadow: 0 1px 2px rgb(18 20 42 / 6%), 0 8px 24px rgb(18 20 42 / 6%);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid #5b8def; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
code, pre, kbd { font-family: var(--mono); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font: 600 16px/1.2 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn); color: #fff; box-shadow: 0 6px 20px rgb(198 34 110 / 30%); }
.btn-primary:hover { color: #fff; box-shadow: 0 8px 26px rgb(198 34 110 / 40%); }
.btn-ghost { background: transparent; color: inherit; border-color: currentcolor; opacity: .92; }
.btn-ghost:hover { color: inherit; background: rgb(255 255 255 / 8%); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { color: var(--ink); border-color: var(--accent); }
.btn-sm { padding: 9px 16px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / 88%); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: none; gap: 26px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--accent); }
@media (min-width: 880px) { .nav { display: flex; } }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--dark); color: #fff; padding: 56px 0 72px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(closest-side, rgb(221 42 123 / 38%), transparent); z-index: -1; }
.hero::after { content: ""; position: absolute; inset: auto auto -30% -10%; width: 640px; height: 640px; background: radial-gradient(closest-side, rgb(81 91 212 / 34%), transparent); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; } .hero { padding: 84px 0 96px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 18%); color: #ffd9ea; margin-bottom: 20px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 4px rgb(61 220 151 / 25%); }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; margin-bottom: 20px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2vw, 20px); color: #cfd2ea; max-width: 38em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.hero .btn-ghost { color: #fff; border-color: rgb(255 255 255 / 40%); }
.fine { font-size: 14px; color: #a9adcc; }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 15px; color: #dfe1f5; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks svg { width: 18px; height: 18px; color: #3ddc97; flex: none; }

/* Code windows */
.win { background: var(--code); border: 1px solid #262a4d; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgb(0 0 0 / 35%); min-width: 0; }
.win + .win { margin-top: 14px; }
.win-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid #262a4d; color: #9aa0c8; font: 12px var(--mono); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f7a; }
.win-bar i:nth-child(2) { background: #ffc24b; }
.win-bar i:nth-child(3) { background: #3ddc97; }
.win-bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.code { margin: 0; padding: 16px; overflow: auto; color: #dfe3ff; font-size: 13px; line-height: 1.6; max-height: 340px; tab-size: 2; }
pre.code code { font: inherit; }
.tk-k { color: #8fb8ff; } .tk-s { color: #8be9b0; } .tk-n { color: #ffb86b; } .tk-b { color: #ff8fb5; } .tk-c { color: #7c82ab; }

/* Sections */
section { padding: 72px 0; }
.alt { background: var(--soft); border-block: 1px solid var(--line); }
.head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 14px; }
.head p { color: var(--ink-2); font-size: 18px; margin: 0; }

/* Stats */
.stats { background: #fff; border-bottom: 1px solid var(--line); padding: 0; }
.stats ul { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats ul { grid-template-columns: repeat(4, 1fr); } }
.stats li { padding: 26px 16px; text-align: center; border-right: 1px solid var(--line); }
.stats li:last-child { border-right: 0; }
.stats strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; background: var(--btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 14px; color: var(--ink-3); }

/* Cards */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.card h3 { font-size: 19px; margin: 14px 0 8px; }
.card p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 14px; flex: 1; }
.ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #fff0f6, #f3ebff); color: var(--accent); }
.ico svg { width: 22px; height: 22px; }
.meta { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; font: 12.5px var(--mono); color: var(--ink-3); }
.meta b { color: var(--ink); }
.free { color: var(--good); font-weight: 700; }
.tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #f3ebff; color: var(--accent-2); }

/* Explorer */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; scrollbar-width: thin; }
.tab { flex: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; }
.tab:hover { border-color: var(--accent); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--btn); border-color: transparent; color: #fff; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-head h3 { font-size: 22px; margin-bottom: 6px; }
.panel-head p { margin: 0; color: var(--ink-2); max-width: 44em; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; font: 12.5px var(--mono); }
.chips span { border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; white-space: nowrap; }
.chips .m { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.params { display: grid; gap: 6px 24px; margin: 0 0 18px; font-size: 14.5px; }
@media (min-width: 720px) { .params { grid-template-columns: 1fr 1fr; } }
.params div { display: flex; gap: 8px; }
.params dt { font: 700 13px var(--mono); color: var(--accent); flex: none; }
.params dd { margin: 0; color: var(--ink-2); }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 960px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.two > div { min-width: 0; }
.cap { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); gap: 8px; }
.langs { display: flex; gap: 4px; }
.lang { border: 0; background: transparent; color: var(--ink-3); font: 600 12.5px var(--sans); padding: 4px 10px; border-radius: 8px; cursor: pointer; letter-spacing: 0; text-transform: none; }
.lang[aria-pressed="true"] { background: var(--ink); color: #fff; }
.copy { border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: 600 12px var(--sans); padding: 4px 10px; border-radius: 8px; cursor: pointer; letter-spacing: 0; text-transform: none; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.panel .win { box-shadow: none; }
.panel pre.code { max-height: 360px; }
.panel-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; font-size: 14.5px; color: var(--ink-3); }
.panel-foot p { margin: 0; }
[hidden] { display: none !important; }

/* Steps */
.steps { list-style: none; display: grid; gap: 22px; counter-reset: s; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px 22px; box-shadow: var(--shadow); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; top: -15px; left: 22px; width: 30px; height: 30px; border-radius: 50%; background: var(--btn); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* Pricing */
.price-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); align-items: stretch; padding-top: 14px; }
@media (min-width: 1100px) { .price-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; } .plan { padding-inline: 18px; } }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px 22px; box-shadow: var(--shadow); }
.plan.pop { border: 2px solid var(--accent); box-shadow: 0 14px 40px rgb(198 34 110 / 18%); }
.plan.free-plan { border: 2px dashed #52c79a; background: #f5fcf9; }
.badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 3px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--ink); color: #fff; }
.pop .badge { background: var(--btn); }
.free-plan .badge { background: var(--good); }
.plan h3 { font-size: 20px; }
.amount { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 2px; }
.amount strong { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; }
.amount small { font-size: 14px; color: var(--ink-3); }
.reqs { color: var(--accent); font-weight: 700; margin: 0; }
.free-plan .reqs { color: var(--good); }
.sub { font-size: 13.5px; color: var(--ink-3); margin: 2px 0 12px; }
.plan ul { list-style: none; display: grid; gap: 9px; margin: 6px 0 22px; font-size: 14.5px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; color: var(--good); margin-top: 4px; flex: none; }
.note { text-align: center; margin: 34px auto 0; font-size: 14.5px; color: var(--ink-3); max-width: 760px; }

/* Table */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; font-size: 15.5px; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
thead th { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--soft); }
thead th:first-child { color: var(--accent); }
td:first-child { font-weight: 600; }
td { color: var(--ink-2); }
td:first-child { color: var(--ink); }

/* Long-form guide */
.prose h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; margin-bottom: 18px; }
.prose h3 { font-size: 22px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.2em 1.2em; display: grid; gap: 6px; }
.prose .win { margin: 18px 0 24px; box-shadow: none; }
.prose :not(pre) > code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .88em; color: var(--ink); }
.callout { border-left: 4px solid var(--accent); background: #fff7fb; border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 20px 0; color: var(--ink-2); }

/* FAQ */
.faq { display: grid; gap: 12px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-weight: 700; font-size: 17px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--accent); transition: transform .2s; flex: none; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 22px 20px; margin: 0; color: var(--ink-2); }

/* Final CTA + footer */
.cta { background: var(--dark); color: #fff; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 90% at 50% 0%, rgb(221 42 123 / 32%), transparent); z-index: -1; }
.cta h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; margin-bottom: 14px; }
.cta p { color: #cfd2ea; max-width: 34em; margin: 0 auto 28px; font-size: 18px; }
.cta .hero-cta { justify-content: center; margin: 0; }
.cta .btn-ghost { color: #fff; border-color: rgb(255 255 255 / 40%); }
.site-footer { background: #090a17; color: #a3a7c6; padding: 56px 0 34px; font-size: 14.5px; }
.foot { display: grid; gap: 34px; }
@media (min-width: 820px) { .foot { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: #a3a7c6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.legal { border-top: 1px solid #20233f; margin-top: 38px; padding-top: 22px; font-size: 13px; color: #7f84a8; }
.legal p { margin: 0 0 6px; }

/* 404 */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.nf h1 { font-size: 72px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, summary::after { transition: none; } }
@media print { .site-header, .hero-cta, .cta { display: none; } section { padding: 24px 0; } }
