/* ==========================================================================
   Fold Counter (foldcounter.com) - Stylesheet
   Aesthetic: Apple Light Mode, Refined Typography, Generous Whitespace
   ========================================================================== */

:root {
  --bg-base: #ffffff;
  --bg-subtle: #fbfbfd;
  --bg-surface: #f5f5f7;
  --bg-card: #ffffff;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.1);
  --border-highlight: rgba(0, 0, 0, 0.2);

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  
  --accent: #0071e3;
  --success: #1b8a3e;

  --radius-card: 20px;
  --radius-pill: 9999px;
  --max-w-container: 1040px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "SF Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;

  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: var(--bg-base);
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.font-mono {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--max-w-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-glyph {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.nav-pill {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
  padding-top: 140px;
  padding-bottom: 96px;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-headline {
  font-size: clamp(3.5rem, 8.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #1d1d1f;
  margin-bottom: 24px;
}

.hero-subtext {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  color: var(--text-secondary);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  letter-spacing: -0.015em;
  margin-bottom: 32px;
}

.hero-meta {
  font-size: 14px;
  color: var(--text-muted);
}

/* Global Section Structure */
.section {
  padding-top: 112px;
  padding-bottom: 112px;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #1d1d1f;
  margin-bottom: 16px;
}

.section-desc {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Big Metrics Row (Replaces the kinematics section) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
}

.metric-number {
  font-family: var(--font-mono);
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.metric-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #1d1d1f;
  margin-bottom: 8px;
}

.metric-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Editorial 3-Column Grid */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.editorial-col {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--text-primary);
  padding-top: 24px;
}

.editorial-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.editorial-heading {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #1d1d1f;
  margin-bottom: 12px;
}

.editorial-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Typographic Health Record Card */
.cert-card-stage {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.05);
}

.cert-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.cert-title-block strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
}

.cert-title-block span {
  font-size: 12px;
  color: var(--text-muted);
}

.cert-status-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: rgba(27, 138, 62, 0.09);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.cert-main-stat {
  margin-bottom: 24px;
}

.cert-number {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 6vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #1d1d1f;
  margin-bottom: 6px;
}

.cert-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.cert-metrics-table {
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.cert-metric-label {
  color: var(--text-secondary);
}

.cert-metric-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

/* Countdown Section */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 32px auto;
}

.countdown-unit {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 22px 12px;
  text-align: center;
}

.countdown-digits {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #1d1d1f;
  margin-bottom: 6px;
}

.countdown-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 56px;
  padding-bottom: 56px;
  background: var(--bg-subtle);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-legal {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 800px;
}

.footer-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

/* Responsive Adaptations */
@media (max-width: 880px) {
  .metrics-grid,
  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .hero-section {
    padding-top: 110px;
    padding-bottom: 64px;
  }
}

@media (max-width: 580px) {
  .countdown-grid {
    gap: 8px;
  }

  .countdown-unit {
    padding: 16px 8px;
  }

  .footer-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
