/* ═══════════════════════════════════════════════════════════════════════════
   HETH SOLUTIONS — MOBILE & RESPONSIVE OVERRIDES
   Loaded AFTER site.css. Touch-first refinements for ≤768px and ≤430px.
   Strategy: collapse multi-column grids, condense hero, hamburger nav,
   tighten type, ensure 44px tap targets.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── STICKY CALL ADRIAN BAR (mobile only) ────────────────────────────────── */
.call-adrian-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 998;
  background: rgba(14, 14, 16, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(240, 112, 32, 0.3);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 10px;
  align-items: stretch;
}
.call-adrian-bar a {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 8px;
  padding: 14px 12px;
  min-height: 48px;
  transition: background 0.2s, transform 0.15s;
}
.call-adrian-bar a.primary {
  background: var(--orange); color: white;
  flex: 1.4;
}
.call-adrian-bar a.primary:active { background: var(--amber); transform: scale(0.98); }
.call-adrian-bar a.secondary {
  background: transparent; color: var(--offwhite);
  border: 1px solid var(--border);
}
.call-adrian-bar a.secondary:active { border-color: var(--orange); background: rgba(240,112,32,0.08); }
.call-adrian-bar svg { flex-shrink: 0; }
.call-adrian-bar .label-small {
  font-family: var(--font-mono); font-size: 9px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.15em; display: block;
  font-weight: 500;
}
.call-adrian-bar .label-big {
  font-family: var(--font-disp); font-size: 18px;
  letter-spacing: 0.04em; line-height: 1;
  display: block;
}
.call-adrian-bar a.primary .label-text {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
}

@media (max-width: 768px) {
  .call-adrian-bar { display: flex; }
  /* Add bottom padding to body so content isn't hidden behind sticky bar */
  body { padding-bottom: 76px; }
  /* Hide bar when mobile nav overlay is open */
  body.mobile-nav-open .call-adrian-bar { display: none; }
}

/* ── FIRST-TOUCH MODE (3-field intake, mobile default) ──────────────────── */
/* Each form gets a wrapper with .first-touch class. When active:
   - All field-group hides except those marked .ft-keep
   - All intake-divider hides except first
   - Expand button shows */
.intake-form.first-touch .field-group:not(.ft-keep) { display: none; }
.intake-form.first-touch .intake-divider:not(.ft-keep) { display: none; }
.intake-form.first-touch .ft-expand-row { display: flex; }
.intake-form .ft-expand-row { display: none; }

.ft-expand-btn {
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  width: 100%;
  color: var(--lgray);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  margin: 8px 0 4px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ft-expand-btn:hover { border-color: var(--orange); color: var(--orange); background: rgba(240,112,32,0.04); }
.ft-expand-btn .plus { color: var(--orange); margin-right: 6px; font-weight: 700; }

.ft-mode-banner {
  background: rgba(240, 112, 32, 0.06);
  border: 1px solid rgba(240, 112, 32, 0.2);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--lgray);
  line-height: 1.5;
  margin-bottom: 18px;
  display: none;
}
.intake-form.first-touch .ft-mode-banner { display: block; }
.ft-mode-banner strong { color: var(--amber); }

/* On mobile: forms default to first-touch mode */
@media (max-width: 768px) {
  .intake-form.ft-mobile-default { /* JS will add .first-touch */ }
}

/* ── HAMBURGER BUTTON (always in DOM, hidden on desktop) ─────────────────── */
.nav-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  cursor: none; padding: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.nav-hamburger:hover { border-color: var(--orange); background: rgba(240,112,32,0.06); }
.nav-hamburger-bars {
  width: 20px; height: 14px;
  position: relative;
}
.nav-hamburger-bars span {
  display: block; position: absolute;
  left: 0; right: 0; height: 2px;
  background: var(--offwhite);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), opacity 0.2s;
}
.nav-hamburger-bars span:nth-child(1) { top: 0; }
.nav-hamburger-bars span:nth-child(2) { top: 6px; }
.nav-hamburger-bars span:nth-child(3) { top: 12px; }

/* Open state — X icon */
.nav-hamburger.open .nav-hamburger-bars span:nth-child(1) {
  top: 6px; transform: rotate(45deg); background: var(--orange);
}
.nav-hamburger.open .nav-hamburger-bars span:nth-child(2) { opacity: 0; }
.nav-hamburger.open .nav-hamburger-bars span:nth-child(3) {
  top: 6px; transform: rotate(-45deg); background: var(--orange);
}

/* ── MOBILE NAV OVERLAY ──────────────────────────────────────────────────── */
.mobile-nav-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: rgba(14, 14, 16, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  display: flex; flex-direction: column;
  padding: 32px 28px 40px;
  overflow-y: auto;
}
.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-overlay .mobile-nav-section-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--mgray); letter-spacing: 0.2em; text-transform: uppercase;
  margin: 24px 0 12px;
}
.mobile-nav-overlay .mobile-nav-section-label:first-child { margin-top: 8px; }
.mobile-nav-overlay a {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--offwhite); text-decoration: none;
  font-family: var(--font-disp); font-size: 28px;
  letter-spacing: 0.04em;
  padding: 14px 0;
  border-bottom: 1px solid rgba(58, 58, 60, 0.4);
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-nav-overlay a:hover,
.mobile-nav-overlay a:active { color: var(--orange); padding-left: 8px; }
.mobile-nav-overlay a.active { color: var(--orange); }
.mobile-nav-overlay a .arrow {
  font-size: 16px; color: var(--mgray);
  transition: color 0.2s, transform 0.2s;
}
.mobile-nav-overlay a:hover .arrow,
.mobile-nav-overlay a:active .arrow { color: var(--orange); transform: translateX(4px); }
.mobile-nav-overlay .mobile-nav-cta {
  margin-top: 24px;
  background: var(--orange); color: white;
  padding: 18px 24px;
  border-radius: 6px;
  border: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.2s;
}
.mobile-nav-overlay .mobile-nav-cta:hover { background: var(--amber); padding-left: 24px; }
.mobile-nav-overlay .mobile-nav-cta .arrow { color: rgba(255,255,255,0.7); }
.mobile-nav-overlay .mobile-nav-footer {
  margin-top: auto; padding-top: 32px;
  display: flex; flex-direction: column; gap: 8px;
}
.mobile-nav-overlay .mobile-nav-footer a {
  font-family: var(--font-body); font-size: 14px;
  border: none; padding: 6px 0; color: var(--lgray);
}
.mobile-nav-overlay .mobile-nav-phone {
  font-family: var(--font-disp); font-size: 22px;
  color: var(--orange) !important; letter-spacing: 0.04em;
}

/* Lock body scroll when nav open */
body.mobile-nav-open { overflow: hidden; }

/* ── TAP RIPPLE (touch only) ─────────────────────────────────────────────── */
@keyframes tap-ripple {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.tap-ripple {
  position: fixed;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,112,32,0.45) 0%, rgba(240,112,32,0) 70%);
  pointer-events: none;
  z-index: 10000;
  animation: tap-ripple 0.6s var(--ease) forwards;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ≤ 768px — TABLET / LARGE PHONE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── NAV ─────────────────────────────────────────────────────────────── */
  nav { padding: 0 20px; height: 64px; }
  :root { --nav-h: 64px; }
  .nav-logo-mark { width: 32px; height: 32px; }
  .hsi-logo img { height: 36px; max-width: 60vw; }
  .nav-logo-text { display: none; }
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex; }

  /* ── BODY / CURSOR ───────────────────────────────────────────────────── */
  body { font-size: 15px; cursor: auto; }
  .cursor, .cursor-ring { display: none !important; }

  /* ── SECTION SPACING ─────────────────────────────────────────────────── */
  .section-inner { padding: 64px 20px; }
  .section-label { font-size: 10px; margin-bottom: 12px; }
  .section-label::after { max-width: 40px; }
  .section-title {
    font-size: clamp(36px, 9vw, 52px);
    margin-bottom: 16px;
  }
  .section-sub {
    font-size: 15px; line-height: 1.6;
    margin-bottom: 40px;
  }

  /* ── PAGE HERO ───────────────────────────────────────────────────────── */
  .page-hero { min-height: auto; padding-top: var(--nav-h); }
  .page-hero-inner {
    grid-template-columns: 1fr !important;
    gap: 40px;
    padding: 48px 20px 56px;
  }
  .page-title {
    font-size: clamp(48px, 12vw, 72px);
    margin-bottom: 18px;
    line-height: 0.95;
  }
  .page-desc {
    font-size: 16px; line-height: 1.6;
    max-width: 100%;
    margin-bottom: 28px;
  }
  .page-tag { font-size: 10px; padding: 5px 10px; margin-bottom: 18px; }
  .breadcrumb { font-size: 10px; margin-bottom: 16px; }
  .response-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    width: fit-content;
    max-width: 100%;
  }
  .response-badge-divider { display: none; }
  .response-badge-label { font-size: 9px; }
  .response-badge-value { font-size: 18px; }
  .hero-giant-text {
    font-size: 180px;
    right: -40px; bottom: -20px;
    opacity: 0.8;
  }

  /* ── BUTTONS ─────────────────────────────────────────────────────────── */
  .btn-primary {
    padding: 14px 24px; font-size: 13px;
    width: 100%; justify-content: center;
    min-height: 48px;
  }
  .btn-ghost {
    padding: 12px 22px; font-size: 12px;
    width: 100%; justify-content: center;
    min-height: 48px;
  }
  .btn-secondary { padding: 12px 0; font-size: 13px; min-height: 44px; }
  /* When buttons are siblings, stack with gap */
  .btn-row,
  .hero-cta-row {
    display: flex; flex-direction: column; gap: 12px;
    width: 100%;
  }

  /* ── INTAKE FORMS ────────────────────────────────────────────────────── */
  .intake-form { border-radius: 12px; }
  .intake-header {
    padding: 18px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .intake-header-icon { width: 40px; height: 40px; font-size: 18px; }
  .intake-header-title { font-size: 20px; }
  .intake-header-sub { font-size: 12px; }
  .intake-status { font-size: 10px; }
  .intake-body { padding: 20px; }

  .intake-notice {
    padding: 12px 14px;
    font-size: 12px;
    margin-bottom: 20px;
  }

  /* Single-column stack — full-width fields */
  .intake-grid,
  .intake-grid.cols-2,
  .intake-grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 14px;
    margin-bottom: 14px;
  }
  .intake-grid .field-group,
  .intake-grid .field-group.span-2,
  .intake-grid .field-group.span-3 {
    grid-column: span 1 !important;
  }
  .field-label { font-size: 9px; letter-spacing: 0.15em; }
  .field-input,
  .field-select,
  .field-textarea {
    padding: 14px 14px;
    font-size: 16px;       /* prevents iOS zoom-on-focus */
    min-height: 48px;
    border-radius: 8px;
  }
  .field-textarea { min-height: 96px; }
  .field-help { font-size: 11px; }

  /* Section dividers between groups */
  .intake-divider { margin: 20px 0 16px; gap: 12px; }
  .intake-divider-text { font-size: 9px; }

  .intake-submit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 20px;
  }
  .intake-submit-note { font-size: 12px; line-height: 1.5; }
  .intake-submit {
    width: 100%; justify-content: center;
    padding: 16px 24px; min-height: 52px;
    border-radius: 8px;
  }

  /* Disabled overlay banner (LTL) */
  .intake-disabled-banner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 20px;
    margin: -8px 20px 20px;
  }
  .intake-disabled-icon { width: 40px; height: 40px; font-size: 18px; }
  .intake-disabled-title { font-size: 16px; }
  .intake-waitlist {
    flex-direction: column;
    width: 100%;
  }
  .intake-waitlist input {
    min-width: 0; width: 100%;
    padding: 14px 14px; font-size: 16px;
    min-height: 48px;
  }
  .intake-waitlist button {
    width: 100%; padding: 14px 20px;
    min-height: 48px;
  }

  /* Confirmation */
  .intake-success { padding: 32px 20px; }
  .intake-success-icon { width: 56px; height: 56px; font-size: 28px; }
  .intake-success-title { font-size: 22px; }
  .intake-success-text { font-size: 14px; }

  /* ── QUOTE RESULT WIDGET ─────────────────────────────────────────────── */
  .quote-result-header { padding: 16px 20px; }
  .quote-result-body {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 20px;
  }
  .quote-result-value { font-size: 22px; }
  .quote-result-value.price { font-size: 28px; }

  /* ── HERO PANEL ──────────────────────────────────────────────────────── */
  .hero-panel-header { padding: 16px 20px; }
  .hero-panel-title { font-size: 10px; }

  /* ── MARQUEE ─────────────────────────────────────────────────────────── */
  .marquee-section { padding: 14px 0; }
  .marquee-track { gap: 36px; animation-duration: 30s; }
  .marquee-item { font-size: 10px; }

  /* ── FOOTER ──────────────────────────────────────────────────────────── */
  footer { padding: 40px 20px 24px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
  }
  .footer-brand { gap: 12px; }
  .footer-tagline { font-size: 13px; max-width: 100%; }
  .footer-col-title { font-size: 10px; margin-bottom: 12px; }
  .footer-links { gap: 8px; }
  .footer-links a { font-size: 14px; padding: 4px 0; min-height: 32px; display: inline-flex; align-items: center; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 20px;
    font-size: 11px;
  }

  /* ── RESPONSIVE COPY (show/hide based on width) ──────────────────────── */
  .mobile-only  { display: inline !important; }
  .desktop-only { display: none !important; }
  .mobile-block { display: block !important; }

  /* Generic 2-col / 3-col grids that pages may define inline */
  .grid-2col,
  .grid-3col,
  .feature-grid,
  .stats-grid,
  .step-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

/* Default: hide mobile-only spans, show desktop-only spans */
.mobile-only { display: none; }
.desktop-only { display: inline; }
.mobile-block { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   ≤ 430px — STANDARD PHONE (iPhone Pro size and below)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 430px) {

  body { font-size: 14px; }

  /* Tighter padding everywhere */
  nav { padding: 0 16px; }
  .section-inner { padding: 52px 16px; }
  .page-hero-inner { padding: 36px 16px 48px; }

  /* Slightly smaller display type */
  .page-title { font-size: clamp(40px, 11vw, 56px); }
  .section-title { font-size: clamp(32px, 9vw, 44px); }
  .section-sub { font-size: 14px; margin-bottom: 32px; }
  .page-desc { font-size: 15px; margin-bottom: 24px; }

  /* Hero giant text — even more reduced */
  .hero-giant-text {
    font-size: 120px;
    right: -20px; bottom: -10px;
  }

  /* Intake form — even less padding */
  .intake-body { padding: 16px; }
  .intake-header { padding: 16px; }
  .intake-header-title { font-size: 18px; }
  .intake-disabled-banner { margin: -8px 16px 16px; padding: 16px; }

  /* Footer */
  footer { padding: 36px 16px 20px; }

  /* Mobile nav overlay — slightly tighter */
  .mobile-nav-overlay { padding: 24px 20px 32px; }
  .mobile-nav-overlay a { font-size: 24px; padding: 12px 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ≤ 360px — SMALL PHONE EDGE CASE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .page-title { font-size: clamp(36px, 11vw, 44px); }
  .section-title { font-size: clamp(28px, 9vw, 36px); }
  .nav-logo-mark { width: 28px; height: 28px; }
  .response-badge { padding: 10px 14px; }
  .response-badge-value { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOUCH-DEVICE GLOBAL (any pointer: coarse)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  /* Disable hover-lift transforms — they're awkward on touch */
  .btn-primary:hover,
  .intake-submit:hover,
  .intake-waitlist button:hover { transform: none; }
  /* Ensure all interactive cursor: none rules don't break */
  a, button, input, select, textarea { cursor: default; }
  .btn-primary, .btn-ghost, .btn-secondary,
  .intake-submit, .intake-waitlist button, .nav-hamburger,
  .field-select { cursor: pointer !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDSCAPE PHONE — keep nav functional, reduce hero
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .page-hero { min-height: auto; }
  .page-hero-inner { padding: 32px 20px; }
  .page-title { font-size: clamp(40px, 7vw, 56px); }
  .mobile-nav-overlay { padding: 20px; }
  .mobile-nav-overlay a { font-size: 20px; padding: 10px 0; }
}
