/* ============================================================
   Denticode - shared site styles
   ============================================================ */

:root {
  /* Brand */
  --teal: #19ADC5;
  --teal-hover: #1490A5;
  --teal-deep: #0F7689;
  --teal-wash: #E5F5F9;
  --teal-glow: rgba(25, 173, 197, 0.18);

  /* Surfaces */
  --bg: #FAFBFC;
  --bg-warm: #F6F4EF;     /* warm cream for variety, very subtle */
  --surface: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --surface-muted: #F1F5F9;
  --border: #E6EAEF;
  --border-strong: #CFD6DE;

  /* Dark */
  --ink: #0B1220;
  --ink-2: #131B2C;
  --charcoal: #1C1F24;

  /* Text */
  --text: #0F172A;
  --text-muted: #5B6573;
  --text-soft: #8A95A3;
  --text-on-dark: #E9EEF5;
  --text-on-dark-muted: #9AA4B2;

  /* Status */
  --success: #15803D; --success-bg: #DCFCE7;
  --warning: #B45309; --warning-bg: #FEF3C7;
  --danger:  #B91C1C; --danger-bg:  #FEE2E2;
  --info:    #0369A1; --info-bg:    #E0F2FE;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04), 0 1px 1px rgba(11, 18, 32, 0.03);
  --shadow-md: 0 6px 20px -4px rgba(11, 18, 32, 0.08), 0 2px 6px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 24px 60px -16px rgba(11, 18, 32, 0.18), 0 8px 24px -10px rgba(11, 18, 32, 0.10);
  --shadow-glow: 0 24px 60px -22px var(--teal-glow);

  /* Type */
  --font-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Cambria", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

/* -----------------------------------------------------------
   Typography scale
   ----------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-wash);
}
.eyebrow.on-dark { color: #6BD7E8; }
.eyebrow.on-dark::before { box-shadow: 0 0 0 4px rgba(107, 215, 232, 0.12); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display {
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.display .ink-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}

.h-xl { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.02; letter-spacing: -0.035em; }
.h-lg { font-size: clamp(28px, 3vw, 40px); line-height: 1.08; letter-spacing: -0.025em; }
.h-md { font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; }
.h-sm { font-size: 17px; line-height: 1.3; letter-spacing: -0.005em; font-weight: 600; }

.lede {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--text-muted);
  text-wrap: pretty;
  max-width: 60ch;
}

.body { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.caption { font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }

/* -----------------------------------------------------------
   Layout
   ----------------------------------------------------------- */

.wrap { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.wrap-narrow { width: min(960px, calc(100% - 48px)); margin: 0 auto; }
.wrap-wide { width: min(1480px, calc(100% - 32px)); margin: 0 auto; }

section { position: relative; }

.section-pad { padding: clamp(72px, 9vw, 140px) 0; }
.section-pad-sm { padding: clamp(48px, 6vw, 96px) 0; }

.section-dark {
  background: var(--ink);
  color: var(--text-on-dark);
}
.section-dark .hero-bg {
  background: transparent !important;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--text-on-dark);
}
.section-dark .lede, .section-dark .body { color: var(--text-on-dark-muted); }

.section-warm {
  background: var(--bg-warm);
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(25, 173, 197, 0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--teal-hover); box-shadow: 0 10px 24px -8px rgba(25, 173, 197, 0.7); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface); }

.btn-ghost-dark {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.16);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.1); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15.5px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 500;
  color: var(--teal-deep);
}
.arrow-link::after { content: "→"; transition: transform .2s ease; }
.arrow-link:hover::after { transform: translateX(3px); }

/* -----------------------------------------------------------
   Floating pill nav
   ----------------------------------------------------------- */

.nav-shell {
  position: fixed;
  top: 18px;
  left: 0; right: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 16px;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  padding: 6px 6px 6px 22px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r-pill);
  box-shadow: 0 14px 40px -16px rgba(11, 18, 32, 0.16), 0 2px 6px rgba(11, 18, 32, 0.04);
  max-width: calc(100vw - 32px);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  color: var(--text);
  text-decoration: none;
}
.nav-brand-logo {
  height: 28px;
  width: auto;
  display: block;
  /* SVG uses currentColor for stroke/fill so the logo follows text color in dark sections */
  color: inherit;
}
.nav-brand-logo--footer {
  height: 36px;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--surface-muted); }
.nav-link.active { color: var(--teal-deep); background: var(--teal-wash); }

.nav-cta {
  margin-left: 4px;
}

/* Hamburger toggle - hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  margin-left: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.nav-toggle:hover { background: var(--surface-subtle); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* The mobile drawer covers the full viewport, so we no longer render
   a dim overlay behind it. .nav-backdrop is kept as a no-op so the
   existing markup/JS doesn't break, but it's invisible. */
.nav-backdrop {
  display: none;
}

/* In-drawer CTA group (hidden on desktop) */
.nav-drawer-cta { display: none; }

@media (max-width: 1100px) {
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .nav { padding: 6px 6px 6px 16px; }
  .nav-brand-logo { height: 24px; }
}

@media (max-width: 880px) {
  .nav-shell {
    /* Pin nav-shell so the mobile bar stays put and the drawer opens beneath it */
    padding: 8px 12px;
  }
  .nav {
    padding: 6px 6px 6px 14px;
    height: 56px;
    border-radius: 14px;
    /* Solid background on mobile - backdrop-filter blur reads as a fuzzy
       smear on small screens and confuses the eye, especially over hero
       imagery. Use an opaque white pill instead. */
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Show the hamburger, drop the secondary ghost CTAs */
  .nav-toggle { display: inline-flex; }
  .nav-cta[href*="sign-in"],
  .nav-cta[href*="sign-up"] { display: none; }
  /* Keep the primary 'Book a demo' button visible for one-tap access */
  .nav-cta[href="/book"] { padding: 6px 12px; font-size: 12.5px; }

  /* Hide the nav-links entirely until the hamburger is tapped. Using
     display:none guarantees the drawer cannot leak into nav flow even
     if a fixed-positioning quirk (transform on an ancestor, viewport
     unit weirdness on iOS, etc) breaks position:fixed. */
  .nav-links {
    display: none;
  }
  html.nav-open .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 88px 22px 32px;
    gap: 4px;
    overflow-y: auto;
    z-index: 100;
    animation: nav-fade-in 0.18s ease-out;
  }
  @keyframes nav-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .nav-link {
    font-size: 17px;
    font-weight: 500;
    padding: 14px 14px;
    border-radius: 10px;
    width: 100%;
  }
  .nav-link.active { background: var(--teal-wash); color: var(--teal-deep); }

  .nav-drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .nav-drawer-cta .btn { justify-content: center; width: 100%; }

  /* Lock body scroll while drawer is open */
  html.nav-open, html.nav-open body { overflow: hidden; }
}

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 14% 0%, rgba(25, 173, 197, 0.18), transparent 50%),
    radial-gradient(circle at 88% 30%, rgba(25, 173, 197, 0.08), transparent 55%);
  pointer-events: none;
}
.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 56px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.82);
  transition: color .15s ease;
}
.footer-col a:hover { color: #fff; }

.footer-brand {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 320px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.footer-bottom {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-soc {
  display: flex; gap: 10px;
}
.footer-soc a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.7);
}
.footer-soc a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Changelog ticker */
.ticker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  margin-bottom: 56px;
  overflow: hidden;
  font-size: 13px;
}
.ticker-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
  font-variant: small-caps;
  letter-spacing: 0.06em;
}
.ticker-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}
.ticker-track {
  display: flex;
  gap: 48px;
  animation: ticker 60s linear infinite;
  white-space: nowrap;
  color: rgba(255,255,255,0.82);
}
.ticker-track > span { display: inline-flex; align-items: center; gap: 8px; }
.ticker-track strong { color: #fff; font-weight: 500; }
.ticker-track .tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(25, 173, 197, 0.18);
  color: #6BD7E8;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* -----------------------------------------------------------
   Reusable bits
   ----------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}
.chip-teal {
  background: var(--teal-wash);
  color: var(--teal-deep);
  border-color: rgba(25, 173, 197, 0.18);
}
.chip-success { background: var(--success-bg); color: var(--success); border-color: rgba(21, 128, 61, 0.16); }
.chip-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(180, 83, 9, 0.16); }
.chip-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(185, 28, 28, 0.16); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.divider {
  height: 1px;
  background: var(--border);
}

/* utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { display: grid; place-items: center; }
.grid { display: grid; }
.gap-xs { gap: 6px; } .gap-sm { gap: 10px; } .gap-md { gap: 16px; }
.gap-lg { gap: 24px; } .gap-xl { gap: 40px; }

.text-mute { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-teal { color: var(--teal-deep); }

/* -----------------------------------------------------------
   Generic page header (subpages)
   ----------------------------------------------------------- */

.page-hero {
  padding: 168px 0 80px;
  text-align: left;
}
.page-hero .lede { margin-top: 22px; }
.page-hero .eyebrow { margin-bottom: 22px; }

/* Anchor offset for sticky nav */
[id] { scroll-margin-top: 96px; }

/* =============================================================
   Mobile fixes
   Forces multi-column inline grids to stack, tightens spacing
   for narrow viewports, and a few small touch-target tweaks.
   ============================================================= */

@media (max-width: 760px) {
  /* Inline 2-col grids that can't be overridden by class-only media queries */
  .lab-feat-grid[style*="grid-template-columns"],
  .pricing-2col {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Inline 3-col grids on home + lab pages */
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Tighten wraps so content can breathe on narrow screens */
  .wrap, .wrap-narrow { width: min(1240px, calc(100% - 28px)); }
  .wrap-wide { width: min(1480px, calc(100% - 20px)); }

  /* Reduce section spacing on small screens */
  .section-pad { padding: clamp(56px, 12vw, 96px) 0; }
  .section-pad-sm { padding: clamp(40px, 8vw, 72px) 0; }

  /* Hero CTAs full-width-friendly */
  .hero-ctas .btn,
  .hero-ctas .btn-lg { width: 100%; justify-content: center; }
  .hero-ctas { flex-direction: column; align-items: stretch; }

  /* Tap-friendly button sizing */
  .btn-sm { padding: 10px 14px; }
  .btn-lg { padding: 14px 18px; font-size: 15px; }

  /* Inputs avoid iOS zoom-on-focus (min 16px) */
  input, select, textarea { font-size: 16px !important; }
}

/* Even tighter at very small widths */
@media (max-width: 480px) {
  .display { font-size: clamp(34px, 9vw, 48px); line-height: 1.02; }
  .h-xl    { font-size: clamp(26px, 7vw, 36px); }
  .h-lg    { font-size: clamp(22px, 6vw, 30px); }
  .lede    { font-size: 15.5px; }

  /* Trust-center / large tables wrap horizontally */
  [style*="grid-template-columns: 1.4fr 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 12px 14px !important;
  }
  [style*="grid-template-columns: 1.4fr 1fr 1.2fr"] code { word-break: break-all; }

  /* Lead form modal: shrink padding */
  .lead-modal-shell { padding: 24px 18px 18px !important; }
  .baa-modal-shell  { max-height: calc(100vh - 16px) !important; }

  /* Footer ticker: hide on tiny screens, save bandwidth */
  .ticker { font-size: 12px; }
}

/* iOS / Safari quirks */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }

/* -----------------------------------------------------------
   .mock-scale — wrapper that renders its child at a fixed
   design width and scales it down with CSS transform on
   narrower viewports. JS sets inline width/transform/height;
   we just need a base block layout here.
   ----------------------------------------------------------- */
.mock-scale {
  display: block;
  width: 100%;
}
.mock-scale > * {
  display: block;
  margin: 0;
}
