/* ============================================================
   TigrimOSR — ChatGPT-style: white, minimal, calm
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --text: #0d0d0d;
  --text-2: #6e6e80;
  --line: #ececf1;
  --accent: #10a37f;
  --accent-dark: #0c8a6a;
  --accent-soft: #e6f4f0;
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 2px 6px rgba(16,24,40,.06), 0 24px 60px rgba(16,24,40,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- reveal on scroll (only hidden when JS is running) ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn-lg { padding: 13px 26px; font-size: 15.5px; }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #2d2d2d; transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-logo { height: 34px; width: auto; }
.brand-osr {
  background: linear-gradient(115deg, var(--text) 0%, #0c8a6a 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 4px; margin: 0 auto; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 7px 12px; border-radius: 8px; transition: all .15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-actions { display: flex; gap: 10px; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 168px 24px 96px; text-align: center; overflow: hidden; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: #fff; border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,163,127,.45); }
  55% { box-shadow: 0 0 0 7px rgba(16,163,127,0); }
}
.hero h1 {
  font-size: clamp(44px, 7.2vw, 84px);
  line-height: 1.04; letter-spacing: -.035em; font-weight: 800;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, #0d8ea3 55%, #6366f1 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 640px; margin: 26px auto 0;
  font-size: 18px; color: var(--text-2);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* hero terminal */
.hero-terminal {
  max-width: 620px; margin: 60px auto 0; text-align: left;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #e4e4e9; }
.term-bar span:nth-child(1) { background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-2); }
.term-body {
  padding: 20px 22px; font-family: var(--mono); font-size: 13.5px;
  line-height: 1.75; color: var(--text); min-height: 132px; white-space: pre-wrap;
}
.term-body .caret {
  display: inline-block; width: 8px; height: 16px; background: var(--accent);
  vertical-align: -2px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats-inner {
  max-width: 1180px; margin: 0 auto; padding: 44px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.stat { text-align: center; }
.stat b { display: block; font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: var(--accent-dark); }
.stat b .count { font-size: inherit; color: inherit; }
.stat > span { font-size: 13.5px; color: var(--text-2); }

/* ---------- sections ---------- */
.section { padding: 110px 24px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--accent-dark);
  background: var(--accent-soft); padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.section h2 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.03em; line-height: 1.12; font-weight: 800; }
.section-head p { margin-top: 18px; color: var(--text-2); font-size: 17px; }

/* ---------- swarm panel ---------- */
.swarm-panel {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.swarm-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 14px; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
.swarm-tab {
  border: 1px solid transparent; background: transparent;
  font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--text-2);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .18s ease;
}
.swarm-tab:hover { color: var(--text); background: #fff; border-color: var(--line); }
.swarm-tab.active { background: var(--text); color: #fff; }
.swarm-stage { position: relative; height: 460px; }
#swarmCanvas { width: 100%; height: 100%; display: block; }
.swarm-caption {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  max-width: 92%; text-align: center;
  font-size: 13.5px; color: var(--text-2);
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.split-text .eyebrow { margin-bottom: 16px; }
.split-text h2 { margin-bottom: 16px; }
.split-text > p { color: var(--text-2); font-size: 16.5px; }
.check-list { list-style: none; margin-top: 26px; }
.check-list li {
  position: relative; padding: 7px 0 7px 34px; font-size: 15.5px; color: #343541;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c8a6a' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- code card ---------- */
.code-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.code-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: var(--bg-alt); border-bottom: 1px solid var(--line);
}
.code-bar em { font-style: normal; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.code-card pre {
  padding: 22px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
}
.code-card .c { color: #9b9ba5; }
.code-card .k { color: #0c8a6a; }
.code-card .s { color: #4f46e5; }
.code-card .n { color: #b45309; }
.copy-btn {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--text-2); background: #fff; border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 8px; cursor: pointer; transition: all .15s ease;
}
.copy-btn:hover { color: var(--text); border-color: #d0d0d8; }
.copy-btn.done { color: var(--accent-dark); border-color: var(--accent); }

/* ---------- architecture ---------- */
.arch-figure {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 22px; max-width: 960px; margin: 0 auto;
}
.arch-figure img { border-radius: 10px; cursor: zoom-in; }
.arch-figure figcaption { text-align: center; font-size: 13.5px; color: var(--text-2); margin-top: 16px; }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: transform .25s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-wide { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 20px; border-color: var(--accent); background: var(--accent-soft); }
.feature-wide .feature-ic { margin-bottom: 0; }
.new-tag {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 10px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap;
  color: #fff; background: var(--accent); border-radius: 999px;
}
.feature-ic {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 21px; margin-bottom: 18px;
}
.feature h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--text-2); }
.feature p b { color: #343541; }

/* ---------- memory chart ---------- */
.mem-chart {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 34px 30px;
}
.mem-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; margin-bottom: 22px; }
.mem-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); text-align: right; }
.mem-row:first-child .mem-label { color: var(--accent-dark); }
.mem-track { background: var(--bg-alt); border-radius: 999px; height: 34px; overflow: hidden; }
.mem-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: #c7c7d1; display: flex; align-items: center;
  transition: width 1.3s cubic-bezier(.22,.9,.35,1);
  min-width: fit-content;
}
.mem-bar i { font-style: normal; font-size: 12.5px; font-weight: 700; color: #fff; padding: 0 14px; white-space: nowrap; }
.mem-bar-hero { background: linear-gradient(90deg, var(--accent), #0d8ea3); }
.mem-note { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.shot {
  grid-column: span 2;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.shot-wide { grid-column: span 3; }
.shot img { border-radius: 8px; cursor: zoom-in; width: 100%; height: 240px; object-fit: cover; object-position: top; }
.shot-wide img { height: 300px; }
.shot-tall { grid-column: span 1; }
.shot-tall img { height: 300px; object-fit: cover; }
.shot figcaption { font-size: 13px; color: var(--text-2); text-align: center; padding: 12px 4px 4px; }

/* ---------- download / install ---------- */
.dl-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 1040px; margin: 0 auto;
}
.dl-card {
  min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 32px 28px;
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.dl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dl-ic {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; margin-bottom: 18px;
}
.dl-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.dl-meta { font-size: 13px; color: var(--text-2); margin: 4px 0 18px; }
.dl-btn { width: 100%; justify-content: center; padding: 12px 18px; font-size: 14.5px; }
.dl-size { font-weight: 500; opacity: .65; font-size: 12.5px; }
.dl-alt { font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.dl-alt a { color: var(--accent-dark); font-weight: 600; }
.dl-alt a:hover { text-decoration: underline; }
.dl-note {
  font-size: 12.5px; color: var(--text-2); margin-top: 14px;
  padding-top: 14px; border-top: 1px dashed var(--line); width: 100%;
}
.dl-note b { color: #343541; }
.dl-note a { color: var(--accent-dark); font-weight: 600; }
.dl-note a:hover { text-decoration: underline; }
.cmd.cmd-mini { width: 100%; max-width: 100%; padding: 16px 14px; overflow: hidden; }
.cmd.cmd-mini code { font-size: 11.5px; white-space: pre; word-break: normal; overflow-x: auto; padding: 26px 0 4px; }
.cmd.cmd-mini .copy-btn { top: 10px; right: 10px; }
.install-note-center { max-width: 780px; margin: 34px auto 0; text-align: center; }
.cmd {
  position: relative; background: #0d0d0d; border-radius: 12px; padding: 18px 92px 18px 20px;
}
.cmd code {
  font-family: var(--mono); font-size: 13px; line-height: 1.7; color: #d8f3ea;
  white-space: pre-wrap; word-break: break-all; display: block;
}
.cmd .copy-btn { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #cfcfd8; }
.cmd .copy-btn:hover { color: #fff; }
.cmd .copy-btn.done { color: #34d399; border-color: #34d399; }
.install-note { font-size: 13px; color: var(--text-2); }
.install-note a { color: var(--accent-dark); font-weight: 600; }
.install-note a:hover { text-decoration: underline; }
code.inline {
  font-family: var(--mono); font-size: .9em; background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}

/* ---------- CTA ---------- */
.cta { padding: 120px 24px; text-align: center; background: var(--bg-alt); border-top: 1px solid var(--line); }
.cta h2 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.03em; font-weight: 800; }
.cta p { color: var(--text-2); font-size: 17px; margin: 16px 0 8px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 24px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.footer-inner p { font-size: 13.5px; color: var(--text-2); }
.footer-inner nav { margin-left: auto; display: flex; gap: 20px; }
.footer-inner nav a { font-size: 13.5px; color: var(--text-2); }
.footer-inner nav a:hover { color: var(--text); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(13,13,13,.88); backdrop-filter: blur(6px); padding: 40px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.5); cursor: default; }
.lightbox p { color: #d1d1db; font-size: 14px; }
.lightbox-close {
  position: absolute; top: 20px; right: 26px;
  background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; opacity: .8;
}
.lightbox-close:hover { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 44px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: 1fr; max-width: 520px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shot, .shot-wide { grid-column: span 2; }
  .shot-tall { grid-column: span 1; }
  .shot img, .shot-wide img { height: auto; max-height: 340px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: block; margin-left: auto; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 20px; gap: 2px;
  }
  .hero { padding-top: 130px; }
  .section { padding: 76px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .swarm-stage { height: 360px; }
  .stat b { font-size: 32px; }
}
