/* ============================================================
   SolTech InfoLabs — Components
   Nav · Buttons · Cards · Badges · Footer · Forms
   ============================================================ */

/* ============================ NAVIGATION ==================== */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  transition: background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              backdrop-filter var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-nav__inner {
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  gap: var(--sp-7);
}
/* Scrolled state — subtle glass, never milky */
.site-nav.is-stuck {
  background: rgb(7 5 22 / 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: rgb(255 255 255 / 0.09);
}
.site-nav.is-light.is-stuck {
  background: rgb(255 255 255 / 0.84);
  border-bottom-color: var(--line-200);
}

/* Brand — the official SolTech logo, used as supplied and never redrawn.
   Padding preserves the logo's clear space. */
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 6px 12px 6px 0;
}
/* The logo's own container block is a mid indigo (#393185). On deep navy it
   would disappear, so the lockup sits on a white plate instead of being
   recoloured — the mark stays exactly as the brand supplies it. */
.brand__plate {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(7 5 22 / 0.20), 0 6px 18px -8px rgb(7 5 22 / 0.5);
}
.brand__logo { height: 30px; width: auto; display: block; }

/* On a light header the plate is unnecessary. */
.site-nav.is-light .brand__plate {
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
}

.site-footer .brand__plate { padding: 9px 15px; }
.site-footer .brand__logo { height: 32px; }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.78rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--r-sm);
  color: var(--nav-fg-muted);
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.nav-link:hover { color: var(--nav-fg); background: var(--nav-hover); }
.nav-link[aria-current] { color: var(--nav-fg); }
.nav-link__chev { width: 11px; height: 11px; opacity: 0.55; transition: transform var(--dur) var(--ease-out); }
.nav-item--has-menu:hover .nav-link__chev,
.nav-item--has-menu:focus-within .nav-link__chev { transform: rotate(180deg); }

.site-nav { --nav-fg: #FFF; --nav-fg-muted: rgb(255 255 255 / 0.68); --nav-hover: rgb(255 255 255 / 0.08); color: var(--nav-fg); }
.site-nav.is-light { --nav-fg: var(--ink-900); --nav-fg-muted: var(--slate-600); --nav-hover: var(--paper-100); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

/* Dropdown mega-menu */
.nav-item { position: relative; }
.nav-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  translate: -50% 0;
  width: min(640px, 88vw);
  padding: 0.6rem;
  background: var(--white);
  border: 1px solid var(--line-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px);
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}
.nav-item--has-menu:hover .nav-menu,
.nav-item--has-menu:focus-within .nav-menu {
  opacity: 1; visibility: visible; transform: none;
}
/* invisible bridge so the pointer can travel from trigger to panel */
.nav-menu::before { content: ""; position: absolute; inset: -16px 0 100% 0; }

.nav-menu__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-menu__item:hover { background: var(--paper-100); }

/* Section captions inside the mega-menu. The two horizontal platforms
   (SuTra, SolServ Studio) sit under their own heading and carry a
   tinted surface, so they read as a layer rather than two more products. */
.nav-menu__section {
  grid-column: 1 / -1;
  margin: 0.5rem 0.8rem 0.15rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  color: var(--slate-500);
}
.nav-menu__section:first-child { margin-top: 0.25rem; }
.nav-menu__item--layer { background: var(--paper-50); }
.nav-menu__item--layer:hover { background: var(--blue-100); }
.nav-menu__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--pa) 12%, transparent);
  color: var(--pa-ink);
  flex: none;
}
.nav-menu__icon svg { width: 17px; height: 17px; }
.nav-menu__name {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-900);
  letter-spacing: var(--tr-normal); line-height: 1.35;
}
.nav-menu__desc {
  font-size: var(--fs-xs); color: var(--slate-500);
  line-height: 1.45; margin-top: 2px;
}
.nav-menu__foot {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  padding: 0.8rem;
  border-top: 1px solid var(--line-200);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-xs); color: var(--slate-500);
}
.nav-menu__foot a { font-weight: 600; color: var(--blue-600); white-space: nowrap; }
.nav-menu__foot a:hover { text-decoration: underline; }

/* Mobile toggle + drawer */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  color: var(--nav-fg);
  border: 1px solid transparent;
}
.nav-toggle:hover { background: var(--nav-hover); }
.nav-toggle__bars { position: relative; width: 19px; height: 12px; }
.nav-toggle__bars span {
  position: absolute; left: 0; height: 1.75px; width: 100%;
  background: currentColor; border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }
[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: var(--z-drawer);
  background: var(--ink-950);
  color: var(--d-text);
  /* dark surface: remap the semantic layer so descendants cannot inherit
     light-surface ink, and accent glyphs use the on-dark tone */
  --text:       var(--d-text);
  --text-muted: var(--d-text-muted);
  --text-faint: var(--d-text-faint);
  --border:     var(--d-border);
  --pa-ink:     var(--pa-lt);
  padding: var(--sp-6) var(--gutter) var(--sp-10);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
}
.nav-drawer.is-open { display: block; animation: drawerIn var(--dur) var(--ease-out); }
@keyframes drawerIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav-drawer__group + .nav-drawer__group { margin-top: var(--sp-7); }
.nav-drawer__label {
  font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: var(--tr-caps); text-transform: uppercase;
  color: var(--d-text-faint); margin-bottom: var(--sp-2);
}
.nav-drawer__link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 0.25rem;
  font-size: var(--fs-md); font-weight: 500;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
}
.nav-drawer__link .nav-menu__icon { width: 30px; height: 30px; border-radius: 8px; }
.nav-drawer__link .nav-menu__icon svg { width: 15px; height: 15px; }
.nav-drawer__meta { font-size: var(--fs-xs); color: var(--d-text-faint); font-weight: 400; margin-left: auto; text-align: right; }
.nav-drawer .btn { width: 100%; margin-top: var(--sp-7); }
body.nav-open { overflow: hidden; }

@media (max-width: 1120px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions { margin-left: auto; }
}

/* ============================ BUTTONS ======================= */
.btn {
  --btn-bg: var(--blue-500);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tr-normal);
  line-height: 1.25;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { box-shadow: 0 1px 2px rgb(23 19 64 / 0.18), 0 10px 24px -12px rgb(65 84 241 / 0.75); }
.btn--primary:hover { --btn-bg: var(--blue-600); box-shadow: 0 2px 4px rgb(23 19 64 / 0.20), 0 16px 34px -14px rgb(65 84 241 / 0.85); }

.btn--secondary { --btn-bg: var(--white); --btn-fg: var(--ink-900); --btn-bd: var(--line-300); box-shadow: var(--sh-xs); }
.btn--secondary:hover { --btn-bd: var(--slate-400); --btn-bg: var(--paper-50); }

.btn--ghost-light { --btn-bg: rgb(255 255 255 / 0.07); --btn-fg: #fff; --btn-bd: rgb(255 255 255 / 0.18); }
.btn--ghost-light:hover { --btn-bg: rgb(255 255 255 / 0.13); --btn-bd: rgb(255 255 255 / 0.30); }

.btn--lg { padding: 0.92rem 1.6rem; font-size: var(--fs-base); border-radius: var(--r-md); }
.btn--sm { padding: 0.5rem 0.9rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.btn__arrow { width: 15px; height: 15px; flex: none; transition: transform var(--dur) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--accent-text);
}
.link-arrow svg { width: 14px; height: 14px; flex: none; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow--pa { color: var(--pa-ink); }
.theme-dark .link-arrow--pa { color: var(--pa-lt); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ============================ BADGES / PILLS ================ */
.pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.34rem 0.85rem 0.34rem 0.68rem;
  font-size: var(--fs-xs); font-weight: 500;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}
.theme-dark .pill { background: rgb(255 255 255 / 0.05); }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pa); flex: none; }
.theme-dark .pill__dot { background: var(--pa-lt); }

.tag {
  display: inline-block;
  padding: 0.24rem 0.62rem;
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  border-radius: var(--r-xs);
  color: var(--pa-ink);
  background: color-mix(in srgb, var(--pa) 11%, transparent);
}
.theme-dark .tag { color: var(--pa-lt); background: color-mix(in srgb, var(--pa-lt) 16%, transparent); }

/* ============================ CARDS ========================= */
.card {
  position: relative;
  padding: var(--sp-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--border-strong);
}
.theme-dark .card { background: var(--d-surface); }
.theme-dark .card--hover:hover { background: var(--d-surface-hover); }

.card__icon {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--pa-ink);
  background: color-mix(in srgb, var(--pa) 10%, transparent);
  margin-bottom: var(--sp-5);
}
.theme-dark .card__icon { color: var(--pa-lt); background: color-mix(in srgb, var(--pa-lt) 14%, transparent); }
.card__icon svg { width: 20px; height: 20px; }
.card__title { font-size: var(--fs-h4); margin-bottom: 0.55rem; }
.card__body { font-size: var(--fs-sm); line-height: var(--lh-loose); color: var(--text-muted); }
.card__body + .card__body { margin-top: var(--sp-3); }

.card__num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--pa-ink);
  letter-spacing: var(--tr-wide);
  margin-bottom: var(--sp-4);
  display: block;
}
.theme-dark .card__num { color: var(--pa-lt); }

/* ============================ SECTION HEADING =============== */
.sec-head { max-width: 730px; margin-bottom: clamp(2.5rem, 1.8rem + 2.4vw, 4rem); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .lede { margin-inline: auto; }
.sec-head__title { margin-top: var(--sp-4); }
.sec-head .lede { margin-top: var(--sp-5); }
.sec-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: var(--sp-8);
  align-items: end;
}
@media (max-width: 900px) { .sec-head--split { grid-template-columns: 1fr; gap: var(--sp-5); align-items: start; } }

/* ============================ CHECK LIST ==================== */
.check-list { display: grid; gap: 0.72rem; }
/* The marker is positioned rather than laid out as a grid or flex item, so a
   bullet can contain inline elements (code spans, links, <b>) without each one
   becoming its own track and stacking vertically. */
.check-list li {
  position: relative;
  padding-left: 1.72rem;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--text-muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 17px; height: 17px;
  border-radius: 50%;
  background-color: var(--pa);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4.3 8.2l2.4 2.4 5-5.1' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 17px 17px;
  background-repeat: no-repeat;
}
.theme-dark .check-list li::before { background-color: var(--pa-lt); }

.check-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.72rem var(--sp-7); }
@media (max-width: 680px) { .check-list--2 { grid-template-columns: 1fr; } }

/* Definition-style list with rules */
.rule-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.55;
}
.rule-list li:last-child { border-bottom: 1px solid var(--border); }
.rule-list b { color: var(--text); font-weight: 600; }

/* ============================ FOOTER ======================== */
.site-footer {
  background: var(--ink-950);
  color: var(--d-text-muted);
  /* dark surface: remap the semantic layer, see .nav-drawer */
  --text:       var(--d-text);
  --text-muted: var(--d-text-muted);
  --text-faint: var(--d-text-faint);
  --border:     var(--d-border);
  padding-top: var(--sp-11);
  border-top: 1px solid rgb(255 255 255 / 0.07);
}
.site-footer a { color: var(--d-text-muted); transition: color var(--dur-fast) var(--ease-out); }
.site-footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-8) var(--sp-7);
  padding-bottom: var(--sp-10);
}
.footer__about { max-width: 34ch; }
.footer__about .brand { color: #fff; margin-bottom: var(--sp-4); }
.footer__desc { font-size: var(--fs-sm); line-height: var(--lh-loose); color: var(--d-text-faint); }
.footer__col h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: var(--tr-caps); text-transform: uppercase;
  color: #fff; margin-bottom: var(--sp-4);
}
.footer__col li + li { margin-top: 0.64rem; }
.footer__col a { font-size: var(--fs-sm); }
.footer__bottom {
  border-top: 1px solid rgb(255 255 255 / 0.07);
  padding-block: var(--sp-5);
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--d-text-faint);
}
.footer__social { display: flex; gap: 0.5rem; }
.footer__social a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--r-sm);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.footer__social a:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.25); }
.footer__social svg { width: 16px; height: 16px; }
@media (max-width: 940px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; max-width: 48ch; } }
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; gap: var(--sp-7); } }

/* ============================ FORMS ========================= */
.field { display: grid; gap: 0.42rem; align-content: start; }
.field__label {
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--text); letter-spacing: var(--tr-normal);
}
.field__req { color: var(--blue-600); margin-left: 2px; }
.field__hint { font-size: var(--fs-xs); color: var(--text-faint); }
.input, .select, .textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font-size: var(--fs-sm);
  background: var(--white);
  border: 1px solid var(--line-300);
  border-radius: var(--r-sm);
  color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--slate-500); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--slate-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgb(65 84 241 / 0.18);
}
.textarea { min-height: 136px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%23626C90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 12px 12px;
  padding-right: 2.2rem;
  cursor: pointer;
}
.field[data-invalid="true"] .input,
.field[data-invalid="true"] .select,
.field[data-invalid="true"] .textarea { border-color: #D22B45; }
.field[data-invalid="true"] .input:focus,
.field[data-invalid="true"] .select:focus,
.field[data-invalid="true"] .textarea:focus { box-shadow: 0 0 0 3px rgb(210 43 69 / 0.15); }
.field__error { font-size: var(--fs-xs); color: #A3122C; font-weight: 500; display: none; }
.field[data-invalid="true"] .field__error { display: block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.form-grid > .field--full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

.form-note { font-size: var(--fs-xs); color: var(--text-faint); line-height: 1.65; }
.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.55;
  border: 1px solid;
  display: none;
}
.form-status.is-shown { display: block; }
.form-status[data-tone="ok"]   { background: #ECFDF5; border-color: #A5E5C8; color: #05614A; }
.form-status[data-tone="info"] { background: var(--blue-100); border-color: var(--blue-200); color: var(--blue-700); }
.form-status[data-tone="err"]  { background: #FEF2F3; border-color: #F5C2CA; color: #A3122C; }
