/* Orthic Software: shared styles. No build step; edit directly. */

/* Fonts are self-hosted on purpose: loading them from a font CDN would send
   every visitor's IP to a third party, which contradicts the privacy pitch. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #16202b;
  --ink-2: #4a5663;
  --ink-3: #6f7a86;
  --line: #e4e0d8;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ed;
  --accent-wash: #eef6f3;
  --band: #0c4a40;
  --band-ink: #eaf5f1;
  --band-ink-2: #a9cfc5;
  --warn: #8a5100;
  --warn-soft: #fdf3e2;

  --shadow-sm: 0 1px 2px rgba(22, 32, 43, .06), 0 1px 1px rgba(22, 32, 43, .04);
  --shadow-md: 0 2px 4px rgba(22, 32, 43, .05), 0 8px 24px rgba(22, 32, 43, .08);
  --shadow-lg: 0 4px 8px rgba(22, 32, 43, .06), 0 24px 56px rgba(22, 32, 43, .14);

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;

  --radius: 12px;
  --radius-lg: 18px;
  --max: 1120px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --surface: #161d24;
    --surface-2: #1b242d;
    --ink: #e8ecf0;
    --ink-2: #b4bdc6;
    --ink-3: #8a959f;
    --line: #283340;
    --accent: #3fb6a0;
    --accent-ink: #07201b;
    --accent-soft: #143029;
    --accent-wash: #122520;
    --band: #0b3a33;
    --band-ink: #e3f3ee;
    --band-ink-2: #97c7bb;
    --warn: #f0b458;
    --warn-soft: #2b2313;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .3), 0 24px 56px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; line-height: 1; }
.brand-tag { display: block; font-size: .72rem; color: var(--ink-3); letter-spacing: .01em; margin-top: 3px; font-family: var(--font); font-weight: 500; }
@media (max-width: 520px) { .brand-tag { display: none; } }
.tm { font-size: .55em; vertical-align: super; font-weight: 500; margin-left: 1px; }
.nav { display: flex; gap: var(--s-5); font-size: .95rem; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

.site-footer { border-top: 1px solid var(--line); margin-top: var(--s-8); padding: var(--s-7) 0; color: var(--ink-3); font-size: .9rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-7); justify-content: space-between; align-items: flex-start; }
.footer-brand .brand-name { color: var(--ink); }
.footer-brand p { margin: 6px 0 0; }
.footer-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); }
.footer-legal { margin-top: var(--s-5); font-size: .82rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 10px; font-weight: 600; font-size: 1rem; font-family: var(--font);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-primary:hover { filter: brightness(1.07); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.btn-stack { display: flex; flex-direction: column; gap: var(--s-3); min-width: 230px; }
.btn-note { font-size: .86rem; color: var(--ink-3); margin-top: var(--s-3); }

/* ---------- Sections and rhythm ---------- */
.section { padding: var(--s-8) 0; }
.section-lg { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-7) 0; }
.section-flush-top { padding-top: 0; }
.alt { background: var(--surface-2); }
.eyebrow { font-size: .78rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: var(--s-3); }
.lede { font-size: clamp(1.1rem, 2vw, 1.28rem); color: var(--ink-2); max-width: 38em; line-height: 1.55; }
.muted { color: var(--ink-3); }
.small { font-size: .92rem; }
.section-head { max-width: 40em; margin-bottom: var(--s-7); }

/* Hero with a soft tonal wash */
.hero {
  position: relative;
  padding: var(--s-9) 0 var(--s-8);
  background:
    radial-gradient(60% 70% at 85% 0%, var(--accent-soft) 0%, transparent 70%),
    radial-gradient(50% 60% at 0% 100%, var(--accent-wash) 0%, transparent 70%);
  overflow: hidden;
}
.hero h1 { max-width: 13em; }
.hero .lede { margin-bottom: var(--s-6); }
.hero-sm { padding: var(--s-8) 0 var(--s-6); }

/* Before / after comparison slider */
.showcase { margin-top: var(--s-8); }
.compare {
  --pos: 50%;
  position: relative; margin: 0 auto; max-width: 960px;
  aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: #e7e4de; user-select: none; touch-action: pan-y;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6' fill='none' stroke='%230f6b5c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px no-repeat;
  box-shadow: var(--shadow-md);
}
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input[type="range"]:focus-visible ~ .compare-handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.compare-tag { position: absolute; top: var(--s-4); padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.compare-tag.before { left: var(--s-4); background: rgba(22,32,43,.78); color: #fff; }
.compare-tag.after-tag { right: var(--s-4); background: var(--accent); color: #fff; }
.compare-caption { text-align: center; font-size: .9rem; color: var(--ink-3); margin-top: var(--s-4); }

/* Brand band */
.band { background: var(--band); color: var(--band-ink); }
.band h2, .band h3 { color: #fff; }
.band .lede, .band p { color: var(--band-ink-2); }
.band .eyebrow { color: #7fd8c4; }
.band a { color: #fff; }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-7); }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; gap: var(--s-6); } }
.band-grid h3 { margin-bottom: var(--s-2); }
.band-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; margin-bottom: var(--s-4); }
.band-icon svg { width: 22px; height: 22px; }

/* Bento grid */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5); box-shadow: var(--shadow-sm); }
.tile h3 { margin-bottom: var(--s-2); }
.tile p { color: var(--ink-2); font-size: .97rem; }
.tile-hero { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tile-hero .tile-body { padding: var(--s-5) var(--s-5) var(--s-6); }
.tile-hero figure { margin: 0; background: #edeae4; border-bottom: 1px solid var(--line); }
.tile-hero img { width: 100%; }
.tile-wide { grid-column: span 2; }
.tile-accent { background: var(--accent-soft); border-color: transparent; }
.tile-kicker { font-family: var(--display); font-size: 2.2rem; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); line-height: 1; margin-bottom: var(--s-3); }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } .tile-hero { grid-row: auto; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .tile-hero, .tile-wide { grid-column: auto; } }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--s-7); } }

/* Numbered steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: var(--s-5); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: var(--s-4); align-items: start; }
.steps li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 700; display: grid; place-items: center; }

/* Check list */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); align-items: start; }
.check-list li::before { content: ""; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%230f6b5c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-7); }
@media (max-width: 700px) { .cols-2 { grid-template-columns: 1fr; } }

/* Held-label panel */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-6); box-shadow: var(--shadow-md); }
.panel-warn { border-left: 4px solid var(--warn); }

/* Maker note */
.maker { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-5); align-items: start; }
.maker-mark { width: 72px; height: 72px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow-md); }
.maker-mark img { width: 40px; height: 40px; }
.maker blockquote { margin: 0; font-size: 1.12rem; line-height: 1.65; color: var(--ink-2); }
.maker blockquote p { margin-bottom: 1em; }
.maker cite { display: block; font-style: normal; font-weight: 600; color: var(--ink); margin-top: var(--s-4); }
@media (max-width: 560px) { .maker { grid-template-columns: 1fr; } }

/* Price */
.price-box { background: var(--surface); border-radius: var(--radius-lg); padding: var(--s-7); display: grid; grid-template-columns: 1fr auto; gap: var(--s-7); align-items: center; box-shadow: var(--shadow-lg); border: 1px solid var(--line); position: relative; overflow: hidden; }
.price-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent); }
@media (max-width: 760px) { .price-box { grid-template-columns: 1fr; padding: var(--s-6); } }
.price { font-family: var(--display); font-size: 3.6rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-bottom: var(--s-4); }
.price small { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.price-copy { color: var(--ink-2); }
.req-label { font-weight: 600; margin: var(--s-5) 0 var(--s-2); }
.req { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.req li { background: var(--surface-2); border-radius: 999px; padding: 6px 14px; font-size: .92rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: var(--s-4) 0; }
.faq summary, details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: var(--s-2); }

/* Callouts */
.callout { border-radius: var(--radius); padding: var(--s-5); }
.callout-warn { background: var(--warn-soft); }
.callout-warn .callout-title { color: var(--warn); }
.callout-info { background: var(--accent-soft); }
.callout-title { font-weight: 700; margin-bottom: var(--s-2); }
.stack > * + * { margin-top: var(--s-4); }

/* Company page product card */
.product-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); color: inherit; text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card .pc-body { padding: var(--s-7) var(--s-6); }
.product-card .pc-body p { color: var(--ink-2); }
.product-card .pc-link { color: var(--accent); font-weight: 600; margin-top: var(--s-5); }
.product-card figure { margin: 0; background: #e7e4de; }
.product-card figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .product-card { grid-template-columns: 1fr; } .product-card figure { order: -1; } }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }
.principles h3 { margin-bottom: var(--s-2); }
.principles p { color: var(--ink-2); }

/* Download table */
.version { font-family: var(--display); font-weight: 700; margin-bottom: var(--s-3); }
.dl-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.dl-table th, .dl-table td { text-align: left; padding: var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.dl-table tr:last-child td { border-bottom: 0; }
.dl-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.dl-table td:last-child { text-align: right; }
.dl-table td:nth-child(2), .dl-table .btn { white-space: nowrap; }
@media (max-width: 600px) {
  .dl-table thead { display: none; }
  .dl-table tr { display: block; border-bottom: 1px solid var(--line); padding: var(--s-3) var(--s-4); }
  .dl-table tr:last-child { border-bottom: 0; }
  .dl-table td { display: block; border: 0; padding: 4px 0; text-align: left !important; }
}
.hash { overflow-wrap: anywhere; }
.hash code { display: inline-block; margin-top: 4px; }

/* Help / docs */
.doc h2 { margin-top: var(--s-8); padding-top: var(--s-2); scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc ol, .doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: .45em; }
.toc { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.toc a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink-2); text-decoration: none; background: var(--surface); box-shadow: var(--shadow-sm); }
.toc a:hover { color: var(--ink); border-color: var(--ink-3); }
