/* ============================================================
   Kyletta — Rillet Implementation & Consulting
   Design system: tokens, layout, components
   ============================================================ */

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

:root {
  /* Brand */
  --ink:        #0D1533;
  --ink-2:      #15204A;
  --ink-3:      #202D5E;
  --brand:      #1F3A93;
  --brand-600:  #16296B;
  --brand-100:  #E7ECF8;
  --mint:       #19B3A6;
  --mint-100:   #DDF3F1;
  --amber:      #FFB020;

  /* Neutrals */
  --text:       #121A34;
  --text-2:     #444E6C;
  --muted:      #6B7590;
  --line:       #E1E6F1;
  --line-2:     #EEF1F7;
  --bg:         #FFFFFF;
  --bg-soft:    #F5F7FB;

  /* Type */
  --display: 'Outfit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space */
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(18,26,52,.06), 0 1px 3px rgba(18,26,52,.04);
  --shadow-md: 0 4px 12px rgba(18,26,52,.06), 0 12px 32px rgba(18,26,52,.07);
  --shadow-lg: 0 18px 50px rgba(13,21,51,.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.11;
  margin: 0 0 .5em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); letter-spacing: -0.012em; }
h4 { font-size: 1.02rem; letter-spacing: -0.006em; }
p  { margin: 0 0 1.1em; color: var(--text-2); }
ul, ol { color: var(--text-2); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--tight { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--ink); color: #C9D2E6; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p { color: #A7B2CC; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--mint));
}
.section--dark .eyebrow { color: var(--mint); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.1rem; margin-bottom: 0; }

.lead { font-size: 1.16rem; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--display); font-weight: 600; font-size: .96rem;
  padding: 13px 22px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(31,58,147,.28); }
.btn--primary:hover { background: var(--brand-600); color: #fff; box-shadow: 0 10px 26px rgba(31,58,147,.34); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: #C4CCE4; color: var(--ink); }
.btn--dark { background: #fff; color: var(--ink); }
.btn--dark:hover { color: var(--ink); background: #EDF0F8; }
.btn--outline-light { border-color: rgba(255,255,255,.28); color: #fff; background: transparent; }
.btn--outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.07); }
.btn--sm { padding: 10px 16px; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.arrow-link {
  font-family: var(--display); font-weight: 600; font-size: .93rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.arrow-link::after { content: "→"; transition: transform .16s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.nav { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark .hex { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linejoin: round; }
.brand-mark .spokes line { stroke: var(--brand); stroke-width: 3; }
.brand-mark .core { fill: var(--mint); }
.site-footer .brand-mark .hex,
.site-footer .brand-mark .spokes line { stroke: #FFFFFF; }
.brand-name {
  font-family: var(--display); font-weight: 600; font-size: 1.32rem;
  letter-spacing: -0.012em;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  font-size: .94rem; font-weight: 500; color: var(--text-2);
  padding: 8px 13px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a.btn--primary { color: #fff; background: var(--brand); }
.nav-links a.btn--primary:hover { color: #fff; background: var(--brand-600); }
.nav-cta { margin-left: 12px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 9px; width: 40px; height: 38px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 17px; height: 2px; background: var(--ink); position: relative; border-radius: 2px; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 2px; background: var(--ink); border-radius: 2px;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after  { top: 5px; }

/* Announcement */
.topbar {
  background: var(--ink); color: #B9C4DD; font-size: .84rem;
  text-align: center; padding: 9px 16px;
}
.topbar a { color: var(--mint); font-weight: 600; }
.topbar a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(31,58,147,.13), transparent 62%),
    radial-gradient(700px 360px at 8% 8%, rgba(25,179,166,.11), transparent 60%),
    var(--bg);
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--line-2);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 60px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .lead { max-width: 40ch; }
.hero-note { font-size: .88rem; color: var(--muted); margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-100); flex: none; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px 6px 8px; font-size: .84rem; font-weight: 500; color: var(--text-2);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.pill b { font-family: var(--mono); background: var(--ink); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: .72rem; letter-spacing: .04em; }

/* Hero visual: close timeline card */
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 24px; position: relative;
}
.hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hero-card-title { font-family: var(--display); font-weight: 600; font-size: .98rem; color: var(--ink); }
.chip { font-size: .7rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; font-family: var(--mono); letter-spacing: .03em; text-transform: uppercase; }
.chip--mint { background: var(--mint-100); color: #0E7F76; }
.chip--brand { background: var(--brand-100); color: var(--brand-600); }
.chip--amber { background: #FFF4DE; color: #96650A; }
.chip--slate { background: #EEF1F7; color: var(--text-2); }

.rowline { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: .9rem; }
.rowline:first-of-type { border-top: 0; }
.rowline .label { color: var(--text-2); flex: 1; }
.rowline .val { font-family: var(--mono); font-weight: 600; font-size: .84rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.bar { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; flex: 1.2; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--mint)); }

.float-badge {
  position: absolute; right: -14px; bottom: -18px;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 13px 17px;
  box-shadow: var(--shadow-lg); font-family: var(--display);
}
.float-badge b { display: block; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.float-badge span { font-size: .74rem; color: #9AA7C4; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Stat band ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: #fff; padding: 28px 24px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--ink); line-height: 1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font-size: .88rem; color: var(--muted); }
.section--dark .stat { background: var(--ink-2); }
.section--dark .stat b { color: #fff; }
.section--dark .stat span { color: #8E9BB8; }

/* ---------- Logo strip ---------- */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 34px; }
.logo-strip span {
  font-family: var(--display); font-weight: 600; font-size: 1.02rem;
  color: #7C87A3; letter-spacing: -0.01em;
}
.strip-label { text-align: center; font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; font-weight: 600; }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #CFD7E9; }
.card h3 { margin-bottom: .45em; }
.card p { font-size: .96rem; margin-bottom: 0; }
.card .arrow-link { margin-top: 16px; }
.card ul { margin: 14px 0 0; padding-left: 18px; font-size: .93rem; }
.card ul li { margin-bottom: 6px; }

.icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand-600); margin-bottom: 16px;
  font-family: var(--mono); font-weight: 600; font-size: 1.02rem;
}
.icon--mint { background: var(--mint-100); color: #0E7F76; }
.icon--ink { background: #EDF0F7; color: var(--ink); }

.card--dark { background: var(--ink-2); border-color: #27345C; }
.card--dark:hover { border-color: #37477A; }
.card--dark h3 { color: #fff; }
.card--dark p { color: #A7B2CC; }

.card--feature { padding: 30px; }
.card--flat { box-shadow: none; }
.card--flat:hover { transform: none; box-shadow: var(--shadow-sm); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--wide { grid-template-columns: .95fr 1.05fr; }

.checks { list-style: none; padding: 0; margin: 22px 0 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; font-size: .98rem; color: var(--text-2); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 6px; background: var(--mint-100); color: #0E7F76;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
}
.section--dark .checks li { color: #A7B2CC; }
.section--dark .checks li::before { background: rgba(25,179,166,.16); color: var(--mint); }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding-top: 30px; }
.step::before {
  content: ""; position: absolute; top: 9px; left: 0; right: -18px; height: 2px;
  background: linear-gradient(90deg, var(--brand), rgba(31,58,147,.18));
}
.step:last-child::before { right: 0; background: rgba(31,58,147,.18); }
.step::after {
  content: ""; position: absolute; top: 3px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand);
}
.step .wk { font-family: var(--mono); font-size: .73rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-variant-numeric: tabular-nums; }
.step h4 { margin: 6px 0 8px; }
.step p { font-size: .92rem; margin: 0; }

/* ---------- Compare table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .93rem; }
th, td { text-align: left; padding: 15px 16px; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
thead th {
  font-family: var(--mono); font-size: .73rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; color: var(--ink); }
td { color: var(--text-2); }
.td-good { color: #0E7F76; font-weight: 600; }

/* ---------- Quotes ---------- */
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.quote p { font-size: 1rem; color: var(--text); margin-bottom: 18px; }
.quote-meta { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--mint)); color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .85rem;
}
.quote-meta b { display: block; font-size: .9rem; color: var(--ink); font-family: var(--display); }
.quote-meta span { font-size: .82rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--brand); font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-right: 40px; margin-bottom: 22px; font-size: .98rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(680px 320px at 82% 0%, rgba(31,58,147,.30), transparent 62%),
    radial-gradient(520px 300px at 6% 100%, rgba(25,179,166,.20), transparent 60%),
    var(--ink);
  border-radius: var(--radius-lg); padding: 62px 56px; color: #fff;
}
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band p { color: #B2BEDA; max-width: 52ch; font-size: 1.05rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--ink); font-family: var(--display); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: .96rem; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,58,147,.14);
}
.field textarea { min-height: 118px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }
.form-status {
  display: none; padding: 13px 16px; border-radius: 10px;
  background: var(--mint-100); color: #0E7F76; font-size: .92rem; font-weight: 500;
}
.form-status.show { display: block; }

/* ---------- Page header ---------- */
.page-head {
  background:
    radial-gradient(760px 330px at 88% -20%, rgba(31,58,147,.13), transparent 60%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 68px 0 60px;
}
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); max-width: 24ch; }
.page-head p { font-size: 1.14rem; max-width: 62ch; margin-bottom: 0; }
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #93A0BF; padding: 66px 0 30px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.site-footer .brand-name { color: #fff; }
.site-footer h5 {
  font-family: var(--mono); color: #fff; font-size: .82rem; letter-spacing: .1em;
  text-transform: uppercase; margin: 0 0 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #93A0BF; }
.site-footer a:hover { color: #fff; }
.footer-about { max-width: 34ch; margin: 16px 0 0; color: #8593B4; font-size: .92rem; }
.footer-bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid #202B49;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: .84rem; color: #6E7C9C;
}
.disclaimer { max-width: 78ch; font-size: .78rem; color: #5E6B8A; margin-top: 14px; line-height: 1.6; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero .lead { max-width: none; }
  .split, .split--wide { grid-template-columns: 1fr; gap: 36px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .step::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 2px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; font-size: 1rem; }
  .nav-cta { margin: 10px 0 0; }
  .nav-toggle { display: inline-flex; }
  .site-header { position: relative; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .section { padding: 62px 0; }
  .hero { padding: 62px 0 56px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 26px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .float-badge { right: 10px; bottom: -14px; }
}
