/* SouthTech — southtechqa.com
   Palette from the brand deck: navy #285293 / #0F3570, ink #2A2E3A, mint #00F4AD, sky #9FC5E8.
   Motif: computer-vision detection brackets + mono tracking labels. */

:root {
  --ink: #0B1B3A;          /* deep navy ground (dark sections, both themes) */
  --ink-2: #12295A;
  --navy: #285293;         /* brand primary */
  --navy-deep: #0F3570;
  --sky: #9FC5E8;
  --mint: #00F4AD;         /* detection accent */
  --mint-ink: #00A878;     /* mint that reads on light ground */

  --bg: #F4F7FC;
  --bg-2: #E9EFF8;
  --surface: #FFFFFF;
  --line: #D3DCEA;
  --text: #17223A;
  --muted: #5A6784;
  --heading: #0F3570;
  --link: #285293;
  --on-dark: #EAF1FB;
  --on-dark-muted: #9FB3D1;

  --font-display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 6px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 62ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1630; --bg-2: #0F1F44; --surface: #12244D; --line: #22386A;
    --text: #E4ECF8; --muted: #9FB3D1; --heading: #FFFFFF; --link: #9FC5E8;
    --mint-ink: #2EF0B8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1630; --bg-2: #0F1F44; --surface: #12244D; --line: #22386A;
  --text: #E4ECF8; --muted: #9FB3D1; --heading: #FFFFFF; --link: #9FC5E8;
  --mint-ink: #2EF0B8; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 600; }
p { margin: 0; max-width: var(--measure); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 110px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.dark { background: var(--ink); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark p { color: var(--on-dark); }
.dark .muted { color: var(--on-dark-muted); }
.muted { color: var(--muted); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; }

/* mono tracking label — the eyebrow */
.tag {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mint-ink); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.tag::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.dark .tag { color: var(--mint); }

.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }
.section-head.split { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 720px) { .section-head.split { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 13px 22px; border-radius: var(--radius); text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--mint); color: #062A22; }
.btn-primary:hover { background: #2AF7BE; }
.btn-ghost { border-color: var(--line); color: var(--heading); background: transparent; }
.dark .btn-ghost { border-color: rgba(159,197,232,.4); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(159,197,232,.18);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 10px 14px; border-radius: var(--radius); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { background: rgba(159,197,232,.12); }
.nav a[aria-current="page"] { color: var(--mint); }
.nav .btn { margin-left: 10px; padding: 10px 18px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(159,197,232,.4); color: #fff; border-radius: var(--radius); padding: 8px 12px; font: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--ink); padding: 12px var(--gutter) 20px; border-bottom: 1px solid rgba(159,197,232,.18); }
  .nav.open { display: flex; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--on-dark); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; opacity: .55; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 20%, rgba(11,27,58,.55) 60%, rgba(11,27,58,.25) 100%), linear-gradient(0deg, var(--ink) 0%, transparent 35%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: end; padding-block: clamp(64px, 9vw, 130px) clamp(48px, 6vw, 90px); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero .lede { margin-top: 22px; max-width: 52ch; color: var(--on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: grid; gap: 10px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: .06em; color: var(--on-dark-muted); justify-self: end; text-align: right; }
.hero-meta strong { color: var(--mint); font-weight: 500; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-meta { justify-self: start; text-align: left; } }

/* Detection bracket frame — the visual motif */
.frame { position: relative; }
.frame::before, .frame::after, .frame > .c1, .frame > .c2 { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--mint); pointer-events: none; z-index: 2; }
.frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.frame > .c1 { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.frame > .c2 { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.frame .label { position: absolute; left: 12px; bottom: 12px; z-index: 2; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase; background: var(--mint); color: #062A22; padding: 3px 8px; }

/* Accreditation strip */
.strip { background: var(--navy-deep); color: #fff; }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 18px; font-size: .95rem; }
.strip .item { display: flex; align-items: center; gap: 12px; }
.strip .item svg { flex: none; }
.strip strong { font-family: var(--font-display); font-weight: 600; }

/* Domains grid */
.domains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.domain { background: var(--surface); padding: 28px 26px 30px; display: grid; gap: 12px; text-decoration: none; color: inherit; position: relative; transition: background .15s ease; }
.domain:hover { background: var(--bg-2); }
.domain .num { font-family: var(--font-mono); font-size: .75rem; color: var(--mint-ink); letter-spacing: .1em; }
.domain h3 { color: var(--heading); }
.domain p { color: var(--muted); font-size: .95rem; }
.domain .more { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--link); margin-top: 6px; }
@media (max-width: 900px) { .domains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .domains { grid-template-columns: 1fr; } }

/* Feature cards (home) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.card .media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .media img { transform: scale(1.03); }
.card .body { padding: 20px 22px 24px; display: grid; gap: 8px; align-content: start; }
.card .body .tag { margin-bottom: 0; font-size: .7rem; }
.card h3 { font-size: 1.15rem; }
.card p { font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Logo rows */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.logos .logo { background: #fff; border: 1px solid var(--line); min-height: 110px; display: grid; place-items: center; padding: 18px 22px; }
.logos .logo img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.logos figcaption { display: none; }

/* Split feature (about teaser, founder) */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split .media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Stats / facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: rgba(159,197,232,.25); border: 1px solid rgba(159,197,232,.25); }
.fact { background: var(--ink); padding: 22px 24px; display: grid; gap: 6px; }
.fact .v { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; color: var(--mint); font-variant-numeric: tabular-nums; }
.fact .k { font-size: .9rem; color: var(--on-dark-muted); }

/* Values */
.values { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.value { border-top: 2px solid var(--navy); padding-top: 16px; display: grid; gap: 8px; }
.value h3 { font-size: 1.05rem; }
.value p { font-size: .92rem; color: var(--muted); }
@media (max-width: 960px) { .values { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .values { grid-template-columns: 1fr 1fr; } }

/* Mission / Vision */
.mv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.mv .panel { background: var(--surface); border: 1px solid var(--line); padding: 30px 30px 34px; display: grid; gap: 12px; }
.mv .panel h3 { font-size: 1.35rem; }
.mv .panel p { font-size: 1.05rem; }
@media (max-width: 720px) { .mv { grid-template-columns: 1fr; } }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.person { background: var(--surface); border: 1px solid var(--line); padding: 26px 26px 28px; display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; }
.person .mono { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.person .role { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mint-ink); margin-top: 4px; }
.person p { font-size: .95rem; color: var(--muted); margin-top: 10px; }
.person.founder { grid-column: 1 / -1; grid-template-columns: 96px 1fr; }
.person.founder .mono { width: 96px; height: 96px; font-size: 1.6rem; background: var(--ink); }
.person.founder p { font-size: 1.05rem; color: var(--text); }
@media (max-width: 720px) { .team { grid-template-columns: 1fr; } .person, .person.founder { grid-template-columns: 1fr; } }

/* Solutions page */
.domain-nav { position: sticky; top: calc(72px + env(safe-area-inset-top, 0px)); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.domain-nav .wrap { display: flex; gap: 4px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.domain-nav .wrap::-webkit-scrollbar { display: none; }
.domain-nav a { flex: none; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: var(--radius); }
.domain-nav a:hover, .domain-nav a.active { color: var(--heading); background: var(--bg-2); }
.domain-block { padding-block: clamp(48px, 7vw, 90px); border-top: 1px solid var(--line); scroll-margin-top: 130px; }
.domain-block:first-of-type { border-top: 0; }
.domain-block .section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.solutions { display: grid; gap: clamp(40px, 6vw, 80px); }
.solution { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; scroll-margin-top: 140px; }
.solution:nth-child(even) .solution-media { order: 2; }
.solution-media { display: grid; gap: 10px; }
.solution-media .frame img, .solution-media .frame video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ink); }
.solution-media .thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.solution-media .thumbs img, .solution-media .thumbs video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ink); }
.solution-body { display: grid; gap: 18px; }
.solution-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.features { display: grid; gap: 16px; margin: 0; }
.features > div { border-left: 2px solid var(--mint-ink); padding-left: 16px; }
.features dt { font-family: var(--font-display); font-weight: 600; color: var(--heading); font-size: 1.02rem; }
.features dd { margin: 4px 0 0; color: var(--muted); font-size: .97rem; }
.demo-note { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 820px) { .solution { grid-template-columns: 1fr; } .solution:nth-child(even) .solution-media { order: 0; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-list a, .contact-list div { background: var(--surface); padding: 20px 22px; display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; text-decoration: none; color: inherit; }
.contact-list a:hover { background: var(--bg-2); }
.contact-list .k { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-list .v { font-family: var(--font-display); font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.contact-list svg { color: var(--navy); }
.contact-list .arrow { color: var(--muted); font-family: var(--font-mono); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* CTA band */
.cta { background: var(--navy); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: clamp(40px, 6vw, 64px); }
.cta h2 { color: #fff; max-width: 22ch; }
.cta p { color: #D6E4F7; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark-muted); font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 56px 36px; }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-mono); font-weight: 500; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--mint); }
.site-footer .brand img { height: 36px; margin-bottom: 14px; }
.site-footer .legal { border-top: 1px solid rgba(159,197,232,.18); }
.site-footer .legal .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 18px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; }
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Page hero (interior) */
.page-hero { background: var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.page-hero .wrap { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); display: grid; gap: 16px; }
.page-hero h1 { color: #fff; max-width: 16ch; font-size: clamp(2rem, 4.5vw, 3.4rem); }
.page-hero .lede { max-width: 58ch; color: var(--on-dark-muted); }
.page-hero .bg { position: absolute; inset: 0; opacity: .18; pointer-events: none; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
  .reveal.pre { opacity: 0; transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover { transform: none; } }
