/* Critical CSS - Above-fold styles only */
/* This file contains only the CSS needed for initial render */

/* ===== CSS Variables (Required for all styles) ===== */
:root {
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --heading-font: "Ubuntu", sans-serif;
  --nav-font: "Rubik", sans-serif;
  --background-color: #ffffff;
  --default-color: #3b5353;
  --heading-color: #193838;
  --accent-color: #0077b6;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
  --accent-hover: #005a8c;
  --nav-color: #3b5353;
  --nav-hover-color: #0077b6;
  --nav-mobile-background-color: #ffffff;
  --nav-dropdown-background-color: #ffffff;
  --nav-dropdown-color: #3b5353;
  --nav-dropdown-hover-color: #0077b6;
}

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-color);
  color: var(--contrast-color);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--contrast-color);
  outline-offset: 2px;
}

/* ===== Base Styles ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--heading-color);
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ===== Header/Navigation (Critical - Above fold) ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
}

.header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header .logo .sitename {
  font-size: 28px;
  font-weight: 500;
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* ===== Navigation ===== */
.navmenu ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
  gap: 30px;
}

.navmenu a {
  color: var(--nav-color);
  padding: 10px 0;
  font-size: 16px;
  font-family: var(--nav-font);
  font-weight: 500;
  display: flex;
  align-items: center;
  white-space: nowrap;
  transition: color 0.3s;
}

.navmenu a:hover,
.navmenu .active {
  color: var(--nav-hover-color);
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--nav-color);
}

@media (max-width: 1199px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .navmenu ul {
    display: none;
    position: fixed;
    inset: 60px 20px 20px 20px;
    padding: 20px;
    background: var(--nav-mobile-background-color);
    border-radius: 8px;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  }
  
  .navmenu.mobile-nav-active ul {
    display: flex;
  }
  
  .navmenu a {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
}

/* ===== CTA Button (Header) ===== */
.btn-getstarted {
  color: var(--contrast-color);
  background: var(--accent-color);
  font-size: 14px;
  padding: 8px 26px;
  margin: 0;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.btn-getstarted:hover {
  background: var(--accent-hover);
  color: var(--contrast-color);
  text-decoration: none;
}

/* ===== Hero Section (Critical LCP Element) ===== */
.hero {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, var(--surface-color) 0%, rgba(0, 119, 182, 0.05) 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero .container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
  position: relative;
  z-index: 2;
}

.hero .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
  align-items: center;
}

.hero .col-lg-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 15px;
}

@media (max-width: 991px) {
  .hero .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.hero-content {
  padding: 20px 0;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--heading-color);
  letter-spacing: -0.5px;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.5rem;
  }
}

.hero-description {
  font-size: 1rem;
  color: var(--default-color);
  margin-bottom: 32px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 576px) {
  .hero-actions {
    flex-direction: column;
    gap: 15px;
  }
}

.btn-primary {
  background: var(--accent-color);
  color: var(--contrast-color);
  padding: 16px 32px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.3);
  color: var(--contrast-color);
  text-decoration: none;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--heading-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  color: var(--accent-color);
  transform: translateX(4px);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 48px;
}

@media (max-width: 768px) {
  .hero-stats {
    gap: 32px;
  }
}

@media (max-width: 576px) {
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }
}

.stat-item {
  text-align: left;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(59, 83, 83, 0.7);
  font-weight: 400;
}

/* Hero Visual */
.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Main Content Wrapper ===== */
main {
  display: block;
}

/* ===== Utility Classes ===== */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

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

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

/* ===== Reduced Motion (Accessibility) ===== */
@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;
  }
}

/* ===== Loading States ===== */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Prevent FOUC for web fonts */
html {
  font-display: swap;
}
