/* PairLingo — shared site styles */

:root {
  color-scheme: light dark;

  --indigo: #2a3b8f;
  --violet: #5b4fcf;
  --coral: #e8735c;
  --amber: #ffc15e;

  --bg: #ffffff;
  --bg-alt: #f6f6fb;
  --text: #1c1c1e;
  --text-muted: #6e6e76;
  --border: #e5e5ea;
  --card-bg: #ffffff;
  --shadow: 0 20px 45px rgba(42, 30, 100, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --brand-gradient: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 45%, var(--coral) 100%);

  /* The app's 6 in-app color themes (AppTheme.swift base RGB values), plus a soft
     pastel "tint" of each (matching the app's own light-mode cardTint blend) —
     used to color different parts of this site the same way the app colors itself. */
  --ocean: #668fb3;      --ocean-tint: #e7edf3;
  --sage: #7a9e87;       --sage-tint: #eaefec;
  --lavender: #8a7dba;   --lavender-tint: #ecebf4;
  --peach: #cc8a61;      --peach-tint: #f7ece6;
  --rosewood: #c4788a;   --rosewood-tint: #f6e9ec;
  --graphite: #788594;   --graphite-tint: #e9ebee;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b12;
    --bg-alt: #121220;
    --text: #f2f2f7;
    --text-muted: #9a9aa6;
    --border: #26263a;
    --card-bg: #16162590;
    --shadow: 0 20px 45px rgba(0, 0, 0, 0.45);

    /* Same 6 theme colors, tinted dark (matching the app's dark-mode blend). */
    --ocean-tint: #1f2b36;
    --sage-tint: #252f29;
    --lavender-tint: #292638;
    --peach-tint: #3d291d;
    --rosewood-tint: #3b2429;
    --graphite-tint: #24282c;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.92rem;
}
.site-nav a { color: var(--text-muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--text);
  color: var(--bg);
}

/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}

.hero .icon {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 1.6rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2.2rem;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #000;
  color: #fff !important;
  border-radius: 14px;
  padding: 0.7rem 1.3rem;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,0.15);
}
.store-badge .apple-mark { font-size: 1.5rem; line-height: 1; }
.store-badge .store-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.store-badge .store-text small { font-size: 0.68rem; font-weight: 500; opacity: 0.85; }
.store-badge .store-text strong { font-size: 1.02rem; }
.store-badge.disabled { opacity: 0.55; cursor: default; pointer-events: none; }

/* Sections */

section { padding: 3.2rem 0; }
section.alt { background: var(--bg-alt); }

/* Section-level tints, cycling through the app's own theme colors. */
.tint-ocean { background: var(--ocean-tint); }
.tint-sage { background: var(--sage-tint); }
.tint-lavender { background: var(--lavender-tint); }
.tint-graphite { background: var(--graphite-tint); }

h2.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
p.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.6rem;
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.5rem;
}
.feature-card .emoji {
  font-size: 1.8rem;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg-alt);
  margin-bottom: 0.9rem;
}
/* Each card's icon badge takes one of the app's 6 theme colors as its tint. */
.feature-card .emoji.ocean { background: var(--ocean-tint); }
.feature-card .emoji.sage { background: var(--sage-tint); }
.feature-card .emoji.lavender { background: var(--lavender-tint); }
.feature-card .emoji.peach { background: var(--peach-tint); }
.feature-card .emoji.rosewood { background: var(--rosewood-tint); }
.feature-card .emoji.graphite { background: var(--graphite-tint); }
.feature-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* Showcase / screenshots */

.showcase {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.showcase figure {
  margin: 0;
  text-align: center;
}
.showcase img {
  width: 220px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: block;
}
.showcase figcaption {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* More-features list */

.more-list {
  columns: 2;
  column-gap: 2.5rem;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.more-list li {
  break-inside: avoid;
  margin-bottom: 0.85rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}
.more-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
}

/* Cards (privacy/support pages) */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  margin: 1.2rem 0;
  background: var(--card-bg);
}

/* Simple content pages (privacy/support) */

.page-header {
  padding: 3rem 0 1rem;
}
.page-header h1 { font-size: 1.9rem; margin-bottom: 0.2rem; }
.page-header .subtitle { color: var(--text-muted); margin-top: 0; }

.content h2 { font-size: 1.25rem; margin-top: 2.2rem; }
.content hr { margin: 3rem 0; border: none; border-top: 1px solid var(--border); }

.back-link { display: inline-block; margin: 1.5rem 0 0; font-size: 0.9rem; }

/* Footer */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.4rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer.site-footer nav { display: flex; gap: 1.2rem; }
footer.site-footer a { color: var(--text-muted); }
footer.site-footer a:hover { color: var(--text); }

/* Language visibility — toggled by assets/lang.js via this class, so it always
   wins regardless of any element's own `display` (flex/inline/etc.) rule. */
.lang-hidden { display: none !important; }

@media (max-width: 640px) {
  .site-nav .nav-links { display: none; }
  .more-list { columns: 1; }
}
