/* =============================================================
   KLAPPIR · Investor site — shared stylesheet
   Restrained, institutional, IBM Plex Sans. Brand tokens carried
   over verbatim from the deck (styles.css).
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Brand palette — from Klappir PPTX theme */
  --green: #3C9E76;
  --green-dark: #075A38;
  --green-deep: #0F3D2C;
  --mint: #D8ECE3;
  --mint-pale: #EAF4EE;
  --blush: #FAEFE8;
  --cream: #FCF5EF;
  --amber: #E8AC58;
  --coral: #E88358;
  --orange: #E88358;
  --blue: #3F6F96;
  --ink: #0B1A14;
  --ink-2: #2A3A33;
  --ink-3: #56675F;
  --ink-4: #8A9892;
  --line: #D6DEDA;
  --line-2: #ECEFED;
  --paper: #FFFFFF;
  --paper-off: #FAFBFA;

  --maxw: 1240px;
  --nav-h: 78px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--green-dark); text-decoration: none; }

::selection { background: rgba(60,158,118,0.18); }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
.container-wide { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 40px; }

.section { padding: 130px 0; position: relative; }
.section-tight { padding: 92px 0; position: relative; }
.section-dark { background: var(--green-deep); color: #fff; }
.section-mint { background: var(--mint-pale); }
.section-off { background: var(--paper-off); }

.divider-line { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--coral); margin: 0 0 26px;
}
.eyebrow::before {
  content: ""; width: 30px; height: 1.5px; background: currentColor; display: inline-block;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow.green { color: var(--green-dark); }
.eyebrow.muted { color: var(--ink-4); }
.section-dark .eyebrow { color: #8EE3BA; }

h1, h2, h3, h4 { font-family: 'IBM Plex Sans'; color: var(--ink); margin: 0; font-weight: 600; }

.display {
  font-weight: 600; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(46px, 7vw, 104px);
}
.h1 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; font-size: clamp(38px, 5vw, 68px); }
.h2 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; font-size: clamp(32px, 4vw, 54px); }
.h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; font-size: clamp(24px, 2.4vw, 34px); }
.h4 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; font-size: 22px; }
.section-dark .h1, .section-dark .h2, .section-dark .h3 { color: #fff; }

.serif {
  font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 500;
  color: var(--green);
}
.section-dark .serif { color: #8EE3BA; }

.lede {
  font-size: clamp(20px, 1.7vw, 25px); line-height: 1.45; font-weight: 400;
  color: var(--ink-3); letter-spacing: -0.005em; max-width: 760px;
}
.lede strong { color: var(--ink); font-weight: 600; }
.section-dark .lede { color: rgba(255,255,255,0.82); }
.section-dark .lede strong { color: #fff; }

.body { font-size: 18px; line-height: 1.62; color: var(--ink-2); }
.body strong { color: var(--ink); font-weight: 600; }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-4); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-4); }

.measure { max-width: 720px; }
.measure-lg { max-width: 860px; }

.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Section heads ---------- */
.sec-head { max-width: 880px; margin-bottom: 64px; }
.sec-head .lede { margin-top: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Sans'; font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  padding: 14px 26px; border-radius: 8px; border: 1.5px solid transparent;
  cursor: pointer; transition: all 180ms var(--ease); white-space: nowrap;
}
.btn .arr { transition: transform 200ms var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); }
.section-dark .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.3); }
.section-dark .btn-ghost:hover { border-color: #8EE3BA; color: #8EE3BA; }
.btn-light { background: #fff; color: var(--green-deep); }
.btn-light:hover { background: var(--mint-pale); }
/* strong end-of-page CTA band (shared across pages) */
.cta-band { background: var(--green-deep); color: #fff; border-radius: 22px; padding: 76px 64px; text-align: center; position: relative; overflow: hidden; }
/* ghost button sitting on the dark CTA band */
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.cta-band .btn-ghost:hover { color: #8EE3BA; border-color: #8EE3BA; background: rgba(255,255,255,0.04); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
  display: flex; align-items: center;
  background: rgba(255,255,255,0); border-bottom: 1px solid transparent;
  transition: background 240ms var(--ease), border-color 240ms var(--ease), backdrop-filter 240ms var(--ease);
}
.nav.scrolled, .nav.solid {
  background: rgba(255,255,255,0.88); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.005em;
  position: relative; padding: 6px 0; transition: color 160ms var(--ease);
}
.nav-links a:hover { color: var(--green-dark); }
.nav-links a.active { color: var(--green-dark); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--green); border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-conf {
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-4); display: inline-flex; align-items: center; gap: 8px;
}
.nav-conf::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.nav-cta {
  font-size: 14px; font-weight: 600; color: #fff; background: var(--green-dark);
  padding: 10px 20px; border-radius: 7px; transition: background 160ms var(--ease);
}
.nav-cta:hover { background: var(--green-deep); }
.nav-toggle { display: none; }

/* ---------- Sticky in-page chapter nav ----------
   Hidden until scrolled past the hero, then slides in.
   Shared across Platform / Market / Financials / Investors. */
.chapter-nav { position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 900; background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px -16px rgba(11,26,20,0.4); transform: translateY(-14px); opacity: 0; visibility: hidden; transition: opacity 360ms var(--ease), transform 360ms var(--ease), visibility 360ms var(--ease); }
.chapter-nav.visible { transform: none; opacity: 1; visibility: visible; }
.chapter-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 56px; }
.chapter-nav-label { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--coral); white-space: nowrap; }
.chapter-nav-links { display: flex; gap: 30px; }
.chapter-nav-links a { font-size: 14px; font-weight: 500; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; position: relative; transition: color 160ms var(--ease); text-decoration: none; }
.chapter-nav-links a .cn-n { font-size: 12px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.chapter-nav-links a:hover { color: var(--ink); }
.chapter-nav-links a.active { color: var(--green-dark); }
.chapter-nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green); border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .chapter-nav { transition: opacity 200ms linear; transform: none; } }
@media (max-width: 920px) {
  .chapter-nav-label { display: none; }
  .chapter-nav-inner { justify-content: center; height: 52px; }
  .chapter-nav-links { gap: 16px; }
  .chapter-nav-links a { font-size: 13px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: calc(var(--nav-h) + 80px); padding-bottom: 96px; overflow: hidden; }
.hero-curve { position: absolute; pointer-events: none; z-index: 0; }

/* ---------- Stat figures ---------- */
.figure {
  font-family: 'IBM Plex Sans'; font-weight: 300; letter-spacing: -0.03em; line-height: 0.9;
  color: var(--green); font-variant-numeric: tabular-nums;
}
.figure .unit { font-size: 0.45em; font-weight: 400; }
.figure-lbl { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 0; }
.stat-cell { padding: 6px 28px; border-left: 1px solid var(--line); }
.stat-cell:first-child { border-left: 0; padding-left: 0; }
.stat-cell .figure { font-size: clamp(44px, 5vw, 68px); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 36px; box-shadow: 0 1px 2px rgba(11,26,20,0.03);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease);
}
.card.hover:hover { box-shadow: 0 20px 44px -22px rgba(11,26,20,0.22); transform: translateY(-3px); }
.card-num { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--coral); }
.card h3 { margin: 16px 0 12px; }
.card .body { color: var(--ink-3); }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(60,158,118,0.10); color: var(--green-dark);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
}

/* ---------- Demo frame ---------- */
.demo-shell {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 70px -34px rgba(11,26,20,0.30);
}
.demo-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  border-bottom: 1px solid var(--line-2); background: var(--paper-off);
}
.demo-dots { display: flex; gap: 7px; }
.demo-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.demo-url {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-4);
  background: #fff; border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 14px;
  flex: 1; text-align: center; max-width: 340px; margin: 0 auto;
}
.demo-tag {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green-dark);
}
.demo-tag::before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.demo-frame { width: 100%; border: 0; display: block; background: #fff; }

/* demo tabs */
.demo-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.demo-tab {
  font-family: 'IBM Plex Sans'; font-size: 14px; font-weight: 600; color: var(--ink-3);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  transition: all 160ms var(--ease);
}
.demo-tab .tnum { font-size: 12px; color: var(--ink-4); font-weight: 700; }
.demo-tab:hover { border-color: var(--green); color: var(--green-dark); }
.demo-tab.active { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.demo-tab.active .tnum { color: #8EE3BA; }

/* ---------- Tables ---------- */
.fin-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fin-table th, .fin-table td { padding: 11px 16px; text-align: right; font-size: 16px; color: var(--ink-2); }
.fin-table th:first-child, .fin-table td:first-child { text-align: left; }
.fin-table thead th {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #fff;
  font-weight: 700; background: var(--green-dark);
}
.fin-table tbody td { border-bottom: 1px solid var(--line-2); }
.fin-table .row-total td { font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--line); }
.fin-table .row-grand td { font-weight: 700; color: var(--ink); background: var(--mint-pale); }
.fin-table .row-sub td { font-weight: 700; color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--green-deep); color: rgba(255,255,255,0.7); padding: 84px 0 44px; }
.footer a { color: rgba(255,255,255,0.7); transition: color 160ms var(--ease); }
.footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-logo img { height: 30px; filter: brightness(0) invert(1); }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 20px; }
.footer-col a, .footer-col p { display: block; font-size: 15px; margin: 0 0 12px; }
.footer-bot { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 32px; font-size: 13px; flex-wrap: wrap; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 720ms var(--ease), transform 720ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 90ms; }
.reveal.d2 { transition-delay: 180ms; }
.reveal.d3 { transition-delay: 270ms; }
.reveal.d4 { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 5000; background: var(--green-deep); color: #fff;
  display: flex; align-items: center; justify-content: center; padding: 32px;
  transition: opacity 520ms var(--ease), visibility 520ms var(--ease);
}
.gate.hide { opacity: 0; visibility: hidden; }
.gate-curve { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.gate-inner { position: relative; width: 100%; max-width: 460px; text-align: left; }
.gate-logo img { height: 30px; margin-bottom: 56px; filter: brightness(0) invert(1); }
.gate-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: #8EE3BA; margin-bottom: 20px; }
.gate h1 { color: #fff; font-size: clamp(34px, 5vw, 46px); letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 20px; }
.gate p { color: rgba(255,255,255,0.66); font-size: 16px; line-height: 1.55; margin: 0 0 38px; }
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-input {
  width: 100%; font-family: 'IBM Plex Sans'; font-size: 16px; color: #fff;
  background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 9px; padding: 16px 18px; outline: none; transition: border-color 160ms var(--ease);
}
.gate-input::placeholder { color: rgba(255,255,255,0.4); }
.gate-input:focus { border-color: #8EE3BA; }
.gate-btn {
  font-family: 'IBM Plex Sans'; font-size: 15px; font-weight: 600; color: var(--green-deep);
  background: #fff; border: 0; border-radius: 9px; padding: 16px 22px; cursor: pointer;
  transition: background 160ms var(--ease);
}
.gate-btn:hover { background: var(--mint-pale); }
.gate-err { font-size: 14px; color: #FFB59C; min-height: 20px; margin-top: 2px; }
.gate-foot { margin-top: 44px; font-size: 13px; color: rgba(255,255,255,0.45); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .nav-links, .nav-conf { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-cell { border-left: 0; padding: 12px 0; }
  .section { padding: 84px 0; }
  .container, .container-wide { padding: 0 24px; }
}
