/* PensionRights shared design system */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-50: #eff6ff;
  --secondary: #1e293b;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --border: #e2e8f0;
  --success: #059669;
  --success-light: #d1fae5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.12);
  --header-h: 68px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 8px 24px;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  min-height: var(--header-h);
}
.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}
.logo-icon svg { width: 18px; height: 18px; fill: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--primary-50);
}
.nav-cta {
  color: var(--primary) !important;
  border: 1.5px solid var(--primary);
  font-weight: 700 !important;
}
.nav-cta:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-50); }

/* Service picker + form helpers */
.service-picker { border: 0; padding: 0; margin: 0 0 20px; }
.service-picker legend {
  font-weight: 700;
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 12px;
}
.service-options { display: grid; gap: 12px; }
.service-option {
  display: block;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.service-option:hover { border-color: var(--primary); }
.service-option.is-selected,
.service-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.service-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.service-option-title {
  display: block;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 4px;
}
.service-option-desc {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.lead-form-details[hidden] { display: none !important; }
.service-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 8px 0 0;
}
.next-steps {
  max-width: 480px;
  margin: 0 auto 20px;
  background: var(--primary-50);
  border: 1px solid var(--primary-light);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: start;
}
.next-steps h3 {
  font-size: 0.98rem;
  color: var(--secondary);
  margin-bottom: 8px;
}
.next-steps ol {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.next-steps li { margin-bottom: 6px; }
.next-steps p {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Video explainer (click-to-load facade) */
.video-section { padding: 48px 0 8px; }
.video-section .section-header { text-align: center; margin-bottom: 24px; }
.video-section .section-header h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 8px;
}
.video-section .section-header p {
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}
.video-embed {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--secondary);
  box-shadow: var(--shadow);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: none;
}
.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  transition: background 0.2s;
}
.video-facade:hover::after,
.video-facade:focus-visible::after { background: rgba(15, 23, 42, 0.1); }
.video-play {
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s, background 0.2s;
  pointer-events: none;
}
.video-facade:hover .video-play,
.video-facade:focus-visible .video-play {
  background: var(--primary-dark);
  transform: translate(50%, -50%) scale(1.06);
}
.video-play svg {
  width: 30px;
  height: 30px;
  fill: #fff;
  margin-inline-start: 4px;
}
.video-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 12px auto 0;
  max-width: 640px;
}
@media (max-width: 768px) {
  .video-section { padding: 32px 0 4px; }
  .video-play { width: 60px; height: 60px; }
  .video-play svg { width: 24px; height: 24px; }
}

.mid-cta {
  margin: 40px auto;
  max-width: 820px;
  background: linear-gradient(135deg, var(--secondary), #334155);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.mid-cta h2 {
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.mid-cta p {
  color: #cbd5e1;
  margin-bottom: 18px;
  font-size: 0.98rem;
}

.toc-details {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 20px 16px;
  box-shadow: var(--shadow-sm);
}
.toc-details > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--secondary);
  padding: 14px 0;
  list-style: none;
}
.toc-details > summary::-webkit-details-marker { display: none; }
.toc-details > summary::after {
  content: "▼";
  float: left;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.toc-details[open] > summary::after { content: "▲"; }
.toc-details ol {
  padding-right: 20px;
  columns: 2;
  column-gap: 30px;
  margin: 0 0 8px;
}
.toc-details li { margin-bottom: 8px; }
.toc-details a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.95rem;
}
.toc-details a:hover { text-decoration: underline; }

.table-scroll-hint {
  display: none;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0 8px;
}
.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1200;
  background: var(--secondary);
  color: #e2e8f0;
  transform: translateY(110%);
  transition: transform 0.3s ease;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.25);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-text { font-size: 0.9rem; flex: 1; min-width: 220px; line-height: 1.6; }
.cookie-text a { color: #93c5fd; text-decoration: underline; }
.cookie-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cookie-accept { background: var(--primary); color: #fff; }
.cookie-decline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.cookie-manage {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 16px;
  z-index: 1100;
  background: #fff;
  color: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: inherit;
}

.mobile-cta {
  display: none;
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 1050;
  background: var(--primary);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}
.mobile-cta:hover { background: var(--primary-dark); }
body.has-cookie-banner .mobile-cta { bottom: 96px; }
body.has-cookie-banner .cookie-manage { bottom: 96px; }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }

  /* Override legacy rules that hid all nav links including CTA */
  .nav a,
  .nav a:not(.btn),
  .nav a:not(.nav-cta) {
    display: none !important;
  }
  .header-actions .nav-cta-desktop {
    display: inline-flex !important;
  }
  .nav.is-open {
    display: flex !important;
    position: absolute;
    top: calc(100% + 1px);
    inset-inline: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    box-shadow: var(--shadow);
    gap: 4px;
  }
  .nav.is-open a,
  .nav.is-open a:not(.btn),
  .nav.is-open a:not(.nav-cta) {
    display: block !important;
    padding: 12px 14px;
  }
  .header-inner { position: relative; }
  .toc-details ol { columns: 1; }
  .table-scroll-hint { display: block; }
  .mobile-cta { display: block; }
  body.has-mobile-cta { padding-bottom: 84px; }
}

@media (min-width: 769px) {
  .nav-cta-desktop { display: none !important; }
  .nav-toggle { display: none !important; }
}
