/* sanin.ai — hand-written, no build step, no webfonts.
   Static files served straight from Caddy: zero processes, zero RAM. */

:root {
  --bg: #0a0b0d;
  --bg-2: #101216;
  --bg-3: #16191f;
  --line: #23272f;
  --text: #eceef1;
  --muted: #949ba6;
  --dim: #6b727d;
  --accent: #6ee7b7;          /* single accent, used sparingly */
  --accent-dim: rgba(110, 231, 183, .12);
  --maxw: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 650; }
p { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font: 600 11.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 13, .82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
.mark { font: 650 16px/1 var(--mono); letter-spacing: -.01em; }
.mark b { color: var(--accent); font-weight: 650; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14.5px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav .btn { margin-left: 4px; }

.btn {
  display: inline-block; font: 600 14.5px/1 var(--sans);
  padding: 11px 18px; border-radius: 8px; border: 1px solid var(--line);
  color: var(--text); transition: .15s;
}
.btn:hover { border-color: #39404b; background: var(--bg-3); }
.btn-primary {
  background: var(--accent); color: #04150e; border-color: var(--accent); font-weight: 700;
}
.btn-primary:hover { background: #8af0c7; border-color: #8af0c7; color: #04150e; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; }

/* ---- hero ---- */
.hero { padding: 108px 0 84px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero:before {
  content: ""; position: absolute; inset: -40% 30% 40% -10%;
  background: radial-gradient(50% 50% at 40% 60%, rgba(110, 231, 183, .09), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; }
.hero h1 { font-size: clamp(2.15rem, 5.4vw, 3.5rem); margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 620px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- sections ---- */
.section { padding: 84px 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 660px; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); }

/* ---- cards ---- */
.grid { display: grid; gap: 18px; }
/* 420px min forces two columns at max-width, so four cards read as a 2x2 block
   rather than an unbalanced 3 + 1. */
.g2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 24px 28px; transition: .15s;
}
.card:hover { border-color: #2d323b; background: var(--bg-3); }
.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.8px; }
.card .kicker { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }

/* ---- numbered steps ---- */
.steps { counter-reset: s; display: grid; gap: 2px; }
.step {
  display: grid; grid-template-columns: 62px 1fr; gap: 22px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-n { font: 600 13px/1.6 var(--mono); color: var(--accent); letter-spacing: .08em; }
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.8px; max-width: 620px; }

/* ---- evidence list ---- */
.ev { display: grid; gap: 0; }
.ev-row {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.ev-row:last-child { border-bottom: 1px solid var(--line); }
.ev-row strong { font-weight: 600; }
.ev-row span { color: var(--dim); font: 500 12.5px/1 var(--mono); white-space: nowrap; }
.ev-row p { color: var(--muted); font-size: 14.6px; margin-top: 5px; }

/* ---- stack strip ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 12.5px/1 var(--mono); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; background: var(--bg-2);
}

/* ---- callout ---- */
.callout {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 10px; padding: 24px 26px;
}
.callout p { color: var(--muted); }
.callout strong { color: var(--text); }

/* ---- CTA band ---- */
.cta { padding: 82px 0; text-align: center; }
.cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.cta p { color: var(--muted); max-width: 520px; margin: 0 auto 30px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mono-link { font: 500 14.5px/1 var(--mono); color: var(--accent); }
.mono-link:hover { text-decoration: underline; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 52px; }
.foot .wrap { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
/* the footer text stacks in its own column so the badge can sit alone on the
   right, with nothing above or below it */
.foot-main { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; flex: 1 1 520px; }
.foot .mark { opacity: .85; }
.foot-links { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { font-size: 14px; color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot-legal { color: var(--dim); font-size: 13px; width: 100%; margin-top: 8px; }

/* ---- Toptal badge ----
   Every selector is scoped under #r on purpose: as supplied the badge used bare
   .a/.b/.c/.d/.f/.h, which would style any element on the site that ever took
   one of those class names. The upstream Typekit @import is dropped — this site
   ships no webfonts — so it inherits --sans instead of proxima-nova. */
#r { --hex: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); font-family: var(--sans); }
#r .h { display: inline-block; background: #25a9ef; padding: 6px; clip-path: var(--hex); }
#r .a {
  width: 200px; padding: 24px 0 40px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; color: #fff; text-align: center;
  background: linear-gradient(153deg, #0667ff 18%, #204ecf 40%, #0f256e 80%);
  clip-path: var(--hex); box-shadow: 0 28px 50px rgba(6, 30, 96, .35);
}
#r .b { margin: 0; font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: 0; }
#r .c { width: 120px; height: 1px; background: #25a9ef; }
#r .d { font-size: 16px; opacity: .8; margin-bottom: -6px; }
#r .f {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 20px; border-radius: 6px; background: #296bff; color: #fff;
  font-size: 16px; font-weight: 500;
  text-decoration-thickness: .5px; text-underline-offset: 2px;
}
.foot-badge { flex: 0 0 auto; }
@media (max-width: 720px) { .foot-badge { margin-top: 18px; } }

/* ---- case study page ---- */
.case-head { padding: 84px 0 56px; border-bottom: 1px solid var(--line); }
.case-head h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin-bottom: 18px; max-width: 720px; }
.case-head .hero-sub { margin-bottom: 0; }
.meta { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 34px; }
.meta div { min-width: 120px; }
.meta dt { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 7px; }
.meta dd { margin: 0; font-size: 14.8px; }
.prose { max-width: 680px; }
.prose h2 { font-size: 1.35rem; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul { color: var(--muted); padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.back { font: 500 13.5px/1 var(--mono); color: var(--muted); display: inline-block; margin-bottom: 26px; }
.back:hover { color: var(--accent); }

@media (max-width: 700px) {
  .nav a:not(.btn) { display: none; }
  .hero { padding: 72px 0 60px; }
  .section { padding: 60px 0; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .ev-row { grid-template-columns: 1fr; }
}

/* ---- selected work cards ---- */
.work-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.work {
  display: block; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; transition: .16s;
}
.work:hover { border-color: #2d323b; transform: translateY(-2px); }
.work-shot {
  /* height:auto is load-bearing — the HTML height="650" attribute is a
     presentational hint that otherwise wins over aspect-ratio, giving a
     portrait box that crops the screenshot sideways. */
  display: block; width: 100%; height: auto; aspect-ratio: 1040 / 650; object-fit: cover;
  border-bottom: 1px solid var(--line); background: #05070a;
}
.work-body { padding: 22px 24px 26px; }
.work-body .kicker {
  font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 12px; display: block;
}
.work-body h3 { font-size: 1.16rem; margin-bottom: 9px; }
.work-body p { color: var(--muted); font-size: 14.8px; margin-bottom: 16px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.work-tags span {
  font: 500 11.5px/1 var(--mono); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px;
}
.work-more { font: 600 13.5px/1 var(--mono); color: var(--accent); margin-top: 16px; display: inline-block; }
.work:hover .work-more { text-decoration: underline; }

/* full-width shot on a case-study page */
.shot {
  width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px;
  display: block; margin: 8px 0 6px; background: #05070a;
}
.shot-cap { color: var(--dim); font-size: 13px; margin-bottom: 30px; }

@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* ---- featured work (our own product) ---- */
.work-feature {
  display: grid; grid-template-columns: 1.1fr 1fr; margin-bottom: 20px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: .16s;
}
.work-feature:hover { border-color: #2d323b; }
.work-feature .shot-side {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-right: 1px solid var(--line); background: #fff; min-height: 260px;
}
.work-feature .work-body { padding: 34px 36px; align-self: center; }
.work-feature h3 { font-size: 1.42rem; margin-bottom: 12px; }
.work-feature p { font-size: 15.4px; }
.badge {
  display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-dim);
  border: 1px solid rgba(110, 231, 183, .3); border-radius: 999px;
  padding: 6px 11px; margin-bottom: 15px;
}

@media (max-width: 820px) {
  .work-feature { grid-template-columns: 1fr; }
  .work-feature .shot-side { border-right: 0; border-bottom: 1px solid var(--line); aspect-ratio: 16/10; height: auto; }
  .work-feature .work-body { padding: 26px 24px 30px; }
}
