/* Mobile-first Kidney Care landing page */

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

:root {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);

  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;

  --bp: #f87171;
  --bp-bg: #fef2f2;
  --glucose: #60a5fa;
  --glucose-bg: #eff6ff;
  --weight: #2dd4bf;
  --weight-bg: #f0fdfa;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-teal: 0 12px 32px rgba(13, 148, 136, 0.22);

  --header-height: 64px;
  --mobile-bar-height: 72px;
  --max-width: 1120px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--mobile-bar-height);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(96, 165, 250, 0.08), transparent 50%),
    var(--bg);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  color: white;
  box-shadow: var(--shadow-teal);
}

.brand-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-5);
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.button:active {
  transform: scale(0.98);
}

.button svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.button-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  color: white;
  box-shadow: var(--shadow-teal);
}

.button-primary:hover {
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.28);
}

.button-ghost {
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.button-ghost:hover {
  background: white;
  border-color: rgba(15, 23, 42, 0.18);
}

.button-sm {
  min-height: 40px;
  padding-inline: var(--space-4);
  font-size: 0.875rem;
}

.button-lg {
  min-height: 52px;
  padding-inline: var(--space-6);
  font-size: 1rem;
}

.button-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: var(--space-8) 0 var(--space-12);
}

.hero-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--teal-100);
  color: var(--teal-700);
}

.pill-outline {
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  border: 1px solid var(--border-strong);
}

.hero-copy h1 {
  margin: 0 0 var(--space-5);
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.text-gradient {
  background: linear-gradient(135deg, var(--teal-600) 0%, #0891b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 var(--space-6);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.hero-actions {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  text-align: center;
}

.hero-stats li:not(:last-child) {
  border-right: 1px solid var(--border);
}

.hero-stats strong {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--teal-700);
}

.hero-stats span {
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--muted);
}

/* Phone preview */
.hero-preview {
  position: relative;
  display: flex;
  justify-content: center;
  padding: var(--space-4) 0;
}

.phone-glow {
  position: absolute;
  inset: 10% 5% 0;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.25), transparent 70%);
  filter: blur(24px);
}

.phone-frame {
  position: relative;
  width: min(100%, 280px);
  padding: 0.625rem;
  border-radius: 36px;
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  box-shadow: var(--shadow-lg);
}

.phone-notch {
  width: 88px;
  height: 22px;
  margin: 0 auto 0.5rem;
  border-radius: var(--radius-full);
  background: #0f172a;
}

.phone-screen {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: 28px;
  background: #f8fafc;
}

.screen-header {
  display: grid;
  gap: 0.125rem;
  margin-bottom: var(--space-1);
}

.screen-greeting {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

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

.vital-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-sm);
}

.vital-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.vital-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.vital-badge {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.vital-value small {
  font-weight: 500;
  color: var(--muted);
}

.vital-unit {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.vital-bp {
  border-left: 3px solid var(--bp);
}

.vital-bp .vital-badge {
  background: var(--bp-bg);
  color: #dc2626;
}

.vital-glucose {
  border-left: 3px solid var(--glucose);
}

.vital-weight {
  border-left: 3px solid var(--weight);
}

.sync-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--teal-700);
  background: var(--teal-50);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

/* Sections */
.section {
  padding: var(--space-12) 0;
}

.section-label {
  margin: 0 0 var(--space-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-600);
}

.section-heading {
  margin-bottom: var(--space-8);
}

.section-heading h2,
.offline-copy h2,
.download-copy h2 {
  margin: 0 0 var(--space-4);
  font-size: clamp(1.625rem, 5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.section-heading p,
.offline-copy p {
  margin: 0;
  color: var(--ink-secondary);
  line-height: 1.65;
}

/* Features */
.feature-grid {
  display: grid;
  gap: var(--space-4);
}

.feature-card {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

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

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
}

.feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.vital-bp-icon {
  background: var(--bp-bg);
  color: #ef4444;
}

.vital-glucose-icon {
  background: var(--glucose-bg);
  color: #3b82f6;
}

.vital-weight-icon {
  background: var(--weight-bg);
  color: var(--teal-600);
}

.feature-icon-teal {
  background: var(--teal-50);
  color: var(--teal-600);
}

.feature-card h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Offline section */
.section-offline {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(240, 253, 250, 0.8));
  border-block: 1px solid var(--border);
}

.offline-grid {
  display: grid;
  gap: var(--space-8);
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3);
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
}

/* Download */
.download-section {
  padding-bottom: var(--space-16);
}

.download-card {
  display: grid;
  gap: var(--space-8);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.download-copy p {
  margin: 0 0 var(--space-6);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.download-copy .section-label {
  color: rgba(255, 255, 255, 0.75);
}

.download-copy h2 {
  color: white;
}

.download-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin: 0;
}

.download-meta div {
  display: grid;
  gap: 0.125rem;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
}

.download-meta dt {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.download-meta dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.download-actions {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.download-card .button-primary {
  background: white;
  color: var(--teal-700);
  box-shadow: var(--shadow-md);
}

.download-card .button-primary:hover {
  box-shadow: var(--shadow-lg);
}

.install-note {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  padding: var(--space-8) 0 var(--space-10);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  gap: var(--space-2);
  text-align: center;
}

.footer-inner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-inner a {
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-note {
  font-size: 0.8125rem;
}

/* Sticky mobile download bar */
.mobile-download-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  padding: var(--space-3) var(--space-4);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.mobile-download-bar .button {
  min-height: 44px;
}

/* Tablet */
@media (min-width: 640px) {
  body {
    padding-bottom: 0;
  }

  .mobile-download-bar {
    display: none;
  }

  .hero-actions {
    grid-template-columns: auto auto;
    width: fit-content;
  }

  .button-block:not(.button-lg) {
    width: auto;
  }

  .hero-stats {
    max-width: 28rem;
  }

  .download-meta div {
    padding: var(--space-4);
  }
}

/* Desktop */
@media (min-width: 900px) {
  .hero {
    padding: var(--space-16) 0;
  }

  .hero-stack {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-12);
    align-items: center;
  }

  .hero-preview {
    order: 1;
  }

  .hero-copy {
    order: 0;
  }

  .hero-copy h1 {
    max-width: 11ch;
  }

  .lead {
    max-width: 34rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }

  .offline-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
  }

  .download-card {
    grid-template-columns: 1.2fr 0.8fr;
    padding: var(--space-10);
    align-items: center;
  }

  .footer-inner {
    text-align: left;
  }
}

@media (min-width: 1080px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
