@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Lora:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --primary: #1E40AF;
  --primary-light: #3B82F6;
  --teal: #0D9488;
  --teal-light: #14B8A6;
  --orange: #F97316;
  --dark: #1E293B;
  --mid: #64748B;
  --light: #E2E8F0;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: 'Nunito', sans-serif; background: var(--bg); color: var(--dark); line-height: 1.6; overflow-x: hidden; }

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light);
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-name {
  font-family: 'Lora', serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}
.nav-logo-name span { color: var(--teal); }
.nav-logo-sub {
  font-size: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--mid);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--mid);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--primary); background: #EFF6FF; }
.nav-links a.active { color: var(--primary); }

.nav-cta {
  background: var(--gradient) !important;
  color: white !important;
  border-radius: 999px !important;
  padding: 9px 20px !important;
  box-shadow: 0 4px 14px rgba(30,64,175,0.25);
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.nav-login {
  border: 1.5px solid var(--light) !important;
  color: var(--mid) !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
}
.nav-login:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: #EFF6FF !important;
}

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 40px 30px;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo-name {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}
.footer-brand .logo-name span { color: var(--teal-light); }
.footer-brand .logo-sub {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 260px;
}
.footer-col h4 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--teal-light); }
.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ── SHARED COMPONENTS ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.page-top  { padding-top: 70px; }

.section-tag {
  display: inline-block;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Lora', serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 16px;
}
.section-title span { color: var(--teal); }
.section-sub {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.8;
  max-width: 580px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.btn-primary  { background: var(--gradient); color: white; box-shadow: 0 4px 16px rgba(30,64,175,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,64,175,0.35); }
.btn-orange   { background: var(--orange); color: white; box-shadow: 0 4px 16px rgba(249,115,22,0.3); }
.btn-orange:hover { transform: translateY(-2px); }
.btn-outline  { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-white    { background: white; color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.btn-white:hover { transform: translateY(-2px); }

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--light);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(30,64,175,0.1); border-color: rgba(30,64,175,0.15); }

.icon-box {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.ib-blue   { background: #DBEAFE; }
.ib-teal   { background: #CCFBF1; }
.ib-orange { background: #FFEDD5; }
.ib-purple { background: #EDE9FE; }

/* Hero */
.hero {
  background: var(--gradient);
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
  color: white;
}
.hero::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.hero::after {
  content: ''; position: absolute; bottom: -150px; left: -50px;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

/* Page hero */
.page-hero {
  background: var(--gradient);
  padding: 90px 40px 60px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-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.03'%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");
}
.page-hero h1 { font-family: 'Lora', serif; font-size: 42px; font-weight: 700; margin-bottom: 14px; position: relative; }
.page-hero p  { font-size: 16px; opacity: 0.85; max-width: 560px; margin: 0 auto; position: relative; line-height: 1.8; }

/* Prose */
.prose { max-width: 800px; margin: 0 auto; padding: 60px 40px; }
.prose h2 { font-family: 'Lora', serif; font-size: 26px; color: var(--primary); margin: 36px 0 12px; }
.prose h3 { font-size: 17px; font-weight: 800; color: var(--dark); margin: 24px 0 8px; }
.prose p  { font-size: 15px; color: var(--mid); line-height: 1.9; margin-bottom: 16px; }
.prose ul { padding-left: 20px; margin-bottom: 16px; }
.prose ul li { font-size: 15px; color: var(--mid); line-height: 1.9; margin-bottom: 6px; }
.prose a  { color: var(--primary); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.fade-up  { animation: fadeUp 0.6s ease both; }
.delay-1  { animation-delay: 0.1s; }
.delay-2  { animation-delay: 0.2s; }
.delay-3  { animation-delay: 0.3s; }

/* ── RESPONSIVE GRID CLASSES ── */
.rg-3   { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.rg-3b  { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.rg-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.rg-2b  { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.rg-2c  { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 80px; }
.rg-2sm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rg-12  { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
.rg-4   { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 80px; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark);
  color: white;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
}
.cookie-banner p { font-size: 13px; color: rgba(255,255,255,0.7); max-width: 700px; }
.cookie-banner a { color: var(--teal-light); }
.cookie-btn {
  background: var(--teal);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* ── MOBILE ── */
@media (max-width: 900px) {
  .rg-2, .rg-2b, .rg-2c, .rg-2sm, .rg-12 {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
  }
  .img-first { order: -1; }
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 20px 20px;
    gap: 2px;
    border-bottom: 1px solid var(--light);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 16px; font-size: 15px; border-radius: 10px; }
  .nav-cta   { display: block !important; text-align: center !important; margin-top: 8px !important; border-radius: 999px !important; }
  .nav-login { display: block !important; text-align: center !important; margin-top: 4px !important; border-radius: 999px !important; }

  .hero { padding: 90px 24px 60px; }
  .hero h1, h1[style*="font-size:54px"] { font-size: 34px !important; line-height: 1.25 !important; }
  .page-hero { padding: 80px 24px 50px; }
  .page-hero h1 { font-size: 30px; }

  .container { padding: 0 20px; }
  .prose { padding: 40px 20px; }

  .rg-3, .rg-3b { grid-template-columns: 1fr !important; gap: 20px !important; }
  .rg-4          { grid-template-columns: 1fr 1fr !important; gap: 16px !important; margin-bottom: 40px !important; }

  /* Inline grid overrides for pages not yet using CSS classes */
  div[style*="repeat(3,1fr)"],
  div[style*="repeat(3, 1fr)"],
  div[style*="repeat(4,1fr)"] { grid-template-columns: 1fr !important; }
  div[style*="1fr 1fr"],
  div[style*="2fr 1fr"],
  div[style*="1fr 2fr"]       { grid-template-columns: 1fr !important; }

  /* Section horizontal padding */
  section[style*="padding:80px"],
  section[style*="padding:100px"],
  section[style*="padding:60px"] { padding-left: 20px !important; padding-right: 20px !important; }

  h2[style*="font-size:40px"],
  h2[style*="font-size:38px"] { font-size: 28px !important; }
  .section-title { font-size: 26px !important; }

  /* Hero stats */
  .flex-stats { flex-wrap: wrap !important; gap: 28px !important; }

  .footer-grid   { grid-template-columns: 1fr !important; gap: 28px !important; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }

  .cookie-banner { flex-direction: column; padding: 16px 20px; gap: 12px; }
  .cookie-banner p { max-width: 100%; }
}
