/* ============================================
   AddFive — Sand (Light) + Navy (Dark)
   Auto-adapts to system theme
   ============================================ */

/* --- Light theme (Sand) — default --- */
:root {
  --bg:         #faf6f0;
  --bg-card:    #f0ece4;
  --bg-card-alt:#e8e4dc;
  --surface:    #e5e0d8;
  --border:     rgba(0,0,0,0.13);
  --text:       #1a1512;
  --text-dim:   #7a6e65;
  --accent:     #e86800;
  --accent-glow:rgba(232,104,0,0.10);
  --blue:       #2a6db5;
  --green:      #1a8a3e;
  --red:        #d32f2f;
  --nav-bg:     rgba(250,246,240,0.85);
  --shadow-img: rgba(0,0,0,0.15);
  --icon-filter:none;
  --radius:     16px;
  --radius-sm:  10px;
  --max-w:      1120px;
  --font:       'Exo 2', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

/* --- Dark theme (Navy) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0c0e16;
    --bg-card:    #14161f;
    --bg-card-alt:#1a1d2a;
    --surface:    #1e2030;
    --border:     #3a3d4a;
    --text:       #f0f0f5;
    --text-dim:   #8b8fa3;
    --accent:     #e07820;
    --accent-glow:rgba(224,120,32,0.22);
    --blue:       #4a8fd4;
    --green:      #34c759;
    --red:        #ff453a;
    --nav-bg:     rgba(12,14,22,0.85);
    --shadow-img: rgba(0,0,0,0.4);
    --icon-filter:brightness(0) invert(1);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* --- Nav --- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.25rem; font-weight: 700; color: var(--text);
}

.nav-brand img.brand-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  object-fit: contain;
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); opacity: 1; }

.nav-cta {
  background: var(--accent); color: #fff !important; padding: 8px 20px;
  border-radius: 20px; font-weight: 600; font-size: .85rem;
}
.nav-cta:hover { opacity: .9; }

/* --- Hero --- */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 600px 400px at 50% 30%, var(--accent-glow), transparent);
  pointer-events: none;
}

.hero-icon {
  width: 100px; height: 100px;
  margin: 0 auto 40px;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.1);
  padding: 8px;
  display: flex; align-items: center; justify-content: center;
}

.hero-icon img { width: 100%; height: 100%; object-fit: contain; }

.hero-title-block {
  margin-bottom: 28px;
}

.hero-label {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.addfive-h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
}

.addfive-number {
  display: inline-flex;
  align-items: stretch;
  color: var(--accent);
}

/* Tighten the "5" box to its visual cap-height so units align flush */
.addfive-number > span:first-child {
  line-height: 0.78;
  display: flex;
  align-items: center;
}

.addfive-units {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  justify-content: space-between;
  font-size: 0.22em;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-left: 0.2em;
  color: var(--accent);
}

.hero-subtitle {
  max-width: 640px;
  margin: 32px auto 0;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 14px 32px; border-radius: 28px;
  font-weight: 600; font-size: 1rem;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  opacity: 1;
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); color: var(--text);
  padding: 14px 32px; border-radius: 28px;
  font-weight: 600; font-size: 1rem;
  border: 1px solid var(--border);
  transition: transform .2s;
}
.btn-secondary:hover { transform: translateY(-2px); opacity: 1; }

/* --- Stats Bar --- */
.stats-bar {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-bar .container {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 4px;
}

/* --- Screenshots Showcase --- */
.screenshots {
  padding: 80px 0;
  overflow: hidden;
}

.screenshots h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
}

.screenshot-track {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0 24px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshot-track::-webkit-scrollbar { display: none; }

.screenshot-track img {
  flex: 0 0 auto;
  width: 240px;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--shadow-img);
  transition: transform .3s;
}

.screenshot-track img:hover {
  transform: scale(1.03);
}

/* --- Feature Sections --- */
.features {
  padding: 80px 0;
}

.features h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.features .section-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 56px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .2s, border-color .2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 14px;
  padding: 12px;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: var(--icon-filter);
  opacity: .9;
}

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

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

.feature-tag {
  display: inline-block;
  background: var(--surface);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 12px;
}

/* --- Hybrid Engine Section --- */
.hybrid-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.hybrid-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
}

.hybrid-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hybrid-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.hybrid-col .col-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.hybrid-col h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hybrid-col ul {
  list-style: none;
  text-align: left;
}

.hybrid-col li {
  color: var(--text-dim);
  font-size: .9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.hybrid-col li:last-child { border: none; }

.hybrid-col li::before {
  content: '→ ';
  color: var(--accent);
}

/* --- Programs Section --- */
.programs-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.programs-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.programs-section .section-sub {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.program-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
}

.program-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: border-color .2s, color .2s;
}

.program-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* --- Credits Section --- */
.credits-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.credits-section h2 {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text-dim);
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.credit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.credit-card .credit-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.credit-card h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.credit-card p {
  font-size: .82rem;
  color: var(--text-dim);
}

.credit-card a { color: var(--blue); }

/* --- CTA Section --- */
.cta-section {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* --- Footer --- */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

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

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

footer .footer-links a {
  font-size: .82rem;
  color: var(--text-dim);
}

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

/* --- Legal Pages --- */
.legal-page {
  padding: 120px 0 80px;
  max-width: 720px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-page .legal-date {
  color: var(--text-dim);
  font-size: .9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--accent);
}

.legal-page p, .legal-page li {
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-page a { color: var(--blue); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .hero { padding: 120px 0 60px; }
  .addfive-h1 { font-size: clamp(2.4rem, 9vw, 4rem); }

  .stats-bar .container { gap: 24px; }
  .stat-number { font-size: 1.5rem; }

  .feature-grid { grid-template-columns: 1fr; }

  .hybrid-cols { grid-template-columns: repeat(2, 1fr); }

  .screenshot-track img { width: 200px; }

  .credits-grid { grid-template-columns: 1fr; }

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

@media (max-width: 480px) {
  .addfive-h1 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .hero-subtitle { font-size: 1rem; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .screenshot-track img { width: 180px; }
}
