/* Corda Health — Static Site */

:root {
  --bg: #000000;
  --bg-subtle: #0c0f0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --text: #edf0f0;
  --text-muted: #8a9494;
  --text-dim: #505c5c;
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --emerald-soft: #0d9668;
  --orange: #f97316;
  --orange-glow: rgba(249, 115, 22, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --max-width: 1200px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

a {
  color: var(--emerald);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: #34d399;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==================== Navigation ==================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  letter-spacing: -0.01em;
}

.nav-brand svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

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

/* ==================== Hero ==================== */
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  text-align: center;
}


.hero .container {
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-width: min(440px, 80vw);
  height: auto;
  margin-bottom: 2rem;
}

.hero .tagline {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.badge .dot {
  width: 7px;
  height: 7px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-glow);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* ==================== Features ==================== */
.features {
  padding: 2rem 0 8rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header .overline {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--emerald);
  margin-bottom: 0.875rem;
  display: block;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.features-grid {
  display: grid;
  gap: 1rem;
}

/* Card */
.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: clip;
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

/* Accent glow on hover — emerald */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 0%, var(--emerald-glow), transparent 60%);
}

.feature-card:hover::after {
  opacity: 1;
}

/* Orange variant glow */
.feature-card.accent-orange::after {
  background: radial-gradient(ellipse at 30% 0%, var(--orange-glow), transparent 60%);
}

.feature-content {
  position: relative;
  z-index: 1;
  padding: 2.25rem 2rem;
}

/* Icon container */
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--emerald-glow);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--emerald);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon.orange {
  background: var(--orange-glow);
  border-color: rgba(249, 115, 22, 0.15);
}

.feature-icon.orange svg {
  stroke: var(--orange);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  font-weight: 400;
}

/* Screenshot carousels & grids */
.feature-screenshots {
  position: relative;
  z-index: 1;
  padding: 0.5rem 0 1.5rem;
}

.screenshot-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem;
  scrollbar-width: none;
}

.screenshot-track::-webkit-scrollbar {
  display: none;
}

/* Right-side scroll padding so last image doesn't touch card edge */
.feature-screenshots.has-scroll .screenshot-track::after {
  content: '';
  flex: 0 0 0.75rem;
}

.screenshot-track img {
  flex: 0 0 45%;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  aspect-ratio: 1206 / 2622;
  width: 45%;
  height: auto;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

/* Scroll fade hint — right edge */
.feature-screenshots.has-scroll::after {
  content: '';
  position: absolute;
  top: 0.5rem;
  right: 0;
  bottom: 1.5rem;
  width: 3rem;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.45));
  border-radius: 0 var(--radius) 0 0;
  z-index: 2;
}

/* Section 1: side-by-side pair (no scroll) */
.screenshot-pair .screenshot-track {
  overflow: visible;
}

.screenshot-pair .screenshot-track img {
  flex: 1 1 0;
  width: 0;
  scroll-snap-align: unset;
}

/* Section 3: Apple Watch 2x2 grid */
.screenshot-watch-grid .screenshot-track {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  overflow: visible;
  padding: 0 1.5rem;
}

.screenshot-watch-grid .screenshot-track img {
  flex: unset;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 368 / 448;
  border-radius: 18%;
  border: none;
  scroll-snap-align: unset;
  justify-self: center;
}

/* ==================== Carousel Dots ==================== */
.screenshot-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0 0.25rem;
}

.screenshot-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.screenshot-dots button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.screenshot-dots button.active {
  background: var(--emerald);
  transform: scale(1.25);
}

/* ==================== Lightbox ==================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  display: none;
}

.lightbox-overlay.open {
  display: flex;
  animation: lightboxFadeIn 0.25s ease both;
}

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-image {
  max-width: min(90vw, 420px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-overlay.open .lightbox-image {
  animation: lightboxImgIn 0.3s ease both;
}

@keyframes lightboxImgIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.lightbox-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-dots button:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-dots button.active {
  background: var(--emerald);
  transform: scale(1.25);
}

/* ==================== Footer ==================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
}

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

.footer .copyright {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

/* ==================== Privacy Policy ==================== */
.policy {
  padding: 5rem 0 4rem;
  max-width: 680px;
  margin: 0 auto;
}

.policy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.policy .effective-date {
  color: var(--text-dim);
  font-size: 0.8125rem;
  margin-bottom: 3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.policy h2 {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 0.875rem;
  color: var(--text);
  letter-spacing: -0.01em;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.policy h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.policy h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.policy p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.policy ul {
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.policy li {
  margin-bottom: 0.375rem;
}

.policy li::marker {
  color: var(--text-dim);
}

.policy a {
  color: var(--emerald);
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s ease;
}

.policy a:hover {
  text-decoration-color: var(--emerald);
}

.policy strong {
  color: var(--text);
  font-weight: 600;
}

/* ==================== Animations ==================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.19s; }
.fade-up-4 { animation-delay: 0.26s; }
.fade-up-5 { animation-delay: 0.33s; }
.fade-up-6 { animation-delay: 0.40s; }
.fade-up-7 { animation-delay: 0.47s; }

/* ==================== Responsive ==================== */
@media (max-width: 639px) {
  .screenshot-track img {
    flex: 0 0 55%;
    width: 55%;
  }

  .screenshot-pair .screenshot-track img {
    flex: 1 1 0;
    width: 0;
  }
}

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

@media (min-width: 768px) {
  .hero {
    padding: 9rem 0 6rem;
  }

  .feature-content {
    padding: 2.5rem;
  }

  .feature-screenshots {
    padding-bottom: 2rem;
  }

  .screenshot-track {
    padding: 0 2rem;
  }

  .screenshot-track img {
    flex: 0 0 42%;
    width: 42%;
  }

  .screenshot-watch-grid .screenshot-track {
    padding: 0 2rem;
  }
}

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

  .screenshot-track img {
    flex: 0 0 48%;
    width: 48%;
  }

  .screenshot-pair .screenshot-track img {
    flex: 1 1 0;
    width: 0;
  }
}
