/* ═══════════════════════════════════════════════════════════════════════
   DERMALYNX DISTRIBUTION — Design System
   Aesthetic: Quartr meets wabi-sabi. Pure black, editorial, data-forward.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg:        #070707;
  --surface:   #0f0f0f;
  --border:    #1c1c1c;
  --border-hi: #2a2a2a;
  --text:      #f0ede8;
  --muted:     #6b6660;
  --gold:      #c9a84c;
  --gold-dim:  #8a6e2e;
  --red:       #b83232;
  --white:     #ffffff;

  /* Typography scale */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  32px;
  --space-lg:  64px;
  --space-xl:  120px;
  --space-2xl: 180px;
}

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  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: 256px 256px;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); }

/* ── Layout ──────────────────────────────────────────────────────────── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

.wrap--narrow {
  max-width: 900px;
}

/* ── Navigation ──────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7,7,7,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.01em;
}

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

.nav-links a,
.nav-menu a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
}

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

.nav-links .nav-cta,
.nav-menu .nav-cta {
  border: 1px solid var(--gold);
  padding: 8px 20px;
  color: var(--gold);
  transition: all 0.3s ease;
}

.nav-links .nav-cta:hover,
.nav-menu .nav-cta:hover {
  background: var(--gold);
  color: var(--bg);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* ── Typography ──────────────────────────────────────────────────────── */
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
}

.display-lg {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.display-md {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

.display-sm {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
}

.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.label--muted {
  color: var(--muted);
}

.body-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  max-width: 680px;
}

.body-text--muted {
  color: var(--muted);
}

.lead {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: #d4d0cb;
  max-width: 720px;
}

em.gold { color: var(--gold); font-style: italic; }

/* ── Sections ────────────────────────────────────────────────────────── */
.section {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 60px 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: 'DERMALYNX';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(100px, 20vw, 260px);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #0c0c0c;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.hero-brandmark {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
  line-height: 1;
}

.hero-sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg);
}

.btn--small {
  padding: 10px 24px;
  font-size: 10px;
}

/* ── Trust Bar ───────────────────────────────────────────────────────── */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-bar span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Card Grid ───────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.card {
  background: var(--surface);
  padding: 40px 36px;
  transition: background 0.3s ease;
}

.card:hover {
  background: #121212;
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.2;
}

.card-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color 0.3s ease;
}

.card-link:hover {
  color: var(--white);
}

.card-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  margin-bottom: 20px;
}

/* ── Differentiator Sections ─────────────────────────────────────────── */
.diff-section {
  padding: var(--space-xl) 60px;
  border-bottom: 1px solid var(--border);
}

.diff-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--space-md);
}

.diff-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: var(--space-md);
  max-width: 800px;
}

.diff-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 600px;
}

/* ── Credential Grid ─────────────────────────────────────── */
.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

.cred-card {
  background: var(--surface);
  padding: 28px 32px;
}

.cred-card .label {
  margin-bottom: 12px;
}

.cred-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

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

/* ── Callout ─────────────────────────────────────────────────────────── */
.callout {
  border-left: 2px solid var(--gold);
  padding: 24px 32px;
  margin: var(--space-md) 0;
  background: #0d0b08;
}

.callout p {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  color: #d4c89a;
  line-height: 1.5;
}

.callout--red {
  border-left-color: var(--red);
  background: #0d0808;
}

.callout--red p {
  color: #d49a9a;
}

/* ── Stat Row ────────────────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

.stat {
  background: var(--surface);
  padding: 36px 32px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Table ────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-hi);
}

.data-table td {
  font-size: 14px;
  color: var(--text);
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.data-table td.muted {
  color: var(--muted);
}

/* ── Download Link ───────────────────────────────────────────────────── */
.download-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color 0.3s ease;
}

.download-link:hover {
  border-color: var(--border-hi);
}

.download-link .dl-icon {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.download-link .dl-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--white);
}

.download-link .dl-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-left: auto;
}

/* ── Form ────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  padding: 14px 18px;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6660' fill='none' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
}

.form-check input[type="checkbox"]:checked {
  border-color: var(--gold);
}

.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 8px; height: 8px;
  background: var(--gold);
}

.form-check label {
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.8;
}

.footer-right {
  text-align: right;
}

.footer-right a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.3s ease;
}

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

/* ── Scroll Animations ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 500ms; }

/* ── Page Hero (interior pages) ──────────────────────────────────────── */
.page-hero {
  padding: var(--space-2xl) 60px var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.page-hero .section-label {
  margin-bottom: var(--space-sm);
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 900px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .wrap { padding: 0 32px; }
  .hero { padding: 0 32px 80px; }
  .page-hero { padding: var(--space-xl) 32px var(--space-lg); }
  .diff-section { padding: var(--space-lg) 32px; }
  .trust-bar { padding: 20px 32px; gap: 24px; }
  .nav { padding: 20px 32px; }
  .footer { padding: 40px 32px; }

  .card-grid { grid-template-columns: 1fr; }
  .cred-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .nav-links,
  .nav-menu { display: none; }
  .nav-links.open,
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(7,7,7,0.98);
    padding: 32px;
    gap: 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 0 20px 60px; }
  .page-hero { padding: var(--space-lg) 20px var(--space-md); }
  .diff-section { padding: var(--space-lg) 20px; }
  .trust-bar { flex-direction: column; gap: 12px; text-align: center; }
  .nav { padding: 16px 20px; }
  .footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }
}
