/* ============================================================
   Posognos Design System
   The single source of truth for tokens + components.
   Documented in style-guide.html
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Design tokens ─────────────────────────────────────── */
:root {
  /* Brand */
  --primary:        #1A8A8A;
  --primary-dark:   #136868;
  --primary-soft:   rgba(26,138,138,0.12);
  --primary-glow:   rgba(26,138,138,0.25);
  --gradient:       linear-gradient(135deg, #1A8A8A, #136868);

  /* Surfaces */
  --bg-dark:        #090B10;
  --bg-section:     #0F1218;
  --bg-card:        #161A23;
  --bg-card-hover:  #1C2230;

  /* Type */
  --text-primary:   #E8ECF4;
  --text-secondary: #8B93A7;
  --text-muted:     #555D73;

  /* Lines */
  --border:         rgba(255,255,255,0.06);
  --border-hover:   rgba(26,138,138,0.30);
  --border-strong:  rgba(255,255,255,0.10);

  /* Status */
  --amber:          #D4915E;
  --amber-soft:     rgba(212,145,94,0.12);
  --green:          #4CAF7D;
  --green-soft:     rgba(76,175,125,0.12);
  --red:            #C0392B;

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-pill: 100px;

  /* Spacing */
  --gutter: 2rem;
  --section-pad: 6rem;
  --max-w: 1200px;

  /* Type scale (web) */
  --t-hero:     clamp(2.4rem, 4.5vw, 3.6rem);
  --t-section:  clamp(2rem, 3.5vw, 2.75rem);
  --t-lead:     1.15rem;
  --t-body:     1rem;
  --t-small:    0.9rem;
  --t-micro:    0.78rem;

  /* Shadows */
  --shadow-soft: 0 4px 20px var(--primary-glow);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--primary-soft); color: var(--text-primary); }

a { color: var(--primary); }

/* ── Nav (shared across pages) ─────────────────────────── */
.po-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(9,11,16,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.po-nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
}
.po-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.2rem; color: var(--text-primary);
  text-decoration: none; letter-spacing: -0.01em;
}
.po-logo-text {
  display: flex; flex-direction: column; line-height: 1;
}
.po-logo-tagline {
  font-size: 0.78rem; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0.04em; margin-top: 4px;
  font-style: italic;
}
.po-logo-mark {
  width: 30px; height: 30px; background: var(--gradient);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 900; color: #fff;
}
.po-nav-links {
  display: flex; align-items: center; gap: 1.75rem;
  list-style: none;
}
.po-nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: color 0.2s var(--ease);
}
.po-nav-links a:hover,
.po-nav-links a.active { color: var(--text-primary); }
.po-nav-links a.active { position: relative; }
.po-nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--primary);
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem; border-radius: var(--r-md);
  font-weight: 600; font-size: 0.9rem;
  font-family: inherit;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(26,138,138,0.4);
}
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost {
  background: transparent; color: var(--text-secondary); padding: 0.5rem 0.8rem;
}
.btn-ghost:hover { color: var(--text-primary); }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 0.95rem; }

/* ── Forms ─────────────────────────────────────────────── */
.po-form { display: flex; flex-direction: column; gap: 1.5rem; max-width: 640px; }
.po-field { display: flex; flex-direction: column; gap: 0.5rem; }
.po-field label {
  font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.po-field label .req { color: var(--primary); }
.po-field input,
.po-field select,
.po-field textarea {
  width: 100%;
  font-family: inherit; font-size: 0.95rem; color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.po-field textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.po-field input::placeholder,
.po-field textarea::placeholder { color: var(--text-muted); }
.po-field input:focus,
.po-field select:focus,
.po-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.po-field input[aria-invalid="true"],
.po-field select[aria-invalid="true"],
.po-field textarea[aria-invalid="true"] { border-color: var(--red); }
.po-field select {
  color-scheme: dark;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%238B93A7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.95rem center;
  padding-right: 2.4rem;
}
.po-form .btn { align-self: flex-start; cursor: pointer; }
.po-form .btn[disabled] { opacity: 0.6; cursor: default; }
.po-form-fine { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* Honeypot — off-screen but still fillable by bots */
.po-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Form status notes (success / error) */
.form-note { border-radius: var(--r-lg); padding: 1.5rem 1.75rem; line-height: 1.6; }
.form-note-success {
  background: var(--green-soft); border: 1px solid rgba(76,175,125,0.35);
}
.form-note-success h3 { color: var(--green); font-size: 1.1rem; margin-bottom: 0.4rem; }
.form-note-success p { color: var(--text-secondary); font-size: 0.95rem; }
.form-note-success a { color: var(--green); }
.form-note-error {
  background: rgba(192,57,43,0.10); border: 1px solid rgba(192,57,43,0.40);
  color: #E8897F; font-size: 0.9rem; font-weight: 600;
  padding: 0.9rem 1.1rem;
}
[hidden] { display: none !important; }

/* ── Layout helpers ────────────────────────────────────── */
section { padding: var(--section-pad) var(--gutter); }
.section-alt { background: var(--bg-section); }
.container { max-width: var(--max-w); margin: 0 auto; }
.container-narrow { max-width: 900px; margin: 0 auto; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 86vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 8rem 2rem 5rem;
}
.hero::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(26,138,138,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(26,138,138,0.25), transparent);
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; width: 100%; }
.hero-content { max-width: 1040px; }
.hero h1 {
  font-size: var(--t-hero); font-weight: 900;
  line-height: 1.08; margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 18ch;
}
.hero-compact h1 { max-width: 22ch; }

/* Pronunciation strip — small italic line below hero h1 */
.hero-name {
  font-size: 0.95rem; color: var(--text-muted);
  font-style: italic; letter-spacing: 0.01em;
  margin-top: -0.5rem; margin-bottom: 1.5rem;
  display: flex; gap: 0.6rem; align-items: baseline;
  flex-wrap: wrap;
}
.hero-name strong { color: var(--text-secondary); font-weight: 600; font-style: normal; }
.hero-name .sep { color: var(--text-muted); opacity: 0.5; }
.hero h1 .accent { color: var(--primary); }
.hero-sub {
  font-size: var(--t-lead); color: var(--text-secondary);
  max-width: 600px; margin-bottom: 2rem; line-height: 1.65;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-tagline {
  font-size: 0.92rem; font-weight: 600; color: var(--primary);
  letter-spacing: 0.04em; margin-bottom: 1rem;
}
.hero-tagline .hp { color: var(--text-muted); font-weight: 500; }

/* ── Badges / chips ───────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--primary-soft);
  border: 1px solid rgba(26,138,138,0.22);
  border-radius: var(--r-pill);
  padding: 0.5rem 1.15rem;
  font-size: 0.92rem; font-weight: 600; color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}
.badge .pulse {
  width: 9px; height: 9px; background: var(--primary);
  border-radius: 50%; animation: po-pulse 2.5s ease-in-out infinite;
}
@keyframes po-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.3); }
}
.chip {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--primary); background: var(--primary-soft);
  padding: 0.25rem 0.65rem; border-radius: var(--r-sm);
}
.chip.amber { color: var(--amber); background: var(--amber-soft); }
.chip.green { color: var(--green); background: var(--green-soft); }
.chip.muted { color: var(--text-muted); background: rgba(85,93,115,0.15); }

/* ── Section header ───────────────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.92rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: var(--t-section); font-weight: 800;
  line-height: 1.15; margin-bottom: 1rem;
  letter-spacing: -0.02em; text-wrap: balance;
}
.section-sub {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 680px; margin-bottom: 3rem; line-height: 1.65;
}
.section-sub-wide { max-width: 820px; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.card:hover { border-color: var(--border-hover); }
.card-pad-sm { padding: 1.5rem; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }
.card .stat {
  font-size: 2.75rem; font-weight: 900; color: var(--primary);
  line-height: 1; margin-bottom: 0.75rem; letter-spacing: -0.02em;
}

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

/* ── Stat strip ───────────────────────────────────────── */
.stat-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-xl); overflow: hidden;
}
.stat-strip .ss-cell {
  background: var(--bg-card); padding: 1.75rem 1rem; text-align: center;
}
.stat-strip .ss-num {
  font-size: 1.9rem; font-weight: 900; color: var(--primary);
  line-height: 1; letter-spacing: -0.02em;
}
.stat-strip .ss-label {
  font-size: 0.76rem; color: var(--text-secondary);
  margin-top: 0.5rem; line-height: 1.4;
}

/* ── Evidence callout ─────────────────────────────────── */
.callout {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-lg); padding: 1.75rem 2rem;
  font-size: 0.98rem; color: var(--text-secondary); line-height: 1.7;
}
.callout strong { color: var(--text-primary); font-weight: 700; }

/* ── FAQ ───────────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--bg-card); margin-bottom: 1rem; overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 1.4rem 1.75rem; font-size: 1rem; font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; color: var(--primary); font-size: 1.4rem;
  font-weight: 400; flex-shrink: 0; transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-body {
  padding: 0 1.75rem 1.5rem; font-size: 0.92rem;
  color: var(--text-secondary); line-height: 1.7;
}

/* ── Tables ───────────────────────────────────────────── */
.po-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.92rem;
}
.po-table th {
  text-align: left; font-size: 0.74rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--border);
}
.po-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.po-table tr:last-child td { border-bottom: none; }
.po-table td.model-name { font-weight: 600; color: var(--text-primary); }

/* Score bar */
.sc-score {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 0.9rem; color: var(--text-primary);
}
.sc-bar {
  width: 70px; height: 6px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.sc-bar-fill { height: 100%; border-radius: 3px; display: block; }
.sc-bar-fill.high { background: var(--green); }
.sc-bar-fill.mid  { background: var(--amber); }
.sc-bar-fill.low  { background: var(--red); }

/* ── CTA block ────────────────────────────────────────── */
.cta-block {
  text-align: center;
  position: relative;
  padding: var(--section-pad) var(--gutter);
}
.cta-block::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(26,138,138,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-block .section-title { max-width: 720px; margin: 0 auto 1rem; }
.cta-block .section-sub { margin: 0 auto 2.5rem; text-align: center; max-width: 600px; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────────── */
.po-footer {
  border-top: 1px solid var(--border);
  padding: 3rem var(--gutter) 4rem;
}
.po-footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.po-footer-brand { max-width: 360px; }
.po-footer-brand p {
  font-size: 0.86rem; color: var(--text-muted); margin-top: 1rem; line-height: 1.6;
}
.po-footer-col h4 {
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.po-footer-col a {
  display: block;
  font-size: 0.88rem; color: var(--text-secondary);
  text-decoration: none; padding: 0.3rem 0;
  transition: color 0.2s var(--ease);
}
.po-footer-col a:hover { color: var(--text-primary); }
.po-footer-base {
  max-width: var(--max-w); margin: 2.5rem auto 0;
  padding-top: 2rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 1rem;
}

/* ── Fade-in (intersection-observer) ─────────────────── */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Audience-page hero variant (lighter) ─────────────── */
.hero-compact {
  min-height: auto;
  padding: 8rem 2rem 4rem;
}
.hero-compact h1 { font-size: clamp(2rem, 3.8vw, 3rem); }

/* ── Roadmap track ────────────────────────────────────── */
.std-track {
  display: flex; gap: 0; align-items: stretch;
  position: relative; margin-bottom: 2rem;
}
.std-track::before {
  content: ''; position: absolute; top: 9px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 33%, var(--amber) 50%, var(--text-muted) 100%);
  z-index: 0;
}
.std-node { flex: 1; text-align: center; position: relative; z-index: 1; padding: 0 0.5rem; }
.std-dot {
  width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 0.75rem;
  border: 3px solid var(--bg-dark);
}
.std-dot.active { background: var(--primary); box-shadow: 0 0 16px var(--primary-glow); }
.std-dot.next   { background: var(--amber); }
.std-dot.future { background: var(--text-muted); }
.std-label { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.25rem; line-height: 1.3; }
.std-desc  { font-size: 0.74rem; color: var(--text-secondary); line-height: 1.4; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .po-nav-links { display: none; }
  .po-footer-inner { grid-template-columns: 1fr 1fr; }
  .std-track { flex-wrap: wrap; gap: 1.5rem; }
  .std-track::before { display: none; }
  .std-node { flex: 0 0 45%; }
}
@media (max-width: 600px) {
  :root { --section-pad: 4rem; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr; }
  .po-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .po-footer-base { flex-direction: column; text-align: center; }
}
