/*
 * SWE Foundry landing page.
 * Palette follows docs/branding.md: charcoal body, ivory emblem, amber accent (#E99A32).
 * The 45-degree chamfer used on buttons and markers echoes the cuts of the F emblem.
 */

:root {
  --bg: #15181e;
  --bg-2: #1b1f26;
  --surface: #21262e;
  --surface-2: #292f38;
  --line: rgba(251, 243, 228, 0.09);
  --line-strong: rgba(251, 243, 228, 0.16);
  --ivory: #fbf3e4;
  --text: #e7e1d5;
  --muted: #a8a196;
  --amber: #e99a32;
  --amber-hi: #f2b45c;
  --amber-soft: rgba(233, 154, 50, 0.12);
  --paper: #f7f1e6;
  --paper-2: #efe6d6;
  --ink: #1f242c;
  --ink-muted: #5d584f;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --chamfer: 10px;
  --container: 1180px;
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--amber-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: var(--font-mono); font-size: 0.88em; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ivory); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--amber); color: var(--ink); font-weight: 600; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font: 600 16px/1 var(--font-body);
  border: 0; cursor: pointer; text-decoration: none !important;
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:focus-visible { clip-path: none; border-radius: 6px; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; --chamfer: 7px; }
.btn-primary { background: var(--amber); color: #1a1408; }
.btn-primary:hover { background: var(--amber-hi); }
.btn-ghost { background: rgba(251, 243, 228, 0.07); color: var(--ivory); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgba(251, 243, 228, 0.12); }
.btn-dark { background: var(--ink); color: var(--ivory); }
.btn-dark:hover { background: #2c323c; }
.btn-meta { font-family: var(--font-mono); font-weight: 500; font-size: 13px; opacity: .7; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(21, 24, 30, 0.6);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header.is-scrolled { background: rgba(21, 24, 30, 0.88); border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ivory); font: 700 18px/1 var(--font-display); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--ivory); text-decoration: none; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ivory); border-radius: 2px; transition: transform .25s ease, opacity .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px; background: var(--bg-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li a:not(.btn) { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links li:last-child { padding-top: 16px; }
  .nav-links .btn { width: 100%; min-height: 46px; }
}

/* ---------- Hero ---------- */

.hero { position: relative; padding: 88px 0 56px; overflow: hidden; isolation: isolate; }
.hero::before {
  /* Faint construction grid, faded toward the edges. */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
  opacity: .55;
}
.hero-glow {
  position: absolute; z-index: -1; width: 720px; height: 720px; right: -160px; top: -220px;
  background: radial-gradient(circle, rgba(233, 154, 50, 0.22), transparent 62%);
  filter: blur(10px); pointer-events: none;
}

.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }

.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 22px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-hi); font: 500 13px/1.5 var(--font-mono); box-shadow: inset 0 0 0 1px rgba(233, 154, 50, .3); }

.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
.accent { color: var(--amber); }
.lead { margin-top: 24px; font-size: clamp(17px, 1.6vw, 19px); color: var(--text); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-facts { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.hero-facts strong { display: block; color: var(--ivory); font: 600 26px/1.2 var(--font-display); letter-spacing: -0.02em; }

/* Session mock */
.session {
  margin: 0; border-radius: var(--radius); background: linear-gradient(180deg, #232830, #1c2027);
  box-shadow: 0 0 0 1px var(--line-strong), 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 120px -40px rgba(233, 154, 50, .25);
  overflow: hidden; min-width: 0;
}
.session-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .15); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #3a404a; }
.session-title { margin-left: 10px; color: var(--muted); font: 400 12.5px/1 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-body { display: flex; flex-direction: column; gap: 14px; padding: 22px; min-height: 420px; }

.msg { padding: 14px 16px; border-radius: 12px; font-size: 15px; line-height: 1.55; }
.msg .who { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font: 600 12px/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.msg .who img { border-radius: 4px; }
.msg code { color: var(--amber-hi); }
.msg-user { align-self: flex-end; max-width: 88%; background: var(--surface-2); color: var(--ivory); border-bottom-right-radius: 4px; }
.msg-agent { max-width: 94%; background: rgba(251, 243, 228, .035); box-shadow: inset 0 0 0 1px var(--line); border-bottom-left-radius: 4px; }
.msg-next { background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber); border-radius: 4px 12px 12px 4px; }
.msg-next .who { color: var(--amber-hi); }
.msg-next em { color: var(--ivory); font-style: normal; }

.files { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: rgba(0, 0, 0, .22); font-size: 13px; }
.file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file code { color: var(--text); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick { color: var(--amber); font-weight: 700; }
.tag { margin-left: auto; flex-shrink: 0; padding: 1px 8px; border-radius: 999px; background: rgba(251, 243, 228, .06); color: var(--muted); font: 500 11px/1.6 var(--font-mono); }

/* Steps reveal one by one when JS runs; without JS everything is visible. */
.js .session [data-step] { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.js .session [data-step].is-shown { opacity: 1; transform: none; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.works-with { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; margin-top: 72px; padding-top: 30px; border-top: 1px solid var(--line); color: var(--muted); font: 500 14px/1 var(--font-mono); }
.works-with li { display: inline-flex; align-items: center; gap: 10px; }
.works-with li::before { content: ""; width: 7px; height: 7px; background: var(--amber); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); opacity: .8; }

/* ---------- Sections ---------- */

.section { padding: 120px 0; }
@media (max-width: 700px) { .section { padding: 84px 0; } }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 760px; margin-bottom: 60px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--amber); font: 600 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 18px; }
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.08; font-weight: 700; }
.section-lead { margin-top: 22px; font-size: 18px; color: var(--muted); max-width: 40em; }

/* Before / after */
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 72px; }
@media (max-width: 760px) { .contrast { grid-template-columns: 1fr; } }
.contrast-col { padding: 32px; border-radius: var(--radius); }
.contrast-col h3 { font-size: 20px; margin-bottom: 20px; }
.contrast-col li { position: relative; padding: 11px 0 11px 32px; border-top: 1px solid var(--line); }
.contrast-col li::before { position: absolute; left: 0; top: 11px; font: 600 15px/1.6 var(--font-mono); }
.contrast-before { background: rgba(251, 243, 228, .025); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.contrast-before h3 { color: var(--muted); }
.contrast-before li::before { content: "×"; color: #7d776d; }
.contrast-after { background: linear-gradient(160deg, rgba(233, 154, 50, .14), rgba(233, 154, 50, .03) 60%); box-shadow: inset 0 0 0 1px rgba(233, 154, 50, .28); }
.contrast-after li::before { content: "→"; color: var(--amber); }
.contrast-after em { font-style: normal; color: var(--ivory); font-weight: 600; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 34px 30px 36px; background: var(--bg); transition: background-color .3s ease; }
.feature:hover { background: #191c23; }
.feature h3 { font-size: 20px; margin: 22px 0 10px; }
.feature p { color: var(--muted); font-size: 15.5px; }
.feature-icon {
  display: grid; place-items: center; width: 46px; height: 46px; background: var(--amber-soft); color: var(--amber);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Lifecycle ---------- */

.lifecycle { border-radius: var(--radius); background: var(--bg); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.phase-track { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.phase-track::-webkit-scrollbar { display: none; }
.phase {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 22px 22px 20px; min-width: 128px; border: 0; background: transparent; color: var(--muted);
  font: inherit; text-align: left; cursor: pointer; transition: color .2s ease, background-color .2s ease;
}
.phase + .phase { border-left: 1px solid var(--line); }
.phase::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.phase:hover { color: var(--ivory); background: rgba(251, 243, 228, .02); }
.phase[aria-selected="true"] { color: var(--ivory); background: rgba(233, 154, 50, .06); }
.phase[aria-selected="true"]::after { transform: scaleX(1); }
.phase:focus-visible { outline-offset: -3px; }
.phase-num { font: 500 12px/1 var(--font-mono); color: var(--amber); opacity: .85; }
.phase-name { font: 600 18px/1.2 var(--font-display); letter-spacing: -0.01em; }
@media (max-width: 860px) { .phase-track { grid-template-columns: repeat(6, minmax(128px, 1fr)); } }

.phase-panel { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding: 44px; }
.phase-panel:not([hidden]) { animation: rise .4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .phase-panel:not([hidden]) { animation: none; } }
@media (max-width: 860px) { .phase-panel { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px; } }
.skill-name { font: 500 13px/1 var(--font-mono); color: var(--amber); margin-bottom: 14px; }
.phase-panel h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; margin-bottom: 14px; }
.phase-panel p:not(.skill-name) { color: var(--muted); }
.outputs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.outputs li { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--text); background: rgba(251, 243, 228, .05); box-shadow: inset 0 0 0 1px var(--line); }

.prompt {
  margin: 0; padding: 26px 28px; border-radius: 12px; background: var(--surface);
  color: var(--ivory); font: 500 17px/1.55 var(--font-body); box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
}
.prompt span { display: block; margin-bottom: 10px; font: 600 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }

.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
@media (max-width: 860px) { .entries { grid-template-columns: 1fr; } }
.entry { padding: 28px; border-radius: var(--radius); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .25s ease, transform .25s ease; }
.entry:hover { box-shadow: inset 0 0 0 1px rgba(233, 154, 50, .35); transform: translateY(-2px); }
.entry-tag { font: 600 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.entry h3 { font-size: 20px; margin-bottom: 10px; }
.entry p:last-child { color: var(--muted); font-size: 15px; font-style: italic; }

/* ---------- How it works ---------- */

.layers { display: grid; grid-template-columns: 1fr 40px 1fr 40px 1fr; align-items: stretch; }
@media (max-width: 900px) { .layers { grid-template-columns: 1fr; } }
.layer { position: relative; padding: 32px 28px; border-radius: var(--radius); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.layer h3 { font-size: 21px; margin: 18px 0 10px; }
.layer p { color: var(--muted); font-size: 15.5px; }
.layer code { color: var(--amber-hi); }
.layer-repo { background: linear-gradient(160deg, rgba(233, 154, 50, .16), rgba(233, 154, 50, .03) 70%); box-shadow: inset 0 0 0 1px rgba(233, 154, 50, .3); }
.layer-num {
  display: grid; place-items: center; width: 36px; height: 36px; background: var(--amber); color: #1a1408; font: 700 16px/1 var(--font-display);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.layer-arrow { position: relative; }
.layer-arrow::before { content: ""; position: absolute; top: 50%; left: 8px; right: 8px; height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--amber)); }
.layer-arrow::after { content: ""; position: absolute; top: calc(50% - 5px); right: 6px; width: 10px; height: 10px; border-top: 2px solid var(--amber); border-right: 2px solid var(--amber); transform: rotate(45deg); }
@media (max-width: 900px) {
  .layer-arrow { height: 36px; }
  .layer-arrow::before { top: 6px; bottom: 6px; left: 50%; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--line-strong), var(--amber)); }
  .layer-arrow::after { top: auto; bottom: 6px; right: auto; left: calc(50% - 5px); transform: rotate(135deg); }
}

.skills { margin-top: 80px; }
.skills-title { font-size: 22px; margin-bottom: 24px; }
.skills-note { max-width: 760px; margin: -12px 0 24px; color: var(--muted); font-size: 15.5px; }
.feature h3 code { font-size: .92em; color: var(--amber-hi); }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .skill-grid { grid-template-columns: repeat(2, 1fr); } }
.skill-grid.agent-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .skill-grid, .skill-grid.agent-grid { grid-template-columns: 1fr; } }
.skill-grid li { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 10px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s ease; }
.skill-grid li:hover { box-shadow: inset 0 0 0 1px rgba(233, 154, 50, .35); }
.skill-grid code { color: var(--amber-hi); font-size: 14px; font-weight: 500; }
.skill-grid span { color: var(--muted); font-size: 14.5px; }

.control { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; margin-top: 80px; padding: 48px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 860px) { .control { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; } }
.control h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 12px; }
.control-copy p:last-child { color: var(--muted); }
.control-list { display: grid; gap: 10px; position: relative; z-index: 1; }
.control-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: 10px; background: rgba(0, 0, 0, .18); font-size: 15.5px; }
.control-list li::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; background: var(--amber); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 70%); }

/* ---------- Install (paper) ---------- */

.section-paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.section-paper h2, .section-paper h3 { color: var(--ink); }
.section-paper .kicker { color: #b56d10; }
.section-paper .section-lead { color: var(--ink-muted); }
.section-paper code { color: #8a4f06; }
.section-paper a:not(.btn) { color: #a35f0b; }

.steps { display: grid; gap: 16px; counter-reset: step; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 24px; padding: 32px; border-radius: var(--radius); background: #fffaf2; box-shadow: 0 1px 0 rgba(31, 36, 44, .05), inset 0 0 0 1px rgba(31, 36, 44, .09); }
@media (max-width: 640px) { .step { grid-template-columns: 1fr; gap: 16px; padding: 24px 20px; } }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; background: var(--ink); color: var(--amber); font: 700 18px/1 var(--font-display);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.step h3 { font-size: 21px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.step p { color: var(--ink-muted); max-width: 46em; }
.step p + .btn, .step p + .code, .step p + p { margin-top: 16px; }
.step-wide { min-width: 0; }
.optional { padding: 2px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-muted); font: 500 12px/1.6 var(--font-mono); letter-spacing: 0; }
.hint { font-size: 15px; }

.tabs { margin-top: 16px; }
.tab-list { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--paper-2); }
.tab-list button { padding: 9px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-muted); font: 600 14px/1 var(--font-body); cursor: pointer; transition: background-color .2s, color .2s; }
.tab-list button:hover { color: var(--ink); }
.tab-list button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(31, 36, 44, .12); }
.tab-panel { padding-top: 18px; }
.tab-panel .code + .code { margin-top: 10px; }

.code { position: relative; display: flex; align-items: center; gap: 12px; border-radius: 10px; background: var(--ink); color: var(--ivory); }
.code pre { flex: 1; min-width: 0; margin: 0; padding: 15px 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.section-paper .code code { color: var(--ivory); font-size: 14px; }
.copy { flex-shrink: 0; margin-right: 8px; padding: 7px 12px; border: 0; border-radius: 6px; background: rgba(251, 243, 228, .08); color: var(--ivory); font: 600 12.5px/1 var(--font-body); cursor: pointer; transition: background-color .2s; }
.copy:hover { background: rgba(251, 243, 228, .16); }
.copy.is-copied { background: var(--amber); color: #1a1408; }

/* ---------- Final CTA ---------- */

.cta { position: relative; padding: 130px 0; text-align: center; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 900px; height: 600px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(233, 154, 50, .18), transparent 62%); }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.cta-logo { border-radius: 20px; box-shadow: 0 20px 50px -18px rgba(233, 154, 50, .45); margin-bottom: 32px; }
.cta h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; max-width: 14em; }
.cta p { margin-top: 18px; color: var(--muted); font-size: 18px; }
.cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.footer-inner .brand { font-size: 16px; }
.footer-inner .brand img { border-radius: 6px; }
.footer-inner p { flex: 1; min-width: 220px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ivory); }
.syscake-credit { display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--muted); }
.syscake-credit:hover { color: var(--ivory); }
.syscake-credit img { width: 108px; height: auto; }
.footer-inner .copyright { flex: 0 0 100%; margin: 4px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- Scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .session [data-step] { opacity: 1; transform: none; transition: none; }
  .typing i { animation: none; }
}
