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

:root {
  --bg: #faf3e8;
  --bg-subtle: #f0e8da;
  --text: #3d3530;
  --text-muted: #82766a;
  --glow: #c8922e;
  --glow-soft: rgba(200, 146, 46, 0.1);
  --glow-border: rgba(200, 146, 46, 0.2);
  --heading: #1a1715;
  --link: #b07d1e;
  --link-hover: #96690f;
  --max-width: 640px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Layout */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* Hero */

.hero {
  text-align: center;
  padding: 4rem 0 1rem;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* App Store badge */

.description .badge-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
}

.badge-link {
  display: inline-block;
  transition: opacity 0.2s;
}

.badge-link:hover {
  opacity: 0.85;
}

.badge-link img {
  height: 48px;
}

/* Description */

.description {
  margin-top: 0;
  padding: 2rem;
  background: var(--bg-subtle);
  border: 1px solid var(--glow-border);
  border-radius: 16px;
}

.description p {
  color: var(--text);
  margin-bottom: 1rem;
}

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

.features {
  list-style: none;
  margin-top: 1rem;
}

.features li {
  padding: 0.35rem 0;
  color: var(--text);
}

.features li::before {
  content: "\2022";
  color: var(--glow);
  font-weight: bold;
  margin-right: 0.6rem;
}

/* Screenshots */

.screenshots {
  margin-top: 2.5rem;
  text-align: center;
}

.screenshots h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

.screenshot-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem 0.5rem;
  /* Break out of the .page max-width to use full viewport */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.screenshot-scroll::before,
.screenshot-scroll::after {
  content: "";
  flex-shrink: 0;
  width: 1px;
  margin: auto;
}

.screenshot-scroll img {
  flex-shrink: 0;
  width: 240px;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  border: none;
  scroll-snap-align: center;
}

/* Footer */

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glow-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--link);
  text-decoration: none;
}

footer a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

footer .footer-links {
  margin-bottom: 0.75rem;
}

footer .footer-links a + a {
  margin-left: 1.5rem;
}

/* Privacy policy page */

.policy h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.policy .effective-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.policy h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.policy h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.policy p {
  margin-bottom: 1rem;
}

.policy ul {
  margin: 0.5rem 0 1rem 1.25rem;
  color: var(--text);
}

.policy ul li {
  padding: 0.25rem 0;
}

.policy a {
  color: var(--link);
  text-decoration: none;
}

.policy a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--link);
  text-decoration: none;
  font-size: 0.9rem;
}

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

/* Free callout */

.free-callout {
  font-weight: 600;
  color: var(--heading);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Language cards (homepage) */

.languages-section {
  margin-top: 2.5rem;
  text-align: center;
}

.languages-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

.language-cards {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.language-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--glow-border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex: 1;
  max-width: 180px;
}

.language-card:hover {
  border-color: var(--glow);
  box-shadow: 0 2px 12px rgba(200, 146, 46, 0.15);
}

.language-card-script {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.25rem;
}

.language-card-name {
  font-size: 0.9rem;
  color: var(--text);
}

.language-card-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Landing pages */

.landing .landing-hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.landing .landing-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}

.landing h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.landing .landing-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.books-section {
  margin-top: 2rem;
}

.books-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.books-section > p {
  color: var(--text);
  margin-bottom: 1rem;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-item {
  padding: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--glow-border);
  border-radius: 12px;
}

.book-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.35rem;
}

.book-item p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}

.coming-soon {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
}

.cta-section {
  margin-top: 2rem;
  text-align: center;
}

.also-available {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.also-available a {
  color: var(--link);
  text-decoration: none;
}

.also-available a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .description {
    padding: 1.25rem;
  }

  .language-cards {
    gap: 0.75rem;
  }

  .language-card {
    padding: 1rem;
  }

  .landing h1 {
    font-size: 1.6rem;
  }
}
