/* ============================================================
   TEN78 — Design System
   Dark-first, glass morphism, gold accent
   ============================================================ */

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

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-primary: #07091A;
  --bg-secondary: #0C0F22;
  --bg-card: #111428;
  --text-primary: #EEF0F8;
  --text-secondary: #8B92B0;
  --text-muted: #4A5070;
  --gold: #F5BC3E;
  --gold-dim: rgba(245, 188, 62, 0.12);
  --gold-border: rgba(245, 188, 62, 0.25);
  --green: #3DD68C;
  --blue: #4F8EF7;
  --red: #FF5C5C;
  --glass-bg: rgba(5, 12, 30, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-card: rgba(255, 255, 255, 0.03);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: rgba(245, 188, 62, 0.3);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(245, 188, 62, 0.3);
  color: var(--text-primary);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.8; }

/* ── Focus Outlines (keyboard a11y) ──────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(245, 188, 62, 0.15);
}

.nav-cta:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

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

/* ── Background Grain ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(79, 142, 247, 0.04) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(245, 188, 62, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 9, 26, 0.8);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.footer-brand .nav-logo img {
  height: 36px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.nav-links a.active {
  color: var(--gold);
  opacity: 1;
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.nav-cta {
  background: var(--gold);
  color: #1C1E21 !important;
  padding: 8px 20px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 13px !important;
  letter-spacing: 0.5px;
}

@media (hover: hover) {
  .nav-cta:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px);
  }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition);
}

/* ── Section Layout ────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 32px;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.accent-bar {
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text {
  max-width: 520px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: normal;
  color: var(--gold);
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-devices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  position: relative;
}

/* ── Device Mockups ────────────────────────────────────────── */
.device-iphone {
  width: 280px;
  height: 570px;
  background: #1a1a2e;
  border-radius: 44px;
  border: 3px solid #2a2a3e;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 120px rgba(245, 188, 62, 0.05);
}

.device-iphone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 32px;
  background: #1a1a2e;
  border-radius: 0 0 20px 20px;
  z-index: 2;
}

.device-iphone .device-screen {
  position: absolute;
  inset: 3px;
  border-radius: 41px;
  overflow: hidden;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-iphone .device-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px;
}

.device-placeholder .placeholder-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.device-placeholder .placeholder-logo span {
  color: var(--gold);
}

.device-macbook {
  width: 420px;
  position: relative;
}

.device-macbook-screen {
  width: 100%;
  aspect-ratio: 16/10;
  background: #1a1a2e;
  border-radius: 12px 12px 0 0;
  border: 2px solid #2a2a3e;
  border-bottom: none;
  overflow: hidden;
  position: relative;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

.device-macbook-screen .device-screen {
  position: absolute;
  inset: 2px;
  inset-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-macbook-base {
  width: 115%;
  margin-left: -7.5%;
  height: 14px;
  background: linear-gradient(to bottom, #2a2a3e, #1a1a2e);
  border-radius: 0 0 8px 8px;
  position: relative;
}

.device-macbook-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: #3a3a4e;
  border-radius: 0 0 4px 4px;
}

.web-coming-soon {
  text-align: center;
  padding: 20px;
}

.web-coming-soon .coming-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.web-coming-soon .coming-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.web-coming-soon .coming-sub {
  font-size: 12px;
  color: var(--text-muted);
}

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

.btn-primary {
  background: var(--gold);
  color: #1C1E21;
}
@media (hover: hover) {
  .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 188, 62, 0.2);
  }
}

.btn-secondary {
  background: var(--glass-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
@media (hover: hover) {
  .btn-secondary:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    opacity: 1;
  }
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* ── Glass Cards ───────────────────────────────────────────── */
.glass-card {
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}

@media (hover: hover) {
  .glass-card:hover {
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-2px);
  }
}

.glass-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.glass-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.glass-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Features Grid ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

/* ── Stats Row ─────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 40px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* ── CTA Section ───────────────────────────────────────────── */
.cta-section {
  text-align: center;
  background: linear-gradient(to bottom, transparent, rgba(245, 188, 62, 0.03), transparent);
}

.cta-section .section-subtitle {
  margin: 0 auto 32px;
}

/* ── App Store Badge ───────────────────────────────────────── */
.app-store-badge {
  height: 48px;
  transition: opacity var(--transition);
}
@media (hover: hover) {
  .app-store-badge:hover { opacity: 0.8; }
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 60px 32px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--transition);
}

@media (hover: hover) {
  .footer-col a:hover {
    color: var(--text-primary);
    opacity: 1;
  }
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Legal / Content Pages ─────────────────────────────────── */
.content-page {
  padding-top: 120px;
  min-height: 100vh;
}

.content-page .content-body {
  max-width: 720px;
}

.content-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.content-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.content-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-body ul, .content-body ol {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
}

.content-body li {
  margin-bottom: 8px;
}

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

.content-body .effective-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Changelog ─────────────────────────────────────────────── */
.changelog-entry {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--glass-border);
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-version {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.changelog-version h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.changelog-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.tag-latest {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.tag-beta {
  background: rgba(79, 142, 247, 0.12);
  color: var(--blue);
  border: 1px solid rgba(79, 142, 247, 0.25);
}

.changelog-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.changelog-list {
  list-style: none;
  padding: 0;
}

.changelog-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 15px;
  color: var(--text-secondary);
}

.changelog-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ── Support / FAQ ─────────────────────────────────────────── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.faq-item {
  margin-bottom: 0;
  border-bottom: 1px solid var(--glass-border);
}

.faq-item:last-child { border-bottom: none; }

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

@media (hover: hover) {
  .faq-question:hover {
    color: var(--gold);
  }
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--gold);
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

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

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 968px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-devices {
    flex-direction: column;
    gap: 32px;
  }

  .device-macbook {
    width: 340px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

@media (max-width: 640px) {
  .section {
    padding: 60px 20px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(7, 9, 26, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
  }

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

  .nav-toggle {
    display: block;
  }

  .device-iphone {
    width: 220px;
    height: 450px;
  }

  .device-macbook {
    width: 280px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ── Page Transition ────────────────────────────────────────── */
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-page .section-inner {
  animation: pageIn 0.5s ease both;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
}

.fade-in.visible {
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

/* ── Print Styles ─────────────────────────────────────────── */
@media print {
  body::before,
  .nav,
  footer,
  .hero-devices,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .section {
    padding: 32px 0;
  }

  .glass-card {
    background: #f5f5f5;
    backdrop-filter: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .content-page {
    padding-top: 0;
  }

  a {
    color: #111;
    text-decoration: underline;
  }

  .hero {
    min-height: auto;
    padding-top: 0;
  }

  .section-title,
  .hero-title {
    color: #111;
  }

  .section-label {
    color: #666;
  }

  .section-subtitle,
  .hero-desc,
  .content-body p {
    color: #333;
  }
}
