/* Global reset and typography */
:root {
  --clr-bg: #f9fafb;
  --clr-dark: #0f172a;
  --clr-muted: #475569;
  --clr-accent: #2563eb;
  --clr-accent-dark: #1d4ed8;
  --clr-border: #e2e8f0;
  --clr-card: #ffffff;
  --max-width: 1080px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-size: 16px;
}

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

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--clr-bg);
  color: var(--clr-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

ul,
ol {
  padding-left: 1.5rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

ul li,
ol li {
  margin-bottom: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--clr-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

table thead {
  background-color: var(--clr-dark);
  color: white;
}

table th,
table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--clr-border);
}

table tbody tr:last-child td {
  border-bottom: none;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Layout */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.site-header-bar {
  background: var(--clr-card);
  width: 100%;
  position: static;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.site-header nav .footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-header nav .footer-links li {
  margin: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #93c5fd, #1d4ed8);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clr-dark);
}

.primary-button {
  background: var(--clr-accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease-in-out, transform 0.2s ease-in-out;
  border: none;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--clr-accent-dark);
  transform: translateY(-1px);
}

/* Hero section */
.hero {
  padding: 3.25rem 0 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.hero-title-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1.05;
  margin: 0;
}

.hero-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
}

.key-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
  justify-items: stretch;
  align-content: stretch;
}

.metric {
  position: relative;
  background: var(--clr-card);
  border-radius: 22px;
  padding: 2.25rem 1.75rem 2rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 240px;
  overflow: hidden;
  z-index: 0;
}

.metric-heading {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
}

.metric-value {
  position: relative;
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: 700;
  color: #0f172a;
  display: block;
}

.metric-label {
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.78);
  display: block;
  max-width: 18ch;
}

.metric > * {
  position: relative;
  z-index: 1;
}

/* Long-form content */
.content-section {
  margin-top: 3rem;
}

.content-section h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.content-section h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content-prose {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s ease, filter 0.2s ease;
}

.content-prose p {
  margin-bottom: 1.25rem;
  color: var(--clr-muted);
}

.content-prose.content-collapsed {
  max-height: 320px;
}

.content-prose.content-collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(249, 250, 251, 0) 0%, var(--clr-bg) 100%);
}

.toggle-content {
  margin-top: 1.5rem;
  text-align: center;
}

.toggle-content button {
  background: transparent;
  border: none;
  color: var(--clr-accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
}

.toggle-content button:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 4px;
  border-radius: 999px;
}

/* FAQ */
.faq-section {
  margin-top: 4rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--clr-border);
  background: var(--clr-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question span {
  flex: 1;
  margin-right: 1.5rem;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--clr-muted);
}

.faq-answer p {
  margin: 0.75rem 0;
}

/* Reviews */
.reviews-section {
  margin-top: 4rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--clr-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-author {
  font-weight: 600;
  color: var(--clr-dark);
}

.review-meta {
  font-size: 0.85rem;
  color: var(--clr-muted);
}

.review-text {
  color: var(--clr-muted);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  background: var(--clr-dark);
  color: #cbd5f5;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-note {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.85);
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #e0e7ff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.68);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

/* Responsive tweaks */
@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
    gap: 2.25rem;
  }

  .hero-title-wrapper {
    padding: 0 1.25rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .hero-inner {
    padding: 0;
  }

  .key-metrics {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .metric {
    min-height: 210px;
  }

  .content-prose.content-collapsed {
    max-height: 260px;
  }
}

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