/* Peitho website. No external fonts, no trackers. */
:root {
  --paper: #fbf7f1;
  --sand: #f3eadc;
  --sand-2: #eadcc6;
  --ink: #1d1612;
  --ink-2: #4a3f37;
  --muted: #7a6a5d;
  --clay: #c2410c;
  --clay-2: #9a330a;
  --ochre: #e8a33d;
  --night: #15100d;
  --night-2: #221a15;
  --line: rgba(29, 22, 18, 0.12);
  --agent: #8b5cf6;
  --ok: #15803d;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Noto Serif", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 22, 18, 0.06), 0 12px 40px -12px rgba(29, 22, 18, 0.25);
  --wrap: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-2); }
code, pre, kbd { font-family: var(--mono); font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Greek key (meander) band, drawn in CSS */
.meander {
  height: 14px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 13h6V3h12v8h-6V7h-2v6h18' fill='none' stroke='%23c2410c' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 28px 14px;
  opacity: 0.55;
}
.meander.light {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 13h6V3h12v8h-6V7h-2v6h18' fill='none' stroke='%23e8a33d' stroke-width='2'/%3E%3C/svg%3E");
  opacity: 0.35;
}

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(251, 247, 241, 0.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 22px var(--serif); letter-spacing: 0.01em; }
.brand img { width: 30px; height: 30px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.nav ul a:hover { color: var(--clay); }
.nav .gh { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav .gh:hover { background: var(--clay); color: #fff; }
.nav .gh svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .nav ul { display: none; } .nav .gh { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 650; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--clay); color: #fff; box-shadow: 0 8px 24px -10px rgba(194, 65, 12, 0.7); }
.btn.primary:hover { background: var(--clay-2); color: #fff; }
.btn.ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.light { border-color: rgba(251, 247, 241, 0.5); color: var(--paper); }
.btn.light:hover { background: var(--paper); color: var(--ink); }
.btn svg { width: 18px; height: 18px; }

/* Section headings: the five parts of a classical speech */
section { padding: 110px 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 13px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay); margin-bottom: 18px; }
.eyebrow .num { font-family: var(--serif); letter-spacing: 0.05em; font-size: 15px; color: var(--ochre); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(34px, 4.6vw, 56px); max-width: 22ch; }
h2 em, h1 em { font-style: italic; color: var(--clay); }
.lead { font-size: 20px; color: var(--ink-2); max-width: 62ch; margin: 22px 0 0; }
.dark { background: var(--night); color: #efe6da; }
.dark .lead { color: #c9bcad; }
.dark h2 em { color: var(--ochre); }
.dark .eyebrow { color: var(--ochre); }

/* Hero */
.hero { padding: 80px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr); gap: 56px; align-items: center;  }
.hero h1 { font-size: clamp(38px, 4.4vw, 62px); line-height: 1.04; }
.hero h1 .line { display: block; }
.hero .lead { font-size: 21px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .install { margin-top: 26px; display: inline-flex; align-items: center; gap: 12px; background: var(--night); color: #efe6da; border-radius: 10px; padding: 11px 14px 11px 16px; font: 14px var(--mono); max-width: 100%; overflow-x: auto; }
.hero .install .p { color: var(--ochre); }
.copy { background: rgba(255,255,255,.08); color: #efe6da; border: 0; border-radius: 6px; padding: 5px 10px; font: 600 12px var(--sans); cursor: pointer; }
.copy:hover { background: rgba(255,255,255,.18); }
.hero .meta { margin-top: 18px; color: var(--muted); font-size: 14px; }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .hero .install { font-size: 12px; } .hero .install > span { word-break: break-all; } section { padding: 72px 0; } .loop .view .term pre { font-size: 12px; } }

/* Browser frame around screenshots */
.frame { border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.frame .bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #f1ebe2; border-bottom: 1px solid var(--line); }
.frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2d6c4; }
.frame .bar .url { margin-left: 10px; flex: 1; background: #fff; border-radius: 6px; padding: 3px 10px; font: 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame img { width: 100%; height: auto; }

.stage { position: relative; }
.stage .frame { transform: perspective(1600px) rotateY(-7deg) rotateX(2deg); transform-origin: left center; }
.bubble { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 14px; max-width: 270px; border: 1px solid var(--line); opacity: 0; transform: translateY(12px) scale(.98); animation: pop .6s cubic-bezier(.2,.8,.2,1) forwards; }
.bubble b { display: block; font-size: 13px; margin-bottom: 2px; }
.bubble.agent b { color: var(--agent); }
.bubble .tag { font: 600 11px var(--sans); background: #ede9fe; color: var(--agent); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.bubble.b1 { left: -28px; bottom: 64px; animation-delay: .7s; }
.bubble.b2 { right: -18px; bottom: -18px; animation-delay: 1.8s; }
.bubble.b3 { right: 24px; top: -26px; animation-delay: 2.8s; background: var(--night); color: #efe6da; border-color: transparent; }
.bubble.b3 b { color: var(--ochre); }
@keyframes pop { to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .bubble { display: none; } }

/* Problem */
.pains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 54px; }
.pain { background: var(--night-2); border: 1px solid rgba(255,255,255,.07); border-radius: var(--radius); padding: 24px; }
.pain .n { font: 600 42px/1 var(--serif); color: var(--ochre); }
.pain h3 { font-size: 21px; margin: 14px 0 8px; color: #fbf3e8; }
.pain p { margin: 0; color: #b9ab9b; font-size: 15.5px; }
@media (max-width: 980px) { .pains { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pains { grid-template-columns: 1fr; } }
.answer { margin-top: 56px; font: italic 500 clamp(24px, 2.8vw, 34px)/1.3 var(--serif); color: #fbf3e8; max-width: 34ch; }
.answer b { color: var(--ochre); font-weight: 600; }

/* The loop (interactive) */
.loop { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 40px; margin-top: 56px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { margin: 0 0 6px; }
.steps button { width: 100%; text-align: left; background: transparent; border: 0; border-radius: 12px; padding: 14px 16px 14px 58px; position: relative; cursor: pointer; color: var(--ink-2); font: inherit; }
.steps button::before { counter-increment: s; content: counter(s, upper-roman); position: absolute; left: 14px; top: 13px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 13px var(--serif); border: 1.5px solid var(--sand-2); color: var(--muted); background: var(--paper); }
.steps b { display: block; font: 600 19px var(--serif); color: var(--ink); }
.steps span { display: block; font-size: 14.5px; margin-top: 3px; }
.steps button[aria-selected="true"] { background: #fff; box-shadow: var(--shadow); }
.steps button[aria-selected="true"]::before { background: var(--clay); border-color: var(--clay); color: #fff; }
.steps .progress { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; background: var(--sand); border-radius: 2px; overflow: hidden; opacity: 0; }
.steps button[aria-selected="true"] .progress { opacity: 1; }
.steps .progress i { display: block; height: 100%; width: 0; background: var(--ochre); }
.loop .view { position: relative; min-height: 520px; }
.panel { display: none; animation: fade .45s ease; }
.panel.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.caption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.caption code { font-size: 13px; background: var(--sand); padding: 1px 6px; border-radius: 5px; color: var(--ink-2); }
@media (max-width: 980px) { .loop { grid-template-columns: minmax(0, 1fr); } .loop .view { min-height: 0; } }

/* Terminal */
.term { background: var(--night); color: #e9ddcd; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; font: 14px/1.65 var(--mono); font-variant-ligatures: none; }
.term .bar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; background: #201813; }
.term .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a2e26; }
.term .bar span { margin-left: 8px; color: #8f7f70; font-size: 12px; }
.term pre { margin: 0; padding: 18px 20px 22px; white-space: pre-wrap; word-break: break-word; min-height: 300px; }
.term .p { color: var(--ochre); }
.term .u { color: #fff; font-weight: 600; }
.term .d { color: #8f7f70; }
.term .g { color: #86efac; }
.term .a { color: #c4b5fd; }
.term .t { color: #fdba74; }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--ochre); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Chat (webhook) */
.chat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.chat .head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.chat .head small { font-weight: 400; color: var(--muted); }
.msgs { padding: 8px 0; }
.msg { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 10px 18px; opacity: 0; transform: translateY(6px); }
.panel.on .msg { animation: pop .5s ease forwards; }
.panel.on .msg:nth-child(2) { animation-delay: .5s; }
.panel.on .msg:nth-child(3) { animation-delay: 1s; }
.panel.on .msg:nth-child(4) { animation-delay: 1.5s; }
.panel.on .msg:nth-child(5) { animation-delay: 2s; }
.msg .av { width: 40px; height: 40px; border-radius: 9px; }
.msg .who { font-weight: 700; font-size: 15px; }
.msg .who small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 12px; }
.msg .app { font: 700 10px var(--sans); background: var(--sand); color: var(--muted); border-radius: 4px; padding: 1px 5px; margin-left: 6px; letter-spacing: .04em; }
.msg .txt { font-size: 15px; color: var(--ink-2); }
.msg .txt a { font-weight: 600; }
.msg blockquote { margin: 6px 0 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--sand-2); color: var(--muted); }

/* Before / after */
.compare { position: relative; margin-top: 54px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); user-select: none; touch-action: none; aspect-ratio: 9 / 5; background: #000; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--x, 12%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--x, 12%); width: 3px; background: var(--ochre); transform: translateX(-1.5px); }
.compare .handle button { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ochre); border: 3px solid #fff; cursor: ew-resize; color: var(--ink); font: 700 16px var(--sans); box-shadow: var(--shadow); }
.compare .lab { position: absolute; top: 16px; padding: 5px 11px; border-radius: 999px; font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.compare .lab.l { left: 16px; background: rgba(0,0,0,.6); color: #fff; }
.compare .lab.r { right: 16px; background: var(--ochre); color: var(--ink); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 54px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ic { width: 42px; height: 42px; border-radius: 11px; background: var(--sand); display: grid; place-items: center; color: var(--clay); margin-bottom: 16px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 22px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.feature code { font-size: 13px; background: var(--sand); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 980px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* Themes */
.themes { margin-top: 50px; display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.tabs { display: flex; flex-direction: column; gap: 10px; }
.tabs button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 18px; cursor: pointer; font: inherit; color: var(--ink-2); }
.tabs button b { display: block; font: 600 20px var(--serif); color: var(--ink); }
.tabs button[aria-selected="true"] { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(194,65,12,.12); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shots img { border-radius: 10px; box-shadow: var(--shadow); aspect-ratio: 16 / 10; object-fit: cover; }
.mdcode { margin-top: 14px; background: var(--night); color: #e9ddcd; border-radius: 10px; padding: 12px 16px; font: 13.5px/1.6 var(--mono); }
.mdcode .k { color: var(--ochre); }
@media (max-width: 980px) { .themes { grid-template-columns: minmax(0, 1fr); } .tabs { flex-direction: row; flex-wrap: wrap; } }

/* Use cases */
.cases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 50px; }
.case { border-top: 3px solid var(--clay); padding-top: 18px; }
.case h3 { font-size: 21px; margin-bottom: 8px; }
.case p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 980px) { .cases { grid-template-columns: 1fr 1fr; } }

/* Video */
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); margin-top: 48px; background: #000; border: 1px solid rgba(255,255,255,.08); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Quick start */
.qs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 50px; }
.qs .s { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.qs .s h3 { font-size: 20px; margin-bottom: 6px; }
.qs .s p { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }
.qs pre { margin: auto 0 0; background: var(--night); color: #e9ddcd; border-radius: 10px; padding: 14px 16px; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.qs pre .c { color: #8f7f70; }
@media (max-width: 980px) { .qs { grid-template-columns: 1fr; } }

/* Refutatio */
.not { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; margin-top: 44px; }
.not div { border-left: 3px solid var(--sand-2); padding-left: 18px; }
.not h3 { font-size: 20px; margin-bottom: 4px; }
.not p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 760px) { .not { grid-template-columns: 1fr; } }

/* Closing */
.closing { text-align: center; padding: 120px 0; }
.closing h2 { margin: 0 auto; max-width: 20ch; }
.closing .cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

footer { background: var(--night); color: #a8998a; padding: 44px 0; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; }
footer a { color: #efe6da; }
footer .brand { color: #efe6da; font-size: 19px; }
footer nav { display: flex; gap: 20px; margin-left: auto; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
