/* ==========================================================================
   HabitPact Landing Page — Complete Stylesheet
   Version: 1.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font Faces
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
  --primary-50: #EEF2FF;
  --primary-600: #4F46E5;
  --primary-700: #4338CA;
  --primary-900: #312E81;
  --primary-950: #1E1B4B;
  --cta-700: #047857;
  --cta-800: #065F46;
  --bg-white: #FAF9FF;
  --white: #ffffff;
  --warm-gray: #F5F3F0;
  --gray-100: #f9f9f9;
  --gray-200: #f1f1f1;
  --gray-300: #e5e7eb;
  --gray-400: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --footer-text: #C7D2FE;

  --font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  --container-max: 1200px;
  --section-padding-y: 48px;
  --section-padding-y-mobile: 32px;
  --base-unit: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 44px -10px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-up: 0 -4px 16px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.2s;
  --duration-moderate: 0.3s;
  --duration-slow: 0.6s;

  /* Opacity */
  --opacity-decorative: 0.25;
  --opacity-muted: 0.6;
  --opacity-subtle: 0.7;
  --opacity-soft: 0.8;
  --opacity-body: 0.85;
  --opacity-subheading: 0.95;

  /* Border radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 32px;
  --radius-2xl: 40px;
  --radius-pill: 99px;
}

/* --------------------------------------------------------------------------
   3. Reset & Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary-950);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */

h1 {
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
}

h3 {
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

small,
.text-small {
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   5. Layout Utilities
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 24px;
  }
}

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

.section {
  padding-top: var(--section-padding-y-mobile);
  padding-bottom: var(--section-padding-y-mobile);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
  }
}

.section--primary-50 {
  background-color: var(--primary-50);
}

.section--warm-gray {
  background-color: var(--warm-gray);
}

.section__title {
  margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--duration-base) ease,
    transform var(--duration-fast) ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--primary-600);
  outline-offset: 2px;
}

.btn--cta {
  background-color: var(--cta-700);
  color: var(--white);
}

.btn--cta:hover {
  background-color: var(--cta-800);
}

.btn--cta:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   7. Navbar
   -------------------------------------------------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  border-bottom: 1px solid var(--primary-50);
}

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

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.navbar__brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.navbar__name {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary-950);
  transition: color var(--duration-base) ease;
}

.navbar__brand:hover .navbar__name {
  color: var(--primary-600);
}

.navbar__cta {
  padding: 16px 24px;
  font-size: 0.875rem;
  min-height: 48px;
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: var(--white);
  clip-path: ellipse(150% 100% at 50% 0%);
  overflow: visible;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 80px;
}

.hero__content {
  text-align: center;
}

.hero__content h1 {
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: var(--opacity-subheading);
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: 24px;
}

.hero__badges {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 8px;
}

.hero__badges a {
  display: inline-flex;
  transition: opacity var(--duration-base) ease;
}

.hero__badges a:hover {
  opacity: var(--opacity-body);
}

.hero__badges a:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.hero__badges a:active {
  opacity: var(--opacity-subtle);
  transform: scale(0.97);
}

.hero__badges img {
  height: 48px;
  width: auto;
}

@media (max-width: 767px) {
  .hero__badges img {
    height: 40px;
  }
}

.hero__sloth {
  width: 120px;
  height: auto;
  animation: float 4s ease-in-out infinite alternate;
}

/* Desktop hero layout */
@media (min-width: 768px) {
  .hero {
    clip-path: ellipse(120% 100% at 50% 0%);
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 64px;
    padding-bottom: 96px;
    gap: 48px;
  }

  .hero__content {
    text-align: left;
    flex: 1;
    max-width: 560px;
  }

  .hero__subtitle {
    margin-inline: 0;
  }

  .hero__badges {
    justify-content: flex-start;
  }

  .hero__sloth {
    width: 200px;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    padding-top: 80px;
    padding-bottom: 120px;
  }

  .hero__sloth {
    width: 260px;
  }
}

/* Float animation */
@keyframes float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(5px);
  }
}

/* --------------------------------------------------------------------------
   9. Features
   -------------------------------------------------------------------------- */

.features {
  position: relative;
  background-color: var(--bg-white);
}

.features h2 {
  margin-bottom: 32px;
}

.features__hero-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}

.features__hero-block:last-of-type {
  margin-bottom: 48px;
}

.features__hero-block h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 8px;
}

.features__hero-block p {
  color: var(--primary-950);
  opacity: var(--opacity-body);
  line-height: 1.6;
}

.features__image-placeholder {
  background-color: var(--primary-50);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--primary-700);
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px dashed var(--primary-600);
  opacity: var(--opacity-muted);
}

@media (min-width: 768px) {
  .features__hero-block {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  /* Alternate: reverse block has image on left */
  .features__hero-block--reverse .features__image-placeholder {
    order: -1;
  }
}

/* Features sub-heading ("And more") */
.features__subheading {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 24px;
  color: var(--primary-950);
}

/* Compact feature rows */
.features__compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .features__compact {
    grid-template-columns: 1fr 1fr;
    gap: 24px 48px;
  }
}

.features__compact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.features__compact-item svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--primary-600);
  margin-top: 2px;
}

.features__compact-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.features__compact-item p {
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: var(--opacity-soft);
  margin-bottom: 0;
}

/* Peeking sloth in features section */
.features__peek-sloth {
  display: none;
}

@media (min-width: 768px) {
  .features__peek-sloth {
    display: block;
    position: absolute;
    right: -20px;
    top: 180px;
    width: 80px;
    height: auto;
    opacity: var(--opacity-subtle);
    z-index: 1;
    pointer-events: none;
    transform: rotate(-8deg);
  }
}

@media (min-width: 1024px) {
  .features__peek-sloth {
    right: 0;
    width: 100px;
  }
}

/* --------------------------------------------------------------------------
   10. How It Works
   -------------------------------------------------------------------------- */

.how-it-works {
  background-color: var(--warm-gray);
}

.how-it-works h2 {
  margin-bottom: 32px;
}

.how-it-works__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}

.how-it-works__row:last-child {
  margin-bottom: 0;
}

.how-it-works__row h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 8px;
}

.how-it-works__row p {
  line-height: 1.6;
  opacity: var(--opacity-body);
}

.how-it-works__image-placeholder {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--primary-700);
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px dashed var(--primary-600);
  opacity: var(--opacity-muted);
}

.how-it-works__image {
  border-radius: var(--radius-lg);
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (min-width: 768px) {
  .how-it-works__row {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  /* Alternate: second row image on left, text on right */
  .how-it-works__row:nth-child(even) .how-it-works__image-placeholder,
  .how-it-works__row:nth-child(even) .how-it-works__image {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   11. Social Proof
   -------------------------------------------------------------------------- */

.social-proof {
  background-color: var(--primary-50);
  text-align: center;
}

.social-proof h2 {
  margin-bottom: 32px;
}

.social-proof__quotes {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 960px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .social-proof__quotes {
    flex-direction: row;
    gap: 32px;
  }
}

.social-proof__quotes blockquote {
  flex: 1;
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary-950);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.social-proof__quotes blockquote::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--primary-600);
  opacity: var(--opacity-decorative);
  font-style: normal;
}

.social-proof__quotes blockquote p {
  margin-bottom: 16px;
}

.social-proof__quotes cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-700);
}

/* --------------------------------------------------------------------------
   12. Screenshots
   -------------------------------------------------------------------------- */

.screenshots {
  background-color: var(--warm-gray);
}

.screenshots h2 {
  text-align: center;
  margin-bottom: 40px;
}

/* Phone frames container - mobile: horizontal scroll */
.screenshots__phones {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-600) transparent;
}

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

.screenshots__phones::-webkit-scrollbar-track {
  background: transparent;
}

.screenshots__phones::-webkit-scrollbar-thumb {
  background-color: var(--primary-600);
  border-radius: var(--radius-xs);
}

/* Individual phone frame */
.phone-frame {
  flex-shrink: 0;
  width: 220px;
  min-width: 220px;
  scroll-snap-align: center;
  text-align: center;
}

/* On small mobile screens, size phones so ~1.5 are visible for scroll affordance */
@media (max-width: 480px) {
  .phone-frame {
    width: 65vw;
    min-width: 200px;
  }
}

/* Figcaption styling below phone frames */
.screenshots__phones figcaption {
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-700);
  line-height: 1.3;
}

.phone-frame__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 280 / 560;
  background-color: var(--gray-300);
  border-radius: var(--radius-xl);
  border: 6px solid var(--gray-800);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-shadow: var(--shadow-md);
}

/* Dynamic Island notch */
.phone-frame__screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 28px;
  background-color: var(--gray-800);
  border-radius: var(--radius-lg);
  z-index: 2;
}

.phone-frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xs);
}

/* Placeholder text for screenshot frames */
.phone-frame__screen span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  padding: 8px;
  line-height: 1.3;
  z-index: 1;
}

.phone-frame__label {
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-700);
  line-height: 1.3;
}

/* Desktop: fanned phone layout */
@media (min-width: 768px) {
  .screenshots__phones {
    overflow: visible;
    scroll-snap-type: none;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
    padding-bottom: 0;
  }

  .phone-frame {
    width: 240px;
    min-width: auto;
    scroll-snap-align: none;
  }

  .phone-frame__screen {
    border-radius: var(--radius-xl);
    border-width: 7px;
    aspect-ratio: 280 / 560;
    box-shadow: var(--shadow-lg);
    transition: box-shadow var(--duration-moderate) ease;
  }

  /* Fanned rotation */
  .phone-frame:nth-child(1) {
    transform: rotate(-6deg);
    z-index: 1;
    margin-right: -32px;
  }

  .phone-frame:nth-child(1) .phone-frame__screen {
    box-shadow: var(--shadow-md);
  }

  .phone-frame:nth-child(2) {
    transform: rotate(-2deg);
    z-index: 2;
    margin-right: -32px;
  }

  .phone-frame:nth-child(2) .phone-frame__screen {
    box-shadow: var(--shadow-lg);
  }

  .phone-frame:nth-child(3) {
    transform: rotate(2deg);
    z-index: 3;
    margin-right: -32px;
  }

  .phone-frame:nth-child(3) .phone-frame__screen {
    box-shadow: var(--shadow-xl);
  }

  .phone-frame:nth-child(4) {
    transform: rotate(6deg);
    z-index: 4;
  }

  .phone-frame:nth-child(4) .phone-frame__screen {
    box-shadow: var(--shadow-2xl);
  }
}

@media (min-width: 1024px) {
  .phone-frame {
    width: 280px;
  }

  .phone-frame__screen {
    border-radius: var(--radius-2xl);
    border-width: 8px;
  }

  .phone-frame__screen::before {
    height: 37px;
    border-radius: var(--radius-lg);
  }

  .phone-frame:nth-child(1) {
    margin-right: -40px;
  }

  .phone-frame:nth-child(2) {
    margin-right: -40px;
  }

  .phone-frame:nth-child(3) {
    margin-right: -40px;
  }
}

/* --------------------------------------------------------------------------
   13. Pricing
   -------------------------------------------------------------------------- */

.pricing {
  background-color: var(--bg-white);
}

.pricing h2 {
  margin-bottom: 32px;
}

.pricing__table {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 0;
  max-width: 720px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-300);
  margin-bottom: 32px;
  border-collapse: separate;
  border-spacing: 0;
}

/* Allow semantic table sub-elements to participate in the CSS grid */
.pricing__table thead,
.pricing__table tbody {
  display: contents;
}

/* Table header row */
.pricing__table-header {
  display: contents;
}

.pricing__table-header > th,
.pricing__table-header > td {
  padding: 16px 24px;
  font-weight: 700;
  font-size: 1rem;
  background-color: var(--white);
  border-bottom: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  text-align: left;
}

/* Premium column header */
.pricing__column--premium {
  background-color: var(--primary-50) !important;
  position: relative;
}

/* Popular pill */
.pricing__popular-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  background-color: var(--cta-700);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  vertical-align: middle;
}

/* Table rows */
.pricing__row {
  display: contents;
}

.pricing__row > th,
.pricing__row > td {
  padding: 16px 24px;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  background-color: var(--white);
}

/* Feature label column (row header) */
.pricing__row > th:first-child {
  font-weight: 600;
  color: var(--primary-950);
  text-align: left;
}

/* Premium column cells tint */
.pricing__row > td:last-child {
  background-color: var(--primary-50);
}

/* Last row removes bottom border */
.pricing__row:last-child > th,
.pricing__row:last-child > td {
  border-bottom: none;
}

.pricing__note {
  font-size: 0.875rem;
  color: var(--primary-950);
  opacity: var(--opacity-muted);
  margin-bottom: 24px;
}

.pricing__cta-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.pricing__cta-badges {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.pricing__cta-badges a {
  display: inline-flex;
  transition: opacity var(--duration-base) ease;
}

.pricing__cta-badges a:hover {
  opacity: var(--opacity-soft);
}

.pricing__cta-badges a:focus-visible {
  outline: 3px solid var(--primary-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.pricing__cta-badges a:active {
  opacity: var(--opacity-muted);
  transform: scale(0.97);
}

.pricing__cta-badges img {
  height: 40px;
  width: auto;
}

/* Mobile pricing: stack into labeled rows */
@media (max-width: 599px) {
  .pricing__table {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }

  /* Hide the empty top-left header cell */
  .pricing__table-header > td:first-child {
    display: none;
  }

  /* Free and Premium headers span one column each */
  .pricing__table-header > th:nth-child(2),
  .pricing__table-header > th:nth-child(3) {
    padding: 16px;
    font-size: 0.9375rem;
    text-align: center;
    justify-content: center;
  }

  /* Feature label spans full width across both columns */
  .pricing__row > th:first-child {
    grid-column: 1 / -1;
    background-color: var(--gray-100);
    font-size: 0.8125rem;
    padding: 8px 16px;
    border-bottom: none;
  }

  /* Free value column */
  .pricing__row > td:nth-child(2) {
    font-size: 0.875rem;
    padding: 8px 16px;
    justify-content: center;
    text-align: center;
  }

  /* Premium value column */
  .pricing__row > td:last-child {
    font-size: 0.875rem;
    padding: 8px 16px;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
  }

  /* Popular pill wraps on small screens */
  .pricing__popular-pill {
    display: none;
  }

  .pricing__column--premium::after {
    content: " \2605";
    color: var(--cta-700);
  }
}

@media (min-width: 600px) {
  .pricing__table {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */

.faq {
  background-color: var(--primary-50);
}

.faq h2 {
  margin-bottom: 32px;
}

.faq__list {
  max-width: 760px;
}

.faq details {
  border-bottom: 1px solid var(--gray-300);
}

.faq details:first-child {
  border-top: 1px solid var(--gray-300);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--primary-950);
  transition: color var(--duration-base) ease;
}

/* Summary text already styled with heading-like weight and size above */

/* Remove default marker */
.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::marker {
  display: none;
  content: "";
}

/* Custom chevron */
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231E1B4B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform var(--duration-moderate) ease;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq summary:hover {
  color: var(--primary-600);
}

.faq summary:focus-visible {
  outline: 3px solid var(--primary-600);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.faq summary:active {
  color: var(--primary-700);
}

.faq details .faq__answer {
  padding-top: 0;
  padding-bottom: 24px;
  padding-left: 0;
  padding-right: 40px; /* prevent text from overlapping chevron column */
  line-height: 1.6;
  color: var(--primary-950);
  opacity: var(--opacity-body);
}

/* Smooth open animation */
.faq details .faq__answer {
  animation: faq-open var(--duration-moderate) ease-out;
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 0.85; /* matches --opacity-body */
    transform: translateY(0);
  }
}

/* Ensure the answer only animates when opening, not when already open */
.faq details:not([open]) .faq__answer {
  animation: none;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.footer {
  background-color: var(--primary-900);
  color: var(--footer-text);
  padding-top: 40px;
  padding-bottom: 32px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer__brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer__brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}

.footer__brand-tagline {
  font-size: 0.875rem;
  opacity: var(--opacity-soft);
}

.footer__badges {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.footer__badges a {
  display: inline-flex;
  transition: opacity var(--duration-base) ease;
}

.footer__badges a:hover {
  opacity: var(--opacity-soft);
}

.footer__badges a:focus-visible {
  outline: 2px solid var(--footer-text);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.footer__badges a:active {
  opacity: var(--opacity-muted);
  transform: scale(0.97);
}

.footer__badges img {
  height: 40px;
  width: auto;
}

.footer__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.footer__links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  color: var(--footer-text);
  text-decoration: none;
  transition: color var(--duration-base) ease;
  padding: 8px 8px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

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

.footer__links a:focus-visible {
  outline: 2px solid var(--footer-text);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.footer__links a:active {
  opacity: var(--opacity-subtle);
}

.footer__links-separator {
  color: var(--footer-text);
  opacity: var(--opacity-decorative);
}

.footer__language {
  font-size: 0.8125rem;
  opacity: var(--opacity-subtle);
}

.footer__language a {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-base) ease;
}

.footer__language a:hover {
  color: var(--white);
}

.footer__language a:focus-visible {
  outline: 2px solid var(--footer-text);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.footer__copyright {
  font-size: 0.8125rem;
  opacity: var(--opacity-subtle);
  padding-top: 16px;
  border-top: 1px solid rgba(199, 210, 254, 0.15);
  width: 100%;
  text-align: center;
}

/* Desktop footer: three columns */
@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
  }

  .footer__brand {
    align-items: flex-start;
    flex: 1;
  }

  .footer__badges {
    flex: 1;
    justify-content: center;
  }

  .footer__links {
    align-items: flex-end;
    flex: 1;
  }

  .footer__copyright {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   16. Sticky Mobile CTA
   -------------------------------------------------------------------------- */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background-color: var(--cta-700);
  transform: translateY(100%);
  transition: transform var(--duration-moderate) var(--ease-out);
  box-shadow: var(--shadow-up);
}

.sticky-cta--visible {
  transform: translateY(0);
}

.sticky-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
}

.sticky-cta__text {
  color: var(--white);
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-cta__text svg {
  width: 16px;
  height: 16px;
}

.sticky-cta__badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-cta__badges a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  transition: opacity var(--duration-base) ease;
}

.sticky-cta__badges a:hover {
  opacity: var(--opacity-body);
}

.sticky-cta__badges a:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.sticky-cta__badges a:active {
  opacity: var(--opacity-subtle);
  transform: scale(0.97);
}

.sticky-cta__badges img {
  height: 32px;
  width: auto;
}

/* Hidden at tablet+ */
@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   17. Animations — Fade Up (IntersectionObserver driven)
   -------------------------------------------------------------------------- */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-up[data-delay="1"] {
  transition-delay: 100ms;
}

.fade-up[data-delay="2"] {
  transition-delay: 200ms;
}

.fade-up[data-delay="3"] {
  transition-delay: 300ms;
}

.fade-up[data-delay="4"] {
  transition-delay: 400ms;
}

/* --------------------------------------------------------------------------
   18. Reduced Motion Preferences
   -------------------------------------------------------------------------- */

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

  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__sloth {
    animation: none !important;
  }

  .phone-frame__screen {
    will-change: auto;
  }
}

/* --------------------------------------------------------------------------
   19. Skip Navigation Link
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 16px 24px;
  background-color: var(--primary-600);
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top var(--duration-base) ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--primary-950);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   20. Utility Classes
   -------------------------------------------------------------------------- */

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

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

/* --------------------------------------------------------------------------
   21. Focus Styles (Global)
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--primary-600);
  outline-offset: 2px;
}

a:focus-visible {
  border-radius: var(--radius-xs);
}

/* --------------------------------------------------------------------------
   22. Selection Styles
   -------------------------------------------------------------------------- */

::selection {
  background-color: var(--primary-600);
  color: var(--white);
}
