/* QI Design Tokens */
:root {
  --qi-teal: #1C637E;
  --qi-teal-700: #154A5E;
  --qi-green: #1F6F54;
  --qi-navy: #0F2D3A;
  --qi-champagne: #E8D9B5;
  --qi-text: #121A1F;
  --qi-subtext: #4A5A60;
  --qi-line: #E2E8EE;
  --qi-bg: #FAFBFC;
  --qi-surface: #FFFFFF;
  --qi-pos: #2BA24C;
  --qi-neg: #C54242;
  --qi-warn: #B07A3A;
  --qi-focus: #2D9ECA;
}

/* Base reset */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--qi-text);
  background: var(--qi-bg);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--qi-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--qi-focus); outline-offset: 2px; }

/* Typography */
h1, h2, h3, h4 { font-family: "Source Serif 4", ui-serif, Georgia, serif; color: var(--qi-navy); margin: 0 0 12px; }
h1 { font-size: 44px; line-height: 52px; font-weight: 600; }
h2 { font-size: 32px; line-height: 40px; font-weight: 600; }
h3 { font-size: 24px; line-height: 32px; font-weight: 600; }
h4 { font-size: 20px; line-height: 28px; font-weight: 600; }
p, li { font-size: 16px; line-height: 26px; margin: 0 0 12px; }
small { font-size: 14px; line-height: 22px; color: var(--qi-subtext); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.surface { background: var(--qi-surface); }

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.muted { color: var(--qi-subtext); }
.center { text-align: center; }
.spacer-8 { height: 8px; }
.spacer-16 { height: 16px; }
.spacer-24 { height: 24px; }
.spacer-40 { height: 40px; }
.spacer-64 { height: 64px; }

/* Header / Nav */
header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  transition: background-color .2s ease, box-shadow .2s ease;
}
header.scrolled { background: var(--qi-surface); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { font-weight: 700; color: var(--qi-navy); letter-spacing: 0.2px; }
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a { color: var(--qi-text); font-weight: 500; }
/* Language Toggle Control - Set to 'none' to hide, 'flex' to show */
.lang-toggle { 
  display: none; /* Change to 'flex' when language switching is implemented */
  border-left: 1px solid var(--qi-line); 
  padding-left: 12px; 
  margin-left: 4px; 
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 12px; font-weight: 600; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--qi-champagne); color: var(--qi-navy); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--qi-teal); border-color: var(--qi-teal); }
.btn-secondary:hover { background: #EEF6F9; }
.btn-tertiary { background: transparent; color: var(--qi-teal); padding: 0; border: none; text-decoration: underline; }

/* Hero variants */
.hero { padding: 96px 0 72px; background: var(--qi-bg); }
.hero .sub { max-width: 720px; margin: 12px auto 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Hero motif background (subtle geometric 5% teal) */
.hero.motif {
  background:
    radial-gradient(180px 140px at 20% 30%, rgba(28, 99, 126, 0.08), transparent),
    radial-gradient(220px 160px at 80% 60%, rgba(31, 111, 84, 0.08), transparent),
    repeating-linear-gradient(45deg, rgba(28, 99, 126, 0.03) 0 8px, transparent 8px 16px),
    var(--qi-bg);
}

.hero-split { padding: 96px 0 32px; background: var(--qi-bg); }
.hero-split .cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 900px) { .hero-split .cols { grid-template-columns: 1fr; } }
.mock-graphic { background: radial-gradient(120px 80px at 20% 30%, rgba(28,99,126,0.12), transparent),
  radial-gradient(160px 120px at 80% 60%, rgba(31,111,84,0.12), transparent);
  border: 1px dashed var(--qi-line); border-radius: 16px; height: 300px; }

.hero-band { padding: 72px 0; color: var(--qi-surface); background: linear-gradient(135deg, var(--qi-teal), var(--qi-green)); }
.hero-band h1, .hero-band p { color: var(--qi-surface); }
.hero-band .hero-actions { justify-content: flex-start; }

/* Cards */
.card {
  background: var(--qi-surface);
  border: 1px solid var(--qi-line);
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-color: var(--qi-teal); transform: translateY(-2px); }

.kicker { font-size: 14px; color: var(--qi-teal); letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }

/* Stats */
.stats { display: grid; gap: 24px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat { padding: 20px; border: 1px solid var(--qi-line); border-radius: 12px; background: var(--qi-surface); }
.stat .value { font-size: 44px; line-height: 52px; font-weight: 700; color: var(--qi-navy); }
.stat .label { font-size: 14px; color: var(--qi-subtext); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Partner strip */
.partner-strip { border-top: 1px solid var(--qi-line); border-bottom: 1px solid var(--qi-line); background: #F6F8FA; }
.partner-row { display: grid; grid-auto-flow: column; gap: 40px; align-items: center; padding: 16px 0; overflow: hidden; }
.partner { color: var(--qi-subtext); font-weight: 600; white-space: nowrap; }

/* Footer */
footer { background: var(--qi-surface); border-top: 1px solid var(--qi-line); padding: 32px 0; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* Utility surfaces */
.band { background: var(--qi-surface); border-top: 1px solid var(--qi-line); border-bottom: 1px solid var(--qi-line); }

/* Forms (for newsletter placeholders) */
.form-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.input { width: 100%; border: 1px solid var(--qi-line); border-radius: 10px; padding: 10px 12px; font-size: 16px; background: var(--qi-surface); }
.input:focus { border-color: var(--qi-teal); }
@media (max-width: 900px) { .form-row { grid-template-columns: 1fr; } }

/* Side index (layout 4) */
.layout-with-aside { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.aside { position: sticky; top: 88px; height: calc(100vh - 88px); padding-right: 12px; border-right: 1px solid var(--qi-line); }
.aside a { display: block; padding: 8px 0; color: var(--qi-subtext); }
.aside a.active { color: var(--qi-teal); font-weight: 600; }

/* Simple helpers */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.chip { display: inline-flex; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--qi-line); color: var(--qi-subtext); font-size: 12px; }

/* Media & images */
.media { border-radius: 16px; border: 1px solid var(--qi-line); overflow: hidden; background: #F6F8FA; }
.media img { width: 100%; height: auto; display: block; }
.media.hero { aspect-ratio: 16 / 9; }
.media.square { aspect-ratio: 1 / 1; }
.media.logo { aspect-ratio: 3 / 1; background: var(--qi-surface); display: grid; place-items: center; padding: 12px; }

.logo-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 24px; align-items: center; }
@media (max-width: 900px) { .logo-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.icon-circle { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: rgba(28, 99, 126, 0.1); border: 1px solid var(--qi-line); margin-bottom: 12px; }
.icon-circle img { width: 28px; height: 28px; }

/* Navigation Dropdown Styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-trigger {
  color: var(--qi-text);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-trigger:hover {
  background: rgba(28,99,126,0.08);
  color: var(--qi-teal);
  text-decoration: none;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--qi-surface);
  border: 1px solid var(--qi-line);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  min-width: 220px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px 0;
  margin-top: 4px;
  backdrop-filter: blur(8px);
  display: none;
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--qi-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}

.nav-dropdown-menu a:hover {
  background: rgba(28,99,126,0.06);
  color: var(--qi-teal);
  text-decoration: none;
  padding-left: 24px;
}

.nav-dropdown-menu a:first-child {
  border-radius: 12px 12px 0 0;
}

.nav-dropdown-menu a:last-child {
  border-radius: 0 0 12px 12px;
}

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Legal Pages Styles */
.hero-simple {
  background: linear-gradient(135deg, var(--qi-teal) 0%, var(--qi-green) 100%);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
}

.hero-simple h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-simple .hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.content-section {
  padding: 80px 0;
  background: var(--qi-bg);
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content {
  background: white;
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.legal-content h2 {
  color: var(--qi-teal);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

.legal-content h3 {
  color: var(--qi-navy);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--qi-line);
  padding-bottom: 8px;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section p {
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--qi-text);
}

.legal-section ul {
  margin: 16px 0;
  padding-left: 24px;
}

.legal-section li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--qi-text);
}

.legal-notice {
  background: var(--qi-bg);
  border-left: 4px solid var(--qi-teal);
  padding: 24px;
  margin-bottom: 32px;
  border-radius: 8px;
}

.legal-notice p {
  margin-bottom: 12px;
  font-weight: 500;
}

.legal-notice p:last-child {
  margin-bottom: 0;
}

.external-link {
  color: var(--qi-teal);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.external-link:hover {
  color: var(--qi-green);
}


