/* ── Reset & base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #a8d5ba;
  --accent-dark: #749e85;
  --bg: #f1eee8;
  --white: #ffffff;
  --text-dark: #2d3a32;
  --text-secondary: #8a9a8f;
  --divider: #d9d5cf;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Funnel Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(241, 238, 232, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.5px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}

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

/* ── Hero ── */
.hero {
  padding: 140px 24px 80px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 0 0 auto;
}

/* ── Flashcard ── */
.flashcard-wrapper {
  width: 300px;
  height: 420px;
  perspective: 1000px;
  cursor: pointer;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-wrapper.flipped .flashcard {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.flashcard-back {
  transform: rotateY(180deg);
}

.flashcard-icons-top {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  color: var(--text-secondary);
}

.flashcard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.flashcard-word {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
}

.flashcard-translation {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
}

.flashcard-example {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  margin-top: 8px;
}

.flashcard-example-en {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.flashcard-audio {
  display: flex;
  justify-content: center;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.flashcard-swipe-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hint-wrong { color: #d9534f; }
.hint-right { color: var(--accent-dark); }
.hint-divider { color: var(--divider); }

.flashcard-tap-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0.7;
}

/* ── Features ── */
.features {
  padding: 80px 24px;
  background: var(--white);
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.features-inner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.5px;
}

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

.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ── How it works ── */
.how-it-works {
  padding: 80px 24px;
}

.how-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.how-inner > h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.5px;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 56px;
}

.step-row:last-child {
  margin-bottom: 0;
}

.step-row-reverse {
  flex-direction: row-reverse;
}

.step-screenshot {
  flex: 0 0 auto;
}

.phone-frame {
  width: 240px;
  border-radius: 20px;
  overflow: hidden;
}

.phone-frame img {
  width: 100%;
  display: block;
}

.step-text {
  flex: 1;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step-text h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-text p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 420px;
}

/* ── Pricing ── */
.pricing {
  padding: 80px 24px;
  background: var(--white);
}

.pricing-inner {
  max-width: 800px;
  margin: 0 auto;
}

.pricing-inner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pricing-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
  border: 2px solid transparent;
}

.pricing-card-pro {
  border-color: var(--accent);
}

.pro-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}

.pricing-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.price {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: 24px;
}

.pricing-card ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-card li {
  font-size: 15px;
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
}

.pricing-card li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent-dark);
  font-weight: 700;
}

/* ── iOS button ── */
.btn-ios {
  border: none;
  font-family: inherit;
}

/* ── iOS Signup ── */
.ios-signup {
  padding: 80px 24px;
  background: var(--white);
}

.ios-signup-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.ios-signup-icon {
  margin-bottom: 16px;
}

.ios-signup-inner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.ios-signup-inner > p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.ios-form {
  margin-top: 8px;
}

.ios-form-row {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}

.ios-form-row input[type="email"] {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--divider);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  background: var(--bg);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s;
}

.ios-form-row input[type="email"]:focus {
  border-color: var(--accent);
}

.ios-form-row .btn {
  white-space: nowrap;
}

.ios-form-success {
  margin-top: 16px;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 15px;
}

.ios-form-error {
  margin-top: 16px;
  color: #d9534f;
  font-weight: 600;
  font-size: 15px;
}

/* ── Download CTA ── */
.download {
  padding: 80px 24px;
  text-align: center;
}

.download-inner {
  max-width: 600px;
  margin: 0 auto;
}

.download-inner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.download-inner > p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.download-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-dark);
}

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

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .flashcard-wrapper {
    width: 240px;
    height: 340px;
  }

  .flashcard-word {
    font-size: 26px;
  }

  .flashcard-translation {
    font-size: 22px;
  }

  .ios-form-row {
    flex-direction: column;
  }

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

  .step-row,
  .step-row-reverse {
    flex-direction: column;
    text-align: center;
  }

  .step-number {
    margin-left: auto;
    margin-right: auto;
  }

  .step-text p {
    max-width: 100%;
  }

  .phone-frame {
    width: 200px;
  }

  .pricing-cards {
    grid-template-columns: 1fr;
  }

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