/* TestoGauge — shared site styles (tokens, base, header, footer, common blocks) */

:root {
  --ink: #0F1B2A;
  --ink-2: #1B2A3B;
  --body: #4A5A6B;
  --muted: #5C6B7D;
  --faint: #8A99AA;
  --line: #E3E8EF;
  --line-2: #D5DCE4;
  --line-strong: #C9D4E0;
  --bg: #fff;
  --bg-soft: #F4F6F9;
  --bg-soft-2: #F3F6FA;
  --navy: #0C1F33;
  --navy-text: #C3D2E0;
  --blue: #1668C1;
  --blue-dark: #0F4E8F;
  --blue-tint: #EDF4FC;
  --blue-tint-2: #E6F1FB;
  --blue-soft: #7FB6E8;
  --amber: #D9A441;
  --green: #2E8B57;
  --red: #C8453B;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 32px;
  --maxw: 1440px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.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: 16px; top: -60px; z-index: 200; background: var(--blue); color: #fff; padding: 10px 14px; border-radius: 7px; font: 600 13px var(--sans); }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.container-wide { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 56px; }
.container-narrow { width: 100%; max-width: 944px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Icons ---------- */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 14px; height: 14px; stroke-width: 2; }
.ic-xs { width: 12px; height: 12px; stroke-width: 2; }

/* ---------- Type ---------- */
.eyebrow { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--blue); text-transform: uppercase; }
.eyebrow-muted { font: 600 10.5px var(--mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.h1 { font: 600 60px/1.02 var(--sans); letter-spacing: -.04em; color: var(--ink); }
.h1-page { font: 600 50px/1.05 var(--sans); letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.h2 { font: 600 34px/1.12 var(--sans); letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.h2-sm { font: 600 30px/1.12 var(--sans); letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.h3 { font: 600 22px/1.25 var(--sans); letter-spacing: -.015em; color: var(--ink); }
.lead { font: 400 18px/1.55 var(--sans); color: var(--body); text-wrap: balance; }
.body { font: 400 15px/1.7 var(--sans); color: var(--body); }
.body-lg { font: 400 16px/1.7 var(--sans); color: var(--body); text-wrap: pretty; }
.small { font: 400 13px/1.6 var(--sans); color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 7px; border: 1px solid transparent;
  font: 600 15px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue-dark); }
/* Primary button with the arrow chip used on inner pages */
.btn-chip { height: 50px; padding: 0 10px 0 20px; gap: 12px; border-radius: 8px; font-size: 14.5px; }
.btn-chip .chip { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.16); border-radius: 7px; }
.btn-chip.btn-secondary { padding: 0 20px; }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px var(--sans); color: var(--blue); }
.link-arrow .ic { transition: transform .15s; }
.link-arrow:hover .ic { transform: translateX(3px); }

/* ---------- Sections ---------- */
.section { padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.section-head > .link-arrow { margin-left: auto; }
.section-head .h2 { margin-top: 12px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 500 12.5px var(--sans); color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: #A9B7C6; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* Image tile with gradient caption (sectors etc.) */
.tile { position: relative; border-radius: 12px; overflow: hidden; background: var(--navy); display: block; color: #fff; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,31,51,.9), rgba(12,31,51,0) 60%); pointer-events: none; }
.tile:hover img { transform: scale(1.04); }
.tile .tile-cap { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.tile .tile-title { font: 600 17px var(--sans); color: #fff; }
.tile .tile-sub { font: 400 12px var(--sans); color: var(--navy-text); margin-top: 3px; }
.tile:hover { color: #fff; }

/* Placeholder for imagery not yet supplied */
.ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  background: repeating-linear-gradient(135deg, #EEF2F6 0 10px, #E7ECF2 10px 20px);
  font: 500 11px var(--mono); letter-spacing: .04em; color: var(--faint);
}
.ph.dark { background: repeating-linear-gradient(135deg, #12283F 0 10px, #0F2338 10px 20px); color: #5D7690; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card-link { display: block; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: #C3D3E4; box-shadow: 0 8px 24px rgba(15,27,42,.08); color: inherit; }

.icon-box { width: 40px; height: 40px; background: var(--blue-tint); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; flex: none; }

.cta-band { padding: 64px 0; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.cta-band .container { display: flex; align-items: center; gap: 32px; }
.cta-band .cta-text { flex: 1; }
.cta-band p { font: 400 15px/1.6 var(--sans); color: var(--body); margin-top: 10px; }
.cta-band .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .label { font: 600 12.5px var(--sans); color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff;
  font: 400 14.5px var(--sans); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235C6B7D' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,104,193,.14); }
.input::placeholder, .textarea::placeholder { color: #9AA8B7; }
.hint { font: 400 12px var(--sans); color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .bar { height: var(--header-h); max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 49px; height: 23px; }
.brand span { font: 600 17px var(--sans); letter-spacing: -.01em; }
/* Wordmark: capital T and G take the logo gradient */
.tg-letter { background: linear-gradient(135deg, #1D78D6, #0A2F7A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tg-letter { font: inherit; letter-spacing: inherit; }
.nav { display: flex; gap: 2px; }
.nav-item { position: static; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border-radius: 7px; border: 0; background: none;
  font: 500 13.5px var(--sans); color: var(--ink-2); cursor: pointer;
}
.nav-link .ic { color: var(--muted); transition: transform .2s; }
.nav-link:hover { color: var(--blue-dark); }
.nav-link[aria-expanded="true"], .nav-link.is-current { background: var(--blue-tint); color: var(--blue-dark); font-weight: 600; }
.nav-link[aria-expanded="true"] .ic { transform: rotate(180deg); color: var(--blue-dark); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); color: var(--blue-dark); }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 5px; font: 500 12px var(--mono); color: var(--body); background: none; border: 0; cursor: pointer; padding: 6px 4px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 32px rgba(15,27,42,.10); padding: 6px; min-width: 140px; display: none; }
.lang-menu.open { display: block; }
.lang-menu button { display: flex; width: 100%; justify-content: space-between; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font: 500 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.lang-menu button:hover, .lang-menu button[aria-checked="true"] { background: var(--bg-soft); color: var(--blue-dark); }
.signin { font: 600 13px var(--sans); color: var(--ink-2); }
.menu-toggle { display: none; }

/* Mega menus */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 32px rgba(15,27,42,.10); display: none;
}
.mega.open { display: block; animation: megaIn .16s ease-out; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mega-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px var(--gutter); }
.mega-foot { background: var(--bg-soft); border-top: 1px solid var(--line); }
.mega-foot .mega-foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 13px var(--gutter); display: flex; align-items: center; font: 400 12.5px var(--sans); color: var(--body); }
.mega-foot a { margin-left: auto; font-weight: 600; }

.mega-sectors { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)) 300px; gap: 28px; }
.mega-col-title { font: 600 10.5px var(--mono); letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.mega-list { display: flex; flex-direction: column; gap: 6px; }
.mega-row { display: flex; gap: 12px; align-items: center; padding: 7px; border-radius: 8px; color: inherit; }
.mega-row:hover { background: var(--bg-soft); color: inherit; }
.mega-row .thumb { width: 58px; height: 42px; position: relative; border-radius: 6px; overflow: hidden; flex: none; background: var(--bg-soft); }
.mega-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega-row .t { font: 600 13.5px var(--sans); color: var(--ink); }
.mega-row .s { font: 400 11.5px var(--sans); color: var(--muted); }
.mega-feature { position: relative; border-radius: 10px; overflow: hidden; background: var(--navy); min-height: 300px; display: block; }
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mega-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,31,51,.92), rgba(12,31,51,.1) 60%); }
.mega-feature .cap { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 1; }
.mega-feature .k { font: 600 10px var(--mono); letter-spacing: .1em; color: var(--blue-soft); }
.mega-feature .t { font: 600 17px/1.3 var(--sans); color: #fff; margin-top: 6px; }
.mega-feature .l { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--sans); color: #BBD8F2; margin-top: 10px; }

.mega-icons { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.mega-icon-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 8px; color: inherit; }
.mega-icon-row:hover { background: var(--bg-soft); color: inherit; }
.mega-icon-row .ib { width: 36px; height: 36px; border-radius: 9px; background: var(--blue-tint-2); color: var(--blue-dark); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mega-icon-row .ib .ic { width: 18px; height: 18px; }
.mega-icon-row .t { font: 600 13.5px var(--sans); color: var(--ink); }
.mega-icon-row .s { font: 400 11.5px var(--sans); color: var(--muted); }

.mega-products { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.mega-product { display: flex; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; color: inherit; transition: border-color .15s, background-color .15s; }
.mega-product:hover { border-color: #BCD0E6; background: #FAFBFD; color: inherit; }
.mega-product .img { width: 72px; height: 52px; flex: none; position: relative; border-radius: 6px; overflow: hidden; background: var(--bg-soft); }
.mega-product .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mega-product .body { padding: 0; min-width: 0; }
.mega-product .t { font: 600 13px/1.3 var(--sans); color: var(--ink); }
.mega-product .s { font: 400 11.5px/1.35 var(--sans); color: var(--muted); margin-top: 2px; }

.mega-backdrop { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(15,27,42,.18); z-index: 90; display: none; }
.mega-backdrop.open { display: block; }

/* Mobile drawer */
.drawer { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 300px repeat(5, minmax(0,1fr)); gap: 28px; }
.footer-tag { font: 400 13px/1.65 var(--sans); color: var(--muted); margin-top: 14px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }
.socials a:hover { border-color: var(--blue); color: var(--blue); }
.socials .ic { width: 17px; height: 17px; }
.footer-col h3 { font: 600 12px var(--sans); color: var(--ink); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font: 400 13px var(--sans); color: var(--body); }
.footer-col a:hover { color: var(--blue); }
.footer-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font: 400 12px var(--sans); color: var(--muted); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .site-header .bar { gap: 18px; }
  .nav-link { padding: 8px 8px; }
  .mega-sectors { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .mega-sectors .mega-feature { display: none; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .container-wide { padding-inline: 32px; }
  .nav, .header-tools .signin, .header-tools .lang, .header-tools .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .mega, .mega-backdrop { display: none !important; }
  .drawer {
    display: block; position: fixed; inset: var(--header-h) 0 0 0; background: #fff; z-index: 99; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
  }
  .drawer.open { transform: none; visibility: visible; }
  .drawer-inner { padding: 12px var(--gutter) 40px; }
  .drawer details { border-bottom: 1px solid var(--line); }
  .drawer summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font: 600 16px var(--sans); color: var(--ink); cursor: pointer; }
  .drawer summary::-webkit-details-marker { display: none; }
  .drawer details[open] summary .ic { transform: rotate(180deg); }
  .drawer details ul { list-style: none; margin: 0; padding: 0 0 14px; display: flex; flex-direction: column; gap: 2px; }
  .drawer details li a { display: block; padding: 9px 0; font: 400 14.5px var(--sans); color: var(--body); }
  .drawer .drawer-link { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font: 600 16px var(--sans); color: var(--ink); }
  .drawer .drawer-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
  .drawer .drawer-lang { display: flex; gap: 8px; margin-top: 20px; }
  .drawer .drawer-lang button { flex: 1; height: 40px; border: 1px solid var(--line-strong); background: #fff; border-radius: 7px; font: 600 12px var(--mono); color: var(--ink-2); cursor: pointer; }
  .drawer .drawer-lang button[aria-checked="true"] { background: var(--blue-tint); border-color: var(--blue); color: var(--blue-dark); }
  body.drawer-open { overflow: hidden; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --header-h: 60px; }
  .container-wide { padding-inline: 16px; }
  .h1 { font-size: 38px; }
  .h1-page { font-size: 34px; }
  .h2 { font-size: 26px; }
  .h2-sm { font-size: 24px; }
  .lead { font-size: 16px; }
  .section { padding: 48px 0 44px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head > .link-arrow { margin-left: 0; }
  .cta-band { padding: 44px 0; }
  .cta-band .container { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px 20px; }
  .footer-bottom .note { margin-left: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
