/* ================================================================
   mobile-fixes.css  — Alozix Website Mobile Enhancements
   Load AFTER styleV2.css, service-page.css, homepage-overrides.css
   Targets: phones (< 480px), small tablets (480–767px), tablets (768–900px)
   ================================================================ */

/* ── 1. GLOBAL ───────────────────────────────────────────────────── */
* {
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
}

section,
nav,
footer {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ── 2. NAV ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  nav {
    padding: 0 20px;
    height: 62px;
  }

  .nav-links {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .language-toggle {
    display: none;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 0 16px;
    height: 56px;
  }

  .nav-logo-img {
    height: 44px !important;
    max-height: 44px !important;
  }
}

/* ── 3. HERO ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    padding: 100px 24px 60px;
    min-height: unset;
    text-align: center;
  }

  .hero-inner {
    max-width: 100%;
    align-items: center;
  }

  .hero-visual {
    display: none;
  }

  .hero-h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {

  /* ─ Hero container: tighter top/bottom, centred column ─ */
  #hero {
    padding: 80px 20px 44px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: auto;
    position: relative;
    overflow: hidden;
  }

  /* Cinematic layered glow — replaces the single flat blob */
  #hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(ellipse at 70% 30%,
      rgba(212,175,55,0.13) 0%,
      rgba(212,175,55,0.04) 45%,
      transparent 70%);
    pointer-events: none;
    filter: blur(32px);
    z-index: 0;
  }

  /* Second ambient orb — bottom-left */
  .hero-glow-1 {
    width: 240px;
    height: 240px;
    top: -80px;
    right: -80px;
    opacity: 0.5;
    filter: blur(80px);
  }

  .hero-glow-2 {
    width: 180px;
    height: 180px;
    bottom: -20px;
    left: -50px;
    opacity: 0.4;
    filter: blur(70px);
  }

  /* Stack inner: badge → h1 → sub → actions → (phone) → stats */
  .hero-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
  }

  /* Badge: small, centered, less margin */
  .hero-badge {
    font-size: 0.7rem;
    padding: 5px 12px;
    margin-bottom: 18px;
    gap: 6px;
    letter-spacing: 0.2px;
  }

  /*
   * Headline — each <br/> line must fit on ONE visual line.
   * "We engineer systems"         ≈ 19 chars
   * "Built to run your business." ≈ 28 chars  ← longest
   * "Not just support it."        ≈ 20 chars
   * At 380px viewport with 20px side padding = 340px usable.
   * font-size: clamp(1.55rem, 6.8vw, 1.9rem) keeps all 3 lines
   * on a single line from 360px up to 480px.
   */
  .hero-h1 {
    font-size: clamp(1.55rem, 6.8vw, 1.9rem);
    line-height: 1.22;
    letter-spacing: -0.4px;
    margin-bottom: 14px;
    max-width: 100%;
  }

  /* Paragraph: tighter and readable */
  .hero-sub {
    font-size: 0.875rem;
    line-height: 1.62;
    max-width: 310px;
    margin-bottom: 22px;
    color: var(--text-muted);
  }

  /* CTA stack */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
  }

  /* Primary: slightly less padding, softer glow */
  .hero-actions .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 13px 24px;
    font-size: 0.92rem;
    box-shadow: 0 0 18px rgba(212,175,55,0.18), 0 4px 14px rgba(0,0,0,0.35);
  }

  /* Ghost: slim text-link style, not another big pill */
  .hero-actions .btn-ghost {
    width: auto;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .hero-actions .btn-ghost:hover {
    background: transparent;
    border-color: transparent;
    color: var(--blue);
  }

  /* Stats: compact horizontal row, placed below phone via order */
  .hero-stats {
    order: 10;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(212,175,55,0.1);
    width: 100%;
    max-width: 320px;
  }

  .hero-stats > div {
    flex: 1;
    text-align: center;
    padding: 0 6px;
  }

  .hero-stats > div + div {
    border-left: 1px solid rgba(212,175,55,0.11);
  }

  .stat-num {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #D4AF37 0%, #F5E6A3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .stat-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
  }
}

/* ── 4. HERO PHONE VISUAL (mobile-only mockup) ───────────────────── */
.hero-phone-visual {
  display: none;
}

@media (max-width: 767px) {
  .hero-visual {
    display: none !important;
  }

  .hero-phone-visual {
    display: flex;
    justify-content: center;
    margin-top: 36px;
    width: 100%;
  }
}

.hpv-phone {
  width: 200px;
  background: linear-gradient(160deg, #111827, #0a0f1e);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: 28px;
  padding: 8px 8px 6px;
  box-shadow:
    0 0 40px rgba(212, 175, 55, 0.08),
    0 0 80px rgba(212, 175, 55, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: hpv-breathe 4s ease-in-out infinite;
}

@keyframes hpv-breathe {
  0%, 100% {
    box-shadow:
      0 0 40px rgba(212,175,55,0.08),
      0 0 80px rgba(212,175,55,0.04),
      inset 0 1px 0 rgba(255,255,255,0.05);
  }
  50% {
    box-shadow:
      0 0 60px rgba(212,175,55,0.14),
      0 0 100px rgba(212,175,55,0.07),
      inset 0 1px 0 rgba(255,255,255,0.07);
  }
}

.hpv-notch {
  width: 60px;
  height: 7px;
  background: #000;
  border-radius: 20px;
  margin: 0 auto 8px;
}

.hpv-screen {
  background: linear-gradient(180deg, #0d1220 0%, #080d18 100%);
  border-radius: 20px;
  padding: 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.hpv-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hpv-screen-brand {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hpv-screen-ping {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  color: var(--green);
}

.hpv-ping-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: hpv-ping 1.5s ease-in-out infinite;
}

@keyframes hpv-ping {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.hpv-metrics {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px 6px;
  margin-bottom: 6px;
}

.hpv-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.hpv-metric-icon {
  font-size: 0.65rem;
  opacity: 0.7;
}

.hpv-metric-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.hpv-metric-lbl {
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Workflow pipeline */
.hpv-workflow {
  margin-bottom: 6px;
}

.hpv-wf-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 5px;
}

.hpv-wf-body {
  display: flex;
  gap: 6px;
}

.hpv-wf-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.hpv-wf-track-line {
  width: 2px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(212,175,55,0.4), rgba(212,175,55,0.15));
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.hpv-track-pulse {
  position: absolute;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  animation: hpv-track-flow 2s linear infinite;
}

.hpv-track-pulse--1 {
  background: var(--blue);
  animation-delay: 0s;
}

.hpv-track-pulse--2 {
  background: var(--purple);
  animation-delay: 1s;
}

@keyframes hpv-track-flow {
  0%   { top: -12px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.hpv-wf-nodes {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hpv-flow-node {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 4px 7px;
  animation: hpv-node-glow 3s ease-in-out infinite;
}

.hpv-node--1 { animation-delay: 0s; }
.hpv-node--2 { animation-delay: 0.75s; }
.hpv-node--3 { animation-delay: 1.5s; }
.hpv-node--4 { animation-delay: 2.25s; }

@keyframes hpv-node-glow {
  0%, 100% {
    border-color: rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
  }
  50% {
    border-color: rgba(212,175,55,0.25);
    background: rgba(212,175,55,0.06);
  }
}

.hpv-node-ring {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hpv-node-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.hpv-node-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hpv-node-title {
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.hpv-node-sub {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Live feed */
.hpv-feed {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 4px 7px;
  margin-bottom: 4px;
}

.hpv-feed-header {
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 5px;
}

.hpv-feed-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 2px 0;
  opacity: 0;
  animation: hpv-feed-in 0.5s ease forwards;
}

.hpv-feed--1 { animation-delay: 0.5s; }
.hpv-feed--2 { animation-delay: 1.2s; }
.hpv-feed--3 { animation-delay: 2s; }

@keyframes hpv-feed-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hpv-feed-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hpv-fdot--gold  { background: var(--blue); }
.hpv-fdot--green { background: var(--green); }

/* Status bar */
.hpv-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.55rem;
  color: var(--green);
}

.hpv-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: hpv-ping 1.5s ease-in-out infinite;
}

.hpv-home-bar {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  margin: 8px auto 0;
}

/* ── 5. FIT GRID ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .fit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .fit-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ── 6. SERVICES GRID ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 7. SVC EXPLORE CARDS ────────────────────────────────────────── */
@media (max-width: 900px) {
  .svc-explore-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 8. PROJECT TABS ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ps-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .ps-tabs::-webkit-scrollbar {
    display: none;
  }

  .ps-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ── 9. AI LAB / CHAT MOCKUP ─────────────────────────────────────── */
@media (max-width: 900px) {
  .ailab-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .chat-mockup {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 10. CASE STUDY / ERP MOCK ───────────────────────────────────── */
@media (max-width: 900px) {
  .case-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mock-slider {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 11. PS-BROWSER (Website tab) ────────────────────────────────── */
@media (max-width: 900px) {
  .ps-web-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ps-browser-viewport {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .ps-browser-viewport {
    height: 220px;
  }
}

/* ── 12. CASE STUDY FEATURED GRID ────────────────────────────────── */
@media (max-width: 900px) {
  .cs-featured-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 13. WHY GRID ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 14. TESTIMONIALS ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── 15. FUNNEL / LEAD FORM ──────────────────────────────────────── */
@media (max-width: 600px) {
  .funnel-wrap {
    padding: 0 4px;
  }

  .funnel-panel {
    padding: 24px 18px;
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .choice-btn {
    padding: 14px 10px;
    font-size: 0.82rem;
  }

  .funnel-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .funnel-actions .btn-next,
  .funnel-actions .btn-submit {
    width: 100%;
    justify-content: center;
  }

  .funnel-actions .btn-back {
    width: 100%;
    justify-content: center;
  }

  .funnel-steps {
    gap: 0;
  }

  .step-indicator {
    width: 90px;
  }
}

/* ── 16. FORM INPUTS — prevent iOS zoom ─────────────────────────── */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ── 17. MODAL ───────────────────────────────────────────────────── */
.modal-box {
  width: 100%;
  max-width: 520px;
  margin: 20px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 480px) {
  .modal-box {
    padding: 28px 20px !important;
    margin: 12px;
    max-height: 95vh;
    border-radius: 16px !important;
  }

  .modal-box h2 {
    font-size: 1.15rem !important;
  }
}

/* ── 18. FLOATING CHAT WIDGET ────────────────────────────────────── */
@media (max-width: 480px) {
  #chat-window {
    width: calc(100vw - 24px);
    right: 12px;
    left: 12px;
    bottom: 76px;
    max-height: 75vh;
    border-radius: 18px;
  }

  #chat-fab {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}

/* Safe area support for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #chat-fab {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  #chat-window {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

/* ── 19. FOOTER ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  footer {
    padding: 40px 20px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }
}

/* ── 20. CLIENTS SLIDER ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .clients-label {
    padding: 0 16px;
    font-size: 0.65rem;
    letter-spacing: 2px;
  }
}

/* ── 21. PS-WEB-FEATURES ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .ps-web-features {
    gap: 10px;
  }

  .ps-web-feature {
    padding: 14px;
  }

  .ps-web-desc {
    font-size: 0.88rem;
  }
}

/* ── 22. MINIMUM TOUCH TARGETS (WCAG 2.5.5) ─────────────────────── */
@media (max-width: 900px) {
  button,
  .btn-primary,
  .btn-ghost,
  .btn-back,
  .nav-cta,
  .choice-btn {
    min-height: 44px;
  }

  h1, h2, h3 {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .service-title,
  .why-title,
  .cs-feat-title {
    line-height: 1.3;
  }
}

/* ── 23. SMOOTH SCROLL OFFSET (fixed nav compensation) ──────────── */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 80px;
  }
}

@media (max-width: 480px) {
  html {
    scroll-padding-top: 68px;
  }
}

/* ── 24. MOBILE HERO PARAGRAPH SWAP ─────────────────────────────────
   The full paragraph is hidden visually on mobile; a shorter version
   is injected via ::after so the original text and its data-i18n
   attribute stay in the DOM untouched for SEO and the i18n JS system.
   Desktop (>=481px) is completely unaffected.
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {

  /* Hide the original long span — SEO crawler still reads it */
  .hero-sub > span[data-i18n="hero_subtitle"] {
    display: none;
  }

  /* Inject the shorter mobile copy via pseudo-element */
  .hero-sub::after {
    content: "Custom websites, AI systems, and business automation built to scale operations.";
    display: block;
    font-size: 0.875rem;
    line-height: 1.62;
    color: var(--text-muted);
    font-family: var(--font);
    font-weight: 400;
  }
}

/* ════════════════════════════════════════════════════════════════════
   25. PHONE-ABOVE-TEXT HERO LAYOUT — max-width: 480px ONLY
   ════════════════════════════════════════════════════════════════════
   DOM order inside #hero:
     1. .hero-inner        (badge, h1, sub, actions, stats)
     2. .hero-visual       (hidden at <=767px)
     3. .hero-phone-visual

   We reorder visually with flex `order`:
     .hero-phone-visual  →  order: -1  →  renders FIRST (top)
     .hero-inner         →  order:  0  →  renders SECOND (below phone)

   Inside .hero-inner, .hero-stats already has order: 10 from
   section 3, keeping stats pinned to the bottom of the text block.

   Desktop (>=481px): completely untouched.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  /* Outer column: tighter padding now that phone leads */
  #hero {
    padding: 72px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* ── Phone wrapper: pulled to top via order: -1 ── */
  .hero-phone-visual {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 0;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
    /* Crop bottom ~35% for floating product-preview feel */
    max-height: 210px;
    overflow: hidden;
  }

  /* Glow layer 1: tight warm core behind phone */
  .hero-phone-visual::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 150px;
    background: radial-gradient(ellipse at center,
      rgba(212,175,55,0.22) 0%,
      rgba(212,175,55,0.07) 45%,
      transparent 70%);
    pointer-events: none;
    filter: blur(20px);
    z-index: 0;
    border-radius: 50%;
  }

  /* Glow layer 2: wide soft outer halo */
  .hero-phone-visual::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 200px;
    background: radial-gradient(ellipse at center,
      rgba(245,230,163,0.07) 0%,
      transparent 65%);
    pointer-events: none;
    filter: blur(30px);
    z-index: 0;
    border-radius: 50%;
  }

  /* ── Phone shell: ~66% of the 224px full-size (≈ 148px) ── */
  .hpv-phone {
    width: 148px !important;
    background: linear-gradient(165deg, #12192a 0%, #090e1a 55%, #060a12 100%);
    border: 1.5px solid rgba(212,175,55,0.35);
    border-radius: 26px;
    padding: 8px 8px 6px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    box-shadow:
      0 0 0 1px rgba(212,175,55,0.08),
      0 0 24px rgba(212,175,55,0.20),
      0 0 56px rgba(212,175,55,0.09),
      0 16px 40px rgba(0,0,0,0.70),
      inset 0 1px 0 rgba(255,255,255,0.08),
      inset 0 -1px 0 rgba(212,175,55,0.08);
    animation: hpv-breathe-preview 4s ease-in-out infinite;
  }

  @keyframes hpv-breathe-preview {
    0%, 100% {
      box-shadow:
        0 0 0 1px rgba(212,175,55,0.08),
        0 0 24px rgba(212,175,55,0.20),
        0 0 56px rgba(212,175,55,0.09),
        0 16px 40px rgba(0,0,0,0.70),
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(212,175,55,0.08);
      border-color: rgba(212,175,55,0.32);
    }
    50% {
      box-shadow:
        0 0 0 1px rgba(212,175,55,0.14),
        0 0 38px rgba(212,175,55,0.30),
        0 0 76px rgba(212,175,55,0.13),
        0 16px 40px rgba(0,0,0,0.70),
        inset 0 1px 0 rgba(255,255,255,0.10),
        inset 0 -1px 0 rgba(212,175,55,0.12);
      border-color: rgba(212,175,55,0.54);
    }
  }

  /* Scale all internal phone UI elements proportionally */
  .hpv-notch {
    width: 40px;
    height: 5px;
    margin: 0 auto 5px;
  }

  .hpv-screen {
    border-radius: 18px;
    padding: 6px;
  }

  .hpv-screen-header {
    margin-bottom: 5px;
  }

  .hpv-screen-brand {
    font-size: 0.50rem;
    font-weight: 900;
    letter-spacing: 1.2px;
    background: linear-gradient(90deg, #D4AF37, #F5E6A3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
  }

  .hpv-screen-ping {
    font-size: 0.46rem;
  }

  .hpv-ping-dot {
    width: 4px;
    height: 4px;
    box-shadow: 0 0 3px var(--green);
  }

  .hpv-metrics {
    background: rgba(212,175,55,0.04);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: 8px;
    padding: 3px 4px;
    margin-bottom: 4px;
  }

  .hpv-metric-icon {
    font-size: 0.52rem;
  }

  .hpv-metric-val {
    font-size: 0.70rem;
  }

  .hpv-metric-lbl {
    font-size: 0.42rem;
  }

  .hpv-workflow {
    margin-bottom: 4px;
  }

  .hpv-wf-label {
    font-size: 0.44rem;
    margin-bottom: 3px;
  }

  .hpv-wf-body {
    gap: 4px;
  }

  .hpv-wf-track-line {
    height: 36px;
  }

  .hpv-wf-nodes {
    gap: 2px;
  }

  .hpv-flow-node {
    padding: 3px 5px;
    gap: 4px;
    border-radius: 5px;
  }

  .hpv-node-ring {
    width: 11px;
    height: 11px;
    border-color: rgba(212,175,55,0.50);
    box-shadow: 0 0 4px rgba(212,175,55,0.18);
  }

  .hpv-node-dot {
    width: 4px;
    height: 4px;
  }

  .hpv-node-title {
    font-size: 0.46rem;
  }

  .hpv-node-sub {
    font-size: 0.40rem;
    color: rgba(212,175,55,0.48);
  }

  .hpv-feed {
    border-color: rgba(212,175,55,0.07);
    border-radius: 6px;
    padding: 3px 5px;
    margin-bottom: 3px;
  }

  .hpv-feed-header {
    font-size: 0.40rem;
    margin-bottom: 3px;
  }

  .hpv-feed-row {
    font-size: 0.44rem;
  }

  .hpv-feed-dot {
    width: 4px;
    height: 4px;
  }

  .hpv-status {
    font-size: 0.44rem;
  }

  .hpv-status-dot {
    width: 5px;
    height: 5px;
    box-shadow: 0 0 4px var(--green);
  }

  .hpv-home-bar {
    width: 38px;
    height: 3px;
    margin: 5px auto 0;
  }

  /* ── .hero-inner: sits below the phone ── */
  .hero-inner {
    order: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
  }

  /* Badge sits directly below phone — tighter top margin */
  .hero-badge {
    margin-bottom: 14px;
  }

  /* Stats: already order:10 from section 3, just tighten spacing */
  .hero-stats {
    margin-top: 18px;
  }
}

/* ── Narrow phones (<=380px) adjustments for phone-above layout ── */
@media (max-width: 380px) {
  #hero {
    padding: 68px 16px 36px;
  }

  .hero-phone-visual {
    max-height: 180px;
    margin-bottom: 18px;
  }

  .hpv-phone {
    width: 130px !important;
  }

  .hero-h1 {
    font-size: clamp(1.45rem, 7vw, 1.75rem);
  }

  .hero-sub {
    font-size: 0.84rem;
    max-width: 280px;
  }

  .hero-actions {
    max-width: 274px;
  }

  .hero-stats {
    max-width: 280px;
  }

  .stat-num {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.58rem;
  }
}