/* ==========================================================================
   Flarely Design System
   A complete design system for the Flarely marketing website.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-primary: #ECA413;
  --color-primary-light: rgba(236, 164, 19, 0.1);
  --color-primary-dark: #D4920F;
  --color-text-primary: #0F172A;
  --color-text-secondary: #94A3B8;
  --color-text-tertiary: #CBD5E1;
  --color-bg: #F8F7F4;
  --color-card: #FFFFFF;
  --color-border: #F1F5F9;
  --color-chip: #F8FAFC;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-cta: 0 4px 8px rgba(236, 164, 19, 0.25);
  --shadow-phone: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes — Desktop */
  --text-hero: 52px;
  --text-section: 36px;
  --text-body: 18px;
  --text-small: 14px;

  /* Spacing */
  --section-padding: 96px;
  --content-max-width: 1120px;

  /* Radii */
  --radius-card: 16px;
  --radius-button: 16px;
  --radius-phone: 16px;
  --radius-chip: 100px;
}

/* --------------------------------------------------------------------------
   2. CSS Reset
   -------------------------------------------------------------------------- */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  line-height: 1.2;
}

p {
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.flex-between {
  align-items: center;
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

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

.heading-hero {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.heading-section {
  font-family: var(--font-serif);
  font-size: var(--text-section);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.heading-card {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.text-body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.text-body-large {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.text-small {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.text-label {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-accent { color: var(--color-primary); }

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }

.font-light { font-weight: 300; }
.font-regular { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* --------------------------------------------------------------------------
   5. Card Styles
   -------------------------------------------------------------------------- */

.card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.card-bordered {
  background: var(--color-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  padding: 32px;
}

.card-flat {
  background: var(--color-chip);
  border-radius: var(--radius-card);
  padding: 32px;
}

/* --------------------------------------------------------------------------
   6. Button Styles
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius-button);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-cta);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 12px rgba(236, 164, 19, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-cta);
}

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

.btn-secondary:hover {
  border-color: var(--color-text-tertiary);
  box-shadow: var(--shadow-card);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.btn-small {
  padding: 10px 20px;
  font-size: 14px;
}

.btn-large {
  padding: 20px 40px;
  font-size: 18px;
}

/* --------------------------------------------------------------------------
   7. Chip / Pill Styles
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-chip);
  border-radius: var(--radius-chip);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.chip-accent {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------------
   8. Phone Frame
   -------------------------------------------------------------------------- */

.phone-frame {
  border-radius: var(--radius-phone);
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  max-height: 500px;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   9. Section-Specific Helpers
   -------------------------------------------------------------------------- */

.section-header {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: 64px;
}

.section-header .text-label {
  margin-bottom: 12px;
}

.section-header .heading-section {
  margin-bottom: 16px;
}

.section-header .text-body {
  margin-top: 0;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --------------------------------------------------------------------------
   10. Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-text-primary);
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   11. Footer (base — overridden by .site-footer in section 21)
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   12. Miscellaneous Utilities
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.highlight {
  color: var(--color-primary);
}

.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
}

/* Fade-in animation (legacy — kept for compatibility) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Scroll-triggered animations */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grouped items (steps, problem cards) */
.animate-in:nth-child(2) { transition-delay: 0.1s; }
.animate-in:nth-child(3) { transition-delay: 0.2s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   13. Hero Section
   -------------------------------------------------------------------------- */

.hero {
  padding-top: 140px;
  padding-bottom: var(--section-padding);
  overflow: hidden;
}

.hero-layout {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-content {
  flex: 0 0 55%;
  max-width: 55%;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-brand .app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hero-brand .wordmark {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-text-primary);
}

.hero .heading-hero {
  margin-bottom: 20px;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
}

/* App Store Badge */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--color-text-primary);
  color: #FFFFFF;
  border-radius: 12px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.app-store-badge:hover {
  background: #1E293B;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.app-store-badge:active {
  transform: translateY(0);
}

.app-store-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.app-store-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.app-store-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.app-store-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Hero Screenshots */
.hero-screenshots {
  flex: 0 0 45%;
  max-width: 45%;
  position: relative;
}

.phone-cascade {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  height: 520px;
}

.phone-cascade .phone-frame {
  position: absolute;
  width: 200px;
  border: 6px solid #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-phone);
  max-height: none;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phone-cascade .phone-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.phone-1 {
  left: 0;
  top: 0;
  z-index: 3;
  transform: rotate(-3deg);
}

.phone-2 {
  left: 140px;
  top: 40px;
  z-index: 2;
  transform: rotate(1deg);
}

.phone-3 {
  left: 280px;
  top: 16px;
  z-index: 1;
  transform: rotate(4deg);
}

.phone-cascade .phone-frame:hover {
  transform: translateY(-8px) rotate(0deg);
  z-index: 10;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

/* --------------------------------------------------------------------------
   14. How It Works Section
   -------------------------------------------------------------------------- */

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

.step {
  text-align: center;
  padding: 16px 8px;
}

.step-number {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 12px;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--color-text-primary);
  margin-bottom: 12px;
}

.step-body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   15. Problem Section
   -------------------------------------------------------------------------- */

.problem {
  background: var(--color-chip);
}

.problem-cards {
  gap: 24px;
}

.problem-card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.problem-icon {
  display: block;
  font-size: 36px;
  margin-bottom: 16px;
  line-height: 1;
}

.problem-card p {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   16. Features Section
   -------------------------------------------------------------------------- */

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

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

.feature + .feature {
  margin-top: 96px;
}

/* Reverse layout: swap column order so image appears on the left */
.feature--reverse {
  direction: rtl;
}

.feature--reverse > * {
  direction: ltr;
}

.feature-content {
  max-width: 480px;
}

.feature--reverse .feature-content {
  max-width: 480px;
  margin-left: auto;
}

.feature-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.feature-headline {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.feature-body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.feature-image {
  display: flex;
  justify-content: center;
}

.feature-phone {
  width: 260px;
  max-height: none;
  border: 6px solid #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-phone);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature-phone:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.feature-phone img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   17. Trust Bar
   -------------------------------------------------------------------------- */

.trust-bar {
  padding-top: 32px;
  padding-bottom: 32px;
  background: var(--color-chip);
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.trust-item svg {
  flex-shrink: 0;
  color: var(--color-primary);
  display: inline-block;
}

/* --------------------------------------------------------------------------
   18. Founder Section
   -------------------------------------------------------------------------- */

.founder {
  text-align: center;
}

.founder .heading-section {
  margin-bottom: 40px;
}

.founder-quote {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  border-left: 4px solid var(--color-primary);
  padding-left: 32px;
  text-align: left;
}

.founder-quote p {
  font-family: var(--font-sans);
  font-size: 18px;
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.founder-quote p + p {
  margin-top: 16px;
}

.founder-personal {
  font-weight: 600;
  color: var(--color-text-primary) !important;
}

.founder-attribution {
  margin-top: 24px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  font-style: normal;
  color: var(--color-text-primary);
}

/* --------------------------------------------------------------------------
   19. Pricing Section
   -------------------------------------------------------------------------- */

.pricing {
  text-align: center;
}

.pricing .heading-section {
  margin-bottom: 20px;
}

.pricing-body {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   20. Closing CTA Section
   -------------------------------------------------------------------------- */

.cta-section {
  padding-top: 120px;
  padding-bottom: 120px;
  background: linear-gradient(
    180deg,
    rgba(236, 164, 19, 0.06) 0%,
    rgba(236, 164, 19, 0.02) 100%
  );
  text-align: center;
}

.cta-section .heading-section {
  margin-bottom: 36px;
}

.app-store-badge--lg {
  padding: 16px 36px;
}

.app-store-badge--lg .app-store-icon {
  width: 24px;
  height: 24px;
}

.app-store-badge--lg .app-store-title {
  font-size: 20px;
}

/* --------------------------------------------------------------------------
   21. Site Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: 48px;
  padding-bottom: 48px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-brand {
  margin-bottom: 20px;
}

.footer-brand .wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--color-text-primary);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.footer-dot {
  font-size: 13px;
  color: var(--color-text-tertiary);
  user-select: none;
}

.footer-company {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.footer-legal {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   22. Legal Pages (Privacy Policy, Terms of Use)
   -------------------------------------------------------------------------- */

.legal-header {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.legal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--color-text-primary);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px;
}

.legal-content h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  margin-bottom: 8px;
}

.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content p,
.legal-content li {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.legal-content p + p {
  margin-top: 12px;
}

.legal-content ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 20px;
  list-style: disc;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--color-primary);
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.legal-content th,
.legal-content td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.legal-content th {
  font-weight: 600;
  color: var(--color-text-primary);
}

.legal-content td {
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   23. Responsive — Mobile (max-width: 768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --text-hero: 34px;
    --text-section: 28px;
    --text-body: 16px;
    --section-padding: 64px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .card {
    padding: 24px;
  }

  .card-bordered {
    padding: 24px;
  }

  .card-flat {
    padding: 24px;
  }

  .section-header {
    margin-bottom: 40px;
  }

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

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

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .text-body-large {
    font-size: 18px;
  }

  .nav-links {
    display: none;
  }

  .btn-large {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
  }

  .phone-frame {
    max-height: 400px;
  }

  .hide-mobile {
    display: none;
  }

  /* Hero mobile */
  .hero {
    padding-top: 100px;
  }

  .hero-layout {
    flex-direction: column;
    gap: 48px;
  }

  .hero-content {
    flex: none;
    max-width: 100%;
  }

  .hero-brand .app-icon {
    width: 48px;
    height: 48px;
  }

  .hero-brand .wordmark {
    font-size: 24px;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-screenshots {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .phone-cascade {
    height: 360px;
    justify-content: center;
  }

  .phone-cascade .phone-frame {
    width: 150px;
    border-width: 4px;
    border-radius: 18px;
  }

  .phone-1 {
    left: 0;
    top: 0;
  }

  .phone-2 {
    left: 100px;
    top: 30px;
  }

  .phone-3 {
    left: 200px;
    top: 12px;
  }

  .app-store-badge {
    width: 100%;
    justify-content: center;
  }

  /* Problem cards mobile */
  .problem-card {
    padding: 24px;
  }

  /* Features mobile */
  .feature {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .feature + .feature {
    margin-top: 64px;
  }

  /* On mobile, image above text — reorder so image comes first */
  .feature-image {
    order: -1;
  }

  /* Reset direction trick on mobile since we stack vertically */
  .feature--reverse {
    direction: ltr;
  }

  .feature-content {
    max-width: 100%;
  }

  .feature--reverse .feature-content {
    margin-left: 0;
  }

  .feature-headline {
    font-size: 26px;
  }

  .feature-phone {
    width: 220px;
    border-width: 4px;
    border-radius: 20px;
  }

  /* Trust bar mobile */
  .trust-bar {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .trust-items {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .trust-item {
    font-size: 13px;
  }

  /* Founder mobile */
  .founder-quote {
    padding-left: 24px;
  }

  .founder-quote p {
    font-size: 16px;
  }

  /* CTA mobile */
  .cta-section {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .app-store-badge--lg {
    width: 100%;
    justify-content: center;
  }

  /* Footer mobile */
  .site-footer {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .footer-legal {
    font-size: 12px;
  }

  /* Legal pages mobile */
  .legal-content {
    padding: 48px 20px;
  }

  .legal-content h1 {
    font-size: 28px;
  }

  .legal-content h2 {
    font-size: 19px;
    margin-top: 32px;
  }

  .legal-content table {
    font-size: 13px;
  }

  .legal-content th,
  .legal-content td {
    padding: 8px;
    font-size: 13px;
  }
}

/* Small phones (iPhone SE / 375px and below) */
@media (max-width: 380px) {
  :root {
    --text-hero: 28px;
    --text-section: 24px;
  }

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

  /* Show only 2 phones on very small screens to prevent overflow */
  .phone-cascade {
    height: 300px;
  }

  .phone-cascade .phone-frame {
    width: 130px;
    border-width: 3px;
    border-radius: 16px;
  }

  .phone-1 {
    left: 0;
  }

  .phone-2 {
    left: 90px;
  }

  .phone-3 {
    display: none;
  }

  /* Ensure feature phones don't overflow */
  .feature-phone {
    width: 190px;
  }

  /* Tighter section header spacing */
  .section-header {
    margin-bottom: 32px;
  }

  /* Smaller CTA padding */
  .cta-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* Tablets and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-layout {
    gap: 32px;
  }

  .phone-cascade .phone-frame {
    width: 160px;
  }

  .phone-2 {
    left: 110px;
  }

  .phone-3 {
    left: 220px;
  }

  /* Features tablet */
  .feature {
    gap: 40px;
  }

  .feature-headline {
    font-size: 28px;
  }

  .feature-phone {
    width: 220px;
  }
}

/* --------------------------------------------------------------------------
   25. Print
   -------------------------------------------------------------------------- */

@media print {
  .nav,
  .btn,
  .site-footer {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  section {
    padding: 24px 0;
    page-break-inside: avoid;
  }
}
