/* =============================================================
   BASE.CSS — Tritech Partners Design System
   Custom properties, reset, typography, utilities
   ============================================================= */

/* ---- Custom Properties ------------------------------------ */
:root {
  /* Colors — aligned with logo palette (navy, patriotic red, shield blue, white) */
  --color-navy:        #0F2044;   /* Logo dark navy (shield border, TRITECH text) */
  --color-navy-mid:    #1A3A6B;   /* Mid navy — logo secondary navy */
  --color-navy-light:  #2C5282;   /* Lighter navy for hovers */
  --color-gold:        #B22234;   /* Logo red — American flag / PARTNERS text */
  --color-gold-light:  #C8384A;   /* Lighter red for hovers */
  --color-blue-accent: #4A7FC1;   /* Logo shield light blue */
  --color-steel:       #5E7BA8;   /* Steel blue — reflects logo's lighter shield tones */
  --color-white:       #FFFFFF;
  --color-gray-50:     #F7F8FA;
  --color-gray-100:    #EEF0F4;
  --color-gray-300:    #C8CDD8;
  --color-gray-500:    #8A95A3;
  --color-gray-700:    #3D4A5C;
  --color-gray-900:    #1A1F2E;
  --color-error:       #C0392B;
  --color-success:     #1A6B3C;

  /* Typography */
  --font-heading: Georgia, 'Times New Roman', Times, serif;
  --font-body:    'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'Courier New', Courier, monospace;

  /* Font sizes */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Spacing */
  --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;

  /* Layout */
  --container-max:  1200px;
  --nav-height:     72px;

  /* Borders & Effects */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   6px;
  --shadow-sm:   0 1px 4px rgba(13,31,60,0.08);
  --shadow-card: 0 2px 12px rgba(13,31,60,0.10);
  --shadow-nav:  0 2px 8px rgba(13,31,60,0.22);
  --shadow-lg:   0 8px 32px rgba(13,31,60,0.16);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ---- Reset ------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-gray-700);
  background: var(--color-white);
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---- Typography ------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-gray-900);
  font-weight: 700;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-gray-900);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ---- Layout Utilities ------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

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

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

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

/* ---- Section Labels & Headings ---------------------------- */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
  position: relative;
  padding-bottom: var(--space-4);
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-gold);
}

.section-heading--center {
  text-align: center;
}

.section-heading--center::after {
  left: 50%;
  transform: translateX(-50%);
}

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

.section-subheading {
  font-size: var(--text-lg);
  color: var(--color-steel);
  max-width: 64ch;
  line-height: 1.7;
}

.section-subheading--center {
  margin: 0 auto;
  text-align: center;
}

.section-intro {
  max-width: 64ch;
  margin-bottom: var(--space-12);
}

.section-intro--center {
  margin: 0 auto var(--space-12);
  text-align: center;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-navy-mid);
  color: var(--color-white);
  border: 2px solid var(--color-navy-mid);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-navy-light);
  border-color: var(--color-navy-light);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-gold);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: rgba(184,151,74,0.12);
  border-color: var(--color-gold-light);
}

.btn-outline-navy {
  background: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}

.btn-outline-navy:hover,
.btn-outline-navy:focus {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn:focus {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ---- Cards ------------------------------------------------ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  box-shadow: var(--shadow-card);
  padding: var(--space-8);
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: background var(--transition-base);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  background: var(--color-gold);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-5);
  color: var(--color-blue-accent);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-gray-900);
  margin-bottom: var(--space-3);
}

.card-text {
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  line-height: 1.7;
}

/* ---- Grids ------------------------------------------------ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

/* ---- Gold Stripe ------------------------------------------ */
.gold-stripe {
  height: 4px;
  background: var(--color-gold);
  width: 100%;
}

/* ---- Page Hero (interior pages) --------------------------- */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 100%);
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-gold);
}

.page-hero__label {
  color: var(--color-gold);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.page-hero__sub {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-lg);
  max-width: 56ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
}

.breadcrumb a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-gold); }

.breadcrumb__sep {
  opacity: 0.4;
}

/* ---- Table ------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table th {
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  padding: var(--space-3) var(--space-5);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-gray-100);
  color: var(--color-gray-700);
  vertical-align: top;
}

.data-table tr:nth-child(even) td {
  background: var(--color-gray-50);
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--color-navy-mid);
}

/* ---- CTA Banner ------------------------------------------- */
.cta-banner {
  background: var(--color-navy);
  padding: var(--space-16) 0;
  position: relative;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-gold);
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-gold);
}

.cta-banner__inner {
  text-align: center;
}

.cta-banner__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.cta-banner__text {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ---- Scroll Reveal ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1023px) {
  h1 { font-size: var(--text-4xl); }
}

@media (max-width: 767px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  .section { padding: var(--space-16) 0; }
  .container { padding: 0 var(--space-4); }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .cta-banner__title {
    font-size: var(--text-2xl);
  }

  .page-hero__title {
    font-size: var(--text-3xl);
  }
}
