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

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-slate: #0B0F19;
  --bg-surface: rgba(15, 23, 42, 0.7);
  --bg-surface-border: rgba(255, 255, 255, 0.08);

  --accent-teal: #2DD4BF;
  --accent-amber: #FBBF24;

  --text-primary: #F8FAFC;
  --text-muted: #94A3B8;

  /* Heart Rate Zone Colors */
  --zone-1: #9E9E9E;
  --zone-2: #4CAF50;
  --zone-3: #FFC107;
  --zone-4: #FF9800;
  --zone-5: #F44336;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-slate);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--text-primary);
  line-height: 1.2;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #5eead4;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

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

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

@media (max-width: 768px) {
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Component: Glass Card
   ========================================================================== */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-surface-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Component: Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background-color: var(--accent-teal);
  color: #0B0F19;
  box-shadow: 0 4px 14px 0 rgba(45, 212, 191, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(45, 212, 191, 0.5);
  background-color: #34d399;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--bg-surface-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: var(--text-primary);
}

/* ==========================================================================
   Component: Calculator & Zone Results Widget
   ========================================================================== */
.zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-surface-border);
  transition: background 0.2s ease, transform 0.2s ease;
}

.zone-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.zone-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zone-badge {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.zone-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.zone-range {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.bpm-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Specific Zone Colors */
.zone-1-color { background-color: var(--zone-1); }
.zone-2-color { background-color: var(--zone-2); }
.zone-3-color { background-color: var(--zone-3); }
.zone-4-color { background-color: var(--zone-4); }
.zone-5-color { background-color: var(--zone-5); }

/* ==========================================================================
   Component: Navbar
   ========================================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--bg-surface-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

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

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

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

/* ==========================================================================
   Component: Hero & Phone Mockup
   ========================================================================== */
.hero {
  padding-top: 60px;
  padding-bottom: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  color: var(--accent-teal);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.subheadline {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.phone-mockup {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 9 / 19;
  border-radius: 40px;
  background: #0f172a;
  border: 8px solid #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(45, 212, 191, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.phone-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}

.phone-bpm {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-teal);
  line-height: 1;
}

.phone-zone {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(76, 175, 80, 0.2);
  color: #4CAF50;
  font-weight: 700;
  font-size: 0.85rem;
}

.phone-wave {
  width: 100%;
  height: 40px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.2), transparent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Component: Calculator Section
   ========================================================================== */
.calculator-section {
  padding-top: 60px;
  padding-bottom: 80px;
}

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

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.calculator-container {
  max-width: 600px;
  margin: 0 auto;
}

.tab-container {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-surface-border);
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 24px;
  gap: 6px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-teal);
  color: #0B0F19;
  box-shadow: 0 2px 10px rgba(45, 212, 191, 0.3);
}

.calc-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--bg-surface-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}

.calc-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ==========================================================================
   Component: Features Section
   ========================================================================== */
.features-section {
  padding-top: 60px;
  padding-bottom: 80px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-icon {
  font-size: 2rem;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.2rem;
}

/* ==========================================================================
   Component: Hardware Section
   ========================================================================== */
.hardware-section {
  padding-top: 60px;
  padding-bottom: 80px;
}

.hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.hardware-card {
  text-align: center;
  padding: 28px 24px;
}

.hardware-card .brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hardware-card .models {
  color: var(--accent-teal);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

/* ==========================================================================
   Component: Footer
   ========================================================================== */
.footer {
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid var(--bg-surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

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

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

@media (max-width: 768px) {
  .hardware-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .navbar {
    flex-direction: column;
    gap: 16px;
  }
  .nav-links {
    gap: 16px;
  }
  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .privacy-card {
    padding: 24px 16px !important;
  }
}

/* ==========================================================================
   Component: Privacy Policy Page
   ========================================================================== */
.privacy-container {
  padding-top: 40px;
  padding-bottom: 80px;
}

.privacy-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px;
}

.privacy-header {
  border-bottom: 1px solid var(--bg-surface-border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.privacy-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--accent-teal);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.privacy-body section {
  margin-bottom: 32px;
}

.privacy-body h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-body h3 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.privacy-body p {
  margin-bottom: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.privacy-body ul {
  margin-left: 24px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.privacy-body li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.privacy-table-wrapper {
  overflow-x: auto;
  margin: 16px 0 24px 0;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--bg-surface-border);
}

.policy-table th,
.policy-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.95rem;
}

.policy-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--bg-surface-border);
}

.policy-table td {
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-muted);
  border-bottom: 1px solid var(--bg-surface-border);
}

.policy-table tr:last-child td {
  border-bottom: none;
}

.policy-table code,
.privacy-body code {
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-teal);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.9em;
  border: 1px solid rgba(45, 212, 191, 0.2);
}


