/* CodeGuru — shared stylesheet. Light theme, matched to the app's palette. */

:root {
  --blue: #1d4ed8;
  --blue-600: #2563eb;
  --blue-50: #eff4ff;
  --ink: #0b1220;
  --body: #475569;
  --muted: #64748b;
  --line: #e4eaf3;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --green: #047857;
  --green-bg: #ecfdf5;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, .22);
  --wrap: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--ink); font-weight: 650; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: .1em .38em; color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.center { text-align: center; }
.lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--body); max-width: 62ch; }
.center .lede { margin-inline: auto; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: .9em;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); font-size: 1.06rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a { color: var(--body); font-weight: 550; font-size: .95rem; }
.nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 860px) { .nav { display: none; } .site-header .btn--sm { margin-left: auto; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; font-weight: 650; font-size: 1rem;
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  box-shadow: 0 10px 24px -10px rgba(29, 78, 216, .7);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:hover { background: #1740b8; text-decoration: none; transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(29, 78, 216, .75); }
.btn svg { flex: none; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.btn--ghost:hover { background: var(--bg-soft); border-color: #cfd9e8; }
.btn--sm { padding: 10px 20px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 86px) 0 clamp(40px, 6vw, 72px); }
.hero::before {
  content: ''; position: absolute; inset: -40% 0 auto -10%; height: 820px; z-index: -1;
  background:
    radial-gradient(60% 55% at 18% 18%, rgba(37, 99, 235, .13), transparent 68%),
    radial-gradient(45% 45% at 88% 8%, rgba(14, 165, 233, .11), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__phone { justify-self: center; width: min(320px, 82vw); filter: drop-shadow(0 30px 60px rgba(15, 23, 42, .18)); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero .btn-row, .hero .trust { justify-content: center; }
  .hero .lede { margin-inline: auto; }
}

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue); border: 1px solid #d8e3fb;
  font-size: .85rem; font-weight: 600; margin-bottom: 20px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-600); }

.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font-size: .92rem; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: var(--green); flex: none; }

.note { font-size: .88rem; color: var(--muted); margin-top: 16px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { background: #fff; padding: 24px 18px; text-align: center; }
.stats b { display: block; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--ink); font-weight: 800; letter-spacing: -.03em; }
.stats span { font-size: .85rem; color: var(--muted); }
@media (max-width: 680px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue); margin-bottom: 16px;
}
.card__icon--amber { background: var(--amber-bg); color: var(--amber); }
.card__icon--green { background: var(--green-bg); color: var(--green); }
.card__icon--red { background: var(--red-bg); color: var(--red); }

/* ---------- screenshot gallery ---------- */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: 258px; gap: 22px; overflow-x: auto; padding: 8px 24px 28px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.shot { scroll-snap-align: center; }
.shot img { border-radius: 20px; box-shadow: var(--shadow-lg); }
.shot figcaption { margin-top: 14px; font-size: .9rem; color: var(--muted); text-align: center; }
.shot b { display: block; color: var(--ink); font-size: .97rem; font-weight: 650; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--blue); color: #fff; font-weight: 750; font-size: .95rem; margin-bottom: 16px;
}

/* ---------- plans ---------- */
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.plan--pro { border-color: #c7d7fb; box-shadow: 0 24px 60px -30px rgba(29, 78, 216, .45); position: relative; }
.plan--pro::after { content: 'Premium'; position: absolute; top: 20px; right: 24px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); background: var(--blue-50); padding: 5px 11px; border-radius: 999px; }
.ticks { list-style: none; margin: 0 0 24px; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 11px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .52em; width: 16px; height: 9px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative;
  font-weight: 650; color: var(--ink); font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 8px; top: 31px; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 36px; }
.faq .answer { padding: 0 0 22px; max-width: 76ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- callouts ---------- */
.callout { border-left: 3px solid var(--blue); background: var(--blue-50); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 28px 0; }
.callout--warn { border-left-color: #d97706; background: var(--amber-bg); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: .25em; }

/* ---------- cta band ---------- */
.cta-band { background: linear-gradient(135deg, #12235c 0%, #1d4ed8 60%, #2563eb 100%); color: #fff; border-radius: 24px; padding: clamp(36px, 5vw, 60px); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c9daff; max-width: 56ch; margin-inline: auto; }
.cta-band .btn { background: #fff; color: var(--blue); border-color: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5); }
.cta-band .btn:hover { background: #eef3ff; }

/* ---------- article ---------- */
.article { max-width: 760px; margin: 0 auto; padding: clamp(32px, 5vw, 56px) 24px 72px; }
.article h2 { margin-top: 2.1em; font-size: clamp(1.4rem, 2.8vw, 1.85rem); scroll-margin-top: 90px; }
.article h3 { margin-top: 1.7em; font-size: 1.12rem; scroll-margin-top: 90px; }
.article ul, .article ol { padding-left: 1.25em; margin: 0 0 1.3em; }
.article li { margin-bottom: .5em; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: .95rem; }
.article th, .article td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--ink); font-weight: 650; background: var(--bg-soft); }
.article td code { white-space: nowrap; }

.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.meta { font-size: .9rem; color: var(--muted); margin: 0 0 2em; padding-bottom: 1.6em; border-bottom: 1px solid var(--line); }

.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 2.4em; }
.toc b { display: block; color: var(--ink); margin-bottom: .6em; font-size: .95rem; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: .96rem; }
.toc li { margin-bottom: .35em; }

.inline-cta { display: flex; gap: 20px; align-items: center; background: var(--blue-50); border: 1px solid #d8e3fb; border-radius: var(--radius); padding: 22px 24px; margin: 2.4em 0; }
.inline-cta img { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.inline-cta p { margin: 0; font-size: .97rem; }
.inline-cta b { display: block; color: var(--ink); }
.inline-cta .btn { margin-left: auto; flex: none; }
@media (max-width: 620px) { .inline-cta { flex-wrap: wrap; } .inline-cta .btn { margin-left: 0; width: 100%; } }

/* ---------- guide cards ---------- */
.guide-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
a.guide-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.guide-card .tag { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.guide-card h3 { margin-bottom: .45em; }
.guide-card p { color: var(--body); font-size: .96rem; margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: .94rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.site-footer h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 1em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .6em; }
.site-footer a { color: var(--body); }
.site-footer a:hover { color: var(--blue); }
.site-footer .about { color: var(--muted); max-width: 34ch; font-size: .92rem; }
.legal { border-top: 1px solid var(--line); padding-top: 24px; color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 780px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
