/* AFS Designs — site.css
   Tokens first, both themes, components after. External file by design:
   airnoulli VPS CSP blocks inline style/script. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/plex-sans-var.woff2") format("woff2");
  font-weight: 100 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f3f6f8;            /* cool paper */
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --ink: #16242f;
  --muted: #506273;
  --line: #d8e0e6;
  --line-soft: #e5ebef;
  --accent: #c85207;        /* windsock orange, text-safe fills (4.5:1 w/ white) */
  --accent-hover: #b04a06;
  --accent-bright: #e05e10; /* graphic-grade orange: marks, dashes, borders */
  --accent-text: #a84607;   /* text-grade orange */
  --accent-contrast: #ffffff;
  --foot-bg: #16242f;
  --foot-ink: #e7edf2;
  --foot-muted: #93a3b0;
  --shadow: 0 1px 2px rgba(22, 36, 47, 0.04), 0 10px 28px -18px rgba(22, 36, 47, 0.25);

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e161d;          /* night panel */
    --bg-alt: #131d26;
    --panel: #17222c;
    --ink: #e7edf2;
    --muted: #94a4b1;
    --line: #26343f;
    --line-soft: #1e2b35;
    --accent: #ff8a3a;
    --accent-hover: #ffa05c;
    --accent-bright: #ff8a3a;
    --accent-text: #ff9c55;
    --accent-contrast: #1a0f04;
    --rose-opacity: 0.09;
    --foot-bg: #0a1117;
    --foot-ink: #e7edf2;
    --foot-muted: #8395a3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -18px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0e161d;
  --bg-alt: #131d26;
  --panel: #17222c;
  --ink: #e7edf2;
  --muted: #94a4b1;
  --line: #26343f;
  --line-soft: #1e2b35;
  --accent: #ff8a3a;
  --accent-hover: #ffa05c;
  --accent-bright: #ff8a3a;
  --accent-text: #ff9c55;
  --accent-contrast: #1a0f04;
  --foot-bg: #0a1117;
  --foot-ink: #e7edf2;
  --foot-muted: #8395a3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -18px rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] {
  --bg: #f3f6f8;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --ink: #16242f;
  --muted: #506273;
  --line: #d8e0e6;
  --line-soft: #e5ebef;
  --accent: #c85207;
  --accent-hover: #b04a06;
  --accent-bright: #e05e10;
  --accent-text: #a84607;
  --accent-contrast: #ffffff;
  --foot-bg: #16242f;
  --foot-ink: #e7edf2;
  --foot-muted: #93a3b0;
  --shadow: 0 1px 2px rgba(22, 36, 47, 0.04), 0 10px 28px -18px rgba(22, 36, 47, 0.25);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
::selection { background: var(--accent); color: var(--accent-contrast); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.02;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--accent-bright);
  vertical-align: 0.28em;
  margin-right: 10px;
}

.lede { font-size: 18px; color: var(--muted); max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  border-radius: 3px;
  padding: 13px 22px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-solid { background: var(--accent); color: var(--accent-contrast); }
.btn-solid:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-lg { padding: 17px 28px; font-family: var(--font-mono); font-size: 15.5px; letter-spacing: 0.02em; }

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.head-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand-mark {
  width: 17px;
  height: 15px;
  background: var(--accent-bright);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.site-nav { display: flex; gap: 22px; }
.site-nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
}
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: clamp(64px, 9vw, 104px);
  padding-bottom: clamp(48px, 7vw, 80px);
}
.hero h1 {
  font-weight: 700;
  font-size: clamp(48px, 7.6vw, 92px);
  letter-spacing: 0.005em;
  max-width: 17ch;
  margin-top: 18px;
}
.hero .lede { margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 8vw, 96px); background: var(--bg); }
.section-alt { background: var(--bg-alt); --panel: var(--bg); }
.section h2 {
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 50px);
  margin-top: 12px;
  margin-bottom: 40px;
}

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.work-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.shot-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.shot-url {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-left: 8px;
}
.shot img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.work-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.work-body h3 { font-weight: 600; font-size: 27px; }
.work-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -8px;
}
.work-body > p:not(.work-meta) { font-size: 15.5px; color: var(--muted); }
.chip-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-row li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 8px;
}
.work-link {
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--accent-text);
  margin-top: auto;
}
.work-link::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 7px;
  vertical-align: 1px;
}
.work-link:hover { text-decoration: underline; }

.earlier { margin-top: 44px; }
.earlier-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.earlier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.earlier-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
  background: var(--panel);
}
.earlier-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.earlier-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.earlier-open {
  border-style: dashed;
  border-color: var(--accent-bright);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.earlier-open .earlier-name { color: var(--accent-text); }
.earlier-open:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---------- Services ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.svc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 26px 28px;
}
.svc h3 {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.svc p { font-size: 15px; color: var(--muted); }

/* ---------- Flight plan ---------- */
.plan-route {
  list-style: none;
  counter-reset: wp;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
}
.plan-route::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  border-top: 2px dashed var(--line);
}
.plan-route li {
  counter-increment: wp;
  position: relative;
  padding-top: 54px;
}
.wp {
  position: absolute;
  top: 0;
  left: 0;
  width: 37px;
  height: 37px;
  border: 2px solid var(--accent-bright);
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
}
.wp::after {
  content: counter(wp);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-text);
}
.plan-route h3 { font-weight: 600; font-size: 22px; letter-spacing: 0.02em; }
.plan-route p { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.plan-note {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- About ---------- */
.about-text h2 { margin-bottom: 24px; }
.about-text p + p { margin-top: 16px; }
.about-text p { color: var(--muted); max-width: 58ch; }

/* ---------- Contact ---------- */
.contact-panel {
  border: 1.5px dashed var(--accent-bright);
  border-radius: 6px;
  padding: clamp(32px, 5vw, 56px);
  max-width: 1056px;
}
.contact-panel h2 { margin-bottom: 18px; }
.contact-panel .lede { margin-bottom: 30px; }

.status-line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-top: 20px;
}
.status-line::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  margin-right: 8px;
}

/* ---------- Footer ---------- */
.site-foot {
  background: var(--foot-bg);
  color: var(--foot-ink);
  border-top: 1px solid var(--line-soft);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
  padding-block: 44px;
}
.foot-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.foot-tag { color: var(--foot-muted); font-size: 14.5px; margin-top: 4px; }
.foot-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 2;
  color: var(--foot-muted);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 761px) {
  .foot-mono { text-align: right; }
}

/* ---------- Reveal on scroll (JS adds body.js + .on) ---------- */
body.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
body.js .reveal.on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Breakpoints (explicit column counts, no auto-fit) ---------- */
@media (max-width: 980px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-route { grid-template-columns: 1fr; gap: 30px; }
  .plan-route::before {
    top: 20px;
    bottom: 6px;
    left: 18px;
    right: auto;
    border-top: none;
    border-left: 2px dashed var(--line);
  }
  .plan-route li { padding-top: 0; padding-left: 58px; }
}
@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-nav { display: none; }
  .earlier-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(42px, 11.5vw, 58px); }
}
