/* ─── krasinski.ai — global + section styles ──────────────────────────────── */

:root {
  --bg:        #0a0a0b;
  --bg-deep:   #070708;
  --panel:     #101012;
  --ink:       #f4f2ee;
  --ink-mute:  rgba(244, 242, 238, .58);
  --ink-dim:   rgba(244, 242, 238, .38);
  --line:      rgba(255, 255, 255, .08);
  --line-2:    rgba(255, 255, 255, .14);
  --accent:    #FF5A1F;      /* set at runtime via --accent on :root */
  --accent-2:  #FF3D7F;
  --grid-dot:  rgba(255, 255, 255, .07);
  --mono:      'JetBrains Mono', 'Berkeley Mono', ui-monospace, monospace;
  --sans:      'Inter Tight', Inter, ui-sans-serif, system-ui, sans-serif;
  --display:   'Inter Tight', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Dotted canvas background — n8n vibe */
.canvas-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle, var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse at center top, #000 35%, rgba(0,0,0,.6) 70%, transparent 100%);
}
.canvas-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 20% 10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(500px 360px at 85% 5%,  color-mix(in oklab, var(--accent-2) 14%, transparent), transparent 60%);
  opacity: .55;
}

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(10,10,11,.82), rgba(10,10,11,.4));
  border-bottom: 1px solid var(--line);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 55%, transparent);
  color: var(--accent);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  box-shadow: 0 0 22px -6px color-mix(in oklab, var(--accent) 70%, transparent);
}
.logo-text { color: var(--ink); }
.logo-text .dot { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; }
.nav-link {
  color: var(--ink-mute); text-decoration: none; padding: 6px 12px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line-2);
  border-radius: 999px; color: var(--ink-mute); font-size: 11.5px;
}
.nav-status i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3ddc84; box-shadow: 0 0 8px #3ddc84;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ─── Hero ─── */
.hero {
  position: relative; z-index: 2;
  padding: 60px 40px 40px;
  max-width: 1480px;
  margin: 0 auto;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-left { max-width: 680px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px; margin-bottom: 20px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute);
  background: rgba(255,255,255,.02);
}
.hero-badge i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}

.h1 {
  font-family: var(--display);
  font-size: clamp(42px, 5.8vw, 82px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.h1 .strike { position: relative; display: inline-block; }
.h1 .strike::after {
  content: ''; position: absolute; left: -4%; right: -4%; top: 52%;
  height: 6px; background: var(--accent); transform: rotate(-2deg);
  border-radius: 2px;
}
.h1 .accent { color: var(--accent); }
.h1 em {
  font-style: normal;
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-sub {
  font-size: 18px; line-height: 1.55; color: var(--ink-mute);
  max-width: 580px; margin: 0 0 28px;
  text-wrap: pretty;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-right {
  font-family: var(--mono); color: var(--ink-dim); font-size: 12px;
  text-align: right; line-height: 1.8; padding-bottom: 6px;
}
.hero-right .k { color: var(--ink-mute); }
.hero-right .v { color: var(--ink); }

/* The workflow canvas */
.hero-workflow {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(255,255,255,.015), transparent);
  background-color: rgba(8,8,10,.72);
  padding: 32px 18px 14px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 40px 80px -40px rgba(0,0,0,.7);
}
.hero-workflow-svg { aspect-ratio: 1280 / 500; max-height: 560px; }
.hero-workflow::before {
  content: 'agentic workflow / live';
  position: absolute; top: 12px; left: 16px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--ink-dim); text-transform: uppercase; z-index: 2;
}
.hero-workflow::after {
  content: '';
  position: absolute; top: 14px; right: 18px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: pulse 1.6s infinite;
}

/* Terminal strip — sits below the SVG inside the hero-workflow frame */
.hero-terminal {
  margin-top: 14px;
  background: rgba(0,0,0,.75);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.8);
  font-family: var(--mono);
  overflow: hidden;
}
.hero-terminal-hd {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-size: 10.5px;
}
.hero-terminal-hd .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hero-terminal-hd .d1 { background: #ff5f56; }
.hero-terminal-hd .d2 { background: #ffbd2e; }
.hero-terminal-hd .d3 { background: #27c93f; }
.hero-terminal-title { color: var(--ink-mute); margin-left: 8px; flex: 1; }
.hero-terminal-status { display: inline-flex; align-items: center; gap: 4px; color: #3ddc84; font-size: 10px; }
.hero-terminal-status i { width: 5px; height: 5px; border-radius: 50%; background: #3ddc84; }
.hero-terminal-body { padding: 10px 14px; height: 112px; overflow: hidden; display: flex; flex-direction: column; gap: 3px; font-size: 11px; line-height: 1.55; }
.hero-terminal-line { display: flex; gap: 8px; animation: slideIn .25s ease-out; white-space: nowrap; }
@keyframes slideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tt-ts    { color: var(--ink-dim); }
.tt-agent { color: var(--accent); }
.tt-text  { color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; }
.blink    { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Metric bar under hero */
.hero-metrics {
  margin-top: 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255,255,255,.015);
  overflow: hidden;
}
.hero-metric { padding: 18px 22px; border-right: 1px solid var(--line); }
.hero-metric:last-child { border-right: 0; }
.hero-metric .v { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.hero-metric .v em { font-style: normal; color: var(--accent); }
.hero-metric .l { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: #0a0a0b;
  border-color: color-mix(in oklab, var(--accent) 90%, #fff 10%);
  box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--accent) 80%, transparent);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-arrow { transition: transform .15s; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.btn-ghost {
  background: rgba(255,255,255,.03); color: var(--ink);
  border-color: var(--line-2);
  font-family: var(--mono); font-size: 13px;
  padding: 14px 18px;
}
.btn-ghost:hover { background: rgba(255,255,255,.06); border-color: var(--line-2); }
.btn-mono { font-family: var(--mono); }
.btn-copy-hint { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; }

/* ─── Section scaffold ─── */
.section {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto;
  padding: 90px 40px;
}
.section-hd { max-width: 760px; margin-bottom: 56px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 18px;
}
.kicker-mark {
  display: inline-block; padding: 2px 6px;
  border: 1px solid var(--line-2); border-radius: 4px;
  color: var(--accent);
}
.h2 {
  font-family: var(--display);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 600; letter-spacing: -.03em; line-height: 1.02;
  margin: 0 0 18px;
  text-wrap: balance;
}
.lead {
  font-size: 17px; line-height: 1.55; color: var(--ink-mute);
  margin: 0; max-width: 620px; text-wrap: pretty;
}

/* ─── How it works ─── */
.steps-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.step-card {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: rgba(255,255,255,.015);
  overflow: hidden;
  min-height: 240px;
  transition: border-color .2s, transform .2s;
}
.step-card:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line-2)); }
.step-art {
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 14px 14px;
  padding: 18px;
  display: grid; place-items: center;
}
.step-body { padding: 22px 24px; }
.step-n {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: .2em; margin-bottom: 10px;
}
.step-title { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 10px; }
.step-text { font-size: 13.5px; line-height: 1.6; color: var(--ink-mute); margin: 0 0 14px; text-wrap: pretty; }
.step-bul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); }
.step-bul-mark { margin-right: 8px; }
.step-connector {
  display: none; /* decorative only — re-enabled in breakpoint if needed */
}

/* ─── Case study ─── */
.case-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  border: 1px solid var(--line-2); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  overflow: hidden;
}
.case-left, .case-right { padding: 32px; }
.case-left { border-right: 1px solid var(--line); }
.case-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.case-name { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -.015em; }
.case-tag { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }
.case-blurb { font-size: 15px; line-height: 1.6; color: var(--ink-mute); margin: 0 0 24px; text-wrap: pretty; }
.case-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.case-meta > div { display: flex; flex-direction: column; gap: 2px; }
.case-meta-k { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); letter-spacing: .1em; text-transform: uppercase; }
.case-meta-v { font-family: var(--mono); font-size: 13px; color: var(--ink); }

.case-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.stat { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-child(n+3) { border-bottom: 0; }
.stat-v { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
.stat-l { font-family: var(--mono); font-size: 10.5px; color: var(--ink-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: .08em; }

.case-quote {
  position: relative;
  padding: 22px 22px 22px 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
}
.case-quote-mark {
  position: absolute; left: 16px; top: 6px;
  font-family: var(--display); font-size: 54px; font-weight: 600; line-height: 1;
}
.case-quote p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.case-quote-by { display: block; margin-top: 4px; }
.case-quote-by { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); }

/* ─── Integrations marquee ─── */
.integrations {
  position: relative; z-index: 2;
  max-width: 1480px; margin: 0 auto;
  padding: 60px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 20px 20px;
}
.integrations-label { text-align: center; font-family: var(--mono); font-size: 12px; color: var(--ink-mute); margin-bottom: 24px; padding: 0 40px; }
.marquee { overflow: hidden; mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent); }
.marquee-track { display: inline-flex; gap: 10px; white-space: nowrap; animation: marquee 42s linear infinite; padding: 0 5px; }
@keyframes marquee { to { transform: translateX(-50%); } }
.int-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--line-2); border-radius: 8px;
  background: rgba(10,10,11,.6);
  font-family: var(--mono); font-size: 13px; color: var(--ink);
  flex-shrink: 0;
}
.int-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }

/* ─── CTA ─── */
.cta {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto;
  padding: 90px 40px 120px;
}
.cta-frame {
  position: relative;
  border: 1px solid var(--line-2); border-radius: 18px;
  padding: 64px 56px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,90,31,.08), rgba(255,61,127,.04) 60%, transparent);
}
.cta-grid {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(8, 1fr);
  pointer-events: none; opacity: .4;
}
.cta-grid span {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-content { position: relative; z-index: 1; max-width: 720px; }
.cta-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.cta-footnote {
  margin-top: 20px;
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim);
}

/* ─── Footer ─── */
.footer {
  position: relative; z-index: 2;
  max-width: 1480px; margin: 0 auto;
  padding: 40px 40px 60px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim);
}
.footer a { color: var(--ink-mute); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ─── Mobile ─── */
@media (max-width: 880px) {
  .nav { padding: 14px 20px; }
  .nav-right .nav-link { display: none; }
  .hero { padding: 40px 20px 30px; }
  .hero-top { flex-direction: column; align-items: flex-start; }
  .hero-right { text-align: left; }
  .hero-workflow { padding: 36px 10px 10px; }
  .hero-workflow-svg { aspect-ratio: auto; min-height: 420px; }
  .hero-terminal { margin-top: 14px; }
  .hero-metrics { grid-template-columns: 1fr 1fr; }
  .hero-metric { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .hero-metric:nth-child(2n) { border-right: 0; }
  .hero-metric:nth-last-child(-n+2) { border-bottom: 0; }
  .section { padding: 60px 20px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { grid-template-columns: 1fr; }
  .step-art { border-right: 0; border-bottom: 1px solid var(--line); min-height: 140px; }
  .case-wrap { grid-template-columns: 1fr; }
  .case-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .cta { padding: 60px 20px 80px; }
  .cta-frame { padding: 36px 24px; }
}
