@import url("../fonts/fonts.css");

/* ==========================================================================
   HighTech Security Romania - design system
   Light theme: soft off-white page, navy reserved for a few small bands.
   One accent (amber), one radius (3px).
   ========================================================================== */

:root {
  /* surfaces */
  --bg:        #f4f6f7;   /* page: soft off-white, never pure #fff */
  --bg-soft:   #e5eaec;   /* alternate band */
  --bg-tint:   #f0f3f4;   /* subtle tint */
  --surface:   #ffffff;   /* cards lifted off the page */

  /* navy accent surfaces (used sparingly) */
  --navy:      #0c3c6c;
  --navy-deep: #08243f;
  --navy-soft: #0a2f52;
  --on-navy:      #eaf1f6;
  --on-navy-dim:  #a2b8c8;
  --on-navy-line: rgba(255, 255, 255, 0.13);

  /* text */
  --ink:   #0a1c28;
  --text:  #22394a;
  --dim:   #556b7a;
  --dim-2: #546a78;

  /* lines */
  --line:      rgba(10, 28, 40, 0.13);
  --line-soft: rgba(10, 28, 40, 0.075);
  --line-hard: rgba(10, 28, 40, 0.26);

  /* brand accent (from logo) */
  --accent:     #ffa63d;  /* amber surface: buttons, marks */
  --accent-2:   #ea8c1c;
  --accent-ink: #1a1206;  /* text on amber */
  --accent-tx:  #96520a;  /* amber as TEXT on light (passes AA) */

  /* radius lock */
  --r: 3px;

  /* type */
  --f-display: "Sora", "Manrope", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* rhythm */
  --pad: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1280px;
  --sec: clamp(4rem, 7vw, 7rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(10, 28, 40, 0.05), 0 8px 24px -12px rgba(10, 28, 40, 0.14);
  --shadow-lift: 0 2px 4px rgba(10, 28, 40, 0.06), 0 18px 40px -18px rgba(10, 28, 40, 0.22);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--navy); color: #fff; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap--narrow { max-width: 900px; }

.section { padding-block: var(--sec); position: relative; }
.section--tight { padding-block: clamp(2.75rem, 4.5vw, 4.25rem); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section--edge { border-top: 1px solid var(--line-soft); }

/* ---------- typography ---------- */
.h-d { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.028em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
.h1  { font-size: clamp(2.25rem, 5vw, 3.9rem); }
.h1--long { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.14; letter-spacing: -0.022em; }
.h2  { font-size: clamp(1.75rem, 3.3vw, 2.7rem); line-height: 1.12; }
.h3  { font-size: clamp(1.18rem, 1.8vw, 1.45rem); line-height: 1.3; letter-spacing: -0.018em; }
.h4  { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; line-height: 1.4; letter-spacing: -0.012em; color: var(--ink); }

.lede {
  font-size: clamp(1.01rem, 1.3vw, 1.16rem);
  line-height: 1.62;
  color: var(--dim);
  max-width: 60ch;
  text-wrap: pretty;
}
.body { color: var(--dim); max-width: 68ch; text-wrap: pretty; }
.body + .body { margin-top: 1rem; }
.body strong, .lede strong { color: var(--ink); font-weight: 600; }

.mono {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.135em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--accent-tx);
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  flex: none;
}

.accent { color: var(--accent-tx); }
.dim { color: var(--dim); }

/* ---------- section head ---------- */
.sechead { max-width: 44rem; }
.sechead .h2 { margin-top: 1.05rem; }
.sechead .lede { margin-top: 1.05rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.88rem 1.45rem;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), transform 0.18s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn:hover { background: var(--accent-2); box-shadow: var(--shadow-card); }
.btn:active { transform: translateY(1px); }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-deep); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-hard); }
.btn--ghost:hover { background: rgba(10, 28, 40, 0.05); border-color: var(--ink); box-shadow: none; }

.btn--onnavy { background: transparent; color: var(--on-navy); border-color: var(--on-navy-line); }
.btn--onnavy:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--on-navy-dim); }

/* solid light button, for navy surfaces only */
.btn--light { background: #fff; color: var(--navy-deep); border-color: #fff; }
.btn--light:hover { background: #e8eef2; border-color: #e8eef2; color: var(--navy-deep); }
.btn--light svg { color: var(--navy); }

.btn--sm { padding: 0.6rem 1rem; font-size: 0.82rem; }
.btn--block { width: 100%; }

.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--accent-tx);
  transition: gap 0.2s var(--ease);
}
.tlink svg { width: 0.95em; height: 0.95em; }
.tlink:hover { gap: 0.62rem; }
.tlink--onnavy { color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 246, 247, 0.86);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nav.is-stuck {
  background: rgba(244, 246, 247, 0.97);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(10, 28, 40, 0.45);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  height: 68px;
}
.nav__brand { display: flex; align-items: center; flex: none; }
.nav__brand img { height: 34px; width: auto; }

.nav__links {
  display: none;
  align-items: center;
  gap: clamp(0.1rem, 1vw, 0.45rem);
  margin-inline-start: auto;
}
@media (min-width: 1080px) { .nav__links { display: flex; } }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--dim);
  border-radius: var(--r);
  white-space: nowrap;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav__link svg { width: 0.72em; height: 0.72em; opacity: 0.6; transition: transform 0.2s var(--ease); }
.nav__item:hover > .nav__link svg { transform: rotate(180deg); }

.nav__right {
  display: none;
  align-items: center;
  gap: 0.85rem;
  margin-inline-start: 0.35rem;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid var(--line-soft);
}
@media (min-width: 1080px) { .nav__right { display: flex; } }

.nav__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.16s var(--ease);
}
.nav__phone svg { width: 0.95em; height: 0.95em; color: var(--accent-tx); }
.nav__phone:hover { color: var(--accent-tx); }

/* mega menu */
.nav__item { position: relative; }
.mega {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translate(calc(-50% + var(--mega-shift, 0px)), 6px);
  width: min(46rem, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1rem;
  display: grid;
  gap: 0.1rem;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 28px 60px -24px rgba(10, 28, 40, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.2s var(--ease), visibility 0.16s;
}
.mega--wide { width: min(58rem, calc(100vw - 2rem)); grid-template-columns: 1fr 1fr 1fr; }
/* bridge the gap between the trigger and the panel so the pointer never
   leaves the hover region on the way down (works without JS too) */
.mega::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.95rem;
  height: 0.95rem;
}

.nav__item:hover .mega,
.nav__item.is-open .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(calc(-50% + var(--mega-shift, 0px)), 0);
}

/* while open, the trigger keeps its active look */
.nav__item.is-open > .nav__link,
.nav__item:hover > .nav__link { color: var(--ink); }
.nav__item.is-open > .nav__link svg { transform: rotate(180deg); }
.mega__a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--r);
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--dim);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.mega__a svg { width: 1.05em; height: 1.05em; flex: none; color: var(--dim-2); transition: color 0.15s var(--ease); }
.mega__a:hover { background: var(--bg-soft); color: var(--ink); }
.mega__a:hover svg { color: var(--accent-tx); }

/* mobile nav trigger + drawer */
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin-inline-start: auto;
  border: 1px solid var(--line-hard);
  border-radius: var(--r);
  color: var(--ink);
}
.nav__toggle svg { width: 1.2rem; height: 1.2rem; }
@media (min-width: 1080px) { .nav__toggle { display: none; } }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--navy-deep);
  color: var(--on-navy);
  padding: 1.1rem var(--pad) 2.5rem;
  overflow-y: auto;
  display: none;
}
.drawer.is-open { display: block; }
.drawer__top { display: flex; align-items: center; height: 52px; margin-bottom: 1.4rem; }
.drawer__top img { height: 34px; width: auto; }
.drawer__close {
  margin-inline-start: auto;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--on-navy-line);
  border-radius: var(--r);
  color: var(--on-navy);
}
.drawer__close svg { width: 1.2rem; height: 1.2rem; }
.drawer__group { border-top: 1px solid var(--on-navy-line); padding: 1.1rem 0; }
.drawer__group > span { display: block; margin-bottom: 0.6rem; color: var(--on-navy-dim); }
.drawer__a {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0;
  font-size: 1rem; font-weight: 600; color: var(--on-navy);
}
.drawer__a svg { width: 1em; height: 1em; color: var(--on-navy-dim); }
.drawer__sub { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1rem 1rem; }
.drawer__sub a { padding: 0.42rem 0; font-size: 0.9rem; color: var(--on-navy-dim); font-weight: 500; }
.drawer__sub a:hover { color: var(--on-navy); }
.drawer__cta { margin-top: 1.6rem; display: grid; gap: 0.6rem; }
.drawer .btn--ghost { color: var(--on-navy); border-color: var(--on-navy-line); }
.drawer .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--on-navy-dim); }

/* ==========================================================================
   HERO - full-bleed photograph dissolving into the page background.
   Text is bottom-anchored on the cleared area, never a side-by-side split.
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--bg);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(244, 246, 247, 0.10) 0%,
    rgba(244, 246, 247, 0.24) 15%,
    rgba(244, 246, 247, 0.72) 34%,
    rgba(244, 246, 247, 0.96) 50%,
    var(--bg) 68%,
    var(--bg) 100%
  );
}
.hero__inner {
  position: relative;
  min-height: clamp(32rem, 74svh, 45rem);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(2rem, 5vw, 3rem) clamp(1.75rem, 4vw, 3rem);
}
.hero__copy { width: 100%; max-width: 46rem; }
.hero .h1 { margin-top: 1.1rem; }
.hero__sub {
  margin-top: 1.15rem;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.6;
  color: var(--dim);
  max-width: 42ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.7rem; }

/* navy figure band (small navy section) */
.statband {
  background: var(--navy-deep);
  border-top: 2px solid var(--accent);
  color: var(--on-navy);
}
.statband__in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 820px) { .statband__in { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sfig { padding: 1.5rem 1.35rem 1.6rem; border-bottom: 1px solid var(--on-navy-line); }
@media (min-width: 820px) {
  .sfig { border-bottom: 0; border-inline-end: 1px solid var(--on-navy-line); }
  .sfig:first-child { padding-inline-start: 0; }
  .sfig:last-child { border-inline-end: 0; }
}
.sfig b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}
.sfig span {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
  line-height: 1.55;
}

/* ==========================================================================
   INNER PAGE HEAD - copy on the left, a photo plate on the right,
   with a small navy meta plate clipped to the image corner.
   ========================================================================== */
.pagehead {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.pagehead::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(48rem 26rem at 0% -46%, rgba(12, 60, 108, 0.11), transparent 66%),
    radial-gradient(30rem 18rem at 92% 122%, rgba(255, 166, 61, 0.14), transparent 70%);
}
.pagehead__in {
  position: relative;
  display: grid;
  gap: clamp(1.85rem, 3.6vw, 3.25rem);
  align-items: center;
  padding-block: clamp(2.1rem, 4.2vw, 3.6rem) clamp(2.1rem, 4.2vw, 3.4rem);
}
@media (min-width: 980px) {
  .pagehead__in { grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); }
  .pagehead--slim .pagehead__in { grid-template-columns: minmax(0, 1fr); }
}
.pagehead__copy { max-width: 41rem; }
/* the copy column is narrower than the page, so the headline scales to it */
.pagehead .h1 { margin-top: 0.9rem; font-size: clamp(1.9rem, 3.5vw, 3rem); }
.pagehead .h1--long { font-size: clamp(1.65rem, 2.9vw, 2.45rem); line-height: 1.14; }
.pagehead--slim .h1 { font-size: clamp(2.1rem, 4.2vw, 3.35rem); }
.pagehead .lede { margin-top: 1.05rem; }
.pagehead__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.pagehead--slim .pagehead__in { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* the photo plate */
.pagehead__media {
  position: relative;
  margin: 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-lift);
}
@media (min-width: 620px) and (max-width: 979px) {
  /* stacked on tablet: a wide strip instead of a viewport-eating block */
  .pagehead__media { aspect-ratio: 16 / 6.5; }
}
.pagehead__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}
@media (min-width: 980px) {
  .pagehead__media { aspect-ratio: 3 / 2.35; }
}

/* navy meta plate clipped into the photo corner */
.pagehead__plate {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 88%;
  padding: 0.72rem 1rem 0.78rem;
  background: var(--navy-deep);
  border-top-right-radius: var(--r);
}
.pagehead__plate ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.05rem;
}
.pagehead__plate li {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--f-mono);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--on-navy-dim);
}
.pagehead__plate li svg { width: 0.9rem; height: 0.9rem; color: var(--accent); flex: none; }
.pagehead__plate li:first-child { color: var(--on-navy); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim-2);
}
.crumbs a { transition: color 0.16s var(--ease); }
.crumbs a:hover { color: var(--accent-tx); }
.crumbs span[aria-hidden] { opacity: 0.45; }

/* ---------- trust / partner logos ---------- */
.trust { border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.trust__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: 1.5rem;
}
.trust__label { flex: none; }
.trust__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.4rem, 3.5vw, 2.9rem);
}
.trust__row img {
  height: 22px;
  width: auto;
  object-fit: contain;
  opacity: 0.42;
  filter: grayscale(1) contrast(1.15);
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease);
}
.trust__row img:hover { opacity: 0.95; filter: grayscale(0) contrast(1); }

/* ==========================================================================
   SYSTEMS CONSOLE - index on the left, navy stage on the right
   ========================================================================== */
.console {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
@media (min-width: 960px) {
  .console { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
}

.console__list {
  padding: 0.55rem;
  display: grid;
  gap: 2px;
  align-content: start;
}
.crow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.82rem 0.85rem;
  border-radius: 2px;
  border-inline-start: 2px solid transparent;
  text-align: start;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.crow:hover, .crow.is-active { background: var(--bg-soft); border-inline-start-color: var(--accent); }
.crow__no {
  flex: none;
  width: 1.55rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--dim-2);
  transition: color 0.18s var(--ease);
}
.crow.is-active .crow__no { color: var(--accent-tx); }
.crow__thumb {
  flex: none;
  display: none;
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 2px;
}
.crow__t {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.955rem;
  letter-spacing: -0.014em;
  line-height: 1.32;
  color: var(--ink);
}
.crow__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--dim);
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.crow__go svg { width: 0.85rem; height: 0.85rem; }
.crow:hover .crow__go, .crow.is-active .crow__go {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.console__stage {
  position: relative;
  display: none;
  background: var(--navy-deep);
  min-height: 27rem;
}
@media (min-width: 960px) { .console__stage { display: block; } }

.cstage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.34s var(--ease), visibility 0.34s var(--ease);
}
.cstage.is-active { opacity: 1; visibility: visible; }
.cstage__img {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}
.cstage__cap {
  flex: none;
  padding: 1.15rem 1.35rem 1.35rem;
  background: var(--navy-deep);
  border-top: 1px solid var(--on-navy-line);
}
.cstage__row { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 0.4rem; }
.cstage__no {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.cstage__deg {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
}
.cstage__t {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.016em;
  line-height: 1.3;
  color: #fff;
}
.cstage__d {
  margin-top: 0.3rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--on-navy-dim);
  max-width: 44ch;
}

@media (max-width: 959px) {
  .crow { gap: 0.7rem; }
  .crow__thumb { display: block; }
}

/* ---------- bento: domains ---------- */
.bento { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 13.5rem;
  padding: 1.1rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--navy-deep);
  isolation: isolate;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.62) brightness(0.66);
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(178deg, rgba(8, 36, 63, 0.18) 16%, rgba(6, 26, 45, 0.94) 92%);
  transition: background 0.35s var(--ease);
}
.tile:hover {
  border-color: var(--line-hard);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.tile:hover img { transform: scale(1.045); filter: saturate(0.8) brightness(0.74); }
.tile__no {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: auto;
}
.tile__t {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #fff;
}
.tile__p {
  margin-top: 0.42rem;
  font-size: 0.83rem;
  line-height: 1.5;
  color: rgba(234, 241, 246, 0.78);
  display: none;
}
.tile--lg { min-height: 13.5rem; }
@media (min-width: 620px) {
  .tile--lg { grid-column: span 2; grid-row: span 2; min-height: 100%; padding: 1.5rem; }
  .tile--lg .tile__t { font-size: clamp(1.35rem, 2vw, 1.7rem); }
  .tile--lg .tile__p { display: block; font-size: 0.92rem; max-width: 34ch; }
}
@media (min-width: 620px) and (max-width: 999px) {
  .tile--lg { grid-row: auto; min-height: 17rem; }
  .tile--lg .tile__p { max-width: 46ch; }
}
.tile__go {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.tile:hover .tile__go, .tile:focus-visible .tile__go { opacity: 1; transform: none; }
.tile__go svg { width: 0.85em; height: 0.85em; }

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); padding: 1.4rem 1.3rem; }
.stat b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.65rem, 2.9vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
}
.stat b em { font-style: normal; color: var(--accent-tx); }
.stat span { display: block; margin-top: 0.45rem; font-size: 0.82rem; line-height: 1.5; color: var(--dim); }

/* ---------- quote ---------- */
.quote {
  position: relative;
  padding-inline-start: clamp(1.2rem, 2.5vw, 2rem);
  border-inline-start: 2px solid var(--navy);
}
.quote p {
  font-family: var(--f-display);
  font-size: clamp(1.22rem, 2.2vw, 1.7rem);
  font-weight: 500;
  line-height: 1.36;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: pretty;
}
.quote footer {
  margin-top: 1rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim-2);
}

/* ---------- split media + text ---------- */
.split { display: grid; gap: clamp(1.9rem, 4vw, 3.4rem); align-items: center; }
@media (min-width: 940px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--media-first > .split__media { order: -1; }
}
.split__media {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  aspect-ratio: 3 / 2;
  box-shadow: var(--shadow-card);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.split__media--tall { aspect-ratio: 4 / 5; }

/* ---------- feature grid ---------- */
.fgrid { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .fgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.fcard {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.fcard:hover { border-color: var(--line-hard); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.fcard__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--navy);
  background: var(--bg-tint);
}
.fcard__ico svg { width: 1.15rem; height: 1.15rem; }
.fcard .h4 { margin-bottom: 0.45rem; }
.fcard p { font-size: 0.875rem; line-height: 1.58; color: var(--dim); }
.fcard .tlink { margin-top: 0.85rem; }

/* ---------- plain list ---------- */
.plist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.plist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--dim);
}
.plist li svg { width: 1.05rem; height: 1.05rem; flex: none; margin-top: 0.22rem; color: var(--navy); }
.plist li strong { color: var(--ink); font-weight: 600; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.62rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.chip svg { width: 0.95em; height: 0.95em; color: var(--navy); }

/* ---------- capability list ---------- */
.caplist {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .caplist { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .caplist--3 { grid-template-columns: 1fr 1fr 1fr; } }
.cap {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.82rem 1rem;
  background: var(--surface);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--dim);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.cap svg { width: 1.05rem; height: 1.05rem; color: var(--navy); flex: none; }
.cap:hover { background: var(--bg-tint); color: var(--ink); }

/* ---------- process steps ---------- */
.steps {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.step {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem 1.3rem;
  background: var(--surface);
  transition: background 0.22s var(--ease);
}
@media (min-width: 900px) {
  .step { grid-template-columns: 3rem minmax(0, 14rem) minmax(0, 1fr); align-items: baseline; }
}
.step:hover { background: var(--bg-tint); }
.step__no {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--accent-tx);
  letter-spacing: 0.08em;
  padding-top: 0.18rem;
}
.step .h4 { margin-bottom: 0.3rem; }
.step p { font-size: 0.87rem; line-height: 1.58; color: var(--dim); }
@media (min-width: 900px) { .step .h4 { margin-bottom: 0; } }
@media (max-width: 899px) {
  .step { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .step > p:last-child { grid-column: 2; }
}

/* ---------- work list ---------- */
.worklist { border-top: 1px solid var(--line); }
.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  padding: 1.15rem 0.25rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease), padding-inline 0.2s var(--ease);
}
@media (min-width: 820px) {
  .work { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); align-items: baseline; }
}
.work:hover { background: rgba(10, 28, 40, 0.03); padding-inline: 0.8rem; }
.work__name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.012em;
  line-height: 1.35;
  color: var(--ink);
}
.work__meta {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--dim-2);
  text-transform: uppercase;
  margin-top: 0.2rem;
}
.work__sys { font-size: 0.855rem; line-height: 1.55; color: var(--dim); }

/* ---------- project cards ---------- */
.pgrid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pcard {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.pcard:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.pcard__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.pcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82);
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
}
.pcard:hover .pcard__img img { transform: scale(1.05); filter: saturate(1); }
.pcard__b { padding: 1rem 1.1rem 1.15rem; }
.pcard__b .h4 { margin-bottom: 0.3rem; }
.pcard__b p { font-size: 0.83rem; color: var(--dim); line-height: 1.5; }

/* ---------- certificates ---------- */
.certs { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .certs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .certs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cert {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.cert:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.cert img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top center; }
.cert__cap {
  padding: 0.55rem 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  line-height: 1.35;
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.15rem 0.25rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.012em;
  line-height: 1.4;
  color: var(--ink);
  transition: color 0.18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-tx); }
.faq summary i {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--line-hard);
  border-radius: var(--r);
  color: var(--dim);
  transition: transform 0.22s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.faq summary i svg { width: 0.85rem; height: 0.85rem; }
.faq details[open] summary i {
  transform: rotate(45deg);
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.faq__a {
  padding: 0 3rem 1.3rem 0.25rem;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--dim);
  max-width: 62ch;
}

/* ---------- CTA band (navy) ---------- */
.ctaband {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--navy-deep);
  color: var(--on-navy);
  padding: clamp(2rem, 4.5vw, 3.4rem);
  isolation: isolate;
}
.ctaband img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.45) brightness(0.5);
}
.ctaband::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(96deg, rgba(6, 26, 45, 0.96) 10%, rgba(8, 36, 63, 0.82) 58%, rgba(8, 36, 63, 0.58)),
    radial-gradient(30rem 18rem at 90% 0%, rgba(255, 166, 61, 0.16), transparent 70%);
}
.ctaband__in { display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 900px) { .ctaband__in { grid-template-columns: minmax(0, 1fr) auto; } }
.ctaband .h2 { max-width: 30ch; color: #fff; }
.ctaband .lede { color: var(--on-navy-dim); }
.ctaband__cta { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 940px) {
  .contact-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
}
.cinfo { display: grid; gap: 1.5rem; }
.cinfo__item { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.9rem; }
.cinfo__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--navy);
  background: var(--bg-tint);
}
.cinfo__ico svg { width: 1.05rem; height: 1.05rem; }
.cinfo__item > div > span { display: block; margin-bottom: 0.2rem; }
.cinfo__item a, .cinfo__item p { font-size: 0.95rem; font-weight: 600; line-height: 1.5; color: var(--ink); }
.cinfo__item a:hover { color: var(--accent-tx); }

/* form */
.form {
  padding: clamp(1.25rem, 3vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}
.form__row { display: grid; gap: 1rem; }
@media (min-width: 620px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field > label {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.72rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line-hard);
  border-radius: var(--r);
  color: var(--ink);
  font-size: 0.92rem;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim-2); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(12, 60, 108, 0.12);
}
.field__hint { font-size: 0.72rem; color: var(--dim-2); }
.check {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--dim);
}
.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; accent-color: var(--navy); }
.check a { color: var(--accent-tx); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- footer (navy) ---------- */
.footer { background: var(--navy-deep); color: var(--on-navy); }
.footer__top {
  display: grid;
  gap: 2.25rem;
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}
@media (min-width: 900px) {
  .footer__top { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}
.footer__brand img { height: 36px; width: auto; }
.footer__brand p { margin-top: 1.1rem; font-size: 0.87rem; line-height: 1.62; color: var(--on-navy-dim); max-width: 30ch; }
.footer__contact { margin-top: 1.3rem; display: grid; gap: 0.55rem; }
.footer__contact a, .footer__contact span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.87rem;
  color: var(--on-navy-dim);
  transition: color 0.16s var(--ease);
}
.footer__contact svg { width: 1rem; height: 1rem; color: var(--accent); flex: none; }
.footer__contact a:hover { color: #fff; }

.fcol > h4 {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
  margin-bottom: 0.85rem;
}
.fcol ul { display: grid; gap: 0.5rem; }
.fcol a { font-size: 0.865rem; color: var(--on-navy-dim); transition: color 0.16s var(--ease); }
.fcol a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--on-navy-line);
  font-size: 0.78rem;
  color: var(--on-navy-dim);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer__legal a:hover { color: #fff; }
.socials { display: flex; gap: 0.5rem; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--on-navy-line);
  border-radius: var(--r);
  color: var(--on-navy-dim);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.socials a svg { width: 1rem; height: 1rem; }
.socials a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------- prose ---------- */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.05rem; }
.prose h2 {
  font-family: var(--f-display);
  font-size: clamp(1.18rem, 1.9vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.prose h3 {
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.9rem;
}
.prose p, .prose li { font-size: 0.92rem; line-height: 1.72; color: var(--dim); }
.prose ul, .prose ol { padding-left: 1.1rem; }
.prose ul li { list-style: disc; margin-top: 0.4rem; }
.prose ol li { list-style: decimal; margin-top: 0.4rem; }
.prose a { color: var(--accent-tx); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- long form with TOC ---------- */
.longwrap { display: grid; gap: 2.5rem; }
@media (min-width: 1040px) {
  .longwrap { grid-template-columns: 15rem minmax(0, 1fr); gap: 4rem; align-items: start; }
}
.toc { display: none; position: sticky; top: 92px; }
@media (min-width: 1040px) { .toc { display: block; } }
.toc__t { margin-bottom: 0.85rem; }
.toc ol { display: grid; gap: 0.05rem; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.36rem 0.5rem 0.36rem 0.85rem;
  border-left: 1px solid transparent;
  font-size: 0.795rem;
  line-height: 1.4;
  color: var(--dim-2);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--accent); }

.longsec { padding-block: clamp(2.1rem, 4vw, 3.2rem); border-top: 1px solid var(--line-soft); }
.longsec:first-of-type { border-top: 0; padding-top: 0; }
.longsec__in > * + * { margin-top: 1.05rem; }
.longsec .h2 { max-width: 38ch; }
.longsec .h3 { margin-top: 2.2rem; color: var(--ink); }
.longsec .body { max-width: 70ch; }

/* ---------- misc utilities ---------- */
.rule { height: 1px; background: var(--line); border: 0; }
.center { text-align: center; }
.mt-s { margin-top: 0.75rem; } .mt-m { margin-top: 1.5rem; } .mt-l { margin-top: 2.25rem; } .mt-xl { margin-top: 3.25rem; }
.stack-s > * + * { margin-top: 0.6rem; }
.stack-m > * + * { margin-top: 1.15rem; }
.tagrow { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.emptynote {
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--line-hard);
  border-radius: var(--r);
  text-align: center;
  color: var(--dim);
  font-size: 0.9rem;
  background: var(--bg-tint);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--surface);
}
.devrow { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 760px) { .devrow { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dev {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  min-height: 7.5rem;
}
.dev img { max-height: 6rem; width: auto; object-fit: contain; }

/* ---------- motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- skip link ---------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.7rem 1rem;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r);
  z-index: 999;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* ---------- responsive fine-tuning ---------- */
@media (max-width: 620px) {
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctaband { padding: 1.5rem; }
  .hero__inner { padding-block: 1.75rem 2rem; }
}
