/* ══════════════════════════════════════════════════════════
   ClockInHR — Impeccable Typeset
   A rigorous, production-grade typography system for every
   page: Precision Dark · Bento · Codex variants
   ──────────────────────────────────────────────────────────
   Font stack:
     Display  — Bricolage Grotesque (variable: opsz 12–96, wght 300–800)
     Body     — DM Sans (variable: wght 300–700)
     Mono     — JetBrains Mono (codex/data contexts)
   ══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   §1  RENDERING FOUNDATION
   Best-in-class text rendering for every browser
   ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  font-optical-sizing: auto; /* honour opsz axis globally */
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

/* ─────────────────────────────────────────────────────────
   §2  BODY — prose foundation
   ───────────────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(0.9375rem, 0.25vw + 0.875rem, 1.0625rem); /* 15–17 px */
  line-height: 1.68;
  letter-spacing: -0.006em;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  font-variant-ligatures: common-ligatures contextual;
  font-weight: 400;
}

/* Long-form paragraphs */
p {
  font-size: inherit;
  line-height: 1.72;
  letter-spacing: -0.005em;
  font-weight: 400;
  /* No global max-width — let layout/grid control line length per context */
}

/* ─────────────────────────────────────────────────────────
   §3  HEADING HIERARCHY — Bricolage Grotesque variable
   Using font-variation-settings to drive the optical-size
   axis so each heading size is optically optimised.
   ───────────────────────────────────────────────────────── */

/* Shared heading defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bricolage Grotesque', 'DM Sans', sans-serif;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'ss01' 1;
  font-variant-ligatures: common-ligatures;
  text-wrap: balance;          /* prevents orphan last-lines */
  font-optical-sizing: auto;
}

/* ── H1  Display · Hero-scale ── */
h1 {
  font-size:   clamp(2rem, 4vw + 0.75rem, 3.75rem);   /* 32 → 60px */
  font-weight: 800;
  line-height: 1.10;
  letter-spacing: -0.028em;
  font-variation-settings: "opsz" 72, "wght" 800;
}

/* On the main hero the Tailwind class forces text-6xl/tight;
   override line-height for true display compression */
.hero-redesign h1,
section:first-of-type h1 {
  font-size:   clamp(2.4rem, 4.5vw + 1rem, 4.5rem) !important; /* 38 → 72px */
  line-height: 1.06 !important;
  letter-spacing: -0.034em !important;
  font-variation-settings: "opsz" 96, "wght" 800 !important;
}

/* ── H2  Section titles ── */
h2 {
  font-size:   clamp(1.5rem, 2.5vw + 0.5rem, 2.625rem); /* 24 → 42px */
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.020em;
  font-variation-settings: "opsz" 48, "wght" 700;
}

/* ── H3  Card / sub-section titles ── */
h3 {
  font-size:   clamp(1.1875rem, 1.25vw + 0.625rem, 1.625rem); /* 19 → 26px */
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 24, "wght" 600;
}

/* ── H4  Card sub-headings / labels ── */
h4 {
  font-size:   clamp(1rem, 0.75vw + 0.625rem, 1.25rem); /* 16 → 20px */
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.010em;
  font-variation-settings: "opsz" 18, "wght" 600;
}

/* ── H5 / H6 — fine detail labels ── */
h5 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.008em;
  font-variation-settings: "opsz" 14, "wght" 600;
}
h6 {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
}

/* ─────────────────────────────────────────────────────────
   §4  INLINE SEMANTICS
   ───────────────────────────────────────────────────────── */
strong, b {
  font-weight: 700;
  letter-spacing: -0.008em;
}

em { font-style: italic; }

small {
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

/* Inline code */
code:not([class]) {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.1em 0.38em;
  border-radius: 4px;
  background: rgba(93, 135, 255, 0.10);
  color: #93bbff;
  font-feature-settings: 'kern' 1, 'calt' 1;
}

/* ─────────────────────────────────────────────────────────
   §5  SECTION LABELS — .clk-label
   Refined pill labels used across all sections
   ───────────────────────────────────────────────────────── */
.clk-label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase !important;
  font-feature-settings: 'kern' 1, 'case' 1 !important;
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────
   §6  STAT NUMBERS
   Count-up targets: tabular, optically sized, display weight
   ───────────────────────────────────────────────────────── */
.stat-num,
[data-count],
.stats-dark-bar .stat-num {
  font-family: 'Bricolage Grotesque', sans-serif !important;
  font-size: clamp(2rem, 3vw + 0.5rem, 2.75rem) !important; /* 32 → 44px */
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.05em !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: 'kern' 1, 'tnum' 1, 'lnum' 1 !important;
  font-variation-settings: "opsz" 48, "wght" 800 !important;
}

.stat-label,
.stats-dark-bar .stat-label {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  font-feature-settings: 'kern' 1 !important;
}

/* ─────────────────────────────────────────────────────────
   §7  NAVIGATION TYPOGRAPHY
   ───────────────────────────────────────────────────────── */
.nav-link,
#navbar .nav-link {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9375rem !important;      /* 15px */
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  font-feature-settings: 'kern' 1 !important;
  line-height: 1;
}

/* Dropdown item labels */
.hs-dropdown-menu a span,
.hs-dropdown-menu .text-gray-700 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;          /* 14px */
  font-weight: 400;
  letter-spacing: -0.008em;
}

/* Dropdown section headers */
.hs-dropdown-menu .text-gray-400.uppercase {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  font-feature-settings: 'kern' 1, 'case' 1;
}

/* ─────────────────────────────────────────────────────────
   §8  BUTTONS
   ───────────────────────────────────────────────────────── */
.hero-btn-primary,
.hero-btn-outline {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9375rem !important;      /* 15px */
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  font-feature-settings: 'kern' 1 !important;
}

/* General buttons */
a[class*="bg-primary"],
button[class*="bg-primary"],
a.rounded-md[class*="text-white"],
a.rounded-xl[class*="text-white"] {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-feature-settings: 'kern' 1;
}

/* Outline / ghost buttons */
a[class*="border-primary"],
button[class*="border-primary"] {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ─────────────────────────────────────────────────────────
   §9  CARDS — heading + body refinements
   ───────────────────────────────────────────────────────── */
/* Feature card titles */
.feat-card h3,
.att-card h3,
.product-card h3 {
  font-size: clamp(1.0625rem, 0.75vw + 0.75rem, 1.25rem) !important;
  font-weight: 700 !important;
  line-height: 1.30 !important;
  letter-spacing: -0.015em !important;
  font-variation-settings: "opsz" 20, "wght" 700 !important;
}

/* Feat card body */
.feat-card p,
.att-card p,
.product-card p {
  font-size: 0.875rem !important;   /* 14px */
  line-height: 1.65 !important;
  letter-spacing: -0.003em !important;
}

/* Pricing card titles */
.pricing-card-v2 h3 {
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

/* Price number */
.pricing-card-v2 .text-4xl,
.pricing-card-v2 .text-5xl {
  font-family: 'Bricolage Grotesque', sans-serif !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: 'tnum' 1, 'lnum' 1 !important;
  font-variation-settings: "opsz" 48, "wght" 800 !important;
  letter-spacing: -0.05em !important;
  line-height: 1 !important;
}

/* ─────────────────────────────────────────────────────────
   §10  TESTIMONIALS — large quote + attribution
   ───────────────────────────────────────────────────────── */
.testi-slide-card p {
  font-size: 0.9375rem;
  line-height: 1.72;
  letter-spacing: -0.005em;
  font-style: normal;
}

/* Reviewer name */
.testi-slide-card h5,
.testi-slide-card [class*="font-semibold"] {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  font-variation-settings: "opsz" 14, "wght" 600;
}

/* Company / role line */
.testi-slide-card [class*="text-sm"][class*="text-muted"],
.testi-slide-card [class*="text-sm"].text-muted {
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
  font-weight: 400 !important;
}

/* ─────────────────────────────────────────────────────────
   §11  FAQ
   ───────────────────────────────────────────────────────── */
.faq-block button[class*="hs-accordion"],
.faq-block .hs-accordion-toggle {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(0.9375rem, 0.5vw + 0.75rem, 1.125rem); /* 15 → 18px */
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.35;
  font-variation-settings: "opsz" 18, "wght" 600;
  text-wrap: balance;
}

.faq-block .hs-accordion-content p {
  font-size: 0.9375rem;
  line-height: 1.72;
  letter-spacing: -0.006em;
  max-width: 72ch;
}

/* ─────────────────────────────────────────────────────────
   §12  CONTACT FORM
   ───────────────────────────────────────────────────────── */
.contact-input-v2,
input[class*="contact"],
textarea[class*="contact"],
select[class*="contact"] {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  letter-spacing: -0.005em !important;
  line-height: 1.5 !important;
}

label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-feature-settings: 'kern' 1;
}

/* ─────────────────────────────────────────────────────────
   §13  FOOTER
   ───────────────────────────────────────────────────────── */
footer h4,
footer [class*="font-semibold"].uppercase {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-feature-settings: 'kern' 1, 'case' 1;
}

footer a,
footer p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
}

footer p[class*="text-base"] {
  font-size: 0.875rem !important;
}

/* ─────────────────────────────────────────────────────────
   §14  TRUST BADGE — hero eyebrow text
   ───────────────────────────────────────────────────────── */
.trust-badge-dark,
.trust-badge-dark span {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.045em !important;
  text-transform: uppercase !important;
  font-feature-settings: 'kern' 1 !important;
}

/* ─────────────────────────────────────────────────────────
   §15  HERO SUBTITLE — the "description" paragraph
   ───────────────────────────────────────────────────────── */
.hero-redesign p,
.hero-redesign p.hero-enter,
section:first-of-type > .container > p,
section:first-of-type > .container .text-muted {
  font-size: clamp(1rem, 0.75vw + 0.75rem, 1.125rem) !important; /* 16 → 18px */
  line-height: 1.68 !important;
  letter-spacing: -0.008em !important;
  font-weight: 400 !important;
  max-width: 56ch;
}

/* ─────────────────────────────────────────────────────────
   §16  INNER PAGE SECTION BODY TEXT (pages.css context)
   ───────────────────────────────────────────────────────── */
.page-dark p,
.page-dark li {
  font-size: 0.9375rem;
  line-height: 1.73;
  letter-spacing: -0.006em;
}

.page-dark h2 {
  font-size: clamp(1.5rem, 2.25vw + 0.5rem, 2.25rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.035em !important;
}

.page-dark h3 {
  font-size: clamp(1.0625rem, 1vw + 0.625rem, 1.375rem) !important;
  line-height: 1.28 !important;
  letter-spacing: -0.02em !important;
}

.page-dark h4 {
  line-height: 1.34 !important;
  letter-spacing: -0.012em !important;
}

/* ─────────────────────────────────────────────────────────
   §17  PILL / BADGE TAGS
   Feature pills, "Best For" tags, spec pills
   ───────────────────────────────────────────────────────── */
[class*="rounded-full"][class*="px-"][class*="py-"][class*="text-sm"],
[class*="rounded-full"][class*="px-"][class*="py-"][class*="text-xs"] {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: -0.005em;
  font-feature-settings: 'kern' 1;
}

/* Inner hero "1–3 m range", "3-yr battery" spec pills */
section:first-of-type .rounded-full.text-sm,
section:first-of-type .rounded-full.text-sm.font-semibold {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}

/* "Best For" tag labels */
.page-dark .flex.items-center.gap-2.rounded-full span,
.flex.items-center.gap-2.rounded-full .text-gray-700 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.004em;
}

/* ─────────────────────────────────────────────────────────
   §18  HOW-IT-WORKS / STEP NUMBERS
   Numbered circles used across inner pages
   ───────────────────────────────────────────────────────── */
.page-dark [class*="w-14"][class*="h-14"] span,
.page-dark [class*="w-10"][class*="h-10"] span,
.page-dark [class*="w-5"][class*="h-5"].text-primary {
  font-family: 'Bricolage Grotesque', sans-serif !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: 'tnum' 1 !important;
  font-variation-settings: "opsz" 18, "wght" 700 !important;
  line-height: 1 !important;
}

/* Step descriptor text in list items */
.page-dark ol li,
.page-dark ul li {
  font-size: 0.875rem;
  line-height: 1.65;
  letter-spacing: -0.004em;
}

/* ─────────────────────────────────────────────────────────
   §19  CTA SECTION TYPOGRAPHY
   ───────────────────────────────────────────────────────── */
.cta-dark-section h1,
.cta-dark-section h2,
.page-dark section.bg-primary h2 {
  font-family: 'Bricolage Grotesque', sans-serif !important;
  font-size: clamp(1.625rem, 2.5vw + 0.75rem, 2.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.04em !important;
  font-variation-settings: "opsz" 48, "wght" 800 !important;
  text-wrap: balance !important;
}

.cta-dark-section p,
.page-dark section.bg-primary p {
  font-size: clamp(0.9375rem, 0.5vw + 0.75rem, 1.0625rem) !important;
  line-height: 1.68 !important;
  letter-spacing: -0.008em !important;
  max-width: 58ch !important;
}

/* ─────────────────────────────────────────────────────────
   §20  BENTO THEME OVERRIDES (.bento-theme)
   Same structure, warm palette — Inter replaces Bricolage
   ───────────────────────────────────────────────────────── */
.bento-theme h1,
.bento-theme h2,
.bento-theme h3,
.bento-theme h4 {
  font-family: 'Inter', sans-serif !important;
  font-feature-settings: 'kern' 1, 'liga' 1, 'cv01' 1 !important;
  font-variation-settings: normal !important; /* reset Bricolage opsz */
}

.bento-theme h1 {
  font-size: clamp(2rem, 4vw + 0.75rem, 3.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.04em !important;
}

.bento-theme h2 {
  font-weight: 700 !important;
  line-height: 1.16 !important;
  letter-spacing: -0.032em !important;
}

.bento-theme h3 {
  font-weight: 650 !important;
  line-height: 1.24 !important;
  letter-spacing: -0.02em !important;
}

.bento-theme section#home.hero-redesign h1 {
  line-height: 1.06 !important;
  letter-spacing: -0.048em !important;
}

.bento-theme p {
  letter-spacing: -0.006em;
  line-height: 1.70;
}

.bento-theme .clk-label {
  font-family: 'Inter', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────
   §21  CODEX THEME OVERRIDES (.codex-theme)
   Space Grotesk display + JetBrains Mono for data
   ───────────────────────────────────────────────────────── */
.codex-theme h1,
.codex-theme h2,
.codex-theme h3,
.codex-theme h4 {
  font-family: 'Space Grotesk', sans-serif !important;
  font-feature-settings: 'kern' 1, 'liga' 1 !important;
  font-variation-settings: normal !important;
}

.codex-theme h1 {
  font-size: clamp(2rem, 4vw + 0.75rem, 3.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.07 !important;
  letter-spacing: -0.038em !important;
}

.codex-theme h2 {
  font-weight: 700 !important;
  line-height: 1.14 !important;
  letter-spacing: -0.03em !important;
}

.codex-theme section#home.hero-redesign h1 {
  line-height: 1.05 !important;
  letter-spacing: -0.044em !important;
}

.codex-theme .stat-num,
.codex-theme [data-count] {
  font-family: 'JetBrains Mono', monospace !important;
  font-variation-settings: normal !important;
  letter-spacing: -0.04em !important;
}

.codex-theme p {
  letter-spacing: -0.005em;
  line-height: 1.70;
}

/* ─────────────────────────────────────────────────────────
   §22  UTILITY CLASSES — typographic helpers
   ───────────────────────────────────────────────────────── */

/* Balanced short text (section intros, pullquotes) */
.type-balance { text-wrap: balance !important; }

/* Tabular numbers anywhere */
.type-tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* Optical size nudge helpers */
.type-display { font-variation-settings: "opsz" 72, "wght" 800; }
.type-text    { font-variation-settings: "opsz" 18, "wght" 400; }
.type-caption { font-variation-settings: "opsz" 12, "wght" 400; }

/* All-caps label helper */
.type-label {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.115em !important;
  text-transform: uppercase !important;
  font-feature-settings: 'kern' 1, 'case' 1 !important;
}

/* Loose tracking for UI metadata */
.type-meta {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* Tight display number (hero counters, price points) */
.type-numeral {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-variation-settings: "opsz" 48, "wght" 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

/* ─────────────────────────────────────────────────────────
   §23  RESPONSIVE SCALE FINE-TUNING
   ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { line-height: 1.65; }
  h1   { letter-spacing: -0.020em; line-height: 1.12; }
  h2   { letter-spacing: -0.014em; line-height: 1.22; }
  h3   { letter-spacing: -0.010em; }

  .hero-redesign h1,
  section:first-of-type h1 {
    letter-spacing: -0.024em !important;
    line-height: 1.09 !important;
  }

  .cta-dark-section h1,
  .page-dark section.bg-primary h2 {
    font-size: clamp(1.5rem, 5vw + 0.5rem, 2rem) !important;
    letter-spacing: -0.020em !important;
  }
}

@media (min-width: 1280px) {
  h1   { letter-spacing: -0.032em; }
  h2   { letter-spacing: -0.024em; }
  .hero-redesign h1,
  section:first-of-type h1 {
    letter-spacing: -0.038em !important;
  }
}
