/* =========================================================================
   TrustedSource EU Compliance Navigator - stylesheet
   Visual language matched to trustedsource.co.za:
   - Inter Tight (body) + Space Grotesk (headings)
   - Cyan #0094ff primary, navy #0b1f3a secondary
   - Dark radial gradient page, alternating with pure white sections
   - Pill-shaped buttons with blue glow shadow
   - 26px-radius dark pillar cards on dark sections
   ========================================================================= */

:root {
  /* Brand palette (from trustedsource.co.za Style.css) */
  --color-primary:        #0094ff;
  --color-primary-dark:   #0064d6;
  --color-secondary:      #0b1f3a;
  --color-secondary-dark: #07162a;
  --color-background:     #020611;
  --color-text:           #e6f1ff;
  --color-muted:          rgba(230, 241, 255, 0.72);
  --color-muted-strong:   rgba(230, 241, 255, 0.86);

  /* Shadows (from main site) */
  --shadow-soft:   0 18px 36px rgba(0, 41, 82, 0.22);
  --shadow-button: 0 14px 24px rgba(0, 148, 255, 0.32);
  --shadow-card:   0 26px 50px rgba(1, 13, 30, 0.28);

  /* Semantic colours for badges (kept restrained, navy-tinted) */
  --badge-danger-bg:  rgba(255, 86, 86, 0.14);
  --badge-danger-fg:  #ffb4b4;
  --badge-info-bg:    rgba(0, 148, 255, 0.16);
  --badge-info-fg:    #7fcaff;
  --badge-warning-bg: rgba(255, 184, 0, 0.16);
  --badge-warning-fg: #ffd47a;
  --badge-success-bg: rgba(72, 207, 173, 0.16);
  --badge-success-fg: #93e7cf;

  /* Layout */
  --max-width: 1200px;
  --nav-card-max-width: 760px;

  /* Type */
  --font-body: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Reset ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: radial-gradient(140% 140% at 25% 5%, #0e3b73 0%, #020611 60%, #01030a 100%);
  background-attachment: fixed;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.005em;
}

p { margin: 0; color: var(--color-muted); line-height: 1.6; }

a { color: inherit; text-decoration: none; }

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

.page-container { flex: 1; }

/* ---------- Section primitives ------------------------------------------ */

.section {
  padding: 100px 24px;
  display: flex;
  justify-content: center;
  position: relative;
}

.section__content {
  width: 100%;
  max-width: var(--max-width);
  position: relative;
  z-index: 1;
}

.section--light {
  background: white;
  color: var(--color-secondary);
}

.section--light h1,
.section--light h2,
.section--light h3,
.section--light h4,
.section--light h5,
.section--light h6 { color: var(--color-secondary); }

.section--light p { color: rgba(7, 22, 42, 0.75); }

.section__eyebrow {
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
  font-weight: 500;
}

.section--light .section__eyebrow { color: rgba(7, 22, 42, 0.55); }

/* ---------- Header ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: white;
  border-bottom: 1px solid rgba(0, 148, 255, 0.15);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 -20px 0 0 white;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav { display: flex; align-items: center; gap: 32px; }

.nav__links { display: flex; align-items: center; gap: 28px; }

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(11, 31, 58, 0.7);
  transition: color 0.15s ease;
}
.nav__link:hover { color: var(--color-primary); }

/* ---------- Buttons ----------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button:disabled:hover { transform: none; }

.button--primary {
  background: linear-gradient(135deg, #00a4ff 0%, #0070f3 100%);
  color: #ffffff;
  box-shadow: var(--shadow-button);
}
.button--primary:hover:not(:disabled),
.button--primary:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #06baff 0%, #0a82ff 100%);
}

/* Ghost on dark backgrounds (default ghost) */
.button--ghost {
  background: rgba(230, 241, 255, 0.06);
  color: var(--color-text);
  border: 1px solid rgba(230, 241, 255, 0.18);
}
.button--ghost:hover:not(:disabled),
.button--ghost:focus-visible {
  background: rgba(230, 241, 255, 0.12);
  transform: translateY(-1px);
}

/* Ghost on light backgrounds */
.button--ghost-dark {
  background: rgba(11, 31, 58, 0.04);
  color: var(--color-secondary);
  border: 1px solid rgba(11, 31, 58, 0.15);
}
.button--ghost-dark:hover:not(:disabled),
.button--ghost-dark:focus-visible {
  background: rgba(11, 31, 58, 0.08);
  transform: translateY(-1px);
}

.button--sm {
  padding: 9px 18px;
  font-size: 0.85rem;
}

.button--invisible { visibility: hidden; }

/* ---------- Hero --------------------------------------------------------- */

.hero {
  padding: 120px 24px 80px;
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero__content {
  position: relative;
  max-width: 760px;
  width: 100%;
  display: grid;
  justify-content: center;
  text-align: center;
  gap: 22px;
}

.hero__eyebrow {
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0;
  font-weight: 500;
}

.hero__headline {
  font-size: clamp(2.5rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.hero__description {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 620px;
  margin: 0 auto;
}

.hero__description em {
  color: var(--color-text);
  font-style: italic;
}

.hero__meta {
  font-size: 0.85rem;
  color: rgba(230, 241, 255, 0.5);
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---------- Navigator card (the wizard surface) ------------------------- */

.navigator-section { padding: 60px 24px 100px; }

.nav-card {
  background: white;
  border: 1px solid rgba(0, 148, 255, 0.12);
  border-radius: 26px;
  padding: 44px;
  max-width: var(--nav-card-max-width);
  margin: 0 auto;
  box-shadow: 0 18px 36px rgba(0, 41, 82, 0.08);
}

/* ----- Wizard ----- */

.progress-shell {
  height: 4px;
  background: rgba(0, 148, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00a4ff 0%, #0070f3 100%);
  transition: width 0.3s ease;
  border-radius: 999px;
}

.step-question {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--color-secondary);
  line-height: 1.25;
}
.step-help {
  font-size: 0.95rem;
  color: rgba(7, 22, 42, 0.6);
  margin: 0 0 22px;
  line-height: 1.55;
}

.options { display: grid; gap: 10px; }

.opt-btn {
  background: white;
  border: 1px solid rgba(11, 31, 58, 0.12);
  border-radius: 14px;
  padding: 15px 18px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-size: 0.98rem;
  font-family: var(--font-body);
  color: var(--color-secondary);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.opt-btn:hover {
  border-color: rgba(0, 148, 255, 0.35);
  background: rgba(0, 148, 255, 0.03);
}
.opt-btn:active { transform: scale(0.99); }

.opt-btn.is-selected {
  background: rgba(0, 148, 255, 0.08);
  border-color: var(--color-primary);
  border-width: 2px;
  padding: 14px 17px;
  box-shadow: 0 0 0 4px rgba(0, 148, 255, 0.08);
}

.opt-btn .ti {
  font-size: 20px;
  color: rgba(11, 31, 58, 0.55);
  flex-shrink: 0;
}
.opt-btn.is-selected .ti { color: var(--color-primary); }

.step-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
}
.step-counter {
  font-size: 0.85rem;
  color: rgba(7, 22, 42, 0.5);
  font-weight: 500;
}

/* ---------- Report ------------------------------------------------------ */

.report-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.report-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 148, 255, 0.12);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.report-header-icon .ti { font-size: 18px; }

.report-eyebrow {
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: rgba(7, 22, 42, 0.55);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.report-headline {
  font-family: var(--font-head);
  font-size: 1.7rem;
  margin: 8px 0 16px;
  color: var(--color-secondary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.report-intro {
  font-size: 1rem;
  color: rgba(7, 22, 42, 0.7);
  margin: 0 0 24px;
  line-height: 1.65;
}

.report-alert {
  padding: 14px 16px;
  background: rgba(255, 184, 0, 0.1);
  color: #8a5a08;
  border-radius: 14px;
  border: 1px solid rgba(255, 184, 0, 0.25);
  margin: 16px 0 24px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.report-alert .ti { margin-right: 6px; vertical-align: -2px; }
.report-alert a { color: inherit; text-decoration: underline; }

/* Regulation cards: light variant living inside the nav-card */
.reg-card {
  background: white;
  border: 1px solid rgba(0, 148, 255, 0.14);
  border-radius: 20px;
  padding: 24px 26px;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(0, 41, 82, 0.05);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.reg-card:hover {
  box-shadow: 0 12px 28px rgba(0, 41, 82, 0.08);
  transform: translateY(-1px);
}

.reg-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.reg-title { flex: 1; min-width: 0; }
.reg-title h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
  color: var(--color-secondary);
}
.reg-ref {
  font-size: 0.78rem;
  color: rgba(7, 22, 42, 0.5);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin: 0;
}

.badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-danger  { background: rgba(255, 86, 86, 0.12);   color: #c33131; }
.badge-info    { background: rgba(0, 148, 255, 0.12);   color: var(--color-primary-dark); }
.badge-warning { background: rgba(255, 184, 0, 0.14);   color: #8a5a08; }
.badge-success { background: rgba(72, 207, 173, 0.14);  color: #0f8466; }

.reg-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 9px 14px;
  background: rgba(0, 148, 255, 0.06);
  border-radius: 10px;
  font-size: 0.88rem;
}
.reg-date .ti { font-size: 15px; color: var(--color-primary); }
.reg-date-label { color: rgba(7, 22, 42, 0.6); }
.reg-date-value { font-weight: 600; color: var(--color-secondary); }

.reg-summary {
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 16px;
  color: rgba(7, 22, 42, 0.78);
}

.reg-section-title {
  font-family: var(--font-head);
  font-size: 0.72rem;
  color: rgba(7, 22, 42, 0.5);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.reg-list {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(7, 22, 42, 0.8);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chip {
  font-size: 0.78rem;
  padding: 5px 11px;
  background: rgba(0, 148, 255, 0.07);
  border: 1px solid rgba(0, 148, 255, 0.14);
  border-radius: 999px;
  color: rgba(7, 22, 42, 0.75);
}

.reg-card-cta { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0, 148, 255, 0.1); }

/* CTA block at end of report - dark, mirrors pillar-card aesthetic */
.cta-block {
  background: linear-gradient(135deg, #0b1f3a 0%, #07162a 100%);
  color: var(--color-text);
  border-radius: 22px;
  padding: 28px;
  margin-top: 28px;
  box-shadow: var(--shadow-card);
}
.cta-block h3 {
  font-family: var(--font-head);
  color: white;
  margin: 0 0 6px;
  font-size: 1.2rem;
}
.cta-block p {
  color: var(--color-muted);
  margin: 0 0 16px;
  font-size: 0.95rem;
}
.cta-block .cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.disclaimer {
  font-size: 0.78rem;
  color: rgba(7, 22, 42, 0.45);
  line-height: 1.55;
  margin: 24px 0 0;
}

/* Loading state */
.loading-block {
  text-align: center;
  padding: 80px 20px;
  color: rgba(7, 22, 42, 0.6);
  font-size: 0.95rem;
}
.loading-block p { margin: 12px 0 0; color: rgba(7, 22, 42, 0.6); }
.loading-block .ti {
  font-size: 28px;
  color: var(--color-primary);
  animation: spin 1.2s linear infinite;
  display: inline-block;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- "How it works" - pillar cards on dark backdrop ------------- */

.how-it-works__headline {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.how-it-works__subtitle {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin: 0 0 48px;
  max-width: 620px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.pillar-card {
  position: relative;
  padding: 36px 30px;
  border-radius: 26px;
  background: rgba(0, 17, 33, 0.75);
  border: 1px solid rgba(0, 148, 255, 0.18);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
}

.pillar-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #E9F1FE;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.pillar-card__icon .ti {
  font-size: 26px;
  color: var(--color-primary);
}

.pillar-card__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: white;
  margin: 0 0 4px;
  font-weight: 600;
}

.pillar-card__subtitle {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0 0 12px;
  font-weight: 400;
}

.pillar-card__description {
  font-size: 0.95rem;
  color: var(--color-muted-strong);
  line-height: 1.6;
  margin: 0;
}

/* ---------- About section ----------------------------------------------- */

.about-section__headline {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin: 0 0 24px;
  max-width: 760px;
  letter-spacing: -0.01em;
}

.about-section__body {
  max-width: 760px;
  margin-bottom: 28px;
}
.about-section__body p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 16px;
}
.about-section__body p:last-child { margin-bottom: 0; }

.about-section__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  background: #01030a;
  color: var(--color-muted);
  padding: 56px 24px 32px;
  border-top: 1px solid rgba(0, 148, 255, 0.1);
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.site-footer__brand .brand__logo { height: 28px; }

.site-footer__tagline {
  max-width: 560px;
  margin: 0 auto 24px;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.site-footer__legal {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: rgba(230, 241, 255, 0.55);
}

.site-footer__disclaimer {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(230, 241, 255, 0.4);
  line-height: 1.5;
}

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 760px) {
  .section { padding: 70px 20px; }
  .hero { padding: 80px 20px 50px; }
  .navigator-section { padding: 40px 16px 70px; }
  .nav-card { padding: 28px 22px; border-radius: 22px; }

  .nav__links { display: none; }
  .nav { gap: 12px; }
  .site-header__inner { padding: 16px 20px; gap: 16px; }
  .brand__logo { height: 28px; }

  .step-question { font-size: 1.25rem; }
  .reg-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pillar-card { padding: 28px 24px; }

  .button { padding: 11px 20px; font-size: 0.9rem; }
}

/* ---------- Utilities ---------------------------------------------------- */

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