/*
  Great Southern Systems — Enterprise Design System
  style.css
  ----
  Purpose:
  - Production-ready baseline stylesheet for an enterprise AI website.
  - Includes reset, tokens, typography, layout, components, responsive rules,
    and utility helpers.

  Updates applied (brand alignment):
  - Palette anchored to brand navy (#0F1C2E), steel blue (#3A5A78), muted teal (#2F7F7A).
  - Removed "SaaS-like" gradients/backdrop blur; flattened buttons.
  - Hero updated to enterprise dark navy treatment.
  - Cards de-softened (less shadow), more structural borders.
  - Added section background helpers (.section-dark, .section-alt, .cta-section).
  - Added product card accent helper (.card-product).
  - Added light outline button for dark backgrounds (.btn-outline-light).
*/

/* ====
   1) RESET / NORMALIZATION
   ==== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

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

/* ====
   2) DESIGN TOKENS / CSS CUSTOM PROPERTIES
   ==== */

:root {
  /* Brand anchors */
  --brand-navy: #0f1c2e;
  --brand-steel: #3a5a78;
  --brand-teal: #2f7f7a;
  --brand-gold: #c6a96b;

  /* Primary scale (navy) */
  --color-primary-950: #0b1422;
  --color-primary-900: var(--brand-navy);
  --color-primary-800: #162a44;
  --color-primary-700: #1e3a5f;
  --color-primary-600: #274a78;
  --color-primary-500: #2f5b8f;
  --color-primary-200: #c7d6e7;
  --color-primary-100: #e6eef7;

  /* Secondary scale (teal) */
  --color-secondary-900: #123433;
  --color-secondary-800: #194645;
  --color-secondary-700: var(--brand-teal);
  --color-secondary-600: #2a6f6a;
  --color-secondary-500: #3a8d87;

  /* Accent (gold) — use sparingly */
  --color-accent-700: #8f6a1b;
  --color-accent-600: #b58625;
  --color-accent-500: var(--brand-gold);
  --color-accent-400: #e6d3a3;

  /* Neutrals */
  --color-neutral-950: #1f2933;
  --color-neutral-900: #2b3642;
  --color-neutral-800: #3a4654;
  --color-neutral-700: #556170;
  --color-neutral-600: #6e7a89;
  --color-neutral-500: #8b95a8;
  --color-neutral-400: #adb5c3;
  --color-neutral-300: #cdd2dc;
  --color-neutral-200: #e4e8ef;
  --color-neutral-100: #f2f5fa;
  --color-neutral-50: #f7f9fb;

  --color-white: #ffffff;

  /* Semantic */
  --color-success: #1f7a4a;
  --color-warning: #b5741d;
  --color-danger: #b63737;
  --color-info: #2f5fb8;

  /* Application surfaces */
  --color-bg-page: var(--color-neutral-50);
  --color-bg-surface: var(--color-white);
  --color-bg-surface-alt: #f1f4f8;

  --color-text-strong: var(--color-neutral-950);
  --color-text-default: var(--color-neutral-800);
  --color-text-muted: var(--color-neutral-600);

  --color-border-subtle: var(--color-neutral-200);
  --color-border-default: var(--color-neutral-300);

  --color-focus: #245edb;

  /* Typography */
  --font-sans: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --text-h1: clamp(2rem, 3vw + 1rem, 3.5rem);
  --text-h2: clamp(1.75rem, 2.25vw + 1rem, 2.75rem);
  --text-h3: clamp(1.5rem, 1.5vw + 1rem, 2rem);
  --text-h4: 1.375rem;
  --text-h5: 1.125rem;
  --text-h6: 1rem;

  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-body-sm: 0.9375rem;
  --text-caption: 0.8125rem;

  --lh-tight: 1.2;
  --lh-heading: 1.25;
  --lh-body: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing scale (8px rhythm) */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius / shadows */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;

  --shadow-sm: 0 1px 2px rgba(15, 20, 28, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 20, 28, 0.08);
  --shadow-lg: 0 16px 38px rgba(10, 28, 46, 0.16);

  --container-max: 1200px;
  --container-pad: clamp(1rem, 2vw, 2rem);

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 0.16s;
  --dur-base: 0.24s;
}

/* ====
   3) TYPOGRAPHY SYSTEM
   ==== */

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  color: var(--color-text-default);
  background: var(--color-bg-page);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-strong);
  line-height: var(--lh-heading);
  letter-spacing: -0.01em; /* slightly less "product UI" */
}

h1 { font-size: var(--text-h1); font-weight: var(--weight-bold); }
h2 { font-size: var(--text-h2); font-weight: var(--weight-bold); }
h3 { font-size: var(--text-h3); font-weight: var(--weight-semibold); }
h4 { font-size: var(--text-h4); font-weight: var(--weight-semibold); }
h5 { font-size: var(--text-h5); font-weight: var(--weight-semibold); }
h6 {
  font-size: var(--text-h6);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

p {
  font-size: var(--text-body);
  color: var(--color-text-default);
}

.lead {
  font-size: var(--text-body-lg);
  color: var(--color-neutral-700);
}

.caption,
small {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  line-height: 1.45;
}

.text-strong { color: var(--color-text-strong); }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary-700); }
.text-accent { color: var(--color-accent-600); }

/* ====
   4) LAYOUT FOUNDATIONS & UTILITIES
   ==== */

.container {
  width: min(100% - (2 * var(--container-pad)), var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-16);
}

.section-sm {
  padding-block: var(--space-10);
}

.stack > * + * {
  margin-top: var(--space-4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

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

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

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

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

/* Spacing utilities */
.mt-0 { margin-top: var(--space-0); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: var(--space-0); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.py-8 { padding-block: var(--space-8); }
.py-12 { padding-block: var(--space-12); }
.py-16 { padding-block: var(--space-16); }
.px-4 { padding-inline: var(--space-4); }
.px-6 { padding-inline: var(--space-6); }

/* ====
   5) COMPONENTS
   ==== */

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-subtle);
}

.navbar {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-brand {
  font-size: 1.0625rem;
  font-weight: var(--weight-semibold);
  color: var(--color-primary-900);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-link {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  color: var(--color-neutral-700);
  transition: color var(--dur-base) var(--ease-standard);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-primary-900);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition:
    transform var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard),
    background-color var(--dur-base) var(--ease-standard),
    color var(--dur-base) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: var(--color-white);
  background: var(--color-secondary-700); /* muted teal */
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--color-secondary-600);
}

.btn-secondary {
  color: var(--color-primary-900);
  background: var(--color-white);
  border-color: var(--color-primary-200);
}

.btn-secondary:hover {
  border-color: var(--color-primary-700);
  color: var(--color-primary-900);
}

.btn-ghost {
  color: var(--color-neutral-800);
  border-color: var(--color-border-default);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--color-primary-200);
  color: var(--color-primary-900);
}

.btn-accent {
  color: var(--color-primary-900);
  background: var(--color-accent-500);
}

.btn-accent:hover {
  background: var(--color-accent-400);
}

/* Light outline button for dark backgrounds */
.btn-outline-light {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Cards */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: none; /* enterprise: structured, not "floating" */
  padding: var(--space-6);
  transition:
    border-color var(--dur-base) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}

.card:hover {
  border-color: var(--color-primary-200);
  transform: translateY(-1px);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: var(--text-h5);
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-neutral-600);
  margin-bottom: var(--space-3);
}

/* Product card accent helper */
.card-product {
  border-top: 3px solid var(--color-secondary-700);
}

.card-product:hover {
  border-top-color: var(--color-secondary-600);
}

/* Forms */
.form-group {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.label {
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  color: var(--color-neutral-800);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  color: var(--color-text-default);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  min-height: 2.75rem;
  transition:
    border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard),
    background-color var(--dur-base) var(--ease-standard);
}

.textarea {
  min-height: 7rem;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-neutral-500);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(36, 94, 219, 0.15);
  outline: none;
}

.help-text {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

.error-text {
  font-size: var(--text-caption);
  color: var(--color-danger);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 42rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th,
.table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

.table th {
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-neutral-600);
  background: var(--color-bg-surface-alt);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Footer */
.site-footer {
  background: var(--color-primary-900);
  color: #d5deec;
  padding-block: var(--space-12);
}

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

.footer-title {
  color: var(--color-white);
  font-size: var(--text-body-sm);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-link {
  color: #c2cee1;
  font-size: var(--text-body-sm);
  transition: color var(--dur-base) var(--ease-standard);
}

.footer-link:hover {
  color: var(--color-white);
}

/* Hero / section helpers */
.hero {
  padding-block: clamp(5rem, 10vw, 8rem);
  background-color: #0d1624;
  background-image: 
    linear-gradient(to right, rgba(13, 22, 36, 0.85) 15%, rgba(13, 22, 36, 0) 55%),
    url('../img/hero-bg.webp');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.hero h1,
.hero h2,
.hero h3,
.hero h4,
.hero h5,
.hero h6 {
  color: var(--color-white);
}

.hero p,
.hero .lead {
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 48rem) {
  .hero {
    background-position: 75% center;
    padding-block: 4rem;
    background-image: 
      linear-gradient(to bottom, rgba(13, 22, 36, 0.7) 0%, rgba(13, 22, 36, 0.7) 100%),
      url('../img/hero-bg.webp');
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.625rem;
  border-radius: 999px;
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Solutions page jump nav active state */
.solutions-nav-link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: 
    background-color var(--dur-base) var(--ease-standard),
    color var(--dur-base) var(--ease-standard);
}

.solutions-nav-link.active {
  background: var(--color-secondary-700);
  color: #ffffff;
}

.solutions-nav-link:hover:not(.active) {
  background: var(--color-neutral-100);
}

/* Section background system */
.section-dark {
  background: var(--color-primary-900);
  color: var(--color-white);
}

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

.section-dark p,
.section-dark .lead,
.section-dark .text-muted {
  color: rgba(255, 255, 255, 0.82);
}

.section-alt {
  background: var(--color-neutral-50);
}

.cta-section {
  background: var(--color-primary-900);
  color: var(--color-white);
  text-align: center;
  padding-block: var(--space-16);
}

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

.cta-section p,
.cta-section .lead {
  color: rgba(255, 255, 255, 0.82);
}

/* ====
   6) RESPONSIVE BEHAVIOR (MOBILE-FIRST)
   ==== */

@media (max-width: 47.99rem) {
  .nav-menu {
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .section {
    padding-block: var(--space-12);
  }

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

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

@media (min-width: 64rem) {
  .section {
    padding-block: var(--space-20);
  }

  .navbar {
    min-height: 5rem;
  }
}

/* ====
   7) UTILITY CLASSES
   ==== */

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flex helpers */
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }

/* Widths */
.w-full { width: 100% !important; }
.max-w-2xl { max-width: 42rem !important; }
.max-w-3xl { max-width: 56rem !important; }
.max-w-4xl { max-width: 72rem !important; }

/* Text alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Background / border helpers */
.bg-surface { background: var(--color-bg-surface) !important; }
.bg-alt { background: var(--color-bg-surface-alt) !important; }
.border { border: 1px solid var(--color-border-subtle) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }

/* Visibility helpers */
@media (max-width: 47.99rem) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 48rem) {
  .show-mobile { display: none !important; }
}

/* ---- Legal/Content Helpers ---- */
.legal-block p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
}
.legal-block .mt-lg {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.list-styled {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}
.list-styled li {
    position: relative;
    margin-bottom: 0.75rem;
    list-style-type: disc;
    color: var(--color-neutral-700);
}
.list-styled li strong {
    color: var(--color-primary-900);
}