/* TSD Labs site. No framework, no JavaScript. Tokens first, then layout, then sections. */

@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --ink: #0e1116;
  --ink-2: #3b414a;
  --muted: #4a515b;
  --subtle: #6a717b;
  --rule: #e2e2dc;
  --rule-strong: #d9d9d2;
  --accent: #e2ec5a;
  --accent-dot: #c8d62a;
  --teal: #0b6b74;
  --teal-hover: #08484e;
  --dark: #0e1116;
  --dark-2: #161b22;
  --dark-rule: #262c35;
  --dark-text: #e7eaee;
  --dark-muted: #a8b0ba;
  --dark-subtle: #8b939d;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --wrap: 1240px;
  --gutter: 32px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: 72px; }
.band { background: var(--surface); border-block: 1px solid var(--rule); }
.dark { background: var(--dark); color: var(--dark-text); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; }

.eyebrow { font: 12px/1.4 var(--mono); color: var(--subtle); text-transform: uppercase; margin-bottom: 20px; }
.dark .eyebrow { color: var(--accent); }
.h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1.02; letter-spacing: -0.035em; }
.lead { font-size: 18px; color: var(--ink-2); }
.dark .lead { color: var(--dark-muted); }
.split { display: flex; flex-wrap: wrap; gap: 24px 64px; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; }
.split > p { max-width: 44ch; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: 500 17px/1 var(--sans); text-decoration: none; border: 1px solid transparent; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #262c35; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--ink); font-weight: 600; }
.btn-accent:hover { background: #d4df3c; color: var(--ink); }
.btn-ghost-dark { color: #fff; border-color: #3a414b; }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.link-arrow:hover { color: var(--teal); border-color: var(--teal); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--dark); border-bottom: 1px solid #1d232b; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.nav-logo img { height: 26px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a:not(.btn) { color: #c4ccd3; text-decoration: none; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-menu { display: none; }
.nav-menu summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px; border: 1px solid #3a414b; border-radius: 999px; font-weight: 500; font-size: 14px; color: #fff; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] .nav-panel { display: flex; }
.nav-panel { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 4px; padding: 12px var(--gutter) 20px;
  background: var(--dark); border-bottom: 1px solid #1d232b; }
.nav-panel a { min-height: 44px; display: flex; align-items: center; color: var(--dark-text); text-decoration: none; font-weight: 500; }
.nav-panel .btn { margin-top: 8px; }
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
}

/* Hero */
.hero { position: relative; padding-block: 56px 52px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 6px 14px; border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; background: rgba(255,255,255,0.06); font: 13px/1.4 var(--mono); color: #c9d3da; }
/* "TSD LABS" wordmark (brand/tsd-labs-wordmark.png, built from the logo by brand/make_wordmark.py) */
.brandmark { margin-bottom: 32px; width: 100%; display: flex; justify-content: center; }
.brandmark img { width: min(100%, 820px); height: auto; }
.dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 999px; background: var(--accent-dot); }
.hero h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1; letter-spacing: -0.04em; max-width: 18ch; }
.hero .sub { margin-top: 20px; max-width: 60ch; font-size: 18px; color: #b9c4cc; }
.hero .btns { justify-content: center; margin-top: 28px; }
.hero .aside { margin-top: 20px; font-size: 14px; color: var(--subtle); }

/* Highlights strip */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.highlights li { padding: 28px 24px; border-right: 1px solid var(--rule); }
.highlights li:first-child { padding-left: 0; }
.highlights li:last-child { border-right: 0; }
.highlights .k { font: 12px/1.4 var(--mono); color: var(--subtle); margin-bottom: 6px; }
.highlights .v { font-weight: 500; }
@media (max-width: 1040px) {
  .highlights li { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0; }
  .highlights li:last-child { border-bottom: 0; }
}

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--ink); }
.service { padding: 28px 32px 28px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; }
.service .n { font: 12px/1.4 var(--mono); color: var(--subtle); margin-bottom: 4px; }
.service h3 { font-size: 22px; letter-spacing: -0.01em; }
.service p { color: var(--muted); }
.service .link-arrow { align-self: flex-start; margin-top: auto; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tier { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; }
.tier .n { font: 12px/1.4 var(--mono); color: var(--subtle); }
.tier h3 { font-size: 26px; letter-spacing: -0.015em; }
.tier .for { color: var(--muted); }
.tier .hours { font: 13px/1.5 var(--mono); color: var(--ink-2); padding-block: 12px; border-block: 1px solid var(--rule); }
.tier ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tier li { position: relative; padding-left: 20px; color: var(--ink-2); }
.tier li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 999px; background: var(--accent-dot); }
.tier li.plus { padding-left: 0; font-weight: 500; color: var(--ink); }
.tier li.plus::before { content: none; }
.eyebrow.more { margin: 64px 0 20px; }
.more-link { margin-top: 24px; }
.services.four { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.services.four .service { padding-right: 28px; }
.feature { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: flex-end; justify-content: space-between;
  padding: 32px 28px; border-radius: var(--radius); background: var(--dark); color: var(--dark-text); text-decoration: none; }
.feature > div { flex: 1 1 520px; display: flex; flex-direction: column; gap: 10px; }
.feature .n { font: 12px/1.4 var(--mono); color: var(--accent); }
.feature h3 { font-size: 26px; letter-spacing: -0.015em; max-width: 30ch; }
.feature p { color: var(--dark-muted); max-width: 60ch; }
.feature .link-arrow { color: #fff; border-color: #fff; }
.feature:hover { color: var(--dark-text); }
.feature:hover .link-arrow { color: var(--accent); border-color: var(--accent); }

/* Intelligence + product preview */
.two-col { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.two-col > * { flex: 1 1 420px; min-width: 0; }
.prose { display: flex; flex-direction: column; gap: 20px; font-size: 18px; color: var(--ink-2); }
.prose h3 { margin: 0 0 -12px; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.prose h3:not(:first-child) { margin-top: 12px; }
.prose .callout { display: flex; gap: 14px; align-items: flex-start; margin-top: 8px; padding: 20px 22px;
  background: #eef5f5; border: 1px solid #b9d9dc; border-radius: 12px; color: var(--ink); }
.callout b { font-weight: 600; }
.callout-icon { flex: none; width: 22px; height: 22px; margin-top: 3px; fill: none; stroke: var(--teal); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.preview { margin: 40px 0 0; background: var(--dark); color: var(--dark-text); border-radius: var(--radius); padding: 28px; }
.preview-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.preview-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.preview-side { flex: 0 1 320px; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }
.preview .meta { display: flex; justify-content: space-between; gap: 12px; font: 12px/1.4 var(--mono); color: var(--dark-subtle); }
.msg { background: var(--dark-2); border: 1px solid var(--dark-rule); border-radius: 10px; padding: 20px; font-size: 15px; }
.msg-ai { border-color: #2e5a5f; }
.msg .who { font-size: 13px; color: var(--dark-subtle); margin-bottom: 6px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.msg-ai .who span:first-child { color: #5fd0da; }
.msg .who .mono { font: 12px/1.4 var(--mono); }
.checks { border: 1px solid var(--dark-rule); border-radius: 10px; padding: 16px; font: 13px/1.4 var(--mono); display: flex; flex-direction: column; gap: 10px; }
.checks div { display: flex; justify-content: space-between; gap: 12px; }
.checks dt { color: var(--dark-subtle); }
.checks dd { margin: 0; }
.checks .hl { color: var(--accent); }
.fake-btn { min-height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.fake-btn.primary { background: var(--accent); color: var(--ink); }
.fake-btn.secondary { border: 1px solid #3a414b; font-weight: 500; }
.preview .caption { font-size: 12px; color: var(--dark-subtle); }

/* Handwritten callouts around the ticket illustration: notes in the margins with hand-drawn arrows on wide
   screens; below 1040px they become a short list above the card and the arrows hide. */
.annotated { position: relative; margin-top: 40px; padding: 104px 0 112px; }
.annotated .preview { margin: 0; }
.note { position: absolute; margin: 0; max-width: 300px; font: 600 25px/1.05 "Caveat", "Segoe Print", cursive; color: var(--teal); }
.note .arrow { position: absolute; width: 54px; height: 66px; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.note .arrow-up { transform: scaleY(-1); }
.note-1 { top: 14px; left: 3%; max-width: 440px; transform: rotate(-2deg); }
.note-1 .arrow { top: calc(100% - 4px); left: 56%; }
.note-3 { top: 0; right: 3%; transform: rotate(1.5deg); }
.note-3 .arrow { top: calc(100% - 2px); left: 18%; }
.note-2 { bottom: 4px; left: 9%; transform: rotate(1.5deg); }
.note-2 .arrow { bottom: calc(100% - 6px); left: 22%; }
.note-4 { bottom: 14px; right: 7%; transform: rotate(-2.5deg); }
.note-4 .arrow { bottom: calc(100% - 6px); left: 40%; }
@media (max-width: 1040px) {
  .annotated { padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
  .annotated .preview { grid-column: 1 / -1; margin-top: 14px; }
  .note { position: static; max-width: none; transform: none; font-size: 22px; }
  .note .arrow { display: none; }
  .annotated { counter-reset: step; }
  .note::before { counter-increment: step; content: counter(step) ". "; }
}
@media (max-width: 640px) { .annotated { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.plan { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.plan h3 { font-size: 28px; letter-spacing: -0.02em; }
.plan p { color: var(--muted); }
.plan .btn { align-self: flex-start; margin-top: 8px; }
.todo { background: #fff3c4; outline: 1px dashed #b38600; }

/* CTA band */
.cta { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 64px 48px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.cta h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.035em; max-width: 20ch; }
.cta p { max-width: 50ch; color: var(--dark-muted); font-size: 18px; }
.cta .btns { justify-content: center; }
@media (max-width: 640px) { .cta { padding: 48px 24px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; padding-block: 40px; font-size: 14px; color: var(--subtle); }
.footer img { height: 20px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Plain content pages (security, 404) */
.page { padding-block: 64px 80px; }
.page h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.04em; margin-bottom: 24px; }
.page .lead { max-width: 60ch; margin-bottom: 56px; }
.page h2 { font-size: 24px; letter-spacing: -0.01em; margin: 48px 0 16px; }
.page p, .page li { max-width: 68ch; color: var(--ink-2); }
.page ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.light-table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.light-table th, .light-table td { text-align: left; padding: 14px 20px; border-top: 1px solid var(--rule); vertical-align: top; }
.light-table thead th { border-top: 0; font: 500 12px/1.4 var(--mono); color: var(--subtle); text-transform: uppercase; }

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .section { padding-block: 56px; }
  .hero { padding-block: 40px 36px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Small spacing utilities (the CSP forbids inline style attributes) */
.m-0 { margin: 0; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mb-48 { margin-bottom: 48px; }
.pb-64 { padding-bottom: 48px; }
.pb-112 { padding-bottom: 72px; }
.narrow { max-width: 44ch; }

/* Logo wheel (not on the page until there are customers): one strip of logos, duplicated so the CSS scroll loops seamlessly. Still for reduced motion. */
.logos { padding-block: 32px; }
.logos .label { text-align: center; font: 12px/1.4 var(--mono); color: var(--subtle); text-transform: uppercase; margin-bottom: 18px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track ul { display: flex; gap: 24px; padding-right: 24px; }
.logo-slot { width: 152px; height: 52px; border: 1px dashed var(--rule-strong); border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font: 12px/1.3 var(--mono); color: var(--subtle); background: var(--bg); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-track ul[aria-hidden] { display: none; }
  .marquee-track, .marquee-track ul { flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee { mask-image: none; }
}
.pt-88 { padding-top: 64px; }

/* Hero band: near-black into deep teal, two soft teal glows and a faint grid that fades toward the edges. */
.hero-band { position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 480px at 50% 118%, rgba(26, 154, 166, 0.55), transparent 65%),
    radial-gradient(640px 360px at 88% -10%, rgba(11, 107, 116, 0.45), transparent 70%),
    radial-gradient(520px 320px at 8% 20%, rgba(11, 107, 116, 0.22), transparent 70%),
    linear-gradient(180deg, var(--dark) 0%, #0c1f24 70%, #0b2b31 100%); }
.hero-band::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }
.hero-band .hero h1 { color: #fff; }
.hero-band .aside, .hero-band .aside a { color: #8fdde4; }
.hero-band .aside a:hover { color: #fff; }
.hero-band :focus-visible { outline-color: var(--accent); }

/* AEO: homepage section and the /aeo FAQ (details/summary, no JavaScript). */
.aeo { border-top: 1px solid var(--rule); }
.faq { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  min-height: 44px; padding: 18px 0; font-size: 19px; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--mono); color: var(--teal); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 22px; }
