/* ==========================================================================
   reVocab — Website Stylesheet (v1.0)
   Single stylesheet for index.html, privacy.html, support.html.
   Organized by: Variables -> Reset -> Layout -> Components -> Pages -> Responsive
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. CSS Variables (matches the reVocab app's real theme: Plus Jakarta Sans,
   primary blue #4A69BD, cream "paper" background, ink text)
   ------------------------------------------------------------------------- */
:root {
  /* Colors */
  --color-primary: #4A69BD;
  --color-primary-dark: #384f92;
  --color-primary-light: #eef1fb;
  --color-accent: #F37F2F;
  --color-bg: #E3F2FD;
  --color-surface: #ffffff;
  --color-surface-alt: #F4F2F2;
  --color-text: #2D3142;
  --color-text-muted: #5b6072;
  --color-border: rgba(45, 49, 66, 0.08);

  /* Typography */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 96px;

  /* Shape & shadow */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 12px 32px rgba(45, 49, 66, 0.08);
  --shadow-hover: 0 16px 40px rgba(74, 105, 189, 0.18);

  --content-width: 1120px;
}

/* -------------------------------------------------------------------------
   2. Reset & Base
   ------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
}

p {
  margin: 0 0 var(--space-sm);
  color: var(--color-text-muted);
}

ul {
  margin: 0 0 var(--space-sm);
  padding-left: 1.25em;
  color: var(--color-text-muted);
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* -------------------------------------------------------------------------
   3. Navigation
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(227, 242, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--content-width);
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text);
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-mark {
  width: 32px;
  height: 32px;
}

.nav-wordmark {
  height: 22px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a[aria-current="page"] {
  color: var(--color-primary);
}

/* -------------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  box-shadow: var(--shadow-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* -------------------------------------------------------------------------
   5. Hero Section
   ------------------------------------------------------------------------- */
.hero {
  padding: var(--space-xl) 0 var(--space-lg);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-logo {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 46ch;
}

.lang-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

/* Screenshot carousel — plain rounded-corner images, no device bezel. */
.carousel {
  position: relative;
  justify-self: center;
  width: 260px;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.carousel-prev {
  left: -14px;
}

.carousel-next {
  right: -14px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-sm);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--color-border);
  cursor: pointer;
}

.carousel-dot[aria-current="true"] {
  background: var(--color-primary);
}

/* -------------------------------------------------------------------------
   6. Feature Cards
   ------------------------------------------------------------------------- */
.section {
  padding: var(--space-lg) 0;
}

.section-heading {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-lg);
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.feature-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   7. Closing / CTA section
   ------------------------------------------------------------------------- */
.cta {
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  color: #fff;
}

.cta h2 {
  color: #fff;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn-row {
  justify-content: center;
}

.cta .btn-primary {
  background: #fff;
  color: var(--color-primary);
}

.cta .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.cta .btn-secondary:hover {
  color: #fff;
  border-color: #fff;
}

/* -------------------------------------------------------------------------
   8. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.footer-brand {
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-copyright {
  width: 100%;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: var(--space-md);
}

/* -------------------------------------------------------------------------
   9. Content pages (Privacy / Support)
   ------------------------------------------------------------------------- */
.page-header {
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
}

.page-header p {
  max-width: 60ch;
  margin: 0 auto;
}

.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-lg);
  max-width: 800px;
  margin: 0 auto var(--space-lg);
}

.content-card h2 {
  font-size: 1.25rem;
  margin-top: var(--space-lg);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-sm) 0;
  font-size: 0.92rem;
}

.content-card th,
.content-card td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.content-card th {
  background: var(--color-surface-alt);
}

.updated-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.callout {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.92rem;
}

/* FAQ (support page) */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.faq-item p {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   10. Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .btn-row {
    justify-content: center;
  }

  .carousel {
    order: -1;
    width: 220px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    gap: var(--space-sm);
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: var(--space-md);
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}
