/* ============================================================
   dogukan — ink minimal
   near-black canvas · white type · one amber accent · no gradients
   ============================================================ */

:root {
  --bg:      #0a0a0b;
  --bg-2:    #101012;
  --panel:   #141417;
  --fg:      #f7f7f8;
  --dim:     #8a8a93;
  --faint:   #5a5a62;
  --line:    #232328;
  --accent:  #e8a93c;          /* used sparingly: live nodes, cursor, key marks */
  --accent-soft: rgba(232,169,60,.14);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --disp: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #000; }

a { color: inherit; text-decoration: none; }

/* film grain + vignette — texture without gradients/blobs */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  box-shadow: inset 0 0 240px 40px rgba(0,0,0,.6);
}

main, .nav, .foot { position: relative; z-index: 1; }

/* ───────────────────────── nav ───────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 26px 28px;
}
.wordmark {
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  letter-spacing: .02em;
}
.wordmark::before { content: "◢ "; color: var(--accent); }
.nav-links { display: flex; gap: 28px; font-family: var(--mono); font-size: 13px; }
.nav-links a { color: var(--dim); transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--fg); }
.nav-links .ext span { color: var(--accent); }

/* ───────────────────────── hero ───────────────────────── */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(48px, 9vw, 120px) 28px clamp(60px, 8vw, 110px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(40px, 6.4vw, 82px); line-height: .98;
  letter-spacing: -0.035em; margin-bottom: 28px;
}
.hero h1 .hl { font-style: italic; font-weight: 500; }
.hero h1 .talk {
  position: relative; white-space: nowrap;
}
.hero h1 .talk::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .08em; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left; animation: underline 1s var(--ease) .5s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.lede {
  font-size: clamp(16px, 1.6vw, 19px); color: var(--dim);
  max-width: 30em; margin-bottom: 36px; letter-spacing: -0.01em;
}

/* copyable command */
.cmd {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 13px 14px 13px 16px; border-radius: 8px; max-width: 100%;
}
.cmd .prompt { color: var(--accent); }
.cmd .cmd-text { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd .copy {
  margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  color: var(--dim); background: transparent; border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 5px; cursor: pointer; transition: all .18s var(--ease);
}
.cmd .copy:hover { color: var(--fg); border-color: var(--faint); }
.cmd .copy.done { color: var(--accent); border-color: var(--accent); }

.cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 13px; letter-spacing: .01em;
  padding: 12px 20px; border-radius: 8px;
  background: var(--fg); color: #000; border: 1px solid var(--fg);
  transition: transform .15s var(--ease), opacity .15s var(--ease);
}
.btn:hover { transform: translateY(-1px); opacity: .9; }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--faint); }

/* ───────── git graph (the signature visual) ───────── */
.graph-wrap { display: flex; flex-direction: column; gap: 14px; }
.git-graph { width: 100%; height: auto; overflow: visible; }
.git-graph .trunk { stroke: var(--line); stroke-width: 2; }
.git-graph .branch {
  fill: none; stroke: var(--faint); stroke-width: 2;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: draw 4.5s var(--ease) infinite;
}
.git-graph .b1 { animation-delay: .2s; }
.git-graph .b2 { animation-delay: .7s; }
.git-graph .b3 { animation-delay: 1.4s; }
@keyframes draw {
  0%   { stroke-dashoffset: 600; opacity: .25; }
  18%  { opacity: 1; }
  55%  { stroke-dashoffset: 0;   opacity: 1; }
  92%  { stroke-dashoffset: 0;   opacity: 1; }
  100% { stroke-dashoffset: 0;   opacity: .35; }
}
.git-graph .node { fill: var(--bg); stroke: var(--faint); stroke-width: 2; }
.git-graph .node.head { fill: var(--accent); stroke: var(--accent); }
.git-graph .trunk-node { fill: var(--dim); stroke: var(--dim); }
.git-graph .node:not(.head):not(.trunk-node) {
  opacity: 0; animation: pop 4.5s var(--ease) infinite;
}
.git-graph .n1  { animation-delay: .4s; }
.git-graph .a2a { animation-delay: .9s; }
.git-graph .a1a { animation-delay: 1.1s; }
.git-graph .a3a { animation-delay: 1.6s; }
.git-graph .a2b { animation-delay: 1.9s; }
.git-graph .m2  { animation-delay: 2.3s; stroke: var(--accent); }
.git-graph .a1b { animation-delay: 2.5s; }
.git-graph .m1  { animation-delay: 3.0s; stroke: var(--accent); }
@keyframes pop {
  0%, 8%  { opacity: 0; transform: scale(.2); }
  16%     { opacity: 1; transform: scale(1.25); }
  24%, 90%{ opacity: 1; transform: scale(1); }
  100%    { opacity: .4; transform: scale(1); }
}
.git-graph .lane {
  fill: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .02em;
}
.git-graph .main-lane { fill: var(--dim); }
.graph-wrap figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--faint); text-align: center;
}

/* ───────────────────────── statement ───────────────────────── */
.statement {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(70px, 12vw, 160px) 28px;
  border-top: 1px solid var(--line);
}
.statement p {
  font-family: var(--disp); font-weight: 400;
  font-size: clamp(28px, 4.6vw, 56px); line-height: 1.1; letter-spacing: -0.03em;
  max-width: 16em; color: var(--dim);
}
.statement em { color: var(--fg); font-style: normal; font-weight: 500; }

/* ───────────────────────── section heads ───────────────────────── */
.section-head { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; margin-bottom: 48px; }
.section-head .num {
  font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .1em;
}
.section-head h2 {
  font-family: var(--disp); font-weight: 600; font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.03em; margin: 10px 0 12px; line-height: 1.02;
}
.section-head p { color: var(--dim); max-width: 36em; font-size: 16px; }

/* ───────────────────────── how / flow ───────────────────────── */
.how { padding: clamp(40px, 7vw, 90px) 0; border-top: 1px solid var(--line); }
.flow {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px; list-style: none;
  position: relative;
}
.flow::before {
  content: ""; position: absolute; left: 64px; top: 40px; bottom: 40px; width: 2px;
  background: var(--line);
}
.step {
  display: grid; grid-template-columns: 110px 1fr; gap: 28px; align-items: start;
  padding: 22px 0; position: relative;
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.step.in { opacity: 1; transform: none; }
.step-mark { display: flex; align-items: center; }
.step-mark span {
  font-family: var(--mono); font-size: 12px; color: var(--fg);
  background: var(--bg-2); border: 1px solid var(--line);
  width: 72px; text-align: center;            /* fixed width → all node centers align on the line */
  padding: 5px 0; border-radius: 999px; position: relative; z-index: 1;
}
.step:nth-child(odd) .step-mark span { border-color: var(--faint); }
.step-body h3 { font-family: var(--disp); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 6px; }
.step-body p { color: var(--dim); max-width: 44em; }

/* ───────────────────────── swarm terminal ───────────────────────── */
.swarm { padding: clamp(40px, 7vw, 90px) 0; border-top: 1px solid var(--line); }
.terminal {
  max-width: var(--maxw); margin: 0 auto; width: calc(100% - 56px);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0,0,0,.9);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel);
}
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #2a2a30; }
.term-title {
  margin-left: 12px; font-family: var(--mono); font-size: 12px; color: var(--faint);
}
.term-body { display: grid; grid-template-columns: 200px 1fr; min-height: 320px; }
.sidebar { border-right: 1px solid var(--line); padding: 16px 0; font-family: var(--mono); font-size: 13px; }
.agent { padding: 8px 16px; color: var(--dim); white-space: pre; }
.agent .st { display: inline-block; width: 1.4em; }
.agent.done .st { color: var(--faint); }
.agent.live { color: var(--fg); }
.agent.live .st { color: var(--accent); animation: blink 1.2s steps(2) infinite; }
.agent.pend { color: var(--faint); }
@keyframes blink { 50% { opacity: .3; } }

.convo { padding: 18px 20px; display: flex; flex-direction: column; }
.stream {
  font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--dim);
  white-space: pre-wrap; flex: 1; min-height: 210px;
}
.stream .ok { color: var(--fg); }
.stream .acc { color: var(--accent); }
.convo-input {
  display: flex; align-items: center; gap: 8px; padding-top: 14px;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px;
}
.convo-input .prompt { color: var(--accent); }
.caret { width: 8px; height: 16px; background: var(--fg); display: inline-block; animation: blink 1s steps(2) infinite; }

/* ───────────────────────── principles ───────────────────────── */
.principles { padding: clamp(40px, 7vw, 90px) 0; border-top: 1px solid var(--line); }
.specs {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
}
.specs > div {
  padding: 26px 0; border-top: 1px solid var(--line);
}
.specs > div:nth-child(odd) { padding-right: 48px; border-right: 1px solid var(--line); padding-left: 0; }
.specs > div:nth-child(even) { padding-left: 48px; }
.specs dt { font-family: var(--disp); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 6px; }
.specs dt::before { content: "→ "; color: var(--accent); }
.specs dd { color: var(--dim); font-size: 15px; }
.specs code { font-family: var(--mono); font-size: 13px; color: var(--fg); background: var(--bg-2); padding: 1px 6px; border-radius: 4px; }

/* ───────────────────────── install ───────────────────────── */
.install { padding: clamp(50px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.install-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.cmd.big { font-size: 16px; padding: 18px 18px 18px 20px; width: 100%; }
.cmd.big .cmd-text { white-space: nowrap; }
.install-note { max-width: 720px; margin: 22px auto 0; padding: 0 28px; color: var(--faint); font-size: 14px; }
.install-note code { font-family: var(--mono); color: var(--dim); }

/* ───────────────────────── footer ───────────────────────── */
.foot {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 28px 64px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--faint);
}
.foot .ext { color: var(--dim); }
.foot .ext:hover { color: var(--fg); }

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .graph-wrap { order: 2; }
  .term-body { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .specs { grid-template-columns: 1fr; }
  .specs > div:nth-child(odd) { padding-right: 0; border-right: none; }
  .specs > div:nth-child(even) { padding-left: 0; }
  /* pills are fixed-width and same left padding, so the line center (64px) holds */
  .step { grid-template-columns: 88px 1fr; gap: 18px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.ext) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
  .step { opacity: 1; transform: none; }
  .git-graph .branch { stroke-dashoffset: 0; }
  .git-graph .node { opacity: 1 !important; }
  .hero h1 .talk::after { transform: scaleX(1); }
}
