/* ============================================================
   Selrite.ai — design system
   Calm-tech minimalist. Ink + paper + one teal signal accent.
   No build step. Vanilla CSS.
   ============================================================ */

:root {
  /* palette */
  --ink:        #0E1116;   /* near-black text / dark surfaces */
  --ink-soft:   #2A2F37;
  --slate:      #5A626E;   /* secondary text */
  --line:       #E4E4DE;   /* hairlines */
  --paper:      #FAFAF8;   /* page bg */
  --paper-2:    #F2F2EE;   /* alt section bg */
  --white:      #FFFFFF;

  --signal:     #14A38B;   /* teal accent */
  --signal-ink: #0C7A68;
  --signal-soft:#E4F4F0;
  --amber:      #E0A33B;   /* secondary accent for live/alerts */

  /* type */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* scale */
  --maxw: 1140px;
  --gut: clamp(20px, 5vw, 56px);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(14,17,22,.04), 0 8px 30px rgba(14,17,22,.06);
  --shadow-lg: 0 24px 60px rgba(14,17,22,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p  { margin: 0 0 1em; color: var(--ink-soft); }
a  { color: var(--signal-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--slate); line-height: 1.5; }
.eyebrow {
  font: 600 .78rem/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--signal-ink); margin-bottom: 1rem; display: inline-block;
}
.muted { color: var(--slate); }
.mono  { font-family: var(--mono); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--alt { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink p { color: #C2C7CF; }
.center { text-align: center; }
.narrow { max-width: 680px; margin-inline: auto; }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 600 .98rem/1 var(--sans);
  padding: .85em 1.5em; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--signal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--signal-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.section--ink .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.btn-lg { padding: 1.05em 1.9em; font-size: 1.05rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: .55em; font-weight: 700; font-size: 1.18rem; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.brand .tld { color: var(--slate); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .95rem; padding: .5em .85em; border-radius: 8px; }
.nav-links a:hover { background: var(--paper-2); text-decoration: none; color: var(--ink); }
.nav-links a.active { color: var(--signal-ink); }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 16px var(--gut) 24px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7em .6em; }
  .nav-cta { margin: 8px 0 0; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(60px, 10vw, 120px) clamp(40px, 7vw, 90px); }
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 52ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 1.4rem; font: 500 .85rem/1.4 var(--mono); color: var(--slate); }

/* ---------- cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: .4em; }
.card .kicker { font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.card .price { font-size: 1.05rem; font-weight: 650; color: var(--signal-ink); margin-top: .6em; }
.tag {
  display: inline-block; font: 600 .7rem/1 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; padding: .4em .7em; border-radius: 999px;
  background: var(--signal-soft); color: var(--signal-ink);
}
.tag--amber { background: #FBF0DA; color: #9A6B14; }

/* feature list */
.ticks { list-style: none; margin: 1em 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.7em; margin-bottom: .55em; color: var(--ink-soft); }
.ticks li::before { content: "→"; position: absolute; left: 0; color: var(--signal); font-weight: 700; }

/* ---------- simulation shell ---------- */
.sim {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.sim-tabs { display: flex; gap: 4px; padding: 10px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.sim-tab {
  flex: 1; padding: .8em 1em; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font: 600 .95rem/1 var(--sans); background: transparent; color: var(--slate);
  display: flex; align-items: center; justify-content: center; gap: .5em; transition: .15s;
}
.sim-tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.sim-body { padding: clamp(22px, 4vw, 40px); min-height: 420px; }
.sim-panel[hidden] { display: none; }

/* finder sim */
.fz-step { display: none; animation: fade .35s ease; }
.fz-step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fz-progress { display: flex; gap: 6px; margin-bottom: 1.6rem; }
.fz-progress span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); transition: .3s; }
.fz-progress span.on { background: var(--signal); }
.fz-q { font-size: 1.25rem; font-weight: 650; margin-bottom: 1.1rem; letter-spacing: -.01em; }
.fz-opts { display: grid; gap: 10px; }
.opt {
  text-align: left; padding: 1em 1.1em; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius-sm); cursor: pointer; font: 500 1rem/1.3 var(--sans); color: var(--ink);
  transition: .15s; display: flex; justify-content: space-between; align-items: center;
}
.opt:hover { border-color: var(--signal); background: var(--signal-soft); }
.opt small { color: var(--slate); font-weight: 400; }
.fz-input { display: flex; gap: 10px; }
.fz-input input {
  flex: 1; padding: 1em 1.1em; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 500 1.1rem var(--sans); color: var(--ink);
}
.fz-input input:focus { outline: 2px solid var(--signal); border-color: var(--signal); }
.fz-back { background: none; border: 0; color: var(--slate); cursor: pointer; font-weight: 500; margin-top: 1.2rem; padding: 0; }
.fz-back:hover { color: var(--ink); }

/* finder result */
.fz-result { animation: fade .4s ease; }
.result-card { border: 1px solid var(--signal); background: var(--signal-soft); border-radius: var(--radius); padding: 24px; margin: 1.2rem 0; }
.result-card .rc-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.result-math { font-family: var(--mono); font-size: .9rem; color: var(--ink-soft); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; white-space: pre-wrap; }
.result-qty { font-size: 2.2rem; font-weight: 750; color: var(--signal-ink); letter-spacing: -.02em; }

/* pipeline sim */
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: stretch; }
@media (max-width: 720px) { .pipe { grid-template-columns: 1fr 1fr; } }
.pipe-node {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: var(--white);
  opacity: .35; transition: .45s ease; position: relative;
}
.pipe-node.lit { opacity: 1; border-color: var(--signal); box-shadow: var(--shadow); }
.pipe-node .pn-k { font: 600 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.pipe-node h4 { margin: .5em 0 .3em; font-size: 1rem; }
.pipe-node p { font-size: .85rem; margin: 0; color: var(--slate); }
.pipe-out {
  margin-top: 24px; background: var(--ink); color: #D7E8E4; border-radius: var(--radius);
  padding: 20px; font: 500 .82rem/1.6 var(--mono); overflow-x: auto; min-height: 220px;
}
.pipe-out .k { color: #7FD6C6; }
.pipe-out .s { color: #E0A33B; }
.pipe-out .n { color: #9BB4FF; }
.pipe-controls { display: flex; gap: 12px; align-items: center; margin-top: 22px; }

/* ---------- phone mockup (mobile app page) ---------- */
.phone-stage { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .phone-stage { grid-template-columns: 1fr; justify-items: center; } }
.phone {
  width: 300px; height: 610px; background: var(--ink); border-radius: 42px; padding: 12px;
  box-shadow: var(--shadow-lg); position: relative; flex-shrink: 0;
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: var(--ink); border-radius: 0 0 16px 16px; z-index: 3; }
.phone-screen { width: 100%; height: 100%; background: var(--paper); border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; }
.app-top { background: var(--white); padding: 38px 18px 14px; border-bottom: 1px solid var(--line); }
.app-top .app-title { font-weight: 700; font-size: 1.05rem; }
.app-live { display: inline-flex; align-items: center; gap: .45em; font: 600 .72rem/1 var(--mono); color: var(--signal-ink); margin-top: 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(20,163,139,.5); } 70% { box-shadow: 0 0 0 8px rgba(20,163,139,0); } }
.app-stats { display: flex; gap: 8px; padding: 14px 16px; }
.app-stat { flex: 1; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.app-stat b { display: block; font-size: 1.4rem; letter-spacing: -.02em; }
.app-stat small { color: var(--slate); font: 500 .66rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.app-feed { flex: 1; overflow: hidden; padding: 6px 14px; }
.feed-row {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 8px; font-size: .8rem; animation: feedin .5s ease;
}
@keyframes feedin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.feed-row .fr-top { display: flex; justify-content: space-between; align-items: center; }
.feed-row .fr-who { font-weight: 650; }
.feed-row .fr-time { font: 500 .66rem/1 var(--mono); color: var(--slate); }
.feed-row .fr-act { color: var(--slate); margin-top: 3px; }
.feed-row .fr-act b { color: var(--signal-ink); font-weight: 600; }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; }
@media (max-width: 720px){ .stats { grid-template-columns: 1fr 1fr; } }
.stat b { display: block; font-size: clamp(2rem,4vw,2.8rem); font-weight: 750; letter-spacing: -.03em; color: var(--ink); }
.section--ink .stat b { color: #fff; }
.stat small { color: var(--slate); font: 500 .8rem/1.3 var(--mono); }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85em 1em; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 500 1rem var(--sans); color: var(--ink); background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--signal); border-color: var(--signal); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #AEB4BD; padding-block: 56px 36px; }
.site-footer a { color: #D4D8DE; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h5 { color: #fff; font: 600 .8rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: .92rem; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand .tld { color: #8A919B; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: #8A919B; }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 820px){ .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; }
.post-card .kicker { color: var(--signal-ink); }
.post-card h3 { margin: .5em 0 .35em; }
.post-card .post-sub { color: var(--slate); margin-bottom: 1rem; flex: 1; }
.post-card .post-meta { font: 500 .78rem/1 var(--mono); color: var(--slate); }
.post-card .read { margin-top: 1rem; font-weight: 600; color: var(--signal-ink); }

/* article */
.article { max-width: 720px; margin-inline: auto; }
.article-head { max-width: 720px; margin: 0 auto 2.4rem; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: .4em; }
.article-head .sub { font-size: clamp(1.15rem,2vw,1.4rem); color: var(--slate); line-height: 1.4; }
.article-meta { font: 500 .82rem/1 var(--mono); color: var(--slate); margin-top: 1.1rem; display: flex; gap: .8rem; align-items: center; }
.article-body { font-size: 1.12rem; line-height: 1.72; }
.article-body p { color: var(--ink-soft); margin: 0 0 1.3em; }
.article-body h2 { font-size: clamp(1.4rem,2.6vw,1.9rem); margin: 2.2rem 0 .8rem; letter-spacing: -.015em; }
.article-body a { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 2px; }
.article-body strong { color: var(--ink); font-weight: 650; }
.article-body .table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.article-body table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.article-body th, .article-body td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body thead th { background: var(--paper-2); font: 600 .8rem/1.2 var(--mono); letter-spacing: .03em; text-transform: uppercase; color: var(--slate); }
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body td strong { color: var(--ink); }
.article-cta { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 32px; margin: 2.6rem auto 0; max-width: 720px; }
.article-cta h3 { color: #fff; }
.article-cta p { color: #C2C7CF; }
.crosslink { max-width: 720px; margin: 2rem auto 0; padding: 18px 20px; border: 1px dashed var(--line); border-radius: var(--radius-sm); font-size: .92rem; color: var(--slate); background: var(--paper-2); }
.crosslink a { font-weight: 600; }
.article-nav { max-width: 720px; margin: 2.4rem auto 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* utility */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.pill { font: 500 .82rem/1 var(--mono); padding: .55em .85em; border: 1px solid var(--line); border-radius: 999px; color: var(--slate); background: var(--white); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
