/*
 * Tango Sierra Technologies — site stylesheet
 * Brand: Tango Sierra Tech media kit (BRAND-GUIDELINES.md); tokens below.
 * Logo files are rasters: never stretch them; keep 10% clear space.
 * Served with a 10-year cache: scripts/tst-site-build.py appends a content
 * hash (?v=) to every asset URL, so never hand-edit the built copy.
 */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #0B192B;          /* brand navy: primary dark surface */
  --ink-2: #142D46;        /* brand panel: raised dark surface */
  --ink-3: #1C3A59;
  --paper: #F4F7FA;        /* brand light: light section */
  --white: #FFFFFF;
  --text: #142033;         /* body on light */
  --muted: #4B5A70;        /* secondary on light (AA on paper + white) */
  --on-ink: #F4F8FF;       /* brand white */
  --on-ink-muted: #B4C4D8; /* AA on navy + panel */
  --line: #DCE2EA;
  --line-ink: rgba(105, 169, 217, .2);
  --steel: #69A9D9;        /* brand steel: accent on dark, buttons */
  --steel-ink: #2B6A99;    /* steel darkened for text on light (AA 5.4:1) */

  --f-head: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --r: 14px;
  --shadow: 0 1px 2px rgba(10, 22, 40, .06), 0 8px 24px rgba(10, 22, 40, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 17px/1.65 var(--f-body); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--steel-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; color: inherit; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--steel); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.plain { list-style: none; margin: 0; padding: 0; }
.eyebrow { font: 500 .78rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--steel-ink); margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }

/* Header ----------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 25, 43, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-ink); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-ink); }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 700 1.05rem var(--f-head); letter-spacing: -.01em; }
.brand-sub { font: 500 .66rem var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--on-ink-muted); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--on-ink-muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--white); }
.site-nav a.btn { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: var(--on-ink); border-radius: 2px; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }

/* Buttons ---------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .5em; background: var(--steel); color: var(--ink); font: 600 1rem var(--f-body); padding: .85em 1.35em; border-radius: 999px; text-decoration: none; border: 1px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { background: #8DC0E6; transform: translateY(-1px); }
.btn-sm { padding: .55em 1.05em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--on-ink); border-color: rgba(232, 238, 246, .35); }
.btn-ghost:hover { background: rgba(232, 238, 246, .08); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-3); }
.arrow::after { content: "→"; font-family: var(--f-body); }

/* Sections --------------------------------------------------------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.dark { background: var(--ink); color: var(--on-ink); }
.dark .eyebrow { color: var(--steel); }
.dark .lede, .dark .muted { color: var(--on-ink-muted); }
.dark a:not(.btn) { color: var(--steel); }
.paper { background: var(--paper); }
.section-head { max-width: 760px; margin-bottom: 48px; }

/* Hero ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(80px, 12vw, 160px) 0 clamp(72px, 10vw, 128px); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(transparent, var(--ink)); pointer-events: none; }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,25,43,.96) 0%, rgba(11,25,43,.86) 40%, rgba(11,25,43,.35) 100%); pointer-events: none; z-index: 1; }
.hero .wrap, .page-hero .wrap { position: relative; z-index: 2; }
@media (max-width: 820px) { .hero::before, .page-hero::before { background: rgba(11,25,43,.84); } }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--steel); }
.hero .lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); margin: 1.4rem 0 2.2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.creds { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-ink); font: 500 .82rem var(--f-mono); letter-spacing: .06em; color: var(--on-ink-muted); text-transform: uppercase; }
.creds b { color: var(--on-ink); font-weight: 600; }
.page-hero { padding: clamp(72px, 10vw, 128px) 0 clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); max-width: 20ch; }

/* Cards / grids ---------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-top: 18px; }
.card p { color: var(--muted); margin: 0; }
.dark .card { background: var(--ink-2); border-color: var(--line-ink); box-shadow: none; }
.dark .card p { color: var(--on-ink-muted); }
.icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: rgba(105, 169, 217, .16); color: var(--steel-ink); }
.dark .icon { color: var(--steel); }
.icon svg { width: 24px; height: 24px; }
a.card { text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--steel); }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
.figure-ink { background: var(--ink); border-radius: calc(var(--r) + 6px); padding: clamp(20px, 3vw, 36px); box-shadow: 0 20px 50px rgba(10, 22, 40, .18); }
.dark .figure-ink { background: var(--ink-2); box-shadow: none; border: 1px solid var(--line-ink); }

.checks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; }
.checks li { position: relative; padding-left: 1.7em; }
.checks li::before { content: ""; position: absolute; left: 0; top: .52em; width: .8em; height: .45em; border-left: 2px solid var(--steel-ink); border-bottom: 2px solid var(--steel-ink); transform: rotate(-45deg); }
.dark .checks li::before { border-color: var(--steel); }

/* Principles (numbered) */
.principles { counter-reset: p; }
.principles .card { position: relative; }
.principles .card::before { counter-increment: p; content: "0" counter(p); font: 500 .85rem var(--f-mono); color: var(--steel); }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-ink); border: 1px solid var(--line-ink); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--ink-2); padding: 26px 24px; }
.stat b { display: block; font: 600 1.7rem var(--f-head); color: var(--white); letter-spacing: -.02em; }
.stat span { font-size: .92rem; color: var(--on-ink-muted); }

/* Stack chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2rem; }
.chip { font: 500 .78rem var(--f-mono); padding: .4em .8em; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--text); }
.dark .chip { background: rgba(232, 238, 246, .06); border-color: var(--line-ink); color: var(--on-ink); }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--line); }
.step { padding: 24px 24px 0 0; position: relative; }
.step::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--steel); box-shadow: 0 0 0 4px var(--paper); }
.step .mono { font-size: .8rem; color: var(--steel-ink); }
.step p { color: var(--muted); font-size: .96rem; }

/* CTA band */
.cta-band { background: var(--ink); color: var(--on-ink); border-radius: calc(var(--r) + 8px); padding: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { margin: 0 0 .4em; }
.cta-band p { color: var(--on-ink-muted); margin: 0; max-width: 54ch; }
.cta-band .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; pointer-events: none; }
.cta-band > :not(.bg) { position: relative; }

/* Diagrams + photos (media kit; illustrative) */
.diagram { margin: 0; }
.diagram img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); }
.dark .diagram img { border-color: var(--line-ink); }
.diagram figcaption, .photo figcaption { font: 500 .78rem/1.5 var(--f-mono); color: var(--muted); margin-top: 10px; }
.dark .diagram figcaption, .dark .photo figcaption { color: var(--on-ink-muted); }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.footer-logo { width: 120px; height: auto; margin-bottom: 4px; }

/* Writing */
.post-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-item { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.post-item:hover h3 { color: var(--steel-ink); }
.post-item time { font: 500 .85rem var(--f-mono); color: var(--muted); padding-top: 4px; }
.post-item p { color: var(--muted); margin: 0; }
.article { max-width: 720px; margin: 0 auto; }
.article h1 { font-size: clamp(2rem, 4vw, 3rem); }
.article-meta { font: 500 .85rem var(--f-mono); color: var(--on-ink-muted); }
.prose { font-size: 1.06rem; }
.prose h2, .prose h3, .prose h6 { font-size: 1.35rem; margin-top: 2em; }
.prose img { border-radius: 10px; border: 1px solid var(--line); margin: 1.6em auto; }
.prose li { margin-bottom: .35em; }
.figure-code, .prose figure.code { margin: 1.6em 0; background: var(--ink); border-radius: 12px; overflow: hidden; }
.prose figure.code figcaption { font: 500 .78rem var(--f-mono); color: var(--on-ink-muted); padding: 10px 18px; border-bottom: 1px solid var(--line-ink); }
.prose pre { margin: 0; padding: 18px; overflow-x: auto; color: var(--on-ink); font: 400 .86rem/1.6 var(--f-mono); }
.note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--steel); border-radius: 10px; padding: 14px 18px; font-size: .95rem; color: var(--muted); margin-bottom: 2rem; }

/* Contact */
.contact-card { display: grid; gap: 6px; }
.contact-card a.big { font: 600 clamp(1.3rem, 2.6vw, 1.9rem) var(--f-head); color: var(--text); text-decoration: none; word-break: break-all; }
.contact-card a.big:hover { color: var(--steel-ink); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.dl dt { font: 500 .8rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 3px; }
.dl dd { margin: 0; }

/* Footer ----------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 72px 0 32px; font-size: .95rem; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--steel); }
.site-footer .eyebrow { color: var(--on-ink-muted); font-size: .72rem; }
.site-footer .muted { color: var(--on-ink-muted); max-width: 34ch; margin-top: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid li { margin-bottom: .5em; }
.footer-base { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-ink); font-size: .85rem; }

/* Motion ----------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } .btn, a.card { transition: none; } }

/* Responsive ------------------------------------------------------- */
@media (max-width: 980px) {
  .g4, .stats { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line-ink); padding: 8px 24px 20px; display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line-ink); font-size: 1.05rem; }
  .site-nav a.btn { margin-top: 16px; justify-content: center; border-bottom: 0; }
  .split, .g2, .cta-band { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .g3, .g4, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .post-item { grid-template-columns: 1fr; gap: 6px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; gap: 8px; }
}
@media (scripting: none) { .reveal { opacity: 1; transform: none; } }
