:root {
  --color-bg: #f7f8fb;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-muted: #52606d;
  --color-accent: #2f6fed;
  --color-accent-dark: #1d4fd7;
  --font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 62rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a:hover,
a:focus-visible {
  color: var(--color-accent);
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(82, 96, 109, 0.1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.75rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.nav-toggle {
  border: none;
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.nav-toggle-bar {
  width: 1.5rem;
  height: 0.125rem;
  background: var(--color-text);
  border-radius: 999px;
}

.primary-nav {
  position: absolute;
  inset: 100% 0 auto auto;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  padding: var(--space-md);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transform-origin: top right;
  transform: scaleY(0);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.primary-nav.open {
  transform: scaleY(1);
  opacity: 1;
}

.primary-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.primary-nav a {
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.primary-nav a:focus-visible,
.primary-nav a:hover {
  background: rgba(47, 111, 237, 0.1);
  color: var(--color-accent);
}

.hero {
  padding: var(--space-xl) 0 var(--space-lg);
}

.hero-content {
  text-align: center;
  display: grid;
  gap: var(--space-md);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0;
}

.hero p {
  color: var(--color-muted);
  margin: 0 auto;
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.button.primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(47, 111, 237, 0.25);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--color-accent-dark);
}

.button.secondary {
  background: var(--color-surface);
  color: var(--color-accent);
  border-color: rgba(47, 111, 237, 0.4);
}

.button.secondary:hover,
.button.secondary:focus-visible,
.button.tertiary:hover,
.button.tertiary:focus-visible {
  background: rgba(47, 111, 237, 0.08);
  color: var(--color-accent);
}

.button.tertiary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: rgba(31, 41, 51, 0.12);
}

.button.inline {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

section {
  padding: var(--space-lg) 0;
}

section:nth-of-type(even) {
  background: var(--color-surface);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.card-grid {
  display: grid;
  gap: var(--space-md);
}

.card {
  background: var(--color-surface);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  display: grid;
  gap: var(--space-sm);
}

.card p {
  margin: 0;
  color: var(--color-muted);
}

.package-grid {
  gap: var(--space-lg);
}

.package-card header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.package-price {
  font-weight: 600;
  color: var(--color-accent);
}

.package-spec {
  font-weight: 500;
  color: var(--color-text);
}

.case-outcomes {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--color-muted);
}

.faq-item {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.faq-item + .faq-item {
  margin-top: var(--space-md);
}

.contact {
  text-align: center;
}

.site-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.88);
  padding: var(--space-md) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-md);
}

.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;
}

.calculator-container {
  width: 100%;
  max-width: 100%;
  padding: 0 var(--space-md);
}

.calculator-container h1 {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  min-height: 95vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--color-surface);
}

.iframe-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.iframe-fallback {
  margin-top: var(--space-md);
  color: var(--color-muted);
  text-align: center;
}

@media (min-width: 64rem) {
  .calculator-container {
    padding: 0 var(--space-xl);
  }

  .iframe-wrapper {
    min-height: 100vh;
  }
}

@media (min-width: 48rem) {
  .primary-nav {
    position: static;
    transform: none;
    opacity: 1;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .primary-nav ul {
    flex-direction: row;
    gap: var(--space-lg);
  }

  .nav-toggle {
    display: none;
  }

  .hero-actions {
    flex-direction: row;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
