/* ========== ROOT & COLOR SYSTEM ========== */
:root {
  /* Warm / Welcoming Blues (refined) */
  --blue-deep:     #1A3352;
  --blue-primary:  #2A5F8A;
  --blue-medium:   #3F8AB5;
  --blue-light:    #6BB0D4;
  --blue-soft:     #A8D4EB;
  --blue-pale:     #E6F3FA;

  /* Neutrals */
  --white:         #FFFFFF;
  --gray-50:       #F5F8FC;
  --gray-100:      #E8EEF5;
  --gray-200:      #D1DBE8;
  --gray-400:      #8A9BB0;
  --gray-600:      #4A5A6E;
  --gray-800:      #243142;
  --near-black:    #0F1724;

  /* Semantic */
  --text:          var(--near-black);
  --text-muted:    var(--gray-600);
  --bg:            var(--gray-50);
  --bg-card:       var(--white);
  --border:        var(--gray-200);
  --accent:        var(--blue-medium);
  --accent-hover:  var(--blue-primary);
  --header-bg:     rgba(255, 255, 255, 0.92);
  --shadow:        0 8px 30px rgba(26, 51, 82, 0.08);
}

/* ========== DARK MODE ========== */
@media (prefers-color-scheme: dark) {
  :root {
    --text:          #E8F0F8;
    --text-muted:    #A0B0C4;
    --bg:            #0B121C;
    --bg-card:       #15202E;
    --border:        #243447;
    --blue-pale:     #152535;
    --header-bg:     rgba(11, 18, 28, 0.92);
    --shadow:        0 8px 30px rgba(0, 0, 0, 0.35);
  }
}

/* Manual dark-mode class (optional toggle) */
html.dark {
  --text:          #E8F0F8;
  --text-muted:    #A0B0C4;
  --bg:            #0B121C;
  --bg-card:       #15202E;
  --border:        #243447;
  --blue-pale:     #152535;
  --header-bg:     rgba(11, 18, 28, 0.92);
  --shadow:        0 8px 30px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  color: var(--blue-deep);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.6em;
}

@media (prefers-color-scheme: dark), html.dark {
  h1, h2, h3, h4 {
    color: var(--blue-soft);
  }
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p {
  margin-bottom: 1.15em;
  color: var(--text);
}

a {
  color: var(--blue-medium);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--blue-primary);
}

/* ========== LAYOUT ========== */
.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

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

/* ========== HEADER / NAV ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: -0.6px;
}
.logo span {
  color: var(--blue-medium);
}

@media (prefers-color-scheme: dark), html.dark {
  .logo { color: var(--blue-soft); }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
}
.nav-links a:hover {
  color: var(--blue-medium);
}

/* Mobile menu button (simple) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

/* ========== HERO ========== */
.hero {
  padding: 6.5rem 0 5.5rem;
  background: linear-gradient(160deg, var(--blue-pale) 0%, var(--bg) 70%);
  text-align: center;
}

.hero h1 {
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 1.2rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 2.2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue-medium);
  color: white;
}
.btn-primary:hover {
  background: var(--blue-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(63, 138, 181, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--blue-medium);
  border: 2px solid var(--blue-medium);
}
.btn-outline:hover {
  background: var(--blue-medium);
  color: white;
  text-decoration: none;
}

/* ========== CARDS GRID ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26, 51, 82, 0.12);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--blue-medium);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 0.98rem;
}

/* ========== CONTENT SECTION ========== */
.content-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 800px) {
  .content-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--blue-deep);
  color: var(--blue-soft);
  padding: 4rem 0 2.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.site-footer a {
  color: var(--blue-light);
}
.site-footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(168, 212, 235, 0.2);
  padding-top: 1.8rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--blue-soft);
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Focus */
:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}