/* Helpyr shared styles */
html { --accent: #F77E2D !important; }
:root {
  --bg: #050505;
  --bg-1: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #1a1a1d;
  --line: #1f1f22;
  --line-2: #2a2a2e;
  --fg: #f5f5f7;
  --fg-2: #c7c7cc;
  --fg-3: #86868b;
  --fg-4: #515154;
  --accent: #F77E2D;
  --accent-weak: #c45d1a;
  --accent-btn: #F77E2D;
  --accent-btn-hover: #ff9147;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 8px;
  --max: 1240px;
  --nav-h: 48px;
  --subnav-h: 52px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-1: #fafafa;
  --bg-2: #f2f2f4;
  --bg-3: #e7e7ea;
  --line: #e2e2e5;
  --line-2: #d1d1d6;
  --fg: #0a0a0b;
  --fg-2: #2a2a2e;
  --fg-3: #515154;
  --fg-4: #86868b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  background: var(--bg);
  color: var(--fg);
  transition: background .3s var(--ease), color .3s var(--ease);
}

.display {
  font-family: 'Inter Tight', 'Inter', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

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

/* Top nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
}
.nav-left, .nav-right, .nav-menu, .nav-actions {
  display: flex; align-items: center; gap: 24px;
}
.nav-actions { gap: 12px; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
}
.nav-toggle:hover { background: var(--bg-2); }
.nav-toggle .close-icon { display: none; }
.nav-logo {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo-mark {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex-shrink: 0;
}
.nav a.nav-link {
  font-size: 12.5px;
  color: var(--fg-2);
  opacity: .85;
  transition: opacity .15s var(--ease);
}
.nav a.nav-link:hover { opacity: 1; color: var(--fg); }
.nav-link.active { color: var(--fg); opacity: 1; }

/* Subnav (product pages) */
.subnav {
  position: sticky; top: var(--nav-h); z-index: 49;
  height: var(--subnav-h);
  background: color-mix(in oklab, var(--bg-1) 85%, transparent);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--line);
}
.subnav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.subnav-title { font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.subnav-links { display: flex; align-items: center; gap: 26px; }
.subnav-links a {
  font-size: 13px;
  color: var(--fg-2);
  position: relative;
  padding: 6px 0;
  transition: color .15s var(--ease);
}
.subnav-links a.active { color: var(--fg); }
.subnav-links a.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--fg);
}
.subnav-links a:hover { color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: transform .15s var(--ease), background .15s var(--ease), opacity .15s var(--ease);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent-btn); color: white; }
.btn-primary:hover { background: var(--accent-btn-hover); }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-text { padding: 0; background: none; color: var(--accent); }
.btn-text:hover { text-decoration: underline; }
.btn-sm { font-size: 12px; padding: 6px 12px; }

/* Layout utilities */
.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.section { padding: 120px 0; position: relative; }
.section-tight { padding: 80px 0; }
.eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 0;
  margin: 0 0 18px;
}
h1.display { font-size: clamp(44px, 7.2vw, 96px); margin: 0; }
h2.display { font-size: clamp(36px, 5.2vw, 68px); margin: 0; }
h3.display { font-size: clamp(22px, 2.2vw, 30px); margin: 0; }
p.lead { font-size: clamp(17px, 1.3vw, 19px); color: var(--fg-2); line-height: 1.45; max-width: 720px; }

/* Gradient text (like Apple's 'Fast runs in the family') */
.grad {
  background: linear-gradient(180deg, #F77E2D 0%, #7a3a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="light"] .grad {
  background: linear-gradient(180deg, #F77E2D 0%, #a24a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Card base */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { border-color: var(--line-2); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  color: var(--fg-3);
  font-size: 12px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: 'Inter Tight', sans-serif;
  color: var(--fg);
  font-size: 13px;
  margin: 0 0 14px;
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--fg); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.footer-bottom-links { display: flex; gap: 18px; }

/* Subtle starfield background used on hero */
.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 20%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 22% 72%, rgba(255,255,255,.25), transparent 60%),
    radial-gradient(1px 1px at 48% 32%, rgba(255,255,255,.30), transparent 60%),
    radial-gradient(1px 1px at 68% 55%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(1px 1px at 82% 18%, rgba(255,255,255,.30), transparent 60%),
    radial-gradient(1px 1px at 90% 78%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(1px 1px at 35% 88%, rgba(255,255,255,.25), transparent 60%);
}
:root[data-theme="light"] .starfield { opacity: 0.25; }

/* Badge chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--fg-2);
  font-family: 'Inter Tight', sans-serif;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(247,126,45,.5); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 280px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px;
  z-index: 100;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  font-size: 12px;
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h5 {
  margin: 0 0 12px;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-row { margin-bottom: 12px; }
.tweaks-row label {
  display: block; font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 6px;
}
.tweaks-swatches { display: flex; gap: 6px; }
.tweaks-swatch {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s;
}
.tweaks-swatch.active { border-color: var(--fg); }
.tweaks-swatch:hover { transform: scale(1.1); }
.tweaks-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
}
.tweaks-toggle-btn {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 10px; color: var(--fg);
  cursor: pointer; font-size: 11px; font-family: inherit;
}

/* Generic */
.divider { height: 1px; background: var(--line); border: 0; }
.muted { color: var(--fg-3); }

/* Fade in animation */
@keyframes fadeUp {
  from { opacity: 0.01; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { opacity: 1; }
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }
.fade-up.d3 { animation-delay: .24s; }
.fade-up.d4 { animation-delay: .32s; }

/* ================================
   RESPONSIVE — mobile / tablet / touch
   ================================ */

/* Any SVG should never force horizontal overflow */
svg { max-width: 100%; height: auto; }

/* Safe-area insets for iPhones with rounded corners / home indicator */
@supports (padding: max(0px)) {
  .container,
  .nav-inner,
  .subnav-inner {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Subnav: allow horizontal scroll on narrow viewports so 5+ links don't wrap */
.subnav-links {
  overflow-x: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-width: 0;
}
.subnav-links::-webkit-scrollbar { display: none; }

/* Mobile: <=720px — hamburger nav, compact everything */
@media (max-width: 720px) {
  .nav-inner { gap: 12px; padding: 0 18px; }
  .nav-toggle { display: inline-flex; }

  /* Collapse menu into an absolute drawer attached to the sticky nav */
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 22px 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,.4);
    transform: translateY(-120%);
    transition: transform .22s var(--ease);
    visibility: hidden;
  }
  html.nav-open .nav-menu {
    transform: translateY(0);
    visibility: visible;
  }
  html.nav-open .nav-toggle { background: var(--bg-2); }
  html.nav-open .nav-toggle .open-icon { display: none; }
  html.nav-open .nav-toggle .close-icon { display: block; }
  html.nav-open body { overflow: hidden; }

  .nav-menu .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    min-height: 44px;
    opacity: 1;
  }
  .nav-menu .nav-link:last-child { border-bottom: 0; }

  /* Subnav: title + scrollable links on one row */
  .subnav-inner { gap: 14px; padding: 0 18px; }
  .subnav-title { flex-shrink: 0; font-size: 15px; }
  .subnav-links { gap: 18px; flex: 1; }
  .subnav-links a {
    padding: 12px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Container padding */
  .container { padding: 0 18px; }

  /* Page-body buttons need a real tap target (44x44 min). */
  .btn:not(.btn-sm):not(.btn-text) {
    padding: 12px 18px;
    min-height: 44px;
  }
  /* Nav Book Call stays compact so the hamburger + logo still fit. */
  .nav-actions .btn-sm { padding: 8px 12px; font-size: 11.5px; }

  /* Footer: 5-col grid stacks into a readable layout on mobile.
     Logo/about goes full-width on top; the four link columns become 2x2. */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  .footer-bottom-links { flex-wrap: wrap; gap: 14px; }
}

/* Very small phones: stack footer link columns fully */
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid > div:first-child { grid-column: 1; }
}

/* prefers-reduced-motion — disable looping/decorative animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
