/* ==========================================================================
   GSTS – Genie Security and Technology Solutions
   Single stylesheet for the whole site. Brand values live in :root only.
   ========================================================================== */

:root {
  /* Brand colours (see CLAUDE.md for allowed pairings) */
  --navy: #0B1F3A;
  --teal: #0D7C78;
  --teal-bright: #2EC4B6;
  --slate: #4A5A70;
  --muted: #9FB3C8;
  --bg-alt: #F4F7FA;
  --white: #FFFFFF;

  /* Derived neutrals */
  --border: #DDE4EC;
  --navy-2: #12294A;
  --teal-dark: #0A6461;

  /* Typography */
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-base: 1.0625rem;
  --leading: 1.65;

  /* Spacing and layout */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --container: 72rem;
  --gutter: 1.25rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 4px 16px rgba(11, 31, 58, 0.06);
  --header-h: 4.5rem;
}

/* --- Reset / base --------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--navy);
  background: var(--white);
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 750;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 650;
}

p {
  margin: 0 0 var(--space-2);
}

ul {
  margin: 0 0 var(--space-2);
  padding-left: 1.25rem;
}

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-dark);
}

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

.visually-hidden {
  position: absolute !important;
  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: var(--space-2);
  top: -100px;
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: 6px;
}

.skip-link:focus {
  top: var(--space-1);
  color: var(--white);
}

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

/* --- Header and navigation ----------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  padding: var(--space-1) 0;
}

.brand img {
  height: 45px;
  width: auto;
}

.site-nav {
  display: flex;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--navy);
  font-weight: 550;
  text-decoration: none;
  border-radius: 6px;
}

.nav-list a:hover {
  background: var(--bg-alt);
  color: var(--navy);
}

.nav-list a[aria-current="page"] {
  color: var(--teal);
  box-shadow: inset 0 -2px 0 var(--teal);
  border-radius: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle .icon {
  width: 22px;
  height: 22px;
}

/* Mobile: collapse nav behind the toggle, but only when JS is running.
   Without JS the nav simply wraps below the logo and stays usable. */
@media (max-width: 47.99rem) {
  .has-js .nav-toggle {
    display: inline-flex;
  }

  .has-js .site-nav {
    display: none;
    width: 100%;
    padding-bottom: var(--space-2);
  }

  .has-js .site-nav.is-open {
    display: block;
  }

  .site-nav {
    width: 100%;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .has-js .nav-list a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .nav-list a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--teal);
    padding-left: 0.85rem;
  }
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-dark);
  color: var(--white);
}

.btn-secondary {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
}

/* Buttons for navy backgrounds */
.btn-bright {
  background: var(--teal-bright);
  color: var(--navy);
}

.btn-bright:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-ghost {
  border-color: var(--muted);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: var(--navy-2);
  color: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* --- Sections ------------------------------------------------------------ */

.section {
  padding: var(--space-5) 0;
}

@media (min-width: 48rem) {
  .section {
    padding: var(--space-6) 0;
  }
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-dark p,
.section-dark li {
  color: var(--muted);
}

.section-dark a {
  color: var(--white);
}

.section-dark .btn-bright,
.section-dark .btn-bright:hover {
  color: var(--navy);
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-4);
}

.section-head p,
.lead {
  font-size: 1.15rem;
  color: var(--slate);
}

.section-dark .section-head p,
.section-dark .lead {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-1);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.section-dark .eyebrow {
  color: var(--teal-bright);
}

.prose {
  max-width: 44rem;
}

.prose p,
.prose li {
  color: var(--slate);
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-6) 0;
  background: var(--navy);
  color: var(--white);
}

.hero::after {
  /* Faint grid, purely decorative */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(159, 179, 200, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 179, 200, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 22ch;
  color: var(--white);
}

.hero h1 .accent {
  color: var(--teal-bright);
}

.hero .lead {
  max-width: 40rem;
  color: var(--muted);
}

.hero-sm {
  padding: var(--space-5) 0;
}

.hero-sm h1 {
  max-width: 24ch;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.3rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--white);
  border: 1px solid rgba(159, 179, 200, 0.4);
  border-radius: 999px;
}

.tag-list-light li {
  color: var(--navy);
  border-color: var(--border);
  background: var(--white);
}

/* --- Cards and grids ----------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 40rem) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card p {
  color: var(--slate);
}

.card > :last-child {
  margin-bottom: 0;
}

.card-featured {
  border-top: 4px solid var(--teal);
  box-shadow: var(--shadow);
}

.card-link {
  margin-top: auto;
  padding-top: var(--space-1);
  font-weight: 600;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-2);
  color: var(--teal);
  background: var(--bg-alt);
  border-radius: 12px;
}

.section-alt .icon-badge {
  background: var(--white);
  border: 1px solid var(--border);
}

.check-list {
  margin: 0 0 var(--space-2);
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.55rem;
  height: 0.9rem;
  border: solid var(--teal);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.section-dark .check-list li {
  color: var(--muted);
}

.section-dark .check-list li::before {
  border-color: var(--teal-bright);
}

/* --- Feature split (text + list side by side) --------------------------- */

.split {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-5);
  }
}

.panel {
  padding: var(--space-3);
  background: var(--navy-2);
  border: 1px solid rgba(159, 179, 200, 0.2);
  border-radius: var(--radius);
}

.panel h3 {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.panel + .panel {
  margin-top: var(--space-2);
}

/* --- Process steps ------------------------------------------------------- */

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 3.25rem;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1;
  color: var(--teal);
}

.steps li::after {
  content: "";
  position: absolute;
  top: 2.25rem;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--border);
}

.steps h3 {
  margin-bottom: var(--space-1);
}

.steps p {
  color: var(--slate);
  margin: 0;
}

/* --- Service detail blocks ---------------------------------------------- */

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(159, 179, 200, 0.4);
  border-radius: 999px;
}

.toc a:hover {
  border-color: var(--teal-bright);
  color: var(--white);
}

.service {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 56rem) {
  .service {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
}

.service-intro .icon-badge {
  margin-bottom: var(--space-2);
}

.service-intro p {
  color: var(--slate);
}

.service-detail {
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .service-detail {
  border-color: var(--border);
}

.service-detail h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.service-detail > :last-child {
  margin-bottom: 0;
}

.badge {
  display: inline-block;
  margin-bottom: var(--space-1);
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--teal);
  border-radius: 999px;
}

/* --- Contact ------------------------------------------------------------- */

.contact-card .email {
  display: inline-block;
  margin-top: auto;
  font-size: 1.1rem;
  font-weight: 650;
  word-break: break-word;
}

.contact-card h2 {
  font-size: 1.25rem;
}

.info-row {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.info-row .icon {
  color: var(--teal);
  margin-top: 0.15rem;
}

/* --- CTA band ------------------------------------------------------------ */

.cta-band {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 56rem) {
  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cta-band .btn-row {
    margin-top: 0;
    flex-shrink: 0;
  }
}

.cta-band h2 {
  margin-bottom: var(--space-1);
}

.cta-band p {
  margin: 0;
  max-width: 40rem;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  padding: var(--space-5) 0 var(--space-3);
  background: var(--navy);
  color: var(--muted);
  border-top: 1px solid var(--navy-2);
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.25fr;
  }
}

.footer-brand img {
  height: 45px;
  width: auto;
  margin-bottom: var(--space-2);
}

.footer-brand p {
  max-width: 22rem;
}

.footer-heading {
  margin: 0 0 var(--space-1);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.35rem;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal-bright);
  text-decoration: underline;
}

.site-footer :focus-visible {
  outline-color: var(--teal-bright);
}

.site-footer p {
  margin-bottom: var(--space-1);
}

.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(159, 179, 200, 0.2);
  font-size: 0.9rem;
}

/* --- 404 ----------------------------------------------------------------- */

.not-found {
  min-height: 50vh;
  display: flex;
  align-items: center;
}

.not-found .code {
  font-size: clamp(4rem, 15vw, 7rem);
  font-weight: 800;
  line-height: 1;
  color: var(--teal-bright);
  margin-bottom: var(--space-2);
}
