/* ==========================================================================
   AMSG ITB — design system layer (loaded last, overrides style.css)
   Type scale, tracking, wrapping, numerals, colour roles, focus, spacing.
   Fonts: Barlow Condensed (display) · Inter (text) · JetBrains Mono (data)
   ========================================================================== */

:root {
  /* families */
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font: var(--font-text);

  /* type scale: role = size / line-height / tracking */
  --fs-display-xl: clamp(3.4rem, 9vw, 7.6rem);
  --fs-display-l:  clamp(2.8rem, 6.6vw, 5.2rem);
  --fs-display-m:  clamp(2.2rem, 4.8vw, 3.6rem);
  --fs-h3:         clamp(1.25rem, 1.6vw, 1.5rem);
  --fs-lead:       clamp(1.0625rem, 1.2vw, 1.25rem);
  --fs-body:       1rem;        /* 16px floor for long text */
  --fs-body-sm:    .9375rem;    /* 15px */
  --fs-caption:    .8125rem;    /* 13px */
  --fs-overline:   .75rem;      /* 12px: lowest size in the system */

  --lh-display: 1.0;
  --lh-heading: 1.2;
  --lh-body: 1.6;
  --track-display: -.01em;
  --track-overline: .12em;

  /* spacing scale (4px base) */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem; --sp-9: 7rem;
  --gutter: clamp(1rem, 4vw, 1.5rem);
  --measure: 62ch;

  /* colour roles (text-safe variants pass 4.5:1 on --bg) */
  --red-text: #ff5247;
  --text-2: #c9c9d3;
  --muted: #a3a3b0;
  --focus: #ffffff;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container { padding-inline: var(--gutter); }
::selection { background: var(--red); color: #fff; }

/* ---------- headings & display ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-heading);
  letter-spacing: var(--track-display);
  text-wrap: balance;
  margin-block: 0;
}
.display {
  font-weight: 800;
  text-transform: uppercase;
  line-height: var(--lh-display);
  letter-spacing: -.005em;
  font-size: var(--fs-display-l);
}
.display-sm { font-size: var(--fs-display-m); }
.c-title { font-size: var(--fs-display-xl); line-height: .92; letter-spacing: -.015em; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: 0; }
h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }

p, li, .muted { text-wrap: pretty; }
p { max-width: var(--measure); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: 36rem; }
.muted { color: var(--muted); }

/* small caps-style labels: overline = 12px / 0.12em, never below */
.kicker, .label, .pill, .btn, .nav-links a, .chip, .footer h4, .step-name, .round-date {
  font-family: var(--font-text);
  font-size: var(--fs-overline);
  letter-spacing: var(--track-overline);
  font-weight: 700;
  text-transform: uppercase;
}
.kicker { color: var(--red-text); }
.label { color: var(--muted); }
.btn { font-size: .8125rem; letter-spacing: .1em; min-height: 44px; }
.btn-sm { min-height: 36px; font-size: var(--fs-overline); }
.nav-links a { font-size: .8125rem; letter-spacing: .08em; }
.badge-count { font-size: var(--fs-overline); font-weight: 800; }
.track-label { font-size: 12px; }
.step-name { font-size: var(--fs-overline); }
.link-arrow { color: var(--text); font-weight: 700; letter-spacing: .06em; font-size: .875rem; text-transform: uppercase; }
.link-arrow:hover { color: var(--red-text); }

/* data & numerals: monospace, fixed width, never shifts */
.stat-num, .price, .order-id, .round, .c-process-num, [data-count], .cart-total, .qty {
  font-variant-numeric: tabular-nums lining-nums;
}
.stat-num, .team-stats .stat-num { font-family: var(--font-display); font-weight: 800; letter-spacing: 0; }
.stat-label { font-family: var(--font-text); font-size: var(--fs-caption); letter-spacing: .04em; color: var(--muted); }
.product .price, .order-id, .cart-total, .specs dd, .tech-meta p { font-family: var(--font-mono); font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.product .price { font-size: 1.0625rem; color: var(--text); }
.c-process-num { font-family: var(--font-display); font-weight: 800; }
.round-date, .label + p { font-family: var(--font-mono); font-size: var(--fs-caption); letter-spacing: 0; text-transform: none; }

/* body copy inside cards stays readable */
.tile-body p, .tech-body p, .product p, .news-card p { font-size: var(--fs-body-sm); line-height: 1.55; color: var(--text-2); }
.tile-body h3, .product h3 { text-wrap: balance; line-height: 1.2; }
.input, .textarea, .select { font-size: 1rem; line-height: 1.4; } /* 16px stops iOS zoom */
.input::placeholder, .textarea::placeholder { color: #8d8d9a; }

/* long unbroken strings never overflow */
h1, h2, h3, p, li, a, .tile-body, .product { overflow-wrap: break-word; }
.btn, .pill, .chip, .label { white-space: nowrap; }

/* ---------- focus (keyboard) ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { outline-offset: 2px; }
.skip-link { position: fixed; left: 12px; top: -64px; z-index: 300; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 700; transition: top .2s var(--ease-out); }
.skip-link:focus { top: 12px; }

/* ---------- spacing rhythm ---------- */
.section { padding-block: clamp(var(--sp-8), 9vw, var(--sp-9)); }
.section-head { margin-bottom: var(--sp-6); gap: var(--sp-5); }
.grid-3 { gap: var(--sp-5); }
.tile-body, .product-body { padding: var(--sp-5); }
.tile-body > * + *, .product-body > * + * { margin-top: var(--sp-2); }

/* ---------- touch & motion ---------- */
.icon-btn { width: 44px; height: 44px; }
a, button { -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .btn:hover svg { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 760px) {
  :root { --fs-lead: 1.0625rem; }
  .nav-links a { font-size: .8125rem; }
}

/* size floor: nothing under 12px */
.news-card .tag, .hero-tagline, .pill, .badge-count, .round-date, .step-name { font-size: var(--fs-overline); letter-spacing: var(--track-overline); }
.pill { padding: 4px 10px; }
.news-card .tag { padding: 5px 10px; }

/* temporary real photo (placeholder until the official team shots arrive) */
.team-banner .media { background: linear-gradient(90deg, rgba(10,10,13,.2), rgba(10,10,13,0)), url("../assets/img/team.webp") center 30% / cover no-repeat; }
.team-banner .media .art { display: none; }
.team-banner .crowd { display: none; }
.team-banner .shade { background: linear-gradient(90deg, rgba(5,5,7,.88) 0%, rgba(5,5,7,.35) 55%, transparent), linear-gradient(0deg, rgba(5,5,7,.7), transparent 45%); }

/* team member placeholders: cinematic dark silhouettes until real portraits arrive */
.member .media { position: relative; aspect-ratio: 4 / 5; background: radial-gradient(70% 60% at 50% 38%, #2a1214 0%, #120b0d 55%, #08080b 100%); overflow: hidden; }
.member .media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(0deg, rgba(5,5,7,.85), transparent); pointer-events: none; }
.member .media svg { position: absolute; inset: 14% 12% 0; width: 76%; height: 86%; opacity: .95; filter: grayscale(1) brightness(.38) contrast(1.3) drop-shadow(0 0 18px rgba(225,6,0,.35)); }
.member .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
