:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --surface-card: #ffffff;
  --text-primary: #0d0d0d;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --accent: #00bcd4;
  --accent-rgb: 0, 188, 212;
  --accent-hover: #0097a7;
  --accent-subtle: rgba(0, 188, 212, 0.1);
  --accent-border: rgba(0, 188, 212, 0.25);
  --border: #e5e7eb;
  --border-subtle: #f3f4f6;
  --phone-bg: #0d0f12;
  --phone-border: #21262d;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --max-w: 1140px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090c10;
    --surface: #0d1117;
    --surface-card: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-tertiary: #484f58;
    --accent: #00e5ff;
    --accent-rgb: 0, 229, 255;
    --accent-hover: #33ebff;
    --accent-subtle: rgba(0, 229, 255, 0.12);
    --accent-border: rgba(0, 229, 255, 0.3);
    --border: #30363d;
    --border-subtle: #21262d;
    --phone-bg: #090c10;
    --phone-border: #30363d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.8);
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  touch-action: pan-y manipulation;
  -webkit-text-size-adjust: 100%;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* 1. Header / Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

@media (prefers-color-scheme: dark) {
  .header {
    background-color: rgba(9, 12, 16, 0.85);
  }
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo {
  width: 36px;
  height: 36px;
  display: block;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0d0f12;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* 2. Hero Section */
.hero {
  padding: 56px 0 48px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    padding: 24px 0;
  }
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 20px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

.hero-badge-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #090c10;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.45);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-subtle);
  border-color: var(--text-tertiary);
  transform: translateY(-2px);
}

.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta-icon {
  width: 15px;
  height: 15px;
  fill: var(--accent);
}

/* Phone Mockup Frame */
.mockup-wrapper {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 100%;
  max-width: 320px;
  background: var(--phone-bg);
  border: 4px solid var(--phone-border);
  border-radius: 36px;
  padding: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #f0f6fc;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b949e;
  margin-bottom: 16px;
  padding: 0 4px;
}

.phone-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.phone-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c9d1d9;
  margin-bottom: 4px;
}

.phone-card-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.phone-card-sub {
  font-size: 0.7rem;
  color: #8b949e;
  margin-top: 2px;
}

/* Stylised 24h Timeline Mock */
.timeline-mock-grid {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
  margin-top: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #30363d;
}

.timeline-bar {
  flex: 1;
  background: #21262d;
  border-radius: 2px 2px 0 0;
  transition: var(--transition);
}

.timeline-bar.active {
  background: var(--accent);
}

.phone-mini-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.phone-mini-stat {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.phone-mini-stat-label {
  font-size: 0.65rem;
  color: #8b949e;
  text-transform: uppercase;
  font-weight: 600;
}

.phone-mini-stat-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0f6fc;
  margin-top: 2px;
}

/* 3. Features Section */
.features {
  padding: 64px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

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

.feature-icon-box {
  width: 44px;
  height: 44px;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon {
  width: 22px;
  height: 22px;
  fill: var(--accent);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* 4. Download Section */
.download-section {
  padding: 72px 0;
}

.download-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

@media (min-width: 768px) {
  .download-card {
    padding: 48px 40px;
  }
}

.download-app-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: block;
}

.download-app-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.download-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0;
  text-align: left;
}

@media (min-width: 640px) {
  .download-meta-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.meta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.meta-label {
  font-size: 0.725rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.meta-value {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Skeleton Loading Animation */
.skeleton {
  display: inline-block;
  height: 1em;
  background: linear-gradient(90deg, var(--border) 25%, var(--border-subtle) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.download-cta-btn {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 20px;
  padding: 16px 28px;
  font-size: 1.1rem;
}

.download-note {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Accordion / Release Notes */
.accordion {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: left;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 8px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
}

.accordion-trigger:hover {
  color: var(--accent);
}

.accordion-chevron {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 16px 0 8px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.accordion-content.open {
  display: block;
}

.accordion-content h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 12px 0 6px;
}

.accordion-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.accordion-content li {
  margin-bottom: 4px;
}

/* 5. Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent);
}

/* 6. Download Toast Notification */
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(32px) scale(0.94);
  background: rgba(13, 17, 23, 0.94);
  color: #f0f6fc;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 229, 255, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  z-index: 9999;
  max-width: calc(100vw - 32px);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast-icon-wrap {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon {
  width: 18px;
  height: 18px;
  fill: var(--accent);
  flex-shrink: 0;
}

.toast-icon-spinner {
  animation: toast-spin 1s linear infinite;
}

.toast-icon-check {
  display: none;
  fill: #10b981;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.2);
}

.toast.success .toast-icon-spinner {
  display: none;
}

.toast.success .toast-icon-check {
  display: block;
}

@keyframes toast-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
