/* Pacing Guard — Marketing Page */

:root {
  --bg: #ffffff;
  --bg-alt: #fafbfc;
  --text: #111827;
  --text-secondary: #4b5563;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1120px;
  --transition: 150ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

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

/* Skip link */
.skiplink {
  position: absolute;
  left: -9999px;
  z-index: 999;
}
.skiplink:focus {
  left: 16px;
  top: 16px;
  padding: 12px 20px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }
}

.section {
  padding: 80px 0;
}

.section--soft {
  background: var(--bg-alt);
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand__name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.nav__cta {
  margin-left: 8px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--text);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.nav__cta:hover {
  background: #1f2937;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle:hover {
  background: var(--bg-alt);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Typography */
.h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.h2 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.fineprint {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Hero */
.hero {
  padding: 64px 0 80px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__copy {
  max-width: 520px;
}

.hero__media {
  display: flex;
  justify-content: center;
}

.phone {
  width: 240px;
  padding: 8px;
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.phone__img {
  border-radius: 20px;
}

/* Buttons */
.ctaRow {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  color: #fff;
  background: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: #1f2937;
  box-shadow: var(--shadow);
}

.btn--secondary {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--bg-alt);
}

/* Trust line */
.trustLine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--text-secondary);
}

.trustLine li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trustLine li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}

/* Section headers */
.section-header,
.who-header {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-header__desc,
.who-header__desc {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.feature__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
}

.feature__content {
  flex: 1;
}

.feature__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.feature__desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.step__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
}

.step__content {
  flex: 1;
}

.step__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.step__desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Gallery */
.gallery {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery::-webkit-scrollbar {
  height: 6px;
}

.gallery::-webkit-scrollbar-track {
  background: var(--bg-alt);
  border-radius: 3px;
}

.gallery::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.figure {
  flex-shrink: 0;
  width: 200px;
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
}

.figure img {
  border-radius: var(--radius);
}

.figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* Footer */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer__brand {
  color: var(--text);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
  .h1 {
    font-size: 40px;
  }

  .h2 {
    font-size: 28px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero__copy {
    max-width: 100%;
  }

  .ctaRow {
    justify-content: center;
  }

  .trustLine {
    justify-content: center;
  }

  .phone {
    width: 220px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .section-header,
  .who-header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 56px 0;
  }

  .h1 {
    font-size: 32px;
  }

  .h2 {
    font-size: 24px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link,
  .nav__cta {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    margin-left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .btn {
    width: 100%;
    padding: 16px 24px;
  }

  .phone {
    width: 200px;
  }

  .feature {
    flex-direction: column;
    text-align: center;
  }

  .feature__icon {
    margin: 0 auto;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .final__inner {
    padding: 40px 24px;
  }
}

/* Page content (Support, Privacy) */
.page-hero {
  padding-bottom: 48px;
}

.page-content {
  max-width: 720px;
}

.page-content p {
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.page-content h2 {
  margin-top: 48px;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-list {
  padding-left: 24px;
  margin: 16px 0;
  color: var(--text-secondary);
}

.page-list li {
  margin: 8px 0;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__question {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "+";
  float: right;
  font-weight: 400;
  color: var(--text-secondary);
  transition: transform var(--transition);
}

.faq__item[open] .faq__question::after {
  content: "−";
}

.faq__answer {
  padding: 0 20px 16px;
  margin: 0;
  color: var(--text-secondary);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
