/* Wear OS Material 3 Dark Theme - Instant Voice Recorder */
:root {
  --bg: #0c0f14;
  --surface: #151922;
  --surface-elevated: #1c222e;
  --surface-hover: #232a38;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(147, 197, 253, 0.28);
  --text: #eef2f7;
  --text-muted: #9aa5b5;
  --primary: #8ab4f8;
  --primary-ink: #081b33;
  --primary-soft: rgba(138, 180, 248, 0.14);
  --record-red: #f87171;
  --record-soft: rgba(248, 113, 113, 0.14);
  --success: #6ee7b7;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max-width: 1080px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at 18% 0%, rgba(138, 180, 248, 0.08), transparent 42%),
              radial-gradient(circle at 85% 15%, rgba(248, 113, 113, 0.05), transparent 36%),
              var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Language toggle visibility: EN is rendered and visible by default without JS */
html:not([data-active-lang="vi"]) [data-lang="vi"] {
  display: none !important;
}

html[data-active-lang="vi"] [data-lang="en"] {
  display: none !important;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 0.6rem 1rem;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 15, 20, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  flex-wrap: wrap;
  padding: 0.6rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--record-red);
  box-shadow: 0 0 0 4px var(--record-soft);
  flex-shrink: 0;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-elevated);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-ink);
}

/* Main */
main {
  flex: 1;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.75rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.78rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border-strong);
}

.badge-neutral {
  background: var(--surface);
  color: var(--text-muted);
  border-color: var(--border);
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.hero-lead {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--text);
  max-width: 58ch;
}

.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 58ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover {
  background: #a5c6fa;
}

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

.btn-secondary:hover {
  background: var(--surface-elevated);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Circular Wear OS Watch Frame */
.watch-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.watch-bezel {
  position: relative;
  width: clamp(240px, 30vw, 300px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 14px;
  background: linear-gradient(145deg, #272e3d, #11151d);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 42px rgba(138, 180, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: watch-bezel-glow 28s ease-in-out infinite;
}

/* Primary mapped hardware button with 1-press animation synced to 28s demo.gif */
.watch-hw-button {
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  width: 9px;
  height: 42px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(180deg, #54617b, #232a38);
  border: 1px solid rgba(138, 180, 248, 0.45);
  border-left: 0;
  box-shadow: 0 0 12px rgba(138, 180, 248, 0.25);
  animation: hw-button-press 28s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.watch-hw-ripple {
  position: absolute;
  right: -18px;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  transform: translateY(-50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  animation: hw-ripple-wave 28s ease-out infinite;
}

@keyframes hw-button-press {
  0%, 3%, 100% {
    transform: translateY(-50%) translateX(0);
    background: linear-gradient(180deg, #54617b, #232a38);
    box-shadow: 0 0 12px rgba(138, 180, 248, 0.25);
  }
  0.8%, 1.6% {
    transform: translateY(-50%) translateX(-4px);
    background: linear-gradient(180deg, #8ab4f8, #5b8ce0);
    box-shadow: 0 0 18px rgba(138, 180, 248, 0.8);
  }
}

@keyframes hw-ripple-wave {
  0% {
    transform: translateY(-50%) scale(0.45);
    opacity: 0;
  }
  1% {
    opacity: 0.85;
  }
  3.5%, 100% {
    transform: translateY(-50%) scale(2.1);
    opacity: 0;
  }
}

@keyframes watch-bezel-glow {
  0%, 4.5%, 100% {
    box-shadow:
      0 24px 50px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 0 42px rgba(138, 180, 248, 0.12);
  }
  1%, 2.5% {
    box-shadow:
      0 24px 50px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(138, 180, 248, 0.4),
      0 0 48px rgba(138, 180, 248, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .watch-bezel,
  .watch-hw-button,
  .watch-hw-ripple {
    animation: none;
  }
}

.watch-screen {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.watch-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sections & Cards */
.section {
  padding: 2.5rem 0;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
  letter-spacing: -0.015em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-elevated);
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Technical Specs Bar */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
}

.spec-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.spec-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.spec-value {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

/* Subpages (Privacy, Support, Terms, 404) */
.page-hero {
  padding: 2.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.meta-line {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.doc-content {
  max-width: 780px;
  padding-bottom: 3rem;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.15rem;
}

.doc-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--text);
}

.doc-card p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.doc-card p:last-child {
  margin-bottom: 0;
}

.doc-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.doc-card li {
  margin-bottom: 0.5rem;
}

.doc-card li:last-child {
  margin-bottom: 0;
}

.doc-card strong {
  color: var(--text);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 0.12rem 0.38rem;
  border-radius: 6px;
  color: var(--primary);
}

.highlight-box {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0.75rem 0;
  color: var(--text);
}

.center-card {
  max-width: 560px;
  margin: 4rem auto;
  text-align: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

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

@media (max-width: 820px) {
  .hero {
    padding: 2.25rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .watch-showcase {
    order: -1;
  }
}
