/* ===== Rex Run Web — Shared Styles ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@700;800;900&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --bg-primary:   #0a0e17;
  --bg-secondary: #111827;
  --bg-card:      rgba(255, 255, 255, 0.04);
  --bg-glass:     rgba(255, 255, 255, 0.06);

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --accent:        #34d399;
  --accent-glow:   rgba(52, 211, 153, 0.25);
  --accent-alt:    #f97316;
  --accent-alt-glow: rgba(249, 115, 22, 0.25);

  --border:        rgba(255, 255, 255, 0.08);
  --radius:        16px;
  --radius-sm:     10px;
  --transition:    0.3s cubic-bezier(.4,0,.2,1);

  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(52, 211, 153, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(249, 115, 22, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(52, 211, 153, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #6ee7b7; }

img { max-width: 100%; display: block; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  opacity: 0.85;
}

.nav-logo img {
  width: 34px;
  height: auto;
  border-radius: 8px;
}

.nav-logo .logo-accent {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Mobile hamburger */
.nav-toggle { display: none; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a7f3d0 40%, var(--accent-alt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-image {
  max-width: 320px;
  margin: 0 auto 40px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(52, 211, 153, 0.15));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  color: var(--text-primary);
}

/* Store badges */
.store-badge {
  height: 52px;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.store-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ---------- Features Grid ---------- */
.features {
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--bg-glass);
  border-color: rgba(52, 211, 153, 0.2);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.feature-icon.green  { background: rgba(52,211,153,0.12); }
.feature-icon.orange { background: rgba(249,115,22,0.12); }
.feature-icon.blue   { background: rgba(96,165,250,0.12); }

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

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

/* ---------- Page Content (Legal / Support) ---------- */
.page-header {
  padding: 60px 0 24px;
  text-align: center;
}

.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page-content {
  padding: 20px 0 80px;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  backdrop-filter: blur(8px);
}

.content-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text-primary);
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p,
.content-card li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.content-card ul {
  padding-left: 20px;
  margin: 10px 0;
}

.content-card li {
  margin-bottom: 6px;
}

.content-card strong {
  color: var(--text-primary);
  font-weight: 600;
}

.content-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Support Page ---------- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
}

.support-card:hover {
  background: var(--bg-glass);
  border-color: rgba(52, 211, 153, 0.2);
  transform: translateY(-4px);
}

.support-card .icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.support-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.support-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.faq-section {
  margin-top: 20px;
}

.faq-section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 28px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-glass);
}

.faq-question .chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item.open .faq-question .chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    transform: translateY(-120%);
    transition: transform var(--transition);
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle:checked ~ .nav-links {
    transform: translateY(0);
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hero { padding: 50px 0 40px; }
  .hero-image { max-width: 240px; }

  .content-card { padding: 28px 20px; }

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