/* Fractan landing page — v3 (light, three-curve mark, animated hero).
   Fonts are loaded via static/css/fonts.css (self-hosted, GDPR-safe).
   Variables overlap with variables.css but stay scoped to :root.
*/

:root {
  --cream:#FAFAF7; --cream-warm:#F5F3EE; --paper:#FFFFFF;
  --ink:#0A0A0F; --ink-2:#1F1F23;
  --muted:#57534E; --muted-2:#78716C; --quiet:#A8A29E;
  --line:#E7E5E4; --line-2:#D6D3D1; --line-soft:rgba(10,10,15,0.06);
  --teal:#0D9488; --teal-dark:#0F766E; --teal-light:#14B8A6;
  --teal-bg:#F0FDFA; --teal-soft:rgba(13,148,136,0.08); --teal-line:rgba(13,148,136,0.18);

  --font-serif:'DM Serif Display', Georgia, serif;
  --font-sans:'Outfit', system-ui, sans-serif;
  --font-mono:'JetBrains Mono', ui-monospace, Consolas, monospace;

  --ease:cubic-bezier(0.22,1,0.36,1);
  --dur:320ms;

  --max-w:1280px;
  --pad-x:clamp(20px, 4.5vw, 56px);
}

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

html { background: var(--cream); scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

section { padding: clamp(96px, 11vw, 160px) var(--pad-x); }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,247,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 20px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.wordmark { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; font-size: 28px; letter-spacing: 0.025em; color: var(--ink); }
.wordmark-mark { width: 46px; height: 38px; display: inline-block; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 14px; font-size: 15px; font-weight: 500; color: var(--muted); border-radius: 8px; transition: color var(--dur) var(--ease), background var(--dur) var(--ease); cursor: pointer; }
.nav-links a:hover { color: var(--ink); background: rgba(10,10,15,0.04); }
.nav-cta { background: var(--ink); color: var(--cream) !important; padding: 8px 16px !important; border-radius: 999px !important; margin-left: 6px; display: inline-flex; align-items: center; gap: 6px; }
.nav-cta:hover { background: var(--teal-dark) !important; color: var(--cream) !important; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; font-size: 16px; font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px; border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { transform: translateY(-1px); }
.btn-large { padding: 18px 32px; font-size: 17px; }
.btn-primary { background: var(--ink); color: var(--cream); border-color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 18px -8px rgba(10,10,15,0.4); }
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); box-shadow: 0 6px 22px -8px rgba(15,118,110,0.55); }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); }

/* ============ Eyebrow ============ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 500; color: var(--muted);
  padding: 6px 13px 6px 11px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; background: var(--teal);
  border-radius: 50%; box-shadow: 0 0 0 3px var(--teal-soft);
}

/* ============ Hero ============ */
.hero { padding-top: clamp(72px, 9vw, 132px); padding-bottom: clamp(110px, 13vw, 180px); position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(800px 360px at 88% 0%, var(--teal-soft), transparent 60%),
    radial-gradient(900px 400px at 0% 100%, rgba(245,243,238,0.7), transparent 60%);
}

/* ============ Hero animated background (soft) ============ */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(40px);
  opacity: 0.85;
  will-change: transform, opacity;
  mix-blend-mode: multiply;
}
.hero-blob-1 {
  width: 30vw; height: 30vw;
  left: 6vw; top: -6vw;
  background: radial-gradient(closest-side, rgba(13,148,136,0.45), rgba(13,148,136,0) 70%);
  animation: hero-drift-1 11s ease-in-out infinite alternate;
}
.hero-blob-2 {
  width: 26vw; height: 26vw;
  right: 4vw; top: 14vw;
  background: radial-gradient(closest-side, rgba(245,180,120,0.6), rgba(245,180,120,0) 70%);
  animation: hero-drift-2 13s ease-in-out infinite alternate;
}
.hero-blob-3 {
  width: 34vw; height: 34vw;
  left: 24vw; bottom: -12vw;
  background: radial-gradient(closest-side, rgba(13,148,136,0.32), rgba(13,148,136,0) 70%);
  animation: hero-drift-3 17s ease-in-out infinite alternate;
}
.hero-blob-4 {
  width: 22vw; height: 22vw;
  right: 22vw; top: -4vw;
  background: radial-gradient(closest-side, rgba(20,184,166,0.35), rgba(20,184,166,0) 70%);
  animation: hero-drift-4 9s ease-in-out infinite alternate;
}
.hero-blob-5 {
  width: 24vw; height: 24vw;
  left: -6vw; bottom: 6vw;
  background: radial-gradient(closest-side, rgba(245,200,140,0.5), rgba(245,200,140,0) 70%);
  animation: hero-drift-5 15s ease-in-out infinite alternate;
}
.hero-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.04;
  mix-blend-mode: multiply;
}
@keyframes hero-drift-1 {
  0%   { transform: translate3d(0, 0, 0) scale(1);     opacity: 0.7; }
  50%  { transform: translate3d(38vw, 26vw, 0) scale(1.3); opacity: 0.95; }
  100% { transform: translate3d(10vw, 34vw, 0) scale(1.1); opacity: 0.75; }
}
@keyframes hero-drift-2 {
  0%   { transform: translate3d(0, 0, 0) scale(1);     opacity: 0.6; }
  50%  { transform: translate3d(-44vw, 18vw, 0) scale(1.25); opacity: 0.9; }
  100% { transform: translate3d(-18vw, 30vw, 0) scale(1.1); opacity: 0.7; }
}
@keyframes hero-drift-3 {
  0%   { transform: translate3d(0, 0, 0) scale(1);     opacity: 0.55; }
  50%  { transform: translate3d(-34vw, -28vw, 0) scale(1.3); opacity: 0.85; }
  100% { transform: translate3d(18vw, -16vw, 0) scale(1.15); opacity: 0.65; }
}
@keyframes hero-drift-4 {
  0%   { transform: translate3d(0, 0, 0) scale(1);     opacity: 0.65; }
  50%  { transform: translate3d(-24vw, 28vw, 0) scale(1.35); opacity: 0.9; }
  100% { transform: translate3d(8vw, 20vw, 0) scale(1.15); opacity: 0.7; }
}
@keyframes hero-drift-5 {
  0%   { transform: translate3d(0, 0, 0) scale(1);     opacity: 0.55; }
  50%  { transform: translate3d(32vw, -22vw, 0) scale(1.3); opacity: 0.85; }
  100% { transform: translate3d(12vw, -8vw, 0) scale(1.1); opacity: 0.65; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-blob { animation: none; }
}
.hero-grid {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 1080px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-content { display: flex; flex-direction: column; gap: 28px; animation: fade-up 700ms var(--ease) both; }
.hero-h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(42px, 6.0vw, 84px); line-height: 1.02;
  letter-spacing: -0.025em; color: var(--ink);
  text-wrap: balance;
}
.hero-lede { font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); max-width: 40ch; line-height: 1.5; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-proof { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.hero-proof-rule { height: 1px; width: 80px; background: var(--line-2); }
.hero-proof p { font-size: 14px; color: var(--muted); }
.hero-proof strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ Chart card ============ */
.chart-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  padding: 36px 40px 24px;
  box-shadow: 0 1px 0 rgba(10,10,15,0.02), 0 30px 70px -28px rgba(10,10,15,0.20), 0 10px 28px -12px rgba(13,148,136,0.12);
  animation: fade-up 900ms 150ms var(--ease) both;
}
.chart-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.chart-label { font-family: var(--font-serif); font-size: 30px; color: var(--ink); letter-spacing: -0.015em; }
.chart-sublabel { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-grid .grid-vline { stroke: var(--line); stroke-dasharray: 1 5; opacity: 0.55; }
.chart-frame line { stroke: var(--ink-2); stroke-width: 1.2; }
.tick-label { font-family: var(--font-mono); font-size: 13px; fill: var(--muted-2); letter-spacing: 0.02em; }
.tick-label-y { text-anchor: end; }
.axis-label-y { font-family: var(--font-mono); font-size: 13px; fill: var(--ink); text-anchor: end; letter-spacing: 0.04em; text-transform: uppercase; }
.curve { stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 1400ms 250ms var(--ease) forwards; transition: opacity var(--dur) var(--ease), stroke-width var(--dur) var(--ease); }
.curve-saflex { stroke: var(--teal); animation-delay: 400ms; }
.curve-sentryglas { stroke: var(--ink); animation-delay: 250ms; }
.curve-label text { font-family: var(--font-mono); font-size: 13px; font-weight: 500; opacity: 0; animation: fade-in 500ms 1700ms var(--ease) forwards; }
.curve-label-saflex text { fill: var(--teal); }
.curve-label-sentryglas text { fill: var(--ink); }
.hero-visual[data-focus="saflex"] .curve-sentryglas,
.hero-visual[data-focus="saflex"] .curve-label-sentryglas text { opacity: 0.18; }
.hero-visual[data-focus="sentryglas"] .curve-saflex,
.hero-visual[data-focus="sentryglas"] .curve-label-saflex text { opacity: 0.18; }
.hero-visual[data-focus="saflex"] .curve-saflex,
.hero-visual[data-focus="sentryglas"] .curve-sentryglas { stroke-width: 3.1; }
.chart-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.legend-item { display: inline-flex; align-items: center; gap: 10px; padding: 4px 8px; margin-left: -8px; border-radius: 8px; font-size: 13px; color: var(--ink); transition: background var(--dur) var(--ease); }
.legend-item:hover { background: rgba(10,10,15,0.04); }
.legend-swatch { width: 18px; height: 4px; border-radius: 2px; }
.legend-meta { color: var(--muted-2); font-size: 12.5px; margin-left: 2px; }

/* ============ Startup hero overrides ============ */
.hero-startup .hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}
@media (max-width: 1080px) { .hero-startup .hero-grid { grid-template-columns: 1fr; } }

.hero-startup .hero-content { gap: 24px; }

.hero-badges { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge-beta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-dark);
  padding: 6px 12px 6px 10px;
  background: var(--teal-bg);
  border: 1px solid var(--teal-line);
  border-radius: 999px;
}
.badge-beta-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
  position: relative;
}
.badge-beta-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--teal);
  animation: pulse 1.8s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(2.4); opacity: 0;   }
  100% { transform: scale(2.4); opacity: 0;   }
}
.badge-free {
  font-size: 13px; color: var(--muted-2);
  letter-spacing: -0.005em;
}

.hero-h1-startup {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.hero-em {
  font-style: italic;
  color: var(--teal-dark);
  font-weight: 400;
}

.hero-lede-startup {
  font-size: clamp(18px, 1.55vw, 22px);
  max-width: 44ch;
  color: var(--muted);
}

.btn-startup-primary {
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
  padding: 18px 30px;
  font-size: 17px;
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 12px 28px -10px rgba(13,148,136,0.55),
    0 4px 10px -4px rgba(13,148,136,0.30);
}
.btn-startup-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 16px 36px -10px rgba(15,118,110,0.65),
    0 6px 14px -4px rgba(15,118,110,0.35);
}
.btn-startup-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 500;
}
.btn-startup-ghost:hover { color: var(--teal-dark); }
.btn-startup-ghost svg { color: var(--teal); }

.hero-stats {
  display: flex; align-items: center;
  gap: 28px; flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 6px;
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.hero-stat strong {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stat span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hero-stat-divider {
  width: 1px; height: 28px;
  background: var(--line-2);
}

.hero-trusted { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.hero-trusted-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--quiet);
}
.hero-trusted-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(18px, 2.5vw, 32px);
  opacity: 0.78;
}
.trusted-mark {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  font-variant: small-caps;
  transition: color var(--dur) var(--ease);
}
.trusted-mark:hover { color: var(--ink); }

/* ============ Product window (hero visual) ============ */
.product-window {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(10,10,15,0.02),
    0 40px 80px -28px rgba(10,10,15,0.28),
    0 14px 34px -14px rgba(13,148,136,0.16);
  animation: fade-up 900ms 150ms var(--ease) both;
  transform: perspective(1600px) rotateY(-2deg) rotateX(1.5deg);
  transform-origin: center center;
}
.pw-titlebar {
  display: flex; align-items: center;
  padding: 10px 14px;
  background: var(--cream-warm);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.pw-dots { display: inline-flex; gap: 6px; }
.pw-dots span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.pw-url {
  flex: 1;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  justify-content: center;
}
.pw-tabs {
  display: flex; gap: 2px;
  padding: 0 12px;
  background: var(--cream-warm);
  border-bottom: 1px solid var(--line);
}
.pw-tab {
  padding: 10px 16px 11px;
  font-size: 12.5px;
  color: var(--muted-2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.pw-tab-active {
  color: var(--ink);
  background: var(--paper);
  border-bottom-color: var(--teal);
  font-weight: 500;
  margin-bottom: -1px;
}
.pw-tab-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--teal); border-radius: 50%;
}
.pw-tab-spacer { flex: 1; cursor: default; }

.pw-body {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  background: var(--paper);
  min-height: 320px;
}
.pw-sidebar {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
}
.pw-side-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.pw-field {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pw-field-label { font-size: 12px; color: var(--muted-2); }
.pw-field-val   { font-size: 12px; color: var(--ink); font-weight: 500; font-family: var(--font-mono); }

.pw-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.pw-table th, .pw-table td {
  text-align: left;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-soft);
}
.pw-table th { color: var(--muted-2); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; font-size: 9.5px; }
.pw-table td { color: var(--ink); }

.pw-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.pw-main-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pw-main-title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--muted); }
.pw-main-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-bg);
  border: 1px solid var(--teal-line);
  border-radius: 999px;
  padding: 3px 9px;
}
.pw-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  animation: pulse 1.8s var(--ease) infinite;
}
.pw-chart { width: 100%; height: 200px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; }
.pw-export { display: flex; gap: 8px; flex-wrap: wrap; }
.pw-export-btn {
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.pw-export-primary {
  background: var(--ink); color: var(--cream); border-color: var(--ink);
}

@media (max-width: 720px) {
  .product-window { transform: none; }
  .pw-body { grid-template-columns: 1fr; }
  .pw-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ============ Tools section ============ */
.tools { background: var(--cream); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.tools-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.tools-h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.05; letter-spacing: -0.025em; text-align: center; max-width: 22ch; margin-top: 10px; text-wrap: balance; }
.tools-lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); text-align: center; max-width: 60ch; margin-bottom: 52px; line-height: 1.55; }
.tools-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1080px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .tools-grid { grid-template-columns: 1fr; } }

.tool-card { position: relative; display: flex; flex-direction: column; gap: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 40px 38px 32px; transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); text-decoration: none; color: inherit; overflow: hidden; cursor: pointer; }
.tool-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 0 var(--teal-soft); transition: box-shadow var(--dur) var(--ease); }
.tool-card:hover { transform: translateY(-3px); border-color: var(--teal-line); box-shadow: 0 26px 60px -28px rgba(10,10,15,0.22); }
.tool-card:hover::after { box-shadow: 0 0 0 4px var(--teal-soft); }
.tool-icon { width: 110px; height: 78px; color: var(--teal); flex-shrink: 0; }
.tool-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
.tool-eyebrow-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.tool-name { font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 3.0vw, 38px); line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); }
.tool-desc { font-size: 16.5px; color: var(--muted); line-height: 1.55; max-width: 38ch; }
.tool-spec { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.tool-spec-pill { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); background: var(--cream-warm); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.tool-cta { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--teal-dark); margin-top: auto; padding-top: 12px; }
.tool-cta svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.tool-card:hover .tool-cta svg { transform: translateX(4px); }

/* ============ Database ============ */
.database { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%); border-top: 1px solid var(--line-soft); }
.database-inner { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.database-h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.05; letter-spacing: -0.025em; text-align: center; max-width: 20ch; margin-top: 10px; text-wrap: balance; }
.database-lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); text-align: center; max-width: 66ch; margin-bottom: 40px; line-height: 1.55; }
.standard-token { font-family: var(--font-mono); font-size: 13px; padding: 2px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); white-space: nowrap; }
.database-table { width: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 40px -28px rgba(10,10,15,0.20); }
.db-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr) minmax(0, 1.2fr); gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); align-items: center; transition: background var(--dur) var(--ease); }
.db-row:last-child { border-bottom: 0; }
.db-row:hover:not(.db-row-head) { background: var(--cream-warm); }
.db-row-head { background: var(--cream-warm); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; padding: 13px 22px; }
.db-cell-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.db-name { font-size: 16px; font-weight: 500; color: var(--ink); }
.db-former { font-size: 13px; color: var(--muted-2); font-style: italic; }
.db-badge { display: inline-block; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; padding: 3px 7px 2px; border-radius: 4px; background: var(--teal); color: var(--cream); }
.db-cell-mfr { font-size: 14.5px; color: var(--muted); }
.db-cell-validity { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); letter-spacing: -0.005em; }
.db-row-new .db-cell-name::before { content: ''; display: inline-block; width: 3px; height: 18px; background: var(--teal); border-radius: 2px; margin-right: 4px; margin-bottom: -3px; }
.database-cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 36px; }
.database-foot { font-size: 14px; color: var(--muted); }
.link-inline { color: var(--teal-dark); border-bottom: 1px solid var(--teal-line); padding-bottom: 1px; }
.link-inline:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ============ Section shared (Team + Research) ============ */
.section-h2 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-align: center;
  max-width: 22ch;
  margin-top: 10px;
  text-wrap: balance;
}
.serif-italic { font-style: italic; color: var(--teal-dark); font-weight: 400; }
.section-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--muted);
  text-align: center;
  max-width: 66ch;
  margin-bottom: 52px;
  line-height: 1.55;
}

/* ============ Team section ============ */
.team {
  background: var(--cream);
  border-top: 1px solid var(--line-soft);
}
.team-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.team-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 820px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px 32px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.team-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal-line);
  box-shadow: 0 26px 60px -28px rgba(10,10,15,0.22);
}
.team-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--teal-bg);
  border: 1px solid var(--teal-line);
  color: var(--teal-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 400; font-size: 32px;
  letter-spacing: -0.02em;
  font-style: italic;
}
.team-name {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--ink);
}
.team-role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 500;
  margin-top: -4px;
}
.team-bio {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 48ch;
}
.team-links {
  display: inline-flex; gap: 8px;
  margin-top: 6px;
}
.team-link {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.team-link svg { width: 17px; height: 17px; }
.team-link:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ============ Research / Publications ============ */
.research {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
  border-top: 1px solid var(--line-soft);
}
.research-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.research-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1000px) { .research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .research-grid { grid-template-columns: 1fr; } }

.pub-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 20px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pub-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal-line);
  box-shadow: 0 26px 60px -28px rgba(10,10,15,0.22), 0 0 0 4px var(--teal-soft);
}
.pub-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.pub-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-bg);
  border: 1px solid var(--teal-line);
  padding: 3px 9px;
  border-radius: 999px;
}
.pub-ext {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  color: var(--muted-2);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pub-card:hover .pub-ext { color: var(--teal-dark); background: var(--teal-bg); }
.pub-ext svg { width: 13px; height: 13px; }

.pub-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin: 0;
}
.pub-meta strong { color: var(--ink-2); font-weight: 600; font-family: var(--font-mono); }

.pub-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
  margin: 0;
}

.pub-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px; font-weight: 500;
  color: var(--teal-dark);
  margin-top: auto;
  padding-top: 8px;
}
.pub-cta svg { width: 13px; height: 13px; transition: transform var(--dur) var(--ease); }
.pub-card:hover .pub-cta svg { transform: translateX(4px); }

.research-foot {
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--muted);
  text-align: center;
}

/* ============ Footer ============ */
.footer-mini { border-top: 1px solid var(--line); padding: 24px var(--pad-x); background: var(--cream); }
.footer-mini-inner { max-width: var(--max-w); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.footer-mini a { color: var(--muted); }
.footer-mini a:hover { color: var(--ink); }

/* ============ Animations ============ */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .curve { stroke-dashoffset: 0 !important; }
}


/* ============ Shared utility classes added for the Jinja template ============ */

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 500;
  margin-bottom: 4px;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--teal-dark);
}

.section-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--muted);
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 40px;
  line-height: 1.55;
}

.link-inline {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--dur) var(--ease);
}
.link-inline:hover { color: var(--ink); }

.nav-link-muted { color: var(--muted) !important; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: var(--ink); color: #fff;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-large {
  padding: 16px 28px;
  font-size: 16px;
}

.tools-inner,
.database-inner,
.team-inner,
.research-inner,
.contact-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ============ Database ============ */
.database-foot { font-size: 13.5px; color: var(--muted-2); margin-top: 12px; text-align: center; }

/* ============ Team ============ */
.team { background: var(--cream); border-top: 1px solid var(--line-soft); }
.team-grid {
  width: 100%;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 40px;
}
@media (max-width: 880px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 38px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.team-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--teal-bg);
  color: var(--teal-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 400; font-size: 32px;
  letter-spacing: -0.02em; font-style: italic;
  margin-bottom: 8px;
}
.team-bio { font-size: 15px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.team-links { display: flex; gap: 10px; margin-top: 14px; }
.team-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-2);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.team-link svg { width: 16px; height: 16px; }
.team-link:hover { color: var(--teal-dark); border-color: var(--teal-line); }

/* ============ Research ============ */
.research { background: var(--cream-warm); border-top: 1px solid var(--line-soft); }
.research-grid {
  width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}
@media (max-width: 1080px) { .research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .research-grid { grid-template-columns: 1fr; } }
.pub-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pub-card:hover {
  border-color: var(--teal-line);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(10,10,15,0.18);
}
.pub-head { display: flex; justify-content: space-between; align-items: flex-start; }
.pub-ext { color: var(--muted-2); transition: color var(--dur) var(--ease); }
.pub-ext svg { width: 14px; height: 14px; }
.pub-card:hover .pub-ext { color: var(--teal-dark); }
.pub-title {
  font-family: var(--font-serif); font-weight: 400; font-size: 20px;
  line-height: 1.2; letter-spacing: -0.015em; color: var(--ink);
  text-wrap: pretty;
}
.pub-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500; color: var(--teal-dark);
  margin-top: auto; padding-top: 8px;
}
.research-foot { margin-top: 30px; font-size: 14px; color: var(--muted); text-align: center; }

/* ============ Contact ============ */
.contact { background: var(--paper); border-top: 1px solid var(--line-soft); }
.contact-form {
  width: 100%; max-width: 760px;
  margin-top: 32px;
  display: flex; flex-direction: column;
  gap: 16px;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.contact-field { display: flex; flex-direction: column; gap: 6px; }
.contact-field-wide { grid-column: 1 / -1; }
.contact-field > span {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 500;
}
.contact-field em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: 0.7; }
.contact-field input,
.contact-field select,
.contact-field textarea {
  font: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.contact-field textarea { resize: vertical; min-height: 120px; }
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}
@media (max-width: 680px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============ Mini footer ============ */
.footer-mini {
  padding: 32px var(--pad-x);
  background: var(--cream);
  border-top: 1px solid var(--line);
}
.footer-mini-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between;
  font-size: 13.5px; color: var(--muted-2);
}
.footer-mini-links a { transition: color var(--dur) var(--ease); }
.footer-mini-links a:hover { color: var(--ink); }
.footer-mini-sep { margin: 0 6px; color: var(--quiet); }

/* Reduce-motion safety net */
@media (prefers-reduced-motion: reduce) {
  .hero-blob, .hero-content, .product-window {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}
