/* ============================================================
   SkinQ Rx — Shared Design System
   Wireframe v1 · May 2026
   ============================================================ */

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

/* picture elements must be block so they inherit container dimensions */
picture { display: block; width: 100%; height: 100%; line-height: 0; }

:root {
  /* Brand */
  --brand:        #7B2E2E;
  --brand-light:  rgba(123, 46, 46, 0.07);
  --brand-mid:    rgba(123, 46, 46, 0.18);

  /* Range colours */
  --hydration:    #3B82C4;
  --pigmentation: #E8890C;
  --acne:         #2E7A6B;
  --sunscreen:    #F07830;
  --ph:           #8B9DC3;

  /* Neutrals */
  --ink:          #1C1C1C;
  --ink-mid:      #4A4A4A;
  --ink-light:    #767676;
  --border:       #E8E8E4;
  --bg:           #FAFAF8;
  --bg-warm:      #F2EDE8;
  --gold:         #C9A87C;
  --white:        #FFFFFF;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Typography ──────────────────────────────────────────── */

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

h1 { font-size: clamp(36px, 5vw, 66px); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3.5vw, 48px); font-weight: 700; line-height: 1.1;  letter-spacing: -0.02em; }
h3 { font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; line-height: 1.2;  letter-spacing: -0.01em; }
h4 { font-size: 18px; font-weight: 600; line-height: 1.3; }

p      { font-size: 16px; line-height: 1.75; color: var(--ink-mid); }
.lead  { font-size: 18px; line-height: 1.65; color: var(--ink-mid); }
.small { font-size: 13px; color: var(--ink-light); }

/* ── Layout ──────────────────────────────────────────────── */

.container  { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-lg { padding: 128px 0; }

/* ── Wireframe Navigation Bar ────────────────────────────── */

.wf-bar {
  background: #111;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 9px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wf-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pigmentation);
}

.wf-pages {
  display: flex;
  gap: 24px;
}

.wf-pages a {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}

.wf-pages a:hover  { color: rgba(255,255,255,0.8); }
.wf-pages a.active { color: white; border-bottom-color: var(--pigmentation); }

/* ── Main Navigation ─────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: white;
  border-bottom: 1px solid var(--border);
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 48px;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-mark {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.04em;
}

.nav-logo-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 3px;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  transition: color 0.15s;
}

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

/* ── Nav Dropdown ─────────────────────────────────────────── */

.nav-dropdown {
  position: relative;
}

/* Transparent bridge fills the 14px gap so hover doesn't break mid-mouse-move */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: -24px;
  right: -24px;
  height: 18px;
  background: transparent;
  z-index: 201;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s;
}

.nav-dropdown:hover > a::after {
  transform: rotate(225deg) translateY(-2px);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  min-width: 210px;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  transform: translateX(-50%) translateY(6px);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: white;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: var(--bg-warm);
  color: var(--ink);
}

.nav-dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-sm { padding: 9px 18px; font-size: 12px; }

.btn-primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-primary:hover { background: #6A2424; }

.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }

.btn-dark { background: var(--ink); color: white; border-color: var(--ink); }
.btn-dark:hover { background: #333; }

.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,0.45); }
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.06); }

/* ── Image / Photo Placeholders ──────────────────────────── */

.img-block {
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.img-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--brand-mid) 1px, transparent 1px),
    linear-gradient(90deg, var(--brand-mid) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
}

.img-block span { position: relative; z-index: 1; }

/* ── Brand Grid Overlay ──────────────────────────────────── */

.grid-bg {
  background-image:
    linear-gradient(var(--brand-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--brand-light) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ── Stats ───────────────────────────────────────────────── */

.stat-num {
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 8px;
  line-height: 1.4;
}

/* ── Badges ──────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 2px;
}

.badge-brand  { color: var(--brand);       border: 1px solid var(--brand); }
.badge-blue   { color: var(--brand);       border: 1px solid var(--brand); }
.badge-green  { color: var(--brand);       border: 1px solid var(--brand); }

/* ── Section rule ────────────────────────────────────────── */

.rule       { border: none; border-top: 1px solid var(--border); }
.rule-brand { border: none; border-top: 1px solid var(--brand-mid); }

/* ── Protocol step arrow chain ───────────────────────────── */

.chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chain-step {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  background: white;
}

.chain-step.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.chain-arrow {
  font-size: 16px;
  color: var(--ink-light);
  font-weight: 300;
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  background: #111111;
  color: white;
  padding: 72px 48px 40px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
}

.footer-logo-text {
  font-size: 22px;
  font-weight: 900;
  color: white;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 12px;
  color: #C8C8C4;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 260px;
}

.footer-address {
  font-size: 11px;
  color: #B8B8B4;
  line-height: 1.8;
  margin-top: 16px;
  max-width: 260px;
}

/* Override inline colour on tel/email links inside footer address */
.footer-address a {
  color: #B8B8B4 !important;
  text-decoration: none;
}
.footer-address a:hover { color: white !important; }

.footer-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A0A09C;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  font-size: 14px;
  color: #D8D8D4;
  transition: color 0.15s;
}

.footer-links-list a:hover { color: white; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: 12px; color: #909090; }

.cert-strip { display: flex; gap: 8px; flex-wrap: wrap; }

.cert-pill {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 2px;
}

/* ── Math of Beauty visual elements ──────────────────────── */

/* Delta stats: +13.7% / −5.3% — numbers with directional precision */
.delta-positive { color: var(--brand); }
.delta-negative { color: var(--brand); }

/* "THE MATH OF BEAUTY™" wordmark stamp */
.math-wordmark {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--brand-mid);
  padding: 5px 12px;
  border-radius: 1px;
}

/* Measured-over label — sub-line beneath a stat */
.measured-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  margin-top: 6px;
}

/* Tier A vocabulary highlight — light brand tint on key terms */
.precision-word {
  font-style: normal;
  color: var(--brand);
}

/* ── Hamburger button (hidden on desktop) ────────────────── */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ───────────────────────────────────── */

.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: white;
  z-index: 89;
  border-bottom: 2px solid var(--brand-mid);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  flex-direction: column;
  padding: 8px 20px 24px;
}

.nav-mobile-drawer.open { display: flex; }

.nav-mobile-drawer a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-mid);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.nav-mobile-drawer a:last-of-type { border-bottom: none; }

.nav-mobile-drawer .nav-drawer-cta {
  margin-top: 16px;
  text-align: center;
  justify-content: center;
  color: white;
}

.nav-mobile-drawer .nav-drawer-cta:hover {
  color: white;
}

/* ── Mobile Responsive (≤768px) ──────────────────────────── */
@media (max-width: 768px) {
  body { overflow-x: hidden; }

  .container  { padding: 0 20px; }
  .section    { padding: 56px 0; }
  .section-sm { padding: 40px 0; }
  .section-lg { padding: 72px 0; }

  /* Wireframe bar — wrap pages horizontally */
  .wf-bar   { padding: 8px 20px; flex-wrap: wrap; gap: 6px; }
  .wf-pages { flex-wrap: wrap; gap: 4px 10px; }
  .wf-pages a { font-size: 10px; }

  /* Nav — collapse links, show hamburger */
  .nav        { padding: 0 20px; height: 60px; }
  .nav-inner  { padding: 0; gap: 0; }
  .nav-links  { display: none; }
  .nav-cta    { display: none; }
  .nav-hamburger { display: flex; }

  /* Section title rows that split h2 + sub-text side-by-side */
  .section-title-row { flex-direction: column !important; align-items: flex-start !important; gap: 12px; }
  .section-title-row .small { text-align: left !important; max-width: 100% !important; }

  /* Footer */
  .footer      { padding: 48px 20px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}
