/*
 * LIBRA CSS — V1
 * Inherited design system from Comprimo V10
 * Committee directives: Ive, Buhai/Row, Hara, Fukasawa,
 * Müller, Morrison, Norman, Mahdavi, Jobs
 * "The score. The truth. Everything else recedes."
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Surface */
  --bg:          #FFFFFF;
  --bg-soft:     #F7F7F7;
  --surface:     #FFFFFF;
  --surface-low: #FAFAFA;

  /* Shadows — warm, not cool */
  --shadow-xs:   0 1px 4px rgba(26,24,20,0.04);
  --shadow-sm:   0 2px 12px rgba(26,24,20,0.05);
  --shadow-md:   0 4px 24px rgba(26,24,20,0.07);
  --shadow-lg:   0 12px 48px rgba(26,24,20,0.09);
  --shadow-xl:   0 24px 80px rgba(26,24,20,0.12);

  /* Text */
  --text:        #1A1A18;
  --text-soft:   #6B665E;
  --text-faint:  #A8A39B;
  --text-ghost:  #C8C3BB;

  /* Forest — Collatio family accent */
  --forest:      #2D6A4F;
  --forest-mid:  #3D7A5F;
  --forest-light:#40916C;
  --forest-ghost:rgba(45,106,79,0.06);
  --forest-glow: rgba(45,106,79,0.12);
  --forest-ring: rgba(45,106,79,0.20);

  /* Gold — THE moment (scores, key data) */
  --gold:        #C9A961;
  --gold-deep:   #B8943F;
  --gold-soft:   rgba(201,169,97,0.08);
  --gold-glow:   rgba(201,169,97,0.15);

  /* Retraction red — for flagged papers */
  --error:       #C0392B;
  --error-soft:  rgba(192,57,43,0.07);

  /* Structure */
  --border:      #EFEFEF;
  --border-soft: #FFFFFF;
  --track:       #ECECEC;

  --shadow:      0 2px 24px rgba(26,26,24,0.05);
  --shadow-lift: 0 12px 48px rgba(26,26,24,0.08);
  --radius:      16px;
  --radius-sm:   10px;

  /* Typography — three sizes only (Müller) */
  --font:        'DM Sans', system-ui, sans-serif;
  --size-dom:    clamp(52px, 10vw, 96px);
  --size-hero:   clamp(36px, 6vw, 64px);
  --size-sup:    15px;
  --size-cap:    12px;

  /* Radii */
  --r-precision: 8px;
  --r-card:      16px;
  --r-invite:    22px;
  --r-pill:      100px;

  --mono:      'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:      150ms;
  --t-mid:       250ms;
  --t-slow:      600ms;
  --t-bloom:     900ms;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--size-sup);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
::selection { background: var(--forest-glow); }

/* ── Typography ──────────────────────────────────────────────── */
.t-dominant {
  font-size: var(--size-dom);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.t-hero {
  font-size: var(--size-hero);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
}
.t-hero strong { font-weight: 600; }
.t-sup {
  font-size: var(--size-sup);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-soft);
}
.t-cap {
  font-size: var(--size-cap);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.t-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

/* ── Layout ──────────────────────────────────────────────────── */
.container    { max-width: 1080px; margin: 0 auto; padding: 0 48px; }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 48px; }
.container-xs { max-width: 480px;  margin: 0 auto; padding: 0 32px; }
.container-lg { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
}
.nav-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: -0.025em;
  color: var(--text);
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-link {
  font-size: 13px; font-weight: 400;
  color: var(--text-faint);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}
.nav-link:hover { color: var(--text-soft); }
.nav-powered {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-ghost);
  text-decoration: none;
}
.nav-powered strong { color: var(--text-faint); font-weight: 500; }
.page-body { padding-top: 64px; }

/* ── Trust mark (Collatio family) ────────────────────────────── */
.mark {
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 38% 36%, #52A67E, #1B4332);
  position: relative;
  animation: markBreathe 4s var(--ease-out) infinite;
}
.mark::after {
  content: '';
  position: absolute;
  top: 30%; left: 36%;
  width: 18%; height: 18%;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}
@keyframes markBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45,106,79,0.12); transform: scale(1); }
  50%       { box-shadow: 0 0 0 7px rgba(45,106,79,0);  transform: scale(1.035); }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  border-radius: var(--r-pill); border: none;
  font-family: var(--font); font-weight: 500; cursor: pointer;
  text-decoration: none;
  transition: all var(--t-mid) var(--ease-out);
  white-space: nowrap;
}
.btn-lg  { padding: 14px 32px; font-size: 14px; letter-spacing: -0.01em; }
.btn-md  { padding: 11px 24px; font-size: 13px; }
.btn-sm  { padding: 8px  18px; font-size: 12px; font-weight: 600; }

.btn-primary {
  background: var(--forest);
  color: #fff;
}
.btn-primary:hover { background: #225540; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,106,79,0.25); }
.btn-primary:active { transform: translateY(0); }

.btn-gold {
  background: var(--gold);
  color: #fff;
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(201,169,97,0.30); }

.btn-ghost {
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-soft); border-color: var(--text-ghost); }

.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #a93226; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-mid) ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-invite {
  background: var(--surface);
  border-radius: var(--r-invite);
  box-shadow: var(--shadow-lg);
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  padding: 160px 0 100px;
  text-align: center;
}
.hero .mark-hero {
  width: 40px; height: 40px;
  margin: 0 auto 48px;
}
.hero h1 {
  font-size: var(--size-hero);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 24px;
}
.hero h1 strong { font-weight: 600; }
.hero .hero-sub {
  font-size: var(--size-sup);
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero .hero-cta {
  display: flex; gap: 16px; justify-content: center;
}

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 920px;
  margin: 0 auto;
  padding: 80px 48px;
}
.stat-item {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: box-shadow var(--t-mid) ease;
}
.stat-item:hover { box-shadow: var(--shadow-md); }
.stat-number {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-detail {
  font-size: 12px;
  color: var(--text-faint);
}

/* ── Section ─────────────────────────────────────────────────── */
.section {
  padding: 100px 0;
}
.section-alt {
  background: var(--bg-soft);
}
.section-label {
  font-size: var(--size-cap);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 24px;
}
.section-title strong { font-weight: 600; }

/* ── Feature Grid (Two-column: text + visual) ────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 48px;
}
.feature-grid.reverse { direction: rtl; }
.feature-grid.reverse > * { direction: ltr; }
.feature-text { max-width: 440px; }
.feature-visual {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  overflow: hidden;
}

/* ── Dimension Radar (Score visualization) ────────────────────── */
.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}
.dim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-precision);
  padding: 16px;
  transition: all var(--t-mid) ease;
}
.dim-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--forest-glow);
}
.dim-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-ghost);
  margin-bottom: 4px;
}
.dim-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.dim-score-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--track);
  overflow: hidden;
}
.dim-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s var(--ease-out);
}
.dim-score-fill.high   { background: var(--forest); }
.dim-score-fill.medium { background: var(--gold); }
.dim-score-fill.low    { background: var(--error); }

/* ── Publisher Comparison ─────────────────────────────────────── */
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-faint);
  padding: 10px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.compare-table th:first-child { border-radius: var(--r-precision) 0 0 0; }
.compare-table th:last-child  { border-radius: 0 var(--r-precision) 0 0; }
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}
.compare-table tbody tr:hover td { background: var(--forest-ghost); }
.claim-vs-actual {
  display: flex; gap: 8px; align-items: center;
}
.claim { color: var(--text-faint); text-decoration: line-through; }
.actual { color: var(--error); font-weight: 600; }
.actual.good { color: var(--forest); }

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 48px;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-invite);
  padding: 40px 32px;
  text-align: center;
  transition: all var(--t-mid) ease;
}
.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.pricing-card.featured {
  border-color: var(--forest);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--forest);
  color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: var(--r-pill);
}
.pricing-tier {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.pricing-price {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 4px;
}
.pricing-price span { font-size: 16px; font-weight: 400; color: var(--text-faint); }
.pricing-desc {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 28px;
  line-height: 1.6;
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}
.pricing-features li {
  font-size: 13px;
  color: var(--text-soft);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.pricing-features li::before {
  content: '✓';
  color: var(--forest);
  font-weight: 700;
  font-size: 12px;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
}
.badge-green  { background: var(--forest-ghost); color: var(--forest); }
.badge-gold   { background: var(--gold-soft);    color: var(--gold-deep); }
.badge-gray   { background: var(--bg-soft);      color: var(--text-faint); }
.badge-red    { background: var(--error-soft);    color: var(--error); }

/* ── Data Source Logos ────────────────────────────────────────── */
.source-bar {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
  padding: 48px 0;
  opacity: 0.5;
}
.source-bar span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 64px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 16px;
}
.footer-brand span { font-size: 14px; font-weight: 600; color: var(--text); }
.footer-links {
  display: flex; gap: 24px; justify-content: center; margin-bottom: 16px;
}
.footer-links a {
  font-size: 13px; color: var(--text-faint);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}
.footer-links a:hover { color: var(--text-soft); }
.footer-copy {
  font-size: 11px; color: var(--text-ghost);
}
.footer-patent {
  font-size: 11px; color: var(--text-ghost);
  margin-top: 4px; font-style: italic;
}

/* ── Reveal animation ────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-bloom) var(--ease-out), transform var(--t-bloom) var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .container, .container-lg { padding: 0 24px; }
  .hero { padding: 120px 24px 60px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 40px 24px; }
  .feature-grid { grid-template-columns: 1fr; gap: 32px; padding: 0 24px; }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; padding: 0 24px; }
}
