/* Calderkit — site styles. No external requests: fonts are self-hosted. */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fafaf8;
  --bg-2: #f3f3ef;
  --surface: #ffffff;
  --ink: #111413;
  --ink-2: #3d4442;
  --muted: #6a716e;
  --line: rgba(17, 20, 19, 0.09);
  --line-2: rgba(17, 20, 19, 0.16);
  --accent: #0e7c6f;
  --accent-wash: rgba(14, 124, 111, 0.09);
  --warm: #d0602e;
  --warm-wash: rgba(208, 96, 46, 0.10);
  --btn-bg: #111413;
  --btn-ink: #fafaf8;
  --shadow: 0 1px 2px rgba(17, 20, 19, 0.04), 0 8px 24px -12px rgba(17, 20, 19, 0.12);
  --shadow-lift: 0 2px 4px rgba(17, 20, 19, 0.05), 0 18px 40px -18px rgba(17, 20, 19, 0.22);
  --radius: 16px;
  --wrap: 1120px;
  --sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d0d;
    --bg-2: #101413;
    --surface: #131817;
    --ink: #eef2f0;
    --ink-2: #c2cac7;
    --muted: #8a938f;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.16);
    --accent: #4fd1bd;
    --accent-wash: rgba(79, 209, 189, 0.10);
    --warm: #f08a5b;
    --warm-wash: rgba(240, 138, 91, 0.12);
    --btn-bg: #eef2f0;
    --btn-ink: #0b0d0d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16.5px/1.65 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-wash); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-head {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
  }
}
.site-head { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.site-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.site-nav a:hover { background: var(--bg-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }

/* ---------- buttons, pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.btn:hover svg { transform: translateX(2px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-2); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--mono); letter-spacing: 0.02em; color: var(--ink-2);
  padding: 7px 12px 7px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
}
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  /* fine grid that fades out towards 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: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {
  /* two soft colour glows behind the sculpture */
  content: ""; position: absolute; z-index: -1; width: 760px; height: 720px; right: -120px; top: 20px;
  background:
    radial-gradient(closest-side, var(--warm-wash), transparent 70%) 0 160px / 420px 420px no-repeat,
    radial-gradient(closest-side, var(--accent-wash), transparent 70%) 200px 0 / 460px 460px no-repeat;
  filter: blur(8px);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 40px; padding-top: 88px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 72px); line-height: 1.02; letter-spacing: -0.045em; margin: 22px 0 22px; font-weight: 600; }
.hero h1 .soft { color: var(--muted); }
.hero p.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 32px; max-width: 54ch; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* the hanging mobile */
.mobile { width: 100%; max-width: 500px; justify-self: center; overflow: visible; }
.mobile .wire { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.mobile .thread { fill: none; stroke: var(--ink); stroke-width: 1.25; stroke-linecap: round; opacity: .55; }
.mobile .s-warm { fill: var(--warm); }
.mobile .s-accent { fill: var(--accent); }
.mobile .s-ink { fill: var(--ink); }
.mobile .s-ring { fill: none; stroke: var(--accent); stroke-width: 2; }
.mobile .arm { transform-box: view-box; }
.mobile .arm-1 { transform-origin: 250px 48px; animation: sway 9s ease-in-out infinite; }
.mobile .arm-2 { transform-origin: 400px 110px; animation: sway 6.5s ease-in-out infinite reverse; }
.mobile .arm-3 { transform-origin: 110px 130px; animation: sway 7.5s ease-in-out -2s infinite; }
@keyframes sway {
  0%, 100% { transform: rotate(-2.4deg); }
  50% { transform: rotate(2.4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile .arm { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 36px; }
.kicker { font: 500 13px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.035em; margin: 0; max-width: 18ch; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 44ch; }

/* product cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-wash); color: var(--accent);
}
.card:nth-child(even) .icon { background: var(--warm-wash); color: var(--warm); }
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 4px 0 0; font-size: 21px; letter-spacing: -0.025em; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tags span { font: 500 12px/1 var(--mono); color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); padding: 6px 9px; border-radius: 7px; }
.status {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font: 500 12px/1 var(--mono); color: var(--ink-2);
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-2);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warm); }
.status.live { color: var(--accent); border-color: transparent; background: var(--accent-wash); }
.status.live::before { background: var(--accent); }
.price { font-weight: 600; color: var(--ink); font-size: 15px; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.principle { padding: 32px 28px; }
.principle + .principle { border-left: 1px solid var(--line); }
.principle .icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 18px; background: var(--bg-2); color: var(--ink); }
.principle .icon svg { width: 20px; height: 20px; }
.principle h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.02em; }
.principle p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- document pages ---------- */
.page-head { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.page-head .wrap { padding-top: 72px; padding-bottom: 56px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.04em; margin: 16px 0 16px; }
.page-head .lede { font-size: 19px; color: var(--ink-2); margin: 0; max-width: 60ch; }
.updated { font: 500 13px/1 var(--mono); color: var(--muted); }

.doc-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; padding-top: 56px; padding-bottom: 96px; }
.doc-grid.no-toc { grid-template-columns: minmax(0, 720px); }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; }
.toc p { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line-2); display: grid; gap: 9px; }
.toc a { color: var(--ink-2); text-decoration: none; line-height: 1.35; display: block; }
.toc a:hover { color: var(--accent); }
.prose h2 { font-size: 22px; letter-spacing: -0.025em; margin: 44px 0 10px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); font-weight: 600; }
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 14px; padding: 18px 20px; margin: 0 0 8px;
}
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 3px; fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.callout p { margin: 0; color: var(--ink); }

.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 28px; border-radius: var(--radius); margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact-card .email { font: 500 clamp(18px, 2.4vw, 24px)/1.2 var(--mono); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.contact-card .email:hover { color: var(--accent); }
.contact-card small { display: block; color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.foot-grid p { color: var(--muted); margin: 14px 0 0; max-width: 34ch; }
.foot-grid h4 { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); padding-top: 22px; padding-bottom: 36px; color: var(--muted); font-size: 13.5px; }

/* logo discs (classes, not inline styles, so the CSP can stay strict) */
.d1 { fill: var(--warm); }
.d2 { fill: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; gap: 8px; }
  .mobile { order: -1; max-width: 300px; justify-self: start; margin: 0 0 8px; }
  .doc-grid { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .doc-grid { padding-top: 40px; padding-bottom: 64px; }
  .section { padding: 64px 0; }
  .cards, .principles { grid-template-columns: 1fr; }
  .principle + .principle { border-left: 0; border-top: 1px solid var(--line); }
  .card { padding: 22px; }
  .hero p.lede { font-size: 17.5px; }
  .mobile { max-width: 230px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .site-nav a { padding: 6px 10px; }
  .page-head .wrap { padding-top: 48px; padding-bottom: 40px; }
}
