/* Earn AI — marketing site (matches app theme) */

@font-face {
  font-family: 'SFUIDisplay';
  src: url('../fonts/SFUIDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SFUIDisplay';
  src: url('../fonts/SFUIDisplay-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SFUIDisplay';
  src: url('../fonts/SFUIDisplay-Semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SFUIDisplay';
  src: url('../fonts/SFUIDisplay-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --on-surface: #1c1c1e;
  --secondary: #8e8e93;
  --tertiary: #aeaeb2;
  --separator: #e5e5ea;
  --success: #34c759;
  --streak: #ff9500;
  --gradient-start: #9fcc3b;
  --gradient-end: #15a833;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 20px;
  --radius-xxl: 24px;
  --shadow-soft: 0 24px 80px rgba(28, 28, 30, 0.08);
  --shadow-card: 0 8px 32px rgba(28, 28, 30, 0.06);
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'SFUIDisplay', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.41px;
  line-height: 1.47;
  color: var(--on-surface);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Brand */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.35px;
}

.logo-earn {
  color: var(--on-surface);
}

.logo-ai {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(242, 242, 247, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(229, 229, 234, 0.8);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--on-surface);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 10px;
  box-shadow: var(--shadow-card);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--on-surface);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.hero {
  padding: 56px 0 80px;
  overflow: hidden;
}

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

.hero-copy {
  max-width: 520px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--separator);
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  box-shadow: var(--shadow-card);
}

.hero-badge img {
  width: 16px;
  height: 20px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.05;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--secondary);
  max-width: 460px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: var(--radius-m);
  background: var(--on-surface);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 32px rgba(28, 28, 30, 0.18);
}

.app-store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(28, 28, 30, 0.22);
}

.app-store-badge svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.app-store-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.app-store-badge-text small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
}

.app-store-badge-text strong {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.hero-note {
  margin: 0;
  font-size: 13px;
  color: var(--tertiary);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat strong {
  font-size: 15px;
  font-weight: 600;
}

.hero-stat span {
  font-size: 13px;
  color: var(--secondary);
}

/* iPhone mockup */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 560px;
}

.phone-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 204, 59, 0.28) 0%, rgba(21, 168, 51, 0.08) 45%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.iphone {
  position: relative;
  width: 280px;
  padding: 6px;
  border-radius: 40px;
  background: linear-gradient(145deg, #3a3a3c 0%, #1c1c1e 55%, #2c2c2e 100%);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset,
    var(--shadow-soft),
    0 40px 80px rgba(28, 28, 30, 0.25);
  z-index: 1;
}

.iphone-screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg);
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(242, 242, 247, 1) 100%);
}

.screenshot-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-card);
}

.screenshot-placeholder-icon img {
  width: 24px;
  height: auto;
}

.screenshot-placeholder p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.35;
}

.screenshot-placeholder code {
  font-size: 11px;
  font-weight: 500;
  color: var(--tertiary);
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--surface);
  border-block: 0.5px solid var(--separator);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.section-header p {
  margin: 0;
  font-size: 17px;
  color: var(--secondary);
}

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

.feature-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 0.5px solid var(--separator);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(159, 204, 59, 0.18), rgba(21, 168, 51, 0.12));
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

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

/* Screenshots gallery */
.screenshots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: end;
}

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

.screenshot-card .iphone {
  width: 220px;
  margin-inline: auto;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.screenshot-card:hover .iphone {
  transform: scale(1);
}

.screenshot-card.is-featured .iphone {
  width: 260px;
  transform: scale(1);
}

.screenshot-card.is-featured:hover .iphone {
  transform: scale(1.02);
}

.screenshot-label {
  margin: 16px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
}

.screenshot-hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--tertiary);
}

/* CTA */
.cta {
  padding: 80px 0 96px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 56px;
  border-radius: var(--radius-xxl);
  background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
  color: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
}

.cta-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 204, 59, 0.25), transparent 70%);
  pointer-events: none;
}

.cta-copy {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.cta-copy h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.15;
}

.cta-copy p {
  margin: 0;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.72);
}

.cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.cta-actions .app-store-badge {
  background: #fff;
  color: var(--on-surface);
  box-shadow: none;
}

/* Footer */
.site-footer {
  padding: 32px 0 40px;
  border-top: 0.5px solid var(--separator);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-links a:hover {
  color: var(--on-surface);
}

/* Legal pages */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-main {
  flex: 1;
  padding: 48px 0 80px;
}

.legal-article {
  max-width: 760px;
  padding: 40px 48px;
  background: var(--surface);
  border-radius: var(--radius-xxl);
  border: 0.5px solid var(--separator);
  box-shadow: var(--shadow-card);
}

.legal-article h1 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.37px;
  line-height: 1.1;
}

.legal-effective {
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 0.5px solid var(--separator);
  font-size: 15px;
  color: var(--secondary);
}

.legal-article h2 {
  margin: 36px 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.legal-article h3 {
  margin: 24px 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.legal-article h4 {
  margin: 20px 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.legal-article p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-surface);
}

.legal-article strong {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    max-width: none;
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .phone-stage {
    min-height: auto;
    order: -1;
  }

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

  .screenshots-row {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-inline: auto;
  }

  .screenshot-card .iphone,
  .screenshot-card.is-featured .iphone {
    width: 260px;
    transform: none;
  }

  .cta-card {
    flex-direction: column;
    text-align: center;
    padding: 40px 32px;
  }

  .cta-actions {
    align-items: center;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: rgba(242, 242, 247, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--separator);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 0.5px solid var(--separator);
    font-size: 17px;
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

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

  .legal-article {
    padding: 28px 24px;
  }

  .hero {
    padding-top: 32px;
  }
}
