/* ==========================================================================
   tak.zyntelligent.com — TAK (Team Awareness Kit) intro site

   Design system generated with the ui-ux-pro-max skill
   (search.py "tactical military command control situational awareness"
    --design-system --variance 7 --motion 4 --density 6, then
    "military defense tactical dark terminal" --domain style)

     Pattern    Hero + Features + CTA (sticky hero CTA + bottom CTA)
     Style      Cyberpunk UI (matched entry: terminal/HUD aesthetic, angular
                shapes, monospace, scanline overlay) with its neon palette
                REJECTED — a defence-services company is not a game. The
                structural cues are kept: square corners, HUD corner brackets,
                a map graticule under everything, mono readouts.
     Colour     No military/tactical palette exists in the colour database
                (nearest matches were media apps), so the palette is an
                extension of the previous one: near-black graphite surfaces,
                brand gold kept as the action colour, and the MIL-STD-2525
                affiliation hues (green own / blue route / red threat) kept
                for status rather than decoration.
     Type       Chakra Petch (display — the only candidate carrying both a
                Thai and a Latin subset, squarish and technical) / Inter +
                Noto Sans Thai (body) / JetBrains Mono (labels and readouts).
                Mono stacks list Noto Sans Thai after JetBrains Mono so Latin
                renders monospaced while Thai glyphs fall back correctly.
     Motion     Standard tier: stagger reveal 300-450ms, back.out(1.4)
     Density    Standard: 16-64px spacing scale

   Every text/background pair below was measured; all body pairs are >= 4.5:1
   and white-on-accent is 4.9:1. Gold #A16207 is a FILL ONLY (3.4:1 as text) —
   use --accent-text for gold text on dark.
   ========================================================================== */

:root {
  /* surfaces — graphite, colder and flatter than the previous navy */
  --bg:            #05070d; /* --color-background */
  --bg-2:          #090d15;
  --panel:         #0d1119; /* --color-card */
  --panel-2:       #141a25; /* --color-muted */
  --line:          #2c3646; /* --color-border, separators */
  --line-soft:     #1a2130;
  --line-strong:   #5c6b80; /* interactive boundaries, 4.1:1 on --bg */

  /* HUD framing */
  --bracket:       rgba(251, 191, 36, .32);
  --graticule:     rgba(148, 163, 184, .055);

  /* text */
  --fg:            #f8fafc; /* --color-foreground      19.3:1 */
  --fg-2:          #cbd5e1; /*                         13.6:1 */
  --muted:         #94a3b8; /* --color-muted-foreground 7.9:1 */

  /* interactive accent */
  --accent:        #a16207; /* --color-accent, fill only */
  --accent-hover:  #ca8a04;
  --on-accent:     #ffffff; /*                          4.9:1 on --accent */
  --accent-text:   #fbbf24; /* gold as text            12.1:1 */

  /* map semantics — used inside diagrams only, never as brand colour */
  --friendly:      #34d399; /* own units       10.5:1 */
  --route:         #60a5fa; /* routes / info    7.9:1 */
  --hostile:       #f87171; /* threats          6.7:1 */

  /* type */
  --display: "Chakra Petch", "Noto Sans Thai", "Inter", system-ui, sans-serif;
  --sans:    "Inter", "Noto Sans Thai", -apple-system, "Segoe UI", system-ui, sans-serif;
  /* Latin renders monospaced, Thai falls back per glyph to Noto Sans Thai */
  --mono:    "JetBrains Mono", "Noto Sans Thai", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* spacing scale — density 4/10 (standard) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  /* metrics */
  --nav-h: 64px;
  --wrap: 1140px;
  --r-sm: 2px;
  --r: 3px;
  --r-lg: 4px;

  /* motion — flat style: 150-200ms for state, 400ms for entrance */
  --t-fast: 150ms;
  --t: 200ms;
  --ease-back: cubic-bezier(.34, 1.4, .64, 1); /* ~ back.out(1.4) */
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--space-3));
  -webkit-text-size-adjust: 100%;
}

html { background: var(--bg); }

/* map graticule + faint raster, static so reduced motion is unaffected */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--graticule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--graticule) 1px, transparent 1px),
    repeating-linear-gradient(to bottom, rgba(148, 163, 184, .022) 0 1px, transparent 1px 4px);
  background-size: 64px 64px, 64px 64px, 100% 4px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Thai needs more leading and no negative tracking */
html[lang="th"] body { line-height: 1.85; }

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-text); text-decoration: none; transition: color var(--t-fast); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.005em;
  text-wrap: balance;
}
html[lang="th"] h1, html[lang="th"] h2,
html[lang="th"] h3, html[lang="th"] h4 { line-height: 1.4; letter-spacing: 0; }

h1 { font-size: clamp(2.05rem, 1.3rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.14rem; font-weight: 600; }

p { margin: 0 0 1.05em; color: var(--fg-2); }
p:last-child { margin-bottom: 0; }
strong { color: var(--fg); font-weight: 600; }

code, kbd, samp, .mono { font-family: var(--mono); font-size: .87em; }
code {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: .12em .42em;
  color: var(--accent-text);
  white-space: nowrap;
}

hr { border: 0; border-top: 1px solid var(--line-soft); margin: var(--space-6) 0; }

::selection { background: rgba(251, 191, 36, .3); color: #fff; }

/* WCAG 2.2 focus appearance: 2px perimeter, 12:1 against the page */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 0;
}

/* --------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

section { position: relative; }

.band { padding: clamp(var(--space-6), 7vw, 88px) 0; }
.band--tight { padding: clamp(var(--space-5), 5vw, var(--space-7)) 0; }
.band--alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.lede {
  font-size: clamp(1.02rem, .97rem + .35vw, 1.18rem);
  color: var(--fg-2);
  max-width: 68ch;
}

.section-head { max-width: 72ch; margin-bottom: var(--space-5); }
.section-head p:last-child { margin-bottom: 0; }

/* eyebrow / kicker — bracketed mono designator, as on a tactical readout */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--space-2);
}
.kicker::before,
.kicker::after { content: "["; font-weight: 700; color: var(--accent); }
.kicker::after { content: "]"; }

/* ------------------------------------------------------------------ nav -- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(5, 7, 13, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 -2px var(--accent);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* wordmark only, until a designed logo replaces it */
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  gap: .75rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent-text); }
.brand__sub {
  font-family: var(--mono);
  font-size: .63rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: .75rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-inline-start: auto;
}
.nav__links a {
  color: var(--fg-2);
  font-size: .93rem;
  font-weight: 500;
  padding: .45rem .68rem;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__links a:hover { color: var(--fg); background: var(--panel-2); text-decoration: none; }
.nav__links a[aria-current="page"] {
  color: var(--accent-text);
  background: rgba(161, 98, 7, .16);
  box-shadow: inset 0 -2px 0 var(--accent-text);
}
.nav__cta { margin-inline-start: var(--space-2); }
.nav__links a.nav__cta {
  color: var(--on-accent);
  background: var(--accent);
  padding: .45rem .9rem;
}
.nav__links a.nav__cta:hover { background: var(--accent-hover); color: var(--on-accent); }

/* language switch */
.lang {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 2px;
  background: var(--panel);
  margin-inline-start: var(--space-2);
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: .3rem .6rem;
  border-radius: 0;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}
.lang button:hover { color: var(--fg); }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.nav__toggle {
  display: none;
  margin-inline-start: auto;
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--fg);
  /* 44x44 minimum touch target */
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  padding: clamp(var(--space-6), 8vw, 104px) 0 clamp(var(--space-6), 6vw, 80px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.hero::before {
  /* flat grid, no blur or gradient fill */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, .1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, .1) 1px, transparent 1px),
    linear-gradient(to right, rgba(251, 191, 36, .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(251, 191, 36, .16) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 192px 192px, 192px 192px;
  mask-image: radial-gradient(125% 90% at 15% 0%, #000 8%, transparent 74%);
  -webkit-mask-image: radial-gradient(125% 90% at 15% 0%, #000 8%, transparent 74%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(var(--space-5), 5vw, var(--space-7));
  align-items: center;
}
.hero h1 { margin-bottom: var(--space-3); }
.hero h1 .accent { color: var(--accent-text); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--friendly);
  border-radius: 0;
  padding: .34rem .8rem;
  margin-bottom: var(--space-4);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 0;
  background: var(--friendly);
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  /* >= 44px tall target */
  padding: .75rem 1.25rem;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { background: var(--panel); border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { background: var(--panel-2); border-color: var(--accent-text); color: var(--fg); }
.btn--sm { font-size: .78rem; padding: .45rem .85rem; min-height: 36px; }

/* ------------------------------------------------------------------ cards -- */

.grid { display: grid; gap: var(--space-3); }
/* Let grid children shrink below min-content — otherwise an inline SVG's
   intrinsic width pushes the page wider than the viewport on phones. */
.grid > *, .hero__grid > *, .stat-row > *, .steps > * { min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: var(--space-4) var(--space-4);
  transition: border-color var(--t-fast), background var(--t-fast);
}
/* HUD corner brackets — the panel reads as a framed readout, not a rounded tile */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--bracket);
  pointer-events: none;
  transition: border-color var(--t-fast);
}
.card::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.card::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
/* flat hover: colour shift only, no lift or shadow */
.card--hover:hover { border-color: var(--line-strong); background: var(--panel-2); }
.card--hover:hover::before,
.card--hover:hover::after { border-color: var(--accent-text); }
/* product cards in a row: the action button sits on the card's bottom edge,
   so the buttons line up however long each description is */
.card:has(> .app__head):has(> .hero__actions:last-child) { display: flex; flex-direction: column; }
.card:has(> .app__head) > .hero__actions:last-child { margin-top: auto; padding-top: var(--space-5); }
.card h3 { margin-bottom: .4rem; }
.card p { font-size: .95rem; margin-bottom: 0; }
.card__icon {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: rgba(161, 98, 7, .18);
  border: 1px solid rgba(251, 191, 36, .28);
  color: var(--accent-text);
  margin-bottom: var(--space-3);
}
.card__icon svg { width: 20px; height: 20px; }
.card__num {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent-text);
  letter-spacing: .12em;
  display: block;
  margin-bottom: var(--space-2);
}

/* app card */
.app { display: flex; flex-direction: column; gap: var(--space-2); }
.app__head { display: flex; align-items: flex-start; gap: .8rem; }
.app__logo {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  color: var(--accent-text);
}
.app__title { margin: 0; font-size: 1.05rem; }
.app__plat {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.chip {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--fg-2);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: .2rem .5rem;
  white-space: nowrap;
}
.chip--accent { color: var(--accent-text); border-color: rgba(251, 191, 36, .3); }
.chip--info { color: var(--route); border-color: rgba(96, 165, 250, .3); }

/* group label above a grid, ruled out to the edge like a readout header */
.subhead {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 var(--space-3);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* feature list */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 1.55rem;
  margin-bottom: .5rem;
  color: var(--fg-2);
  font-size: .95rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 9px; height: 9px;
  border-radius: 0;
  border: 1.5px solid var(--accent-text);
}
.ticks li:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ table -- */

.table-wrap {
  overflow-x: auto;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--panel);
}
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: .84rem;
  padding: .8rem 1rem;
  border-top: 1px solid var(--line-soft);
}
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th {
  font-family: var(--mono);
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--fg); }

/* -------------------------------------------------------------- callouts -- */

.note {
  display: flex;
  gap: var(--space-3);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--route);
  border-radius: var(--r-sm);
  padding: 1rem 1.15rem;
  font-size: .94rem;
}
.note p { margin-bottom: 0; }
.note--warn { border-left-color: var(--accent-text); }
.note--ok { border-left-color: var(--friendly); }
.note__ico { flex: 0 0 auto; color: var(--route); margin-top: .2rem; }
.note--warn .note__ico { color: var(--accent-text); }
.note--ok .note__ico { color: var(--friendly); }

/* ------------------------------------------------------------------ steps -- */

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps > li {
  counter-increment: s;
  position: relative;
  padding: 0 0 var(--space-5) var(--space-6);
  border-left: 1px solid var(--line-soft);
  margin-left: var(--space-3);
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: calc(var(--space-3) * -1); top: -2px;
  width: var(--space-5); height: var(--space-5);
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
}
.steps h3 { margin-bottom: .3rem; }
.steps p { font-size: .95rem; }

/* code block */
pre {
  margin: var(--space-3) 0 0;
  background: #01040e;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 1rem 1.05rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.7;
  color: var(--fg-2);
}
pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; }
pre .c { color: var(--muted); }
pre .k { color: var(--friendly); }

/* -------------------------------------------------------------------- faq -- */

.faq { border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 3rem 1rem 1.2rem;
  min-height: 44px;
  font-weight: 600;
  color: var(--fg);
  position: relative;
  transition: background var(--t-fast), color var(--t-fast);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--panel-2); color: var(--accent-text); }
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.25rem; top: 1.35rem;
  width: 9px; height: 9px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(45deg);
  transition: transform var(--t);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq__body { padding: 0 1.5rem 1.2rem 1.2rem; font-size: .95rem; }
.faq__body p { margin-bottom: .7rem; }
.faq__body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- misc -- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.stat { background: var(--panel); padding: 1.1rem 1.2rem; }
.stat__v {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-text);
  display: block;
  line-height: 1.3;
}
.stat__k { font-size: .84rem; color: var(--muted); }

.glossary { list-style: none; margin: 0; padding: 0; }
.glossary li {
  padding: .9rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .95rem;
  color: var(--fg-2);
}
.glossary li:last-child { border-bottom: 0; }
.glossary b {
  display: inline-block;
  min-width: 9.5rem;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: .85rem;
}

.cta {
  position: relative;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(var(--space-5), 5vw, 56px) var(--space-4);
}
.cta::before,
.cta::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--accent-text);
  pointer-events: none;
}
.cta::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.cta::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.cta .lede { margin-inline: auto; }
.cta .hero__actions { justify-content: center; }

/* diagram */
.diagram {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: var(--space-4) var(--space-3) var(--space-3);
}
.diagram figcaption {
  color: var(--muted);
  font-size: .85rem;
  margin-top: var(--space-3);
  text-align: center;
}
.diagram svg { width: 100%; height: auto; }
.hero__art svg { width: 100%; height: auto; }

/* live COP in the home hero (assets/js/cop.js) */
.hero__head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--space-4) clamp(var(--space-5), 5vw, var(--space-7));
  align-items: end;
}
.hero__head .hero__actions { margin-top: var(--space-4); }
.hero--cop h1 { margin-bottom: 0; }
.cop { margin-top: clamp(var(--space-5), 4vw, var(--space-6)); }
.cop__screen {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.cop__screen::before,
.cop__screen::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--accent-text);
  pointer-events: none;
  z-index: 2;
}
.cop__screen::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.cop__screen::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.cop__top {
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 38px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--muted);
}
.cop__live { width: 8px; height: 8px; background: var(--friendly); animation: cop-blink 1.6s steps(2, jump-none) infinite; }
.cop__ok { color: var(--friendly); }
.cop__clock { margin-left: auto; }
.cop__view { position: relative; aspect-ratio: 1000 / 560; overflow: hidden; }
.cop__map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.cop.is-live .cop__map { cursor: crosshair; }
.cop__log, .cop__legend,
.cop__readout {
  position: absolute;
  z-index: 1;
  margin: 0;
  padding: .5rem .75rem;
  list-style: none;
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.6;
  color: var(--muted);
  background: rgba(5, 7, 13, .84);
  border: 1px solid var(--line);
  pointer-events: none;
}
.cop__log { top: .75rem; right: .75rem; min-width: 13.5rem; }
.cop__log li { white-space: pre; }
.cop__log .is-wp { color: var(--accent-text); }
.cop__log .is-ok { color: var(--friendly); }
.cop__log .is-fed { color: var(--route); }
.cop__log .is-hostile { color: var(--hostile); }
.cop__readout { bottom: .75rem; left: .75rem; display: flex; gap: 1rem; color: var(--fg-2); }
.cop__legend { bottom: .75rem; right: .75rem; display: flex; gap: .9rem; font-size: .68rem; color: var(--fg-2); }
.cop__legend li { display: flex; align-items: center; gap: .4rem; }
.cop__legend i { width: 14px; height: 5px; border: 1px solid #000; outline: 1px solid rgba(226, 232, 240, .8); }
.cop__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.cop__hint { margin: 0; font-size: .88rem; color: var(--muted); }
.cop__drop { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
.cop__actions { display: flex; gap: var(--space-2, 8px); flex: 0 0 auto; }
.cop__full .cop__full-off,
.cop.is-full .cop__full .cop__full-on { display: none; }
.cop.is-full .cop__full .cop__full-off { display: inline; }
/* full screen: the map fills everything above the button bar */
.cop.is-full {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: var(--space-3);
  padding: max(var(--space-3), env(safe-area-inset-top)) max(var(--space-3), env(safe-area-inset-right))
           max(var(--space-3), env(safe-area-inset-bottom)) max(var(--space-3), env(safe-area-inset-left));
  background: var(--bg);
}
.cop.is-full .cop__screen { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.cop.is-full .cop__view { flex: 1 1 auto; aspect-ratio: auto; height: auto; min-height: 0; }
.cop.is-full .cop__bar { flex: 0 0 auto; }
/* no Fullscreen API (iPhone): a fixed overlay pinned to the visible screen
   (inset, not 100vh, which is taller than the screen while Safari's bars show);
   cop.js moves the COP to the end of <body> and pins the page underneath */
.cop-full, .cop-full body { overflow: hidden; overscroll-behavior: none; }
.cop-full .cop.is-full { position: fixed; inset: 0; width: auto; height: auto; z-index: 1000; }
.cop-full .nav { visibility: hidden; }
/* upright phone in full screen: the map is wide, so suggest turning the phone */
.cop__turn { display: none; margin: 0; font-size: .85rem; color: var(--accent-text); text-align: center; }
@media (orientation: portrait) and (max-width: 640px) {
  .cop.is-full .cop__turn { display: block; }
}
@keyframes cop-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .cop__live { animation: none; } }
@media (max-width: 960px) {
  .hero__head { grid-template-columns: minmax(0, 1fr); }
}
/* narrow screens: a taller window onto the middle of the map, with larger labels */
@media (max-width: 640px) {
  .cop__view { aspect-ratio: auto; height: 440px; }
  .cop__map text { font-size: 15px; }
  .cop__log, .cop__legend { display: none; }
  .cop__readout { font-size: .7rem; }
  .cop__bar { flex-direction: column; align-items: stretch; }
  .cop__actions > * { flex: 1 1 0; min-width: 0; justify-content: center; padding-inline: var(--space-2); }
  .cop.is-full .cop__hint { display: none; }
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* screenshot frames -------------------------------------------------------
   Each frame holds <img src="assets/img/shots/NAME.png"> over a placeholder.
   Drop a file at that path and it appears; while the file is missing the
   img removes itself (onerror) and the placeholder shows the expected path
   and size. The screen keeps a fixed ratio only while empty, so a real
   screenshot is never cropped. */
.shot { margin: 0; min-width: 0; }
.shot__frame {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.shot--desktop .shot__frame::before,
.shot--desktop .shot__frame::after,
.shot--browser .shot__frame::before,
.shot--browser .shot__frame::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--accent-text);
  pointer-events: none;
  z-index: 2;
}
.shot--desktop .shot__frame::before,
.shot--browser .shot__frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.shot--desktop .shot__frame::after,
.shot--browser .shot__frame::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.shot__bar {
  display: flex;
  align-items: center;
  gap: .55rem;
  height: 32px;
  padding: 0 .75rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.shot__bar::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; background: var(--friendly); }
.shot__url {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  letter-spacing: .02em;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  padding: 0 .5rem;
  line-height: 20px;
}
.shot__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(148, 163, 184, .05) 0 10px, transparent 10px 20px),
    var(--bg-2);
}
.shot__screen:has(img) { aspect-ratio: auto; }
.shot__screen img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.shot__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: .35rem;
  padding: var(--space-3);
  text-align: center;
  font-family: var(--mono);
  font-size: .7rem;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.shot__ph b { color: var(--accent-text); font-weight: 600; letter-spacing: .14em; }
.shot figcaption { margin-top: .75rem; font-size: .88rem; color: var(--muted); }
.shot--phone figcaption { text-align: center; }

/* a phone keeps its bezel and a rounded body — the one exception to the square rule */
.shot--phone .shot__frame {
  max-width: 250px;
  margin-inline: auto;
  padding: 10px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--panel-2);
}
.shot--phone .shot__screen { aspect-ratio: 9 / 19.5; border-radius: 18px; }
/* a phone held sideways: bezel on the short ends, screen follows the image */
.shot--phone-land .shot__frame { max-width: 800px; padding: 6px 10px; }
.shot--phone-land .shot__screen { aspect-ratio: 19.5 / 9; border-radius: 14px; }
.shot--phone-land .shot__screen:has(img) { aspect-ratio: auto; }

/* gallery layouts */
.shots-phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 250px));
  justify-content: center;
  gap: var(--space-6);
}
/* one landscape phone beside one portrait phone */
.shots-phones:has(.shot--phone-land) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
}
/* two sideways phones share one screen height; each image is fitted inside
   (never cropped) and any spare edge stays black like a real phone screen */
.shots-phones .shot--phone-land .shot__screen:has(img) { aspect-ratio: 2 / 1; background: #000; }
.shots-phones .shot--phone-land .shot__screen img { position: absolute; inset: 0; height: 100%; object-fit: contain; }
/* a wide lead phone above the phone pair */
.shot--phone-lead .shot__frame { max-width: 900px; }
.shot--phone-lead + .shots-phones { margin-top: var(--space-6); }
.shots-desktops { margin-top: var(--space-6); }
.shot--lead { width: 100%; }
.shots-pair { margin-top: var(--space-5); }
/* side-by-side frames share one height so captions line up: the image is
   fitted inside (never cropped) and any spare band is plain background */
.shots-pair .shot__screen:has(img),
.shots-desktops .shot__screen:has(img) { aspect-ratio: 16 / 10; background: var(--bg); }
.shots-pair .shot__screen img,
.shots-desktops .shot__screen img { position: absolute; inset: 0; height: 100%; object-fit: contain; }
/* a hardware photo (portrait) sits in a column, never wider than it needs */
.shot--photo { width: 100%; max-width: 520px; margin-inline: auto; }
@media (max-width: 960px) { .shot--photo { max-width: 460px; } }


/* --------------------------------------------------------------- contact -- */

.kicker--center { justify-content: center; }

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
}
.contact__item {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-align: left;
  min-height: 44px;
  padding: .85rem 1.2rem;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.contact__item:hover { border-color: var(--accent-text); background: var(--panel); text-decoration: none; }
.contact__item > svg { color: var(--accent-text); flex: 0 0 auto; }
.contact__text { display: block; }
.contact__k {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__v { display: block; font-weight: 600; }
.contact__note { margin-top: var(--space-4); color: var(--muted); font-size: .88rem; }

/* process timeline on the services page */
.flow { counter-reset: f; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.flow > li {
  counter-increment: f;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: var(--space-4) var(--space-4) var(--space-4) 4.2rem;
}
.flow > li::before {
  content: counter(f, decimal-leading-zero);
  position: absolute;
  left: var(--space-4); top: var(--space-4);
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent-text);
}
.flow h3 { margin-bottom: .3rem; }
.flow p { font-size: .95rem; margin-bottom: 0; }

/* ----------------------------------------------------------------- footer -- */

.foot {
  border-top: 1px solid var(--line);
  box-shadow: inset 0 3px 0 -2px var(--accent);
  background: var(--bg-2);
  padding: var(--space-6) 0 var(--space-5);
  font-size: .92rem;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.foot h4 {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-3);
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .4rem; }
.foot a { color: var(--fg-2); }
.foot a:hover { color: var(--accent-text); }
.foot__note {
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-4);
}
.foot__note p { color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- reveal -- */
/* Motion tier "Standard": stagger 300-450ms, back.out(1.4).
   Entrance only — CSS transform/opacity, no layout properties animated. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px) scale(.985); }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 400ms ease-out, transform 400ms var(--ease-back);
    transition-delay: var(--reveal-delay, 0ms);
  }
}

/* ------------------------------------------------------------ responsive -- */
/* Verified at 375 / 768 / 1024 / 1440px */

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 560px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--space-2) var(--space-4) var(--space-3);
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
  }
  .nav__links[hidden] { display: none; }
  .nav__links a { padding: .8rem .4rem; border-radius: 0; font-size: .95rem; }
  .nav__cta, .lang { margin: var(--space-2) 0 0; align-self: flex-start; }
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .band { padding: var(--space-6) 0; }
}

@media (max-width: 640px) {
  .shots-phones:has(.shot--phone-land) { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding-inline: var(--space-3); }
  .foot__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .glossary b { min-width: 0; display: block; }
  .hero__actions .btn { width: 100%; }
  .contact { flex-direction: column; }
  .flow > li { padding-left: var(--space-4); padding-top: 2.6rem; }
  .steps > li { padding-left: var(--space-5); }
  .shots-phones { gap: var(--space-3); }
}

@media print {
  .nav, .hero::before, .foot { display: none; }
  body { background: #fff; color: #000; }
}

