/* ==========================================================================
   Link Lynx Static Pages — Shared Theme Stylesheet
   Plain CSS, no preprocessor. Consumed by all pages at the project root.
   ========================================================================== */

/* ---------- CSS Custom Properties (Dark Mode Default) ---------- */
:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2a2f3a;
  --text: #e7e9ee;
  --text-dim: #9aa3b2;
  --primary: #6366f1;
  --primary-hover: #545bdd;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

  /* Layout primitives */
  --container-max: 960px;
  --container-px: 24px;
  --section-gap: 48px;
}

/* ---------- Light Mode Overrides ---------- */
html[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --border: #d9dde3;
  --text: #1c2024;
  --text-dim: #66707d;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ---------- Nord Theme Overrides ---------- */
html[data-theme="nord"] {
  --bg: #e5e9f0;
  --surface: #eceff4;
  --surface-2: #d8dee9;
  --border: #c8d0de;
  --text: #2e3440;
  --text-dim: #4c566a;
  --shadow: 0 8px 30px rgba(46, 52, 64, 0.1);
}

/* ---------- Sepia Theme Overrides ---------- */
html[data-theme="sepia"] {
  --bg: #f4ecd8;
  --surface: #fdf6e3;
  --surface-2: #e9dfc6;
  --border: #d3c7a8;
  --text: #433422;
  --text-dim: #7c6a52;
  --shadow: 0 8px 30px rgba(67, 52, 34, 0.08);
}

/* ---------- Cyberpunk Theme Overrides ---------- */
html[data-theme="cyberpunk"] {
  --bg: #0d0e15;
  --surface: #171925;
  --surface-2: #222538;
  --border: #ff0055;
  --text: #00ffcc;
  --text-dim: #94a3b8;
  --shadow: 0 8px 30px rgba(255, 0, 85, 0.25);
}

/* ---------- Base Reset & Typography ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-dim);
}

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

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

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

/* ---------- Layout Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

main {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  min-height: calc(100vh - 160px);
}

section + section {
  margin-top: var(--section-gap);
}

/* ---------- Navigation (.site-nav) ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px var(--container-px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-links li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-links li a:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.nav-links li a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 600;
}

.nav-app-link {
  background: var(--primary);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-app-link:hover {
  background: var(--primary-hover) !important;
  color: #fff !important;
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle:hover {
  background: var(--surface-2);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: background 0.15s;
}

.theme-toggle:hover {
  background: var(--surface-2);
}

/* ---------- Footer (.site-footer) ---------- */
.site-footer {
  padding: 24px var(--container-px);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--primary);
}

.site-footer a:hover {
  color: var(--primary-hover);
}

/* ---------- Hero Component ---------- */
.hero {
  text-align: center;
  padding: var(--section-gap) var(--container-px);
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  min-height: 44px;
}

.hero .cta:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

/* ---------- Feature Cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- FAQ Entries ---------- */
.faq-list {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.faq-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.faq-entry:first-child {
  padding-top: 0;
}

.faq-entry h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}

.faq-entry p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Version Entries (What's New) ---------- */
.changelog {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.version-entry {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.version-entry:first-child {
  padding-top: 0;
}

.version-entry h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.version-entry .version-date {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.version-entry ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
}

.version-entry li {
  margin-bottom: 4px;
}

/* ---------- Content Sections (Privacy, Terms) ---------- */
.content-section {
  max-width: var(--container-max);
  margin: 40px auto 0;
  padding: 0 var(--container-px);
}

.content-section h1 {
  margin-bottom: 24px;
}

.content-section h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-section p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-body {
  padding: 0 var(--container-px);
}


/* ---------- Membership Comparison ---------- */
.membership-comparison {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
  text-align: center;
}

.membership-comparison h2 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.membership-subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  text-align: left;
}

.membership-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.membership-card--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}

.membership-card-header {
  margin-bottom: 20px;
}

.membership-card-header h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.membership-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.membership-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-dim);
}

.membership-perks {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}

.membership-perks li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.membership-perks li:last-child {
  border-bottom: none;
}

.perk-icon {
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.membership-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  min-height: 44px;
  text-align: center;
}

.membership-cta:hover {
  background: var(--primary-hover);
  text-decoration: none;
  color: #fff;
}

.membership-cta--secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.membership-cta--secondary:hover {
  background: var(--border);
  color: var(--text);
}

/* ---------- Responsive: Tablet & Mobile (< 768px) ---------- */
@media (max-width: 767px) {
  :root {
    --container-px: 16px;
    --section-gap: 32px;
  }

  /* Show hamburger, hide nav links by default */
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px var(--container-px);
    gap: 4px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    padding: 12px 16px;
    min-height: 44px;
    width: 100%;
    font-size: 1rem;
  }

  .site-nav {
    flex-wrap: wrap;
    position: relative;
  }

  /* Hero adjustments */
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  /* Feature grid stacks */
  .features {
    grid-template-columns: 1fr;
  }

  /* Membership grid stacks */
  .membership-grid {
    grid-template-columns: 1fr;
  }

  /* Ensure 44px touch targets for all interactive elements */
  a, button, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }

  .nav-links li a,
  .nav-app-link,
  .theme-toggle,
  .nav-toggle,
  .hero .cta,
  .site-footer a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---------- Responsive: Wide Screens (≥ 1440px) ---------- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1120px;
    --container-px: 32px;
  }
}
