/* =====================================================================
   PT Jala Anugerah Mandiri — stylesheet
   Palette and typefaces carried over from the original site.
   ===================================================================== */

/* ---------- Fonts (self-hosted, IBM Plex — SIL Open Font License) ---------- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* JAM palette */
  --navy-950: #0B2740;   /* deepest — footer */
  --navy-900: #072D4E;   /* dark sections */
  --navy-800: #0A3B66;   /* primary */
  --steel:    #2E5E87;   /* secondary blue */
  --sky:      #86B9DE;   /* logo light blue — accents on dark */
  --coral:    #E88383;   /* logo coral */
  --red:      #D32F2F;   /* merah-putih accent */
  --ink:      #2B2F33;   /* body text */
  --slate:    #5D6772;   /* muted text */
  --mist:     #F3F4F6;   /* light surface */
  --fog:      #E7EAEE;   /* light surface 2 */
  --stone:    #C5C1B9;   /* warm neutral */
  --white:    #FFFFFF;

  --line:       rgba(10, 59, 102, 0.15);
  --line-dark:  rgba(255, 255, 255, 0.14);
  --on-dark:    rgba(255, 255, 255, 0.80);
  --on-dark-2:  rgba(255, 255, 255, 0.62);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Roboto Mono", monospace;

  /* type scale */
  --fs-xs:  0.8125rem;
  --fs-sm:  0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:  1.25rem;
  --fs-lg:  clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  --fs-xl:  clamp(1.875rem, 1.35rem + 1.9vw, 2.75rem);
  --fs-2xl: clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  --fs-hero: clamp(2.125rem, 0.9rem + 6.2vw, 6.25rem);

  /* layout */
  --container: 82rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 3rem + 6vw, 9rem);
  --header-h: 4.75rem;
  --cut: 1.75rem;        /* chamfer size — echoes the logo's diagonal */
  --cut-sm: 0.625rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { body { font-size: 1rem; } }
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
.section--light :focus-visible, .product :focus-visible { outline-color: var(--navy-800); }
[hidden] { display: none !important; }
section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 1rem); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--white); color: var(--navy-800); padding: .75rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* merah-putih bar — used at the top of every page and as a small mark */
.flagline { height: 3px; background: linear-gradient(90deg, var(--red) 0 50%, var(--white) 50% 100%); }
.flagmark { display: inline-flex; width: 3.5rem; height: 3px; flex: none; }
.flagmark::before, .flagmark::after { content: ""; flex: 1; }
.flagmark::before { background: var(--red); }
.flagmark::after  { background: var(--white); }
.section--light .flagmark::after, .product .flagmark::after { background: var(--fog); box-shadow: inset 0 0 0 1px var(--line); }

.code { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .04em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .95rem 1.4rem .95rem 1.3rem;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .01em; line-height: 1.2;
  text-decoration: none; border: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut-sm)) 0, 100% var(--cut-sm), 100% 100%, 0 100%);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
.btn svg { width: .85em; height: .85em; flex: none; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--light { background: var(--white); color: var(--navy-800); }
.btn--light:hover { background: var(--fog); }
.btn--glass { background: rgba(255, 255, 255, .14); color: var(--white); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn--glass:hover { background: rgba(255, 255, 255, .24); }
.btn--primary { background: var(--navy-800); color: var(--white); }
.btn--primary:hover { background: var(--navy-900); }
.btn--quiet { background: rgba(10, 59, 102, .07); color: var(--navy-800); }
.btn--quiet:hover { background: rgba(10, 59, 102, .13); }

.textlink {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.textlink svg { width: .8em; height: .8em; }
.textlink:hover { border-bottom-width: 2px; padding-bottom: 1px; }

/* =====================================================================
   Header
   ===================================================================== */
.site-top { position: fixed; inset: 0 0 auto 0; z-index: 100; }
.site-header {
  position: relative;
  color: var(--white);
  background: transparent;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-top.is-solid .site-header,
.site-top.is-open .site-header { background: var(--navy-900); box-shadow: 0 1px 0 var(--line-dark); }
.header-inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--white); margin-right: auto; }
.brand img { width: 2.6rem; height: 2.6rem; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font-size: .95rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.brand-name span { font-size: var(--fs-xs); color: var(--on-dark-2); letter-spacing: .02em; margin-top: .2rem; }

.primary-nav ul { list-style: none; display: flex; align-items: center; gap: .25rem; }
.nav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem .9rem; background: none; border: 0;
  font-size: var(--fs-sm); font-weight: 500; text-decoration: none; color: var(--white);
  position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .25rem; height: 2px;
  background: var(--sky); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav-link:hover::after, .nav-link[aria-expanded="true"]::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link svg { width: .7rem; height: .7rem; transition: transform .25s var(--ease); }
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.header-cta { margin-left: .5rem; }

.menu-toggle {
  display: none; align-items: center; gap: .6rem;
  background: none; border: 0; color: var(--white); padding: .6rem .25rem; font-size: var(--fs-sm); font-weight: 600;
}
.menu-toggle .bars { width: 1.4rem; height: .9rem; position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s;
}
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars span { top: calc(50% - 1px); }
.menu-toggle .bars::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(calc(.45rem - 1px)) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(calc(-.45rem + 1px)) rotate(-45deg); }

/* Mega menu (desktop) */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--navy-900); color: var(--white);
  border-top: 1px solid var(--line-dark);
  box-shadow: 0 30px 60px -20px rgba(4, 20, 36, .55);
}
.mega-inner { display: grid; grid-template-columns: minmax(14rem, 1fr) 3fr; gap: 3rem; padding-block: 2.5rem 3rem; }
.mega-intro h2 { font-size: var(--fs-lg); font-weight: 500; }
.mega-intro p { color: var(--on-dark-2); font-size: var(--fs-sm); margin: .75rem 0 1.5rem; max-width: 30ch; }
.mega-intro .textlink { color: var(--white); }
.mega-list { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.mega-item { display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: var(--white); }
.mega-item .stage { aspect-ratio: 4 / 3; }
.mega-item .code { color: var(--sky); margin-top: .5rem; }
.mega-item strong { font-size: var(--fs-base); font-weight: 600; line-height: 1.3; }
.mega-item:hover strong { text-decoration: underline; text-underline-offset: 4px; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: calc(var(--header-h) + 3px) 0 0 0; z-index: 99;
  background: var(--navy-900); color: var(--white);
  overflow-y: auto; padding: 1.5rem var(--gutter) 3rem;
}
.mobile-menu ul { list-style: none; }
.mobile-menu > nav > ul > li { border-bottom: 1px solid var(--line-dark); }
.mobile-menu a { text-decoration: none; }
.mobile-menu .m-link { display: block; padding: 1.1rem 0; font-size: var(--fs-lg); font-weight: 500; }
.mobile-menu .m-sub { padding: 0 0 1.1rem; display: grid; gap: .25rem; }
.mobile-menu .m-sub a { display: flex; align-items: baseline; gap: .9rem; padding: .55rem 0; color: var(--on-dark); }
.mobile-menu .m-sub .code { color: var(--sky); min-width: 4.5rem; }
.mobile-menu .m-sub a[aria-current="page"] { color: var(--white); font-weight: 600; }
.mobile-menu .m-contact { margin-top: 2rem; display: grid; gap: .75rem; color: var(--on-dark); font-size: var(--fs-sm); }
.mobile-menu .m-contact a { color: var(--white); font-weight: 600; }

@media (max-width: 960px) {
  .primary-nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand-name span { display: none; }
}
@media (min-width: 961px) { .mobile-menu { display: none !important; } }
body.menu-open { overflow: hidden; }

/* =====================================================================
   Shared visual devices
   ===================================================================== */
/* product "stage": navy field with a fine grid, product floats on it */
.stage {
  position: relative; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 2rem 2rem,
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 2rem 2rem,
    radial-gradient(120% 90% at 65% 30%, var(--steel) 0%, var(--navy-800) 45%, var(--navy-900) 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.stage img { width: 100%; height: 100%; object-fit: contain; padding: 8%; filter: drop-shadow(0 18px 24px rgba(3, 15, 28, .45)); }
.stage--light {
  background:
    linear-gradient(90deg, rgba(10,59,102,.06) 1px, transparent 1px) 0 0 / 2rem 2rem,
    linear-gradient(rgba(10,59,102,.06) 1px, transparent 1px) 0 0 / 2rem 2rem,
    radial-gradient(110% 90% at 60% 35%, var(--white) 0%, var(--mist) 55%, var(--fog) 100%);
}
.stage--light img { filter: drop-shadow(0 18px 20px rgba(11, 39, 64, .18)); }
.stage img.fit-cover { object-fit: cover; padding: 0; filter: none; }

.section { padding-block: var(--section-y); }
.section--light { background: var(--white); color: var(--ink); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--navy-900); color: var(--white); }

.section-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem 2rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { grid-column: 1 / span 6; font-size: var(--fs-xl); }
.section-head p { grid-column: 8 / span 5; color: var(--slate); max-width: 46ch; }
.section--dark .section-head p { color: var(--on-dark); }
@media (max-width: 900px) {
  .section-head h2, .section-head p { grid-column: 1 / -1; }
}

/* =====================================================================
   Home — hero
   ===================================================================== */
.hero {
  position: relative; isolation: isolate;
  min-height: max(40rem, 100svh);
  display: grid; align-items: end;
  color: var(--white);
  background: var(--navy-900) url("../img/hero-poster.webp?v=20261023") center / cover no-repeat;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, rgba(7,45,78,.78) 0%, rgba(7,45,78,0) 24%),
    linear-gradient(0deg, rgba(7,45,78,.94) 0%, rgba(7,45,78,.55) 38%, rgba(7,45,78,0) 70%),
    linear-gradient(90deg, rgba(7,45,78,.88) 0%, rgba(7,45,78,.55) 45%, rgba(7,45,78,.12) 80%);
}
.hero-content { padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(3rem, 9vh, 6.5rem); }
.hero-kicker { display: flex; align-items: center; gap: 1rem; font-size: var(--fs-sm); font-weight: 500; color: var(--on-dark); }
.hero h1 {
  margin-top: 1.25rem;
  font-size: var(--fs-hero); font-weight: 600; line-height: .98;
  letter-spacing: .07em; text-transform: uppercase;
}
.hero h1 span { display: block; }
.hero-lede { margin-top: 1.75rem; max-width: 52ch; font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.6; color: rgba(255,255,255,.9); }
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-control {
  position: absolute; right: var(--gutter); bottom: clamp(1.5rem, 4vh, 2.5rem);
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .6rem .9rem; border: 0; color: var(--white);
  background: rgba(7, 45, 78, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em;
}
.hero-control:hover { background: rgba(7, 45, 78, .8); }
.hero-control svg { width: .8rem; height: .8rem; }
@media (max-width: 640px) {
  .hero-overlay {
    background:
      repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 8px),
      linear-gradient(180deg, rgba(7,45,78,.8) 0%, rgba(7,45,78,.45) 30%, rgba(7,45,78,.7) 60%, rgba(7,45,78,.95) 100%);
  }
  .hero-content { padding-bottom: 5.5rem; }
  .hero-control { left: var(--gutter); right: auto; }
}

/* one orchestrated entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-kicker, .hero h1 span, .hero-lede, .hero-actions { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
  .hero h1 span:nth-child(1) { animation-delay: .12s; }
  .hero h1 span:nth-child(2) { animation-delay: .22s; }
  .hero-lede { animation-delay: .38s; }
  .hero-actions { animation-delay: .5s; }
  .hero-kicker .flagmark { transform-origin: left; animation: draw .8s var(--ease) .1s both; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* =====================================================================
   Home — about
   ===================================================================== */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3rem 2rem; }
.about-intro { grid-column: 1 / span 5; }
.about-intro h2 { font-size: var(--fs-xl); max-width: 16ch; }
.about-intro p { margin-top: 1.25rem; color: var(--slate); max-width: 46ch; }
.about-intro p:first-of-type { margin-top: 2rem; color: var(--ink); font-size: var(--fs-md); line-height: 1.55; }
.about-intro .textlink { margin-top: 2rem; color: var(--navy-800); }
.about-detail { grid-column: 7 / span 6; }
.about-label { font-size: var(--fs-sm); font-weight: 600; color: var(--steel); display: flex; align-items: center; gap: .9rem; }
.vision { margin-top: 1rem; font-size: var(--fs-2xl); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; color: var(--navy-800); max-width: 18ch; }
.mission { margin-top: clamp(2.5rem, 5vw, 4rem); }
.mission ol { list-style: none; margin-top: 1rem; border-top: 1px solid var(--line); counter-reset: m; }
.mission li {
  counter-increment: m;
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-md); line-height: 1.45; color: var(--ink);
}
.mission li::before { content: counter(m, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--steel); padding-top: .2rem; }
@media (max-width: 900px) {
  .about-intro, .about-detail { grid-column: 1 / -1; }
}

/* =====================================================================
   Home — product category tiles
   ===================================================================== */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
.tile { position: relative; grid-column: span 6; display: flex; flex-direction: column; min-height: 36rem; color: var(--white); }
.tiles--home .tile:nth-child(4n+1), .tiles--home .tile:nth-child(4n+4) { grid-column: span 7; }
.tiles--home .tile:nth-child(4n+2), .tiles--home .tile:nth-child(4n+3) { grid-column: span 5; }
.tile .stage { position: absolute; inset: 0; }
.tile-media { position: relative; flex: 1 1 auto; min-height: 15rem; }
.tile-media img {
  position: absolute; left: 2rem; right: 2rem; top: 2.25rem; bottom: .5rem;
  width: calc(100% - 4rem); height: calc(100% - 2.75rem); object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(3, 15, 28, .45));
  transition: transform .5s var(--ease);
}
.tile:hover .tile-media img { transform: translateY(-6px) scale(1.02); }
.tile-body { position: relative; padding: 1.5rem clamp(1.5rem, 3vw, 2.5rem) clamp(1.75rem, 3vw, 2.5rem); }
.tile-body .code { color: var(--sky); }
.tile-body h3 { margin-top: .5rem; font-size: var(--fs-lg); }
.tile-body p { margin-top: .75rem; color: var(--on-dark); font-size: var(--fs-sm); max-width: 52ch; }
.tile-link { margin-top: 1.25rem; color: var(--white); }
.tile-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile-link:focus-visible { outline: none; }
.tile:focus-within { outline: 2px solid var(--sky); outline-offset: 4px; }

@media (max-width: 1080px) {
  .tiles--home .tile:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 720px) {
  .tiles { grid-template-columns: 1fr; }
  .tiles .tile:nth-child(n), .tiles--home .tile:nth-child(n) { grid-column: 1 / -1; min-height: 30rem; }
}

/* =====================================================================
   Home — purpose band (full-bleed photo)
   ===================================================================== */
.purpose {
  position: relative; isolation: isolate; color: var(--white);
  min-height: clamp(32rem, 75vh, 46rem); display: grid; align-items: center;
  background: var(--navy-900);
}
.purpose-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.purpose::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7,45,78,.95) 0%, rgba(7,45,78,.82) 42%, rgba(7,45,78,.25) 85%),
    linear-gradient(0deg, rgba(7,45,78,.6), rgba(7,45,78,0) 40%);
}
.purpose-inner { padding-block: var(--section-y); }
.purpose .about-label { color: var(--sky); }
.purpose-statement { margin: 1.25rem 0 0; font-size: var(--fs-2xl); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; max-width: 22ch; }
.purpose .btn { margin-top: 2.5rem; }
@media (max-width: 640px) {
  .purpose::before { background: linear-gradient(0deg, rgba(7,45,78,.95) 0%, rgba(7,45,78,.8) 60%, rgba(7,45,78,.55) 100%); }
}

/* =====================================================================
   Home — clients
   ===================================================================== */
.clients { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.client { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 2.5rem 1rem 2rem; text-align: center; }
.client + .client { border-left: 1px solid var(--line); }
.client img { height: 6.5rem; width: auto; object-fit: contain; }
.client span { font-size: var(--fs-sm); font-weight: 500; color: var(--slate); line-height: 1.35; }
@media (max-width: 900px) {
  .clients { grid-template-columns: repeat(3, 1fr); }
  .client:nth-child(3n+1) { border-left: 0; }
  .client:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .clients { grid-template-columns: repeat(2, 1fr); }
  .client:nth-child(n) { border-left: 0; border-top: 0; }
  .client:nth-child(2n) { border-left: 1px solid var(--line); }
  .client:nth-child(n+3) { border-top: 1px solid var(--line); }
  .client img { height: 5rem; }
}

/* =====================================================================
   Contact
   ===================================================================== */
.contact { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3rem 2rem; align-items: start; }
.contact-info { grid-column: 1 / span 5; }
.contact-info h2 { font-size: var(--fs-xl); }
.contact-info > p { margin-top: 1.25rem; color: var(--on-dark); max-width: 42ch; }
.contact-list { margin: 2.5rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--line-dark); }
.contact-item { padding: 1.4rem 0; border-bottom: 1px solid var(--line-dark); display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; }
.contact-item dt { font-size: var(--fs-sm); color: var(--sky); font-weight: 500; padding-top: .2rem; }
.contact-item dd { margin: 0; }
.contact-item .big { font-size: var(--fs-md); font-weight: 600; color: var(--white); text-decoration: none; word-break: break-word; }
.contact-item .big:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact-item address { font-style: normal; color: var(--white); line-height: 1.55; }
.contact-item .textlink { margin-top: .9rem; color: var(--sky); }
.contact-map { grid-column: 7 / span 6; }
.map-frame { position: relative; aspect-ratio: 4 / 3; background: var(--navy-800); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.8); }
.map-caption { margin-top: .9rem; font-size: var(--fs-xs); color: var(--on-dark-2); }
@media (max-width: 900px) {
  .contact-info, .contact-map { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .contact-item { grid-template-columns: 1fr; gap: .35rem; }
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: var(--navy-950); color: var(--on-dark); font-size: var(--fs-sm); }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1.6fr; gap: 2.5rem; padding-block: 4.5rem 3.5rem; }
.footer-brand .brand { margin: 0; }
.footer-brand p { margin-top: 1.25rem; max-width: 34ch; color: var(--on-dark-2); }
.site-footer h2 { font-size: var(--fs-sm); font-weight: 600; color: var(--white); margin-bottom: 1rem; }
.site-footer ul { list-style: none; display: grid; gap: .6rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-contact address { font-style: normal; line-height: 1.6; }
.footer-bottom { border-top: 1px solid var(--line-dark); }
.footer-bottom .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; color: var(--on-dark-2); font-size: var(--fs-xs); }
.to-top { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; color: var(--on-dark); font-size: var(--fs-xs); font-weight: 600; padding: .4rem 0; }
.to-top svg { width: .75rem; height: .75rem; }
.to-top:hover { color: var(--white); }
@media (max-width: 960px) { .footer-main { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-main { grid-template-columns: 1fr; } }

/* =====================================================================
   Category page
   ===================================================================== */
.cat-hero {
  position: relative; color: var(--white); overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 8px),
    linear-gradient(140deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-900) 100%);
  padding-top: calc(var(--header-h) + 3px);
}
.cat-hero-inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); }
.cat-hero-text { grid-column: 1 / span 6; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; font-size: var(--fs-xs); color: var(--on-dark-2); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; opacity: .6; }
.breadcrumb a { text-decoration: none; color: var(--on-dark); }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.cat-hero .code { display: block; margin-top: 2.5rem; color: var(--sky); }
.cat-hero h1 { margin-top: .75rem; font-size: clamp(2rem, 1rem + 4.4vw, 4.5rem); letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.cat-hero .tagline { margin-top: 1rem; font-size: var(--fs-md); color: var(--sky); font-weight: 500; }
.cat-hero .summary { margin-top: 1.25rem; color: var(--on-dark); max-width: 50ch; }
.cat-hero .flagmark { margin-top: 2rem; }
.cat-hero-media { grid-column: 7 / span 6; }
.cat-hero-media .stage { aspect-ratio: 5 / 4; background: radial-gradient(70% 60% at 55% 50%, rgba(134,185,222,.28) 0%, rgba(46,94,135,.18) 45%, transparent 75%); clip-path: none; }
.cat-hero-media .stage img { padding: 4%; }
@media (max-width: 900px) {
  .cat-hero-text, .cat-hero-media { grid-column: 1 / -1; }
  .cat-hero-media { order: -1; max-width: 32rem; }
  .cat-hero .code { margin-top: 1.5rem; }
}

.cat-switch { background: var(--navy-950); border-top: 1px solid var(--line-dark); }
.cat-switch ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.cat-switch a { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.25rem 1rem; text-decoration: none; color: var(--on-dark); border-top: 3px solid transparent; height: 100%; }
.cat-switch li + li a { border-left: 1px solid var(--line-dark); }
.cat-switch a .code { color: var(--on-dark-2); }
.cat-switch a span:last-child { font-weight: 500; }
.cat-switch a:hover { color: var(--white); background: rgba(255,255,255,.04); }
.cat-switch a[aria-current="page"] { color: var(--white); border-top-color: var(--red); background: rgba(255,255,255,.05); }
.cat-switch a[aria-current="page"] .code { color: var(--sky); }
@media (max-width: 720px) {
  .cat-switch .container { padding-inline: 0; }
  .cat-switch ul { grid-template-columns: repeat(2, 1fr); }
  .cat-switch li:nth-child(3) a { border-left: 0; }
  .cat-switch li:nth-child(n+3) a { border-top-color: transparent; box-shadow: inset 0 1px 0 var(--line-dark); }
  .cat-switch li:nth-child(n+3) a[aria-current="page"] { border-top-color: var(--red); }
}

.products { display: grid; gap: clamp(4rem, 8vw, 7rem); }
.product { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem 3rem; align-items: center; }
.product-media { grid-column: 1 / span 7; }
.product-info { grid-column: 8 / span 5; }
.product:nth-child(even) .product-media { grid-column: 6 / span 7; order: 2; }
.product:nth-child(even) .product-info { grid-column: 1 / span 5; order: 1; }
.product-media .stage { aspect-ratio: 4 / 3; }
.product-info .code { color: var(--steel); display: block; margin-bottom: .6rem; }
.product-info h2 { font-size: var(--fs-xl); color: var(--navy-800); }
.product-info .flagmark { margin-top: 1.5rem; }
.product-info p { margin-top: 1.25rem; color: var(--ink); max-width: 52ch; }
.product-info p + p { margin-top: 1rem; }
.specs { margin: 1.75rem 0 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.specs dt { color: var(--slate); }
.specs dd { margin: 0; font-weight: 500; }
.product-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.thumbs { list-style: none; display: flex; gap: .6rem; margin-top: .9rem; overflow-x: auto; padding-bottom: .25rem; }
.thumb { flex: none; width: 5.5rem; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--mist); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.thumb img.fit-cover { object-fit: cover; padding: 0; }
.thumb::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.thumb:hover::after { box-shadow: inset 0 0 0 2px var(--steel); }
.thumb[aria-pressed="true"]::after { box-shadow: inset 0 0 0 2px var(--navy-800); }
.thumb:focus-visible { outline-offset: 2px; }

.empty-state { padding: 3rem; background: var(--mist); max-width: 46rem; }
.empty-state h2 { font-size: var(--fs-lg); color: var(--navy-800); }
.empty-state p { margin-top: .75rem; color: var(--slate); }
.empty-state .btn { margin-top: 1.5rem; }

@media (max-width: 900px) {
  .product .product-media, .product:nth-child(even) .product-media,
  .product .product-info, .product:nth-child(even) .product-info { grid-column: 1 / -1; order: initial; }
}

.cta-band { background: var(--mist); }
.cta-band .container { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem 2rem; align-items: center; padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.cta-band .cta-text { grid-column: 1 / span 6; }
.cta-band h2 { font-size: var(--fs-xl); color: var(--navy-800); }
.cta-band p { margin-top: 1rem; color: var(--slate); max-width: 44ch; }
.cta-band .actions { grid-column: 8 / span 5; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; }
@media (max-width: 900px) {
  .cta-band .cta-text, .cta-band .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

.tiles--more .tile { grid-column: span 4; min-height: 26rem; }
@media (max-width: 960px) { .tiles--more .tile { grid-column: span 6; } .tiles--more .tile:last-child { grid-column: 1 / -1; } }
@media (max-width: 720px) { .tiles--more .tile:nth-child(n) { grid-column: 1 / -1; min-height: 24rem; } }

/* 404 */
.notfound { min-height: 100svh; display: grid; align-items: center; color: var(--white);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 8px), linear-gradient(140deg, var(--navy-950), var(--navy-800)); }
.notfound .container { padding-block: calc(var(--header-h) + 4rem) 4rem; }
.notfound h1 { font-size: var(--fs-2xl); margin-top: 1rem; max-width: 18ch; }
.notfound p { margin-top: 1.25rem; color: var(--on-dark); max-width: 46ch; }
.notfound .hero-actions { margin-top: 2rem; }

noscript .noscript { display: block; padding: 1rem var(--gutter); background: var(--mist); color: var(--ink); font-size: var(--fs-sm); }

/* ---------- Collapse 12-column grids on small screens ---------- */
@media (max-width: 900px) {
  .about, .contact, .section-head, .cat-hero-inner, .cta-band .container, .product { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-top, .mobile-menu, .hero-media, .hero-control, .contact-map, .to-top { display: none !important; }
  .hero, .section--dark, .cat-hero, .purpose, .site-footer { background: none !important; color: #000 !important; }
  .hero-overlay, .purpose::before { display: none; }
}
