/* Stoat site. Dark developer-tool style (brand navy + teal from the logo), JetBrains Mono headings,
   IBM Plex Sans body. Design direction from the ui-ux-pro-max skill: dark mode, visible focus, SVG icons,
   150–300 ms transitions, reduced motion respected, 44 px touch targets. */
:root {
  --bg: #0a1230;
  --bg-2: #0e1839;
  --card: #111d45;
  --card-2: #15245a;
  --line: #22336b;
  --line-2: #2d4389;
  --text: #eef1fb;
  --muted: #a3aed4;
  --faint: #7f8bb8;
  --accent: #2dd4bf;
  --accent-2: #5eead4;
  --accent-ink: #042822;
  --good: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 16px;
  --max: 1120px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .1em .35em; }
pre { background: #070e27; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; line-height: 1.55; }
pre code { background: none; border: 0; padding: 0; }
h1, h2, h3 { font-family: var(--mono); letter-spacing: -.02em; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(10, 18, 48, .82); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: 17px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 10px 10px; border-radius: 8px; transition: color .15s, background .15s; }
.top nav a:hover { color: var(--text); background: var(--card); }
.top nav a.btn { color: var(--accent-ink); padding: 8px 14px; margin-left: 6px; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--line-2); color: var(--text); background: var(--card);
  cursor: pointer; transition: transform .15s ease, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 8px 30px rgba(45, 212, 191, .25); }
.btn.primary:hover { background: var(--accent-2); color: var(--accent-ink); box-shadow: 0 10px 36px rgba(45, 212, 191, .35); }
.small { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(600px 300px at 78% 30%, rgba(45, 212, 191, .16), transparent 70%),
    radial-gradient(520px 320px at 12% 10%, rgba(99, 102, 241, .18), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--accent); background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .25); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; margin: 18px 0 16px; }
.hero h1 .accent { color: var(--accent); }
.hero .tag { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); margin: 0 0 28px; max-width: 560px; }
.hero .tag strong { color: var(--text); font-weight: 600; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.proof span { display: inline-flex; align-items: center; gap: 6px; }
.proof .icon { width: 16px; height: 16px; color: var(--good); }

/* Product mockup */
.mock { background: #0b1435; border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .02) inset; overflow: hidden; font-size: 14px; }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0f1a44; border-bottom: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 12px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #334370; display: inline-block; }
.mock-bar .title { margin-left: 8px; display: flex; align-items: center; gap: 6px; }
.mock-bar .title img { width: 16px; height: 16px; border-radius: 4px; }
.mock-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-left: auto; box-shadow: 0 0 10px var(--good); }
.mock-body { padding: 16px; display: grid; gap: 10px; }
.bubble { padding: 10px 12px; border-radius: 12px; line-height: 1.5; }
.bubble.user { background: var(--card-2); justify-self: end; max-width: 85%; }
.bubble.ai { background: transparent; color: var(--muted); padding: 0 2px; }
.bubble.ai b { color: var(--text); font-weight: 600; }
.row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.row .icon { width: 15px; height: 15px; color: var(--faint); }
.row .file { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.row .grow { flex: 1; min-width: 0; }
.plus { color: var(--good); font-family: var(--mono); font-size: 12.5px; }
.minus { color: var(--bad); font-family: var(--mono); font-size: 12.5px; }
.row.ok { border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .07); color: var(--text); }
.row.ok .icon { color: var(--good); }
.row.review { border-color: rgba(45, 212, 191, .35); }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); white-space: nowrap; color: var(--muted); }
.pill.keep { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.ghost { color: #5f6c99; }

/* Logo strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px; padding: 18px 16px; color: var(--muted); font-family: var(--mono); font-size: 14px; }
.strip .label { color: var(--faint); font-family: var(--sans); }

/* Sections */
section { padding: 72px 0; scroll-margin-top: 50px; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head .kicker { font-family: var(--mono); color: var(--accent); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
section h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; margin: 8px 0 10px; }
section .lead { color: var(--muted); margin: 0; font-size: 17px; }

/* Feature rows: text + visual, alternating */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: 0; }
.feature.flip .feature-text { order: 2; }
.feature h3 { font-size: 24px; margin: 10px 0 8px; }
.feature p { color: var(--muted); margin: 0 0 12px; }
.feature ul { margin: 0; padding-left: 0; list-style: none; color: var(--muted); }
.feature li { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.feature li .icon { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
.badge-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .25); color: var(--accent); }
.visual { background: linear-gradient(160deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 13px; padding: 7px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); }
.chip.local { border-color: rgba(45, 212, 191, .45); color: var(--accent); }
.codebox { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; background: #070e27; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; white-space: pre; }
.codebox .k { color: #c4b5fd; } .codebox .f { color: #93c5fd; } .codebox .ghost { color: #5f6c99; font-style: italic; }
.codebox .cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--accent); vertical-align: -3px; }

/* Card grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.three { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { margin: 12px 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card a.more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 14px; min-height: 32px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-family: var(--mono); font-size: 13px; }
.table .us { background: rgba(45, 212, 191, .07); }
.table th.us { color: var(--accent); }
.yes { color: var(--good); font-weight: 600; }
.no { color: var(--bad); font-weight: 600; }
.meh { color: var(--warn); font-weight: 600; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.scroll .table tr:last-child td { border-bottom: 0; }

/* Story */
.story { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px; }
.story img { width: 180px; height: 180px; border-radius: 36px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.story p { color: var(--muted); margin: 8px 0 0; font-size: 17px; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; transition: border-color .2s; }
details[open] { border-color: var(--line-2); }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 0 0 14px; }

/* Final CTA */
.cta-band { text-align: center; background: radial-gradient(500px 200px at 50% 0%, rgba(45, 212, 191, .18), transparent 70%), var(--card); border: 1px solid var(--line-2); border-radius: 24px; padding: 44px 20px; }
.cta-band h2 { margin-top: 0; }
.cta-band .buttons { justify-content: center; margin-top: 18px; }

/* Guide / compare pages */
.article { max-width: 780px; margin: 0 auto; padding: 40px 16px 20px; }
.article h1 { font-size: clamp(28px, 4.6vw, 42px); line-height: 1.15; margin: 8px 0 12px; }
.article h2 { margin-top: 40px; font-size: clamp(22px, 3vw, 28px); }
.article .crumbs { font-size: 14px; color: var(--muted); }
.article .crumbs a { color: var(--muted); }
.article ol li, .article ul li { margin: 6px 0; }
.note { background: var(--bg-2); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px; color: var(--muted); }
.note strong { color: var(--text); }
.cta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 34px 0 10px; text-align: center; }
.cta .buttons { justify-content: center; }

footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* Reveal on scroll (only when JS runs and motion is welcome) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-grid, .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-text { order: 0; }
  .story { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px; }
  .story img { width: 120px; height: 120px; border-radius: 26px; }
}
@media (max-width: 560px) {
  .top nav a.hide-sm { display: none; }
  section { padding: 52px 0; }
  .mock { font-size: 13px; }
}

/* Screenshot tour: tab row + framed screenshot */
.tour-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.tour-tab {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; min-height: 44px; padding: 14px 16px;
  font: inherit; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.tour-tab:hover { background: var(--card); color: var(--text); border-color: var(--line-2); }
.tour-tab.active { background: var(--card); border-color: rgba(45, 212, 191, .5); color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.tour-tab .n { font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 2px; }
.tour-tab.active .n { color: var(--accent); }
.tour-tab b { display: block; font-weight: 600; font-size: 15.5px; }
.tour-tab small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.shot { margin: 0; }
.js .shot:not(.active) { display: none; }
.shot + .shot { margin-top: 32px; }
.js .shot + .shot { margin-top: 0; }
.js .shot.active { animation: shot-in .3s ease; }
@keyframes shot-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.shot-frame { background: #0b1435; border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.shot-zoom { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: #070e27; cursor: zoom-in; overflow: hidden; }
.shot-zoom img { display: block; width: 100%; height: auto; transition: transform .4s ease; }
.shot-zoom:hover img { transform: scale(1.01); }
.shot figcaption { color: var(--muted); font-size: 15px; margin-top: 14px; padding: 0 4px; max-width: 820px; }
.shot figcaption b { color: var(--text); font-weight: 600; }
/* Portrait shot: narrow frame beside its caption */
.shot.split { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 36px; align-items: center; }
.shot.split figcaption { margin: 0; font-size: 17px; }
.shot.split .chips { margin-top: 16px; }

.lightbox { max-width: min(96vw, 1700px); max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: #070e27; overflow: auto; }
.lightbox::backdrop { background: rgba(4, 8, 24, .85); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 100%; max-height: 92vh; width: auto; margin: 0 auto; }
.lightbox-close { position: sticky; top: 8px; float: right; margin: 8px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }

@media (max-width: 900px) {
  .tour-tabs { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
  .tour-tab { flex: none; width: auto; padding: 10px 14px; align-items: center; }
  .tour-tab small { display: none; }
  .shot.split { grid-template-columns: 1fr; gap: 16px; justify-items: center; }
  .shot.split .shot-frame { max-width: 400px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .shot.active { animation: none; }
  .shot-zoom img { transition: none; }
}
