/* Textikraft websites: shared design. System fonts, no external requests. Brand colours sampled from the logo. */
:root {
  --navy: #0c2454; --blue: #246c9c; --blue-2: #3c9ccc; --orange: #e48424;
  --bg: #ffffff; --bg-soft: #f4f7fb; --text: #14213d; --muted: #5b6b86; --line: #dfe6f0; --card: #ffffff; --code-bg: #0f1b33; --code-text: #e6edf7;
  --shadow: 0 10px 30px rgba(12, 36, 84, .08); --radius: 14px; --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0b1426; --bg-soft: #101c33; --text: #e8eefb; --muted: #9fb0cc; --line: #22304d; --card: #12203a; --code-bg: #07101f; --shadow: 0 10px 30px rgba(0, 0, 0, .35); --navy: #cfe0ff; }
}
:root[data-theme="dark"] { --bg: #0b1426; --bg-soft: #101c33; --text: #e8eefb; --muted: #9fb0cc; --line: #22304d; --card: #12203a; --code-bg: #07101f; --shadow: 0 10px 30px rgba(0, 0, 0, .35); --navy: #cfe0ff; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
:root[data-theme="dark"] a, :root:not([data-theme="light"]) a { }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); } h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 0; } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; } .muted { color: var(--muted); } .small { font-size: .875rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
figure.video { max-width: 960px; margin: 28px auto 0; } figure.video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #12263a; border-radius: 14px; box-shadow: 0 18px 50px rgba(18, 38, 58, .28); }
figure.video figcaption { margin-top: 12px; color: var(--muted); font-size: .95rem; text-align: center; }
section { padding: 72px 0; } section.soft { background: var(--bg-soft); }
.eyebrow { color: var(--blue); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; margin-bottom: 10px; }

/* header */
header.site { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--navy); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; } .brand img { width: 34px; height: 34px; }
.brand small { font-weight: 600; font-size: .7rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px; }
nav.main { display: flex; align-items: center; gap: 4px; }
nav.main a { color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; } nav.main a:hover { background: var(--bg-soft); text-decoration: none; }
nav.main a.active { color: var(--blue); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--text); font-size: 1.1rem; cursor: pointer; }
.theme-btn { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--text); cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  nav.main { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px; }
  nav.main.open { display: flex; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 10px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-size: 1rem; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(36, 108, 156, .3); } .btn.primary:hover { background: #1d5a83; }
.btn.accent { background: var(--orange); color: #fff; box-shadow: 0 6px 16px rgba(228, 132, 36, .3); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); } .btn.ghost:hover { background: var(--bg-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* hero */
.hero { padding: 84px 0 64px; background: radial-gradient(900px 420px at 85% -10%, rgba(60, 156, 204, .22), transparent), radial-gradient(700px 360px at -5% 20%, rgba(228, 132, 36, .14), transparent); }
.hero .grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--blue), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 900px) { .hero .grid { grid-template-columns: 1fr; } }
.pill { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 12px; font-size: .82rem; margin: 0 6px 6px 0; }

/* cards & grids */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; } .card p:last-child { margin-bottom: 0; }
.icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; font-size: 1.2rem; margin-bottom: 14px; }
.icon.o { background: linear-gradient(135deg, var(--orange), #f2a65a); }
.steps { counter-reset: s; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: 52px; } .step::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--bg); display: grid; place-items: center; font-weight: 700; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; } @media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.cta-band { background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; border-radius: 22px; padding: 48px; text-align: center; } .cta-band h2 { color: #fff; } .cta-band .muted { color: #cfe0ff; }

/* tables / pricing */
table { border-collapse: collapse; width: 100%; font-size: .95rem; } th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; } th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.price { font-size: 2.6rem; font-weight: 800; color: var(--navy); } .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
ul.tick { list-style: none; padding: 0; } ul.tick li { padding-left: 28px; position: relative; margin: 8px 0; } ul.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.note { background: color-mix(in srgb, var(--orange) 12%, var(--bg)); border: 1px solid color-mix(in srgb, var(--orange) 40%, var(--line)); border-radius: 10px; padding: 12px 16px; font-size: .92rem; }
.note.info { background: color-mix(in srgb, var(--blue-2) 12%, var(--bg)); border-color: color-mix(in srgb, var(--blue-2) 40%, var(--line)); }

/* code */
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
pre { background: var(--code-bg); color: var(--code-text); border-radius: 12px; padding: 16px 18px; overflow: auto; font-size: .86rem; line-height: 1.55; margin: 0 0 1.2em; position: relative; border: 1px solid #1b2a4a; }
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.copy { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .1); color: #cfe0ff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; font-size: .75rem; padding: 3px 8px; cursor: pointer; } .copy:hover { background: rgba(255, 255, 255, .2); }
.tabs { margin: 0 0 1.2em; } .tabbar { display: flex; gap: 4px; margin-bottom: -1px; position: relative; z-index: 1; }
.tabbar button { background: var(--bg-soft); border: 1px solid var(--line); border-bottom: 0; padding: 7px 14px; border-radius: 8px 8px 0 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; font-weight: 600; }
.tabbar button[aria-selected="true"] { background: var(--code-bg); color: #fff; border-color: #1b2a4a; }
.tabs pre { border-top-left-radius: 0; margin-bottom: 0; } .tabs [role="tabpanel"][hidden] { display: none; }
.method { display: inline-block; min-width: 56px; text-align: center; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: .78rem; color: #fff; margin-right: 8px; }
.method.GET { background: #2e8b57; } .method.POST { background: var(--blue); } .method.DELETE { background: #c0392b; } .method.PUT, .method.PATCH { background: var(--orange); }

/* docs layout */
.docs { display: grid; grid-template-columns: 260px minmax(0, 1fr) 200px; gap: 40px; padding: 40px 0 80px; }
.docs aside.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: .93rem; }
.docs aside.side h4 { text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: var(--muted); margin: 18px 0 6px; }
.docs aside.side a { display: block; color: var(--text); padding: 5px 10px; border-radius: 8px; } .docs aside.side a:hover { background: var(--bg-soft); text-decoration: none; } .docs aside.side a.active { background: color-mix(in srgb, var(--blue) 14%, var(--bg)); color: var(--blue); font-weight: 600; }
.docs article h1 { font-size: 2.2rem; } .docs article h2 { margin-top: 2em; padding-top: .5em; border-top: 1px solid var(--line); font-size: 1.5rem; } .docs article h3 { margin-top: 1.6em; }
.docs aside.toc { position: sticky; top: 84px; align-self: start; font-size: .85rem; } .docs aside.toc a { display: block; color: var(--muted); padding: 3px 0; } .docs aside.toc a:hover { color: var(--blue); }
@media (max-width: 1100px) { .docs { grid-template-columns: 240px minmax(0, 1fr); } .docs aside.toc { display: none; } }
@media (max-width: 800px) { .docs { grid-template-columns: 1fr; } .docs aside.side { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 12px; } }
.ep { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 18px 0; background: var(--card); } .ep h3 { margin: 0 0 6px; font-size: 1.05rem; } .ep .path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; word-break: break-all; }

footer.site { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg-soft); font-size: .92rem; }
footer.site .cols { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr 1fr; } @media (max-width: 800px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
footer.site h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); } footer.site a { display: block; color: var(--text); padding: 3px 0; }

.cur-bar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.cur-select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .9rem; }
.cur-note { margin: 0 0 16px; text-align: right; } .money { white-space: nowrap; }

/* ---------- polish: rhythm, hierarchy and small screens (appended; later rules win) ---------- */
:root { --max: 1160px; --radius: 16px; --shadow-lg: 0 24px 60px rgba(12, 36, 84, .14); }
body { text-rendering: optimizeLegibility; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue-2) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
img, video, svg { max-width: 100%; height: auto; }
.wrap { padding: 0 clamp(16px, 4vw, 32px); }
section { padding: clamp(48px, 8vw, 92px) 0; }
h1 { font-weight: 800; letter-spacing: -.025em; } h2 { font-weight: 750; letter-spacing: -.02em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; } .eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); border-radius: 2px; }

/* header */
header.site { transition: box-shadow .2s ease; } header.site.scrolled { box-shadow: 0 6px 24px rgba(12, 36, 84, .08); }
nav.main a.btn { color: #fff; } nav.main a.btn:hover { background: #1d5a83; }
@media (max-width: 1040px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 40px; }
  nav.main { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(12, 36, 84, .12); flex-direction: column; align-items: stretch; gap: 2px; padding: 12px clamp(16px, 4vw, 32px) 18px; max-height: calc(100vh - 64px); overflow-y: auto; }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 12px; font-size: 1rem; } nav.main a.btn { justify-content: center; margin: 8px 0 0 !important; padding: 12px 16px !important; }
  nav.main .theme-btn { align-self: flex-start; margin-top: 8px; }
}
@media (min-width: 1041px) and (max-width: 1200px) { nav.main a { padding: 8px 9px; font-size: .9rem; } }

/* hero */
.hero { padding: clamp(44px, 8vw, 96px) 0 clamp(36px, 6vw, 72px); }
.hero .grid > * { min-width: 0; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); }
.hero .grid > .card, .hero .card { box-shadow: var(--shadow-lg); }
.hero pre { font-size: clamp(.72rem, 1.8vw, .86rem); overflow-x: auto; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; } .badges span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 600; color: var(--muted); }

/* proof strip */
.proof { padding: 0; margin-top: -8px; }
.proof .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.proof .item { padding: 22px 24px; border-right: 1px solid var(--line); } .proof .item:last-child { border-right: 0; }
.proof b { display: block; font-size: 1.55rem; line-height: 1.1; color: var(--navy); letter-spacing: -.02em; } .proof span { color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .proof .wrap { grid-template-columns: repeat(2, 1fr); } .proof .item:nth-child(2) { border-right: 0; } .proof .item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 480px) { .proof .wrap { grid-template-columns: 1fr; } .proof .item { border-right: 0; border-bottom: 1px solid var(--line); } .proof .item:last-child { border-bottom: 0; } }

/* cards */
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.card, .cards .card:hover { } .cards .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--blue-2) 45%, var(--line)); }
.cards.tight { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.chip-card { display: block; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; } .chip-card:hover { text-decoration: none; border-color: var(--blue-2); box-shadow: var(--shadow); }
.chip-card b { display: block; color: var(--navy); margin-bottom: 4px; } .chip-card span { color: var(--muted); font-size: .9rem; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 66px 22px 22px; } .step::before { top: 20px; left: 22px; }

/* buttons and bands */
.btn { padding: 12px 22px; } .btn.primary { background: linear-gradient(135deg, var(--blue), #1d5a83); }
.cta-band { padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px); box-shadow: var(--shadow-lg); }
.cta-band .actions { margin-top: 22px; }
@media (max-width: 560px) { .actions { flex-direction: column; align-items: stretch; } .actions .btn { justify-content: center; } .cta-band .actions { align-items: stretch; } }

/* tables: scroll instead of squashing */
@media (max-width: 720px) { table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; } }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; } .legal h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal table { white-space: normal; } .legal blockquote { margin: 0 0 1.4em; padding: 14px 18px; border-left: 4px solid var(--orange); background: color-mix(in srgb, var(--orange) 10%, var(--bg)); border-radius: 0 10px 10px 0; }
.legal ul, .legal ol { padding-left: 1.3em; } .legal li { margin: .35em 0; }

/* footer */
footer.site { padding: clamp(32px, 6vw, 56px) 0 28px; }
footer.site .fine { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
footer.site .fine a { display: inline; padding: 0; color: var(--muted); } footer.site .fine a:hover { color: var(--blue); }
@media (max-width: 520px) { footer.site .cols { grid-template-columns: 1fr; } }

.split > *, .cards > *, .hero .grid > * { min-width: 0; }
.card pre { max-width: 100%; overflow-x: auto; }

/* docs on small screens: the single column may shrink below its content, wide code and tables scroll inside it */
@media (max-width: 800px) { .docs { grid-template-columns: minmax(0, 1fr); } }
.docs article, .docs aside { min-width: 0; }
.docs article pre, .ep pre { max-width: 100%; overflow-x: auto; }
.ep .path, .docs article p, .docs article li, .docs article td { overflow-wrap: anywhere; }

/* ---------- sliders ---------- */
.hero-video video { box-shadow: var(--shadow-lg); }
.slider { position: relative; }
.slider-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px 2px 10px; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { outline-offset: 4px; }
.slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; min-width: 0; }
.tour .slide { display: block; }
.tour .slide img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--card); }
.tour .slide figcaption { margin-top: 14px; color: var(--muted); max-width: 52em; } .tour .slide figcaption b { color: var(--navy); margin-right: 6px; }
.cards-slider .slide { flex: 0 0 min(320px, 82%); } .cards-slider .chip-card { padding: 22px; } .cards-slider .chip-card b { font-size: 1.05rem; } .cards-slider .chip-card span { display: block; margin-top: 4px; }
.slider-ui { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.slider-ui button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--navy); font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow); }
.slider-ui button:hover { border-color: var(--blue-2); background: var(--bg-soft); } .slider-ui button[disabled] { opacity: .4; cursor: default; }
.dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; background: var(--line); border: 0; box-shadow: none; } .dots button[aria-selected="true"] { background: var(--blue); width: 26px; border-radius: 6px; }
@media (max-width: 560px) { .slider-ui button { width: 38px; height: 38px; } }

footer.site .cols { grid-template-columns: 2fr repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 800px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { footer.site .cols { grid-template-columns: 1fr; } }
