/*
  Twenty design system, trued up to the real source.
  Sources (twentyhq/twenty @ packages/twenty-website/src):
    Fonts:      app/[locale]/layout.tsx  -> Host_Grotesk (--font-sans, 300/400/500/600),
                                            Aleo (--font-serif, 300), Azeret_Mono (--font-mono, 300/500)
    Palette:    tokens/palette.ts        -> white #ffffff, black #1c1c1c, black-hover #333333,
                                            white-hover #e8e8e8, neutral #f4f4f4, graphite #424242,
                                            silver #dbdbdb, fog #dddddd (accent blue #4a38f5 -> replaced with Overturn #7d2431)
    Semantics:  tokens/scheme.ts         -> ink=black, inkMuted=black-60, inkSubtle=black-40,
                                            line=black-10, lineStrong=black-20, surface=white / neutral
    Base units: tokens/units.ts          -> spacingBase 4px, fontBase 0.25rem (4px), radiusBase 2px
    Radius:     tokens/radius.ts         -> radius(n) = 2n px
    Shadow:     tokens/shadow.ts         -> header 0 1px 3px rgba(0,0,0,.06),
                                            card 0 12px 32px -16px rgba(0,0,0,.18), popup 0 12px 32px rgba(0,0,0,.08)
    Rhythm:     tokens/rhythm.ts+gutter  -> section md 64px (16*4), hero md 48px (12*4), gutter md 40px (10*4)
    Layout:     tokens/max-content-width -> 1512px ; menu-height.ts -> 64px
    Motion:     tokens/easing.ts         -> standard cubic-bezier(.22,1,.36,1) ; duration.ts -> 200/400/600ms
    Type:       computed on twenty.com   -> h1 60/66 w300 ls-.02em Aleo ; h2 48/56 w300 ls-.02em Aleo ;
                                            body 16-18 w400 lh1.55 Host Grotesk ; eyebrow/CTA 12 w500 uppercase Azeret Mono
  Overturn substitution: the single brand accent (--accent) replaces Twenty's blue. Everything else is Twenty-exact.
*/
:root {
  /* Fonts */
  --font-sans: 'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Aleo', Georgia, 'Times New Roman', serif;
  --font-mono: 'Azeret Mono', ui-monospace, 'SF Mono', 'Menlo', monospace;

  /* Surfaces */
  --bg: #ffffff;              /* surface */
  --panel: #f4f4f4;           /* neutral surface */
  --panel-2: #f4f4f4;         /* neutral surface (alt sections) */
  --white-hover: #e8e8e8;

  /* Ink (black #1c1c1c at alpha, per scheme.ts) */
  --ink: #1c1c1c;                       /* ink */
  --ink-2: rgba(28, 28, 28, 0.60);      /* inkMuted, black-60 */
  --ink-3: rgba(28, 28, 28, 0.40);      /* inkSubtle, black-40 */

  /* Lines (black at alpha) */
  --line: rgba(28, 28, 28, 0.10);       /* line, black-10 */
  --line-soft: rgba(28, 28, 28, 0.06);  /* softer hairline */
  --line-strong: rgba(28, 28, 28, 0.20);/* lineStrong, black-20 */

  /* Accent: Overturn oxblood, the one brand substitution for Twenty blue #4a38f5 */
  --accent: #141414;         /* per-page override sets brand accent */
  --accent-soft: #f0f0f0;

  /* Radius (radiusBase 2px) */
  --r-sm: 4px;   /* radius(2) */
  --r: 6px;      /* radius(3), buttons */
  --r-lg: 8px;   /* radius(4), cards/panels */
  --r-xl: 12px;  /* radius(6), product frame */

  /* Shadows (tokens/shadow.ts) */
  --shadow-header: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  --shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.18);   /* card */
  --shadow-lg: 0 20px 48px -22px rgba(0, 0, 0, 0.22);/* product frame, scaled card */

  /* Layout */
  --max: 1512px;   /* max-content-width.ts */
  --menu-h: 64px;  /* menu-height.ts */

  /* Motion */
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-xs: 200ms;
  --dur-lg: 400ms;
  --dur-xl: 600ms;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Content column: Twenty frames sections at 1512 and constrains content islands.
   Our content is denser, so the wrap sits at a readable 1200 within that frame. */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 700px; margin: 0 auto; padding: 0 24px; } /* Twenty text measure ~672-700px */

/* Nav: solid neutral #f4f4f4, 64px, no blur, no border. Header shadow on scroll (twenty.js). */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--panel);
  transition: box-shadow var(--dur-xs) var(--ease-standard);
}
.nav.scrolled { box-shadow: var(--shadow-header); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--menu-h); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.logo-mark {
  width: 26px; height: 26px; border-radius: var(--r-sm);
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--ink); font-weight: 400; }
.nav-links a { transition: color var(--dur-xs) var(--ease-standard); }
.nav-links a:hover { color: var(--ink-2); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
@media (max-width: 800px) { .nav-links { display: none; } }

/* Buttons: Azeret Mono, uppercase, weight 500 (Twenty CTA signature) */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r);
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: background var(--dur-xs) var(--ease-standard), border-color var(--dur-xs) var(--ease-standard), transform var(--dur-xs) var(--ease-standard);
  cursor: pointer;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333333; transform: translateY(-1px); } /* black-hover */
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--panel); }
.btn-lg { padding: 13px 22px; font-size: 13px; border-radius: var(--r); }

/* Hero */
.hero { padding: 48px 0 56px; text-align: center; } /* hero rhythm md 48px */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2);
  background: var(--bg); margin-bottom: 28px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(2.5rem, 5.2vw, 3.75rem); /* 40 -> 60px */
  letter-spacing: -0.02em; line-height: 1.1;
  max-width: 900px; margin: 0 auto 20px;
  text-wrap: balance;
}
.sub {
  font-size: 18px; color: var(--ink-2); max-width: 640px;
  margin: 0 auto 34px; line-height: 1.55;
  text-wrap: pretty;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--ink-3); }

/* Browser-frame product mock */
.window {
  margin: 56px auto 0; max-width: 1080px;
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: #fff; box-shadow: var(--shadow-lg);
  overflow: hidden; text-align: left;
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}
.wdot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.window-url {
  flex: 1; max-width: 320px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 3px 10px;
}
.app { display: flex; min-height: 420px; font-size: 13px; }
.app-side {
  width: 200px; flex-shrink: 0; border-right: 1px solid var(--line-soft);
  background: var(--panel); padding: 14px 10px;
}
.side-item {
  padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-2);
  font-weight: 400; margin-bottom: 2px; font-size: 12.5px;
}
.side-item.on { background: var(--white-hover); color: var(--ink); font-weight: 500; }
.side-label {
  font-family: var(--font-mono);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); padding: 14px 10px 6px; font-weight: 500;
}
.app-main { flex: 1; padding: 18px 22px; overflow: hidden; }
.app-h { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.app-sub { color: var(--ink-3); font-size: 12px; margin-bottom: 14px; }
@media (max-width: 720px) { .app-side { display: none; } }

/* Mock table */
.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.t th {
  text-align: left; font-family: var(--font-mono); font-weight: 500; color: var(--ink-3); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 500; background: var(--accent-soft); color: var(--ink-2);
}
.pill.good { background: #e7f2ec; color: #23624a; }
.pill.warn { background: #fdf1e3; color: #8a5b1e; }
.pill.bad { background: #faeaea; color: #9c3535; }
.bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }

/* Metric strip */
.metrics { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--panel-2); }
.metrics-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 34px 20px; text-align: center; border-left: 1px solid var(--line-soft); }
.metric:first-child { border-left: none; }
.metric b { display: block; font-family: var(--font-serif); font-size: 30px; font-weight: 300; letter-spacing: -0.02em; }
.metric span { font-size: 13px; color: var(--ink-3); }
@media (max-width: 720px) {
  .metrics-inner { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: none; border-top: 1px solid var(--line-soft); }
  .metric:nth-child(4) { border-top: 1px solid var(--line-soft); }
}

/* Sections (rhythm section md 64px, generous marketing spacing) */
.section { padding: 96px 0; }
.section-alt { background: var(--panel-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3); margin-bottom: 14px;
}
h2 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(1.95rem, 3.6vw, 3rem); /* 31 -> 48px */
  letter-spacing: -0.02em; line-height: 1.16; max-width: 720px; margin-bottom: 14px;
  text-wrap: balance;
}
.section-lede { font-size: 18px; color: var(--ink-2); max-width: 640px; margin-bottom: 48px; line-height: 1.55; text-wrap: pretty; }

/* Split feature rows */
.split { display: grid; grid-template-columns: 5fr 6fr; gap: 56px; align-items: center; margin-bottom: 88px; }
.split:last-child { margin-bottom: 0; }
.split.flip > .split-copy { order: 2; }
.split h3 { font-family: var(--font-serif); font-size: 24px; font-weight: 300; letter-spacing: -0.01em; margin-bottom: 12px; line-height: 1.2; }
.split p { color: var(--ink-2); font-size: 16px; max-width: 46ch; }
.split ul { list-style: none; margin-top: 18px; }
.split li {
  padding: 8px 0 8px 26px; position: relative; color: var(--ink-2); font-size: 15px;
  border-top: 1px solid var(--line-soft);
}
.split li::before {
  content: ""; position: absolute; left: 2px; top: 16px;
  width: 12px; height: 6px; border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.panel {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--shadow); padding: 20px; overflow: hidden;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; margin-bottom: 64px; }
  .split.flip > .split-copy { order: 0; }
}

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: #fff; padding: 26px 24px;
  transition: box-shadow var(--dur-xs) var(--ease-standard), transform var(--dur-xs) var(--ease-standard);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-ic {
  width: 34px; height: 34px; border-radius: var(--r-lg);
  background: var(--accent-soft); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 14px; margin-bottom: 16px;
  border: 1px solid var(--line-soft);
}
.card h4 { font-size: 16px; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.01em; }
.card p { font-size: 14.5px; color: var(--ink-3); }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* Quote */
.quote { max-width: 760px; margin: 0 auto; text-align: center; }
.quote blockquote { font-family: var(--font-serif); font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 300; letter-spacing: -0.01em; line-height: 1.3; text-wrap: balance; }
.quote cite { display: block; margin-top: 22px; font-style: normal; font-size: 14px; color: var(--ink-3); }
.quote cite b { color: var(--ink); font-weight: 500; display: block; }

/* Final CTA (dark closer, black surface) */
.cta-final { padding: 110px 0; text-align: center; background: var(--ink); color: #fff; }
.cta-final h2 { margin: 0 auto 16px; max-width: 720px; color: #fff; }
.cta-final .sub { color: rgba(255, 255, 255, 0.66); }
.cta-final .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.cta-final .btn-ghost:hover { border-color: rgba(255, 255, 255, 0.44); background: rgba(255,255,255,.06); }
.cta-final .btn-dark { background: #fff; color: var(--ink); }
.cta-final .btn-dark:hover { background: var(--white-hover); }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 40px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--ink); }

/* Reveal motion (easing.standard, duration.xl) */
.rv { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-xl) var(--ease-standard), transform var(--dur-xl) var(--ease-standard); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .btn, .card, .nav { transition: none; }
  html { scroll-behavior: auto; }
}
