/* =============================================================
   SAFpedia — Terms & Conditions (self-contained stylesheet)
   ============================================================= */
:root {
  --color-blue: #2563EB;
  --color-blue-deep: #12305C;
  --color-blue-light: #E8EFFD;
  --color-red: #D82F1E;
  --color-red-deep: #B02416;
  --color-red-light: #FCEAE8;
  --color-gold: #E8A93A;
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F8FB;
  --color-text: #0B1220;
  --color-text-muted: #4A5568;
  --color-border: #E3E7F0;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px;
  --shadow-card: 0 4px 24px rgba(11, 46, 89, 0.08);
  --shadow-pop: 0 12px 40px rgba(11, 46, 89, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); color: var(--color-text); background: var(--color-bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 3px; }

.section-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-container {
  max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand-logo {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--color-blue); display: flex; align-items: baseline; gap: 2px;
}
.brand-logo::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-red); margin-left: 4px; align-self: flex-end; margin-bottom: 6px;
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--color-text-muted);
  position: relative; padding: 6px 0; transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--color-blue); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--color-red); border-radius: 2px;
}
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 4px; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--r-md); box-shadow: var(--shadow-pop);
  min-width: 210px; padding: 10px;
  opacity: 0; visibility: hidden; transition: all 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a { display: block; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--color-text-muted); }
.nav-dropdown-menu a:hover { background: var(--color-blue-light); color: var(--color-blue); }

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-signin { font-size: 15px; font-weight: 600; color: var(--color-blue); display: flex; align-items: center; gap: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 12px 24px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--color-red); color: var(--color-white); box-shadow: 0 6px 18px rgba(216,47,30,0.28); }
.btn-primary:hover { background: var(--color-red-deep); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--color-blue); border: 1.5px solid var(--color-border); }
.btn-secondary:hover { border-color: var(--color-blue); color: var(--color-blue); }
.btn-outline { background: transparent; color: var(--color-blue); border: 1.5px solid var(--color-blue); }
.btn-outline:hover { background: var(--color-blue); color: var(--color-white); }
.btn-white { background: var(--color-white); color: var(--color-blue); }
.btn-white:hover { background: var(--color-bg-alt); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

.mobile-menu-btn { display: none; font-size: 26px; color: var(--color-blue); }
@media (max-width: 960px) {
  .nav-links, .nav-signin { display: none; }
  .mobile-menu-btn { display: block; }
}
.mobile-menu {
  position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: var(--color-white); z-index: 999; padding: 24px;
  transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-nav-link {
  display: block; padding: 16px 4px; font-size: 18px; font-weight: 600;
  color: var(--color-text); border-bottom: 1px solid var(--color-border);
}

/* Page hero */
.page-hero { position: relative; background: var(--color-bg); overflow: hidden; padding: 88px 0 48px; text-align: center; }
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.gradient-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.28; }
.orb-1 { width: 420px; height: 420px; background: var(--color-blue); top: -140px; right: -100px; }
.orb-2 { width: 320px; height: 320px; background: var(--color-gold); bottom: -100px; left: -80px; opacity: 0.22; }
.page-hero-container { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-blue-light); border: 1px solid var(--color-border); color: var(--color-blue);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.badge-icon { color: var(--color-gold); font-size: 16px; display: flex; }
.page-hero-title {
  font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600;
  color: var(--color-text); line-height: 1.15; margin-bottom: 20px;
}
.page-hero-title .accent { color: var(--color-red); font-style: italic; }
.page-hero-subtitle { font-size: 17px; color: var(--color-text-muted); max-width: 620px; margin: 0 auto; }

/* Last-updated pill */
.updated-pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  background: var(--color-bg-alt); border: 1px solid var(--color-border); color: var(--color-text-muted);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.updated-pill ion-icon { color: var(--color-blue); font-size: 15px; }

/* Section headers (shared component) */
.section-badge {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-red); background: var(--color-red-light); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 600;
  color: var(--color-blue); line-height: 1.2; margin-bottom: 16px;
}

/* ===================== LEGAL PAGE LAYOUT ===================== */
.legal-shell { padding: 64px 0 96px; }

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* Sticky table of contents */
.legal-toc {
  position: sticky; top: 96px;
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); padding: 22px 20px;
  max-height: calc(100vh - 130px); overflow-y: auto;
}
@media (max-width: 900px) {
  .legal-toc { position: static; max-height: none; }
}
.legal-toc-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-muted); margin-bottom: 14px;
}
.legal-toc-list { display: flex; flex-direction: column; gap: 2px; }
.legal-toc-list a {
  display: block; font-size: 13.5px; font-weight: 500; color: var(--color-text-muted);
  padding: 8px 10px; border-radius: var(--r-sm); transition: background 0.15s ease, color 0.15s ease;
}
.legal-toc-list a:hover { background: var(--color-blue-light); color: var(--color-blue); }
.legal-toc-list a.active { background: var(--color-blue); color: var(--color-white); font-weight: 600; }

/* Plain-English summary callout */
.legal-callout {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--color-blue-light); border: 1px solid var(--color-border);
  border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 32px;
}
.legal-callout ion-icon { color: var(--color-blue); font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.legal-callout h4 { font-size: 15px; font-weight: 700; color: var(--color-text); margin-bottom: 4px; }
.legal-callout p { font-size: 14px; color: var(--color-text-muted); }
.legal-callout.warn { background: var(--color-red-light); }
.legal-callout.warn ion-icon { color: var(--color-red); }

/* Clause accordion (shares .faq-item markup used sitewide) */
.faq-item { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--r-md); overflow: hidden; margin-bottom: 12px; scroll-margin-top: 96px; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px;
  cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--color-blue-deep);
}
.faq-question ion-icon { color: var(--color-blue); font-size: 20px; flex-shrink: 0; transition: transform 0.25s ease; }
.faq-item.open .faq-question ion-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 22px; font-size: 14.5px; color: var(--color-text-muted); }
.faq-item.open .faq-answer { padding: 0 22px 22px; }
.faq-answer p { margin-bottom: 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; padding-left: 4px; }
.faq-answer li { position: relative; padding-left: 18px; }
.faq-answer li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-red);
}
.faq-answer a { color: var(--color-blue); font-weight: 600; text-decoration: underline; text-decoration-color: var(--color-blue-light); }
.faq-answer a:hover { text-decoration-color: var(--color-blue); }
.faq-answer strong { color: var(--color-text); }

/* Contact card */
.legal-contact-card {
  margin-top: 40px; text-align: center;
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--r-lg); padding: 40px 32px;
}
.legal-contact-card h3 { font-family: var(--font-display); font-size: 22px; color: var(--color-blue); margin-bottom: 10px; }
.legal-contact-card p { font-size: 14.5px; color: var(--color-text-muted); max-width: 440px; margin: 0 auto 22px; }

/* Footer */
.footer { background: var(--color-text); color: rgba(255,255,255,0.7); padding: 72px 0 24px; }
.footer-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand h3 { font-family: var(--font-display); color: var(--color-white); font-size: 22px; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; margin-bottom: 20px; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 17px; transition: background 0.2s ease;
}
.social-links a:hover { background: var(--color-red); }
.footer-links h4, .footer-contact h4 { color: var(--color-white); font-size: 14.5px; margin-bottom: 18px; }
.footer-links ul { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14px; }
.footer-links a:hover { color: var(--color-white); }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 12px; }
.contact-item ion-icon { color: var(--color-gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; flex-wrap: wrap; gap: 12px; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover, .footer-bottom-links a.active { color: var(--color-white); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }