/* === Color Palette === */
:root {
  --bg-primary: #0A2540;
  --bg-card: #1A4A5A;
  --bg-button: #2D6A6A;
  --text-primary: #B8E6E6;
  --text-secondary: rgba(184, 230, 230, 0.7);
  --text-muted: rgba(184, 230, 230, 0.6);
  --accent: #4DD4D4;
  --accent-warm: #FFB84D;
  --border: rgba(77, 212, 212, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* === Layout === */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

h1, h2, h3, h4 {
  line-height: 1.2;
}

h1 { font-size: 2.4rem; margin-bottom: 16px; }
h2 { font-size: 1.8rem; margin-bottom: 24px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 37, 64, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
}

/* === Language Dropdown === */
.lang-dropdown {
  position: relative;
}

.lang-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: color 0.2s;
}

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

.lang-dropdown-trigger .globe-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lang-dropdown-trigger .caret {
  font-size: 0.6rem;
  transition: transform 0.2s;
}

.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 12px;
  background: rgba(10, 37, 64, 0.98);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 160px;
  z-index: 200;
  list-style: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.lang-dropdown-menu a:hover {
  background: rgba(77, 212, 212, 0.08);
  color: var(--accent);
  text-decoration: none;
}

.lang-dropdown-menu a.current-lang {
  color: var(--accent);
  font-weight: 600;
}

.lang-dropdown:hover .lang-dropdown-menu,
.lang-dropdown:focus-within .lang-dropdown-menu {
  display: block;
}

.lang-dropdown:hover .caret {
  transform: rotate(180deg);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--border);
}

.breathing-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), transparent);
  animation: breathe 5s ease-in-out infinite;
  margin: 0 auto 40px;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

.hero h1 {
  font-size: 2.6rem;
  max-width: 600px;
  margin: 0 auto 16px;
}

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

.badge-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.badge-row a img {
  height: 48px;
}

.badge-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Section intro paragraph (secondary color, tighter bottom margin) === */
.section-intro {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* === Why It Matters === */
.why-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.why-section .citation {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Research Grid === */
.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

.research-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px;
}

.research-card h3 {
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.research-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.research-disclaimer {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 28px;
  font-style: italic;
}

/* === Science === */
.science-subsection {
  margin-bottom: 32px;
}

.science-subsection h3 {
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.science-subsection p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 8px;
}

.references {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.references h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
}

.references ol {
  list-style: decimal;
  padding-left: 24px;
}

.references li {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.references li em {
  font-style: italic;
}

/* === How It Works === */
.steps {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.step-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-card h3 {
  margin-bottom: 6px;
  color: var(--text-primary);
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* === Features === */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px;
}

.feature-card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.tag-free {
  background: rgba(77, 212, 212, 0.15);
  color: var(--accent);
}

.tag-premium {
  background: rgba(255, 184, 77, 0.15);
  color: var(--accent-warm);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* === Screenshots === */
.screenshot-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 32px 0 16px;
  -webkit-overflow-scrolling: touch;
}

.phone-frame {
  flex-shrink: 0;
  width: 180px;
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(135deg, var(--bg-card), rgba(77, 212, 212, 0.08));
  border-radius: 24px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 6px;
  background: rgba(184, 230, 230, 0.1);
  border-radius: 3px;
}

.phone-frame span {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0 12px;
}

/* === Sensor === */
.sensor-points {
  list-style: none;
  margin-top: 24px;
}

.sensor-points li {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-left: 28px;
  position: relative;
}

.sensor-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* === Privacy Highlight === */
.privacy-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.privacy-card h2 {
  margin-bottom: 12px;
}

.privacy-card .tagline {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.privacy-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.privacy-card a {
  font-weight: 600;
}

/* === Footer === */
.site-footer {
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-logo img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin-bottom: 16px;
}

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

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

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 12px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

/* === Legal Pages === */
.legal-page {
  padding: 40px 0 80px;
}

.legal-page h1 {
  margin-bottom: 8px;
}

.legal-page .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-page h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.legal-page h3 {
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-page ul {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page strong {
  color: var(--text-primary);
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.legal-page th,
.legal-page td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.legal-page th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.legal-page td {
  color: var(--text-secondary);
}

/* === Responsive === */
@media (min-width: 768px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }

  .hero h1 { font-size: 3rem; }

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

  .phone-frame {
    width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .breathing-circle { animation: none; opacity: 0.8; transform: scale(1); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 37, 64, 0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

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

  .hamburger {
    display: block;
  }

  .lang-dropdown-trigger {
    display: none;
  }

  .lang-dropdown {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
  }

  .lang-dropdown-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-width: 0;
  }

  .lang-dropdown-menu a {
    padding: 4px 0;
  }

  section {
    padding: 56px 0;
  }

  .hero {
    padding: 72px 0 56px;
  }

  .privacy-card {
    padding: 32px 24px;
  }
}
