/* css/main.css */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* ========== DESIGN TOKENS ========== */
:root {
  /* Colors */
  --blue: #3182ce;
  --blue-dark: #2c5282;
  --blue-light: #ebf8ff;
  --blue-border: #bee3f8;
  --green: #38a169;
  --green-light: #f0fff4;
  --yellow: #d69e2e;
  --yellow-light: #fffff0;
  --red: #e53e3e;
  --red-light: #fff5f5;
  --purple: #805ad5;
  --purple-light: #faf5ff;

  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --bg-muted: #edf2f7;
  --border: #e2e8f0;
  --border-dark: #cbd5e0;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Sizes */
  --nav-height: 64px;
  --max-width: 1120px;
}

/* ========== TYPOGRAPHY ========== */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.text-muted {
  color: var(--text-light);
}

.text-small {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.section-title {
  text-align: center;
  margin-bottom: var(--space-xs);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
}

/* ========== NAVIGATION ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

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

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--blue);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  text-decoration: none;
}

/* CTA link in nav */
.nav-cta-link {
  font-weight: 600 !important;
  color: var(--blue) !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.nav-badge {
  display: inline-block;
  background: var(--blue);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.08); }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text);
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-md) var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--blue-dark);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-dark);
  text-decoration: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

/* ========== HERO ========== */
.hero {
  text-align: center;
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(26, 54, 93, 0.88) 0%, rgba(49, 130, 206, 0.82) 50%, rgba(44, 82, 130, 0.85) 100%),
    url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?w=1600&q=80') center/cover no-repeat;
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: white;
  margin-bottom: var(--space-lg);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  stroke: #68d391;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero h1 {
  margin-bottom: var(--space-md);
  color: white;
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 540px;
  margin: 0 auto var(--space-xl);
  font-size: 1.125rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.hero-buttons .btn-primary {
  background: white;
  color: var(--blue-dark);
  font-size: 1rem;
  padding: 12px 28px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.hero-buttons .btn-primary:hover {
  background: #f0f7ff;
  color: var(--blue-dark);
}

.hero-buttons .btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  padding: 12px 28px;
}

.hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

/* Main hero CTA -- big, animated, attention-grabbing */
.hero-cta-main {
  font-size: 1.125rem !important;
  padding: 14px 32px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(255, 255, 255, 0.4) !important;
  animation: hero-cta-glow 2.5s ease-in-out infinite;
  position: relative;
}

.hero-cta-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25) !important;
}

.hero-arrow {
  display: inline-block;
  transition: transform 0.3s;
  font-size: 1.25rem;
}

.hero-cta-main:hover .hero-arrow {
  transform: translateX(4px);
}

@keyframes hero-cta-glow {
  0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(255, 255, 255, 0.15); }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

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

.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .hero {
    padding: 56px 0 48px;
  }

  .hero h1 {
    font-size: 1.875rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-stats {
    gap: var(--space-xl);
  }

  .hero-stat-number {
    font-size: 1.375rem;
  }
}

/* ========== TRUST BAR ========== */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-light);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-sm);
}

.card-featured {
  border: 2px solid var(--blue);
  background: var(--blue-light);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: var(--space-xs);
}

.card p {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
}

/* ========== STEPS (How it works) ========== */
.steps {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
}

@media (max-width: 768px) {
  .steps {
    flex-direction: column;
    align-items: center;
  }
}

.step {
  text-align: center;
  max-width: 200px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.step h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.step p {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ========== ADVANTAGES GRID ========== */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.advantage {
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.advantage svg {
  width: 32px;
  height: 32px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: var(--space-sm);
}

.advantage h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.advantage p {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ========== CTA BANNER ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .cta-banner {
    flex-direction: column;
    text-align: center;
  }
}

.cta-banner h3 {
  color: white;
  margin-bottom: var(--space-xs);
}

.cta-banner p {
  opacity: 0.9;
  font-size: 0.9375rem;
}

.cta-banner .btn {
  background: white;
  color: var(--blue);
  white-space: nowrap;
}

.cta-banner .btn:hover {
  background: var(--blue-light);
}

/* ========== BLOG PREVIEW ========== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

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

.blog-card-image {
  height: 140px;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
}

.blog-card-body {
  padding: var(--space-md);
}

.blog-card-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.blog-card-body h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.blog-card-body p {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.blog-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ========== FOOTER ========== */
.footer {
  background: #1a202c;
  color: #a0aec0;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.footer h4 {
  color: white;
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
}

.footer p,
.footer a {
  font-size: 0.875rem;
  color: #a0aec0;
  line-height: 1.8;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  padding: var(--space-sm) 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.breadcrumb span {
  color: var(--blue);
}

/* ========== CONSTRUCTION BANNER ========== */
.construction-banner {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: white;
  padding: 10px var(--space-lg);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 99;
  animation: construction-pulse 3s ease-in-out infinite;
}

.construction-banner svg {
  animation: construction-icon 1.5s ease-in-out infinite;
}

@keyframes construction-pulse {
  0%, 100% { background: linear-gradient(90deg, #f59e0b, #d97706); }
  50% { background: linear-gradient(90deg, #d97706, #b45309); }
}

@keyframes construction-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ========== COOKIE BAR ========== */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a202c;
  color: #e2e8f0;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}

.cookie-bar p {
  font-size: 0.875rem;
  flex: 1;
}

.cookie-bar p a {
  color: var(--blue-border);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.cookie-bar .btn-accept {
  background: var(--blue);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-bar .btn-settings {
  background: transparent;
  color: #a0aec0;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid #4a5568;
  font-size: 0.8125rem;
  cursor: pointer;
}

.cookie-bar.hidden {
  display: none;
}

@media (max-width: 768px) {
  .cookie-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
