/* =================================================================
   MOBILE-FIRST REFINEMENTS — Protocolo Extralock
   Layered ON TOP of styles.css. Loaded after, with higher specificity.
   Targets ≤ 768px. Desktop unaffected.
   ================================================================= */

@media (max-width: 768px) {

  /* ─── Base rhythm ───────────────────────────────────── */
  :root {
    --m-pad-x: 22px;
    --m-section-y: 96px;
  }
  .wrap { padding: 0 var(--m-pad-x); }

  body {
    font-size: 15px;
    line-height: 1.55;
  }

  .section { padding: var(--m-section-y) 0; }
  .section-tight { padding: 72px 0; }

  /* Reveal — slightly punchier on mobile */
  .reveal { transform: translateY(20px); transition-duration: 0.7s; }

  /* ─── Nav ───────────────────────────────────────────── */
  .nav { padding: 14px 0; }
  .nav-links { display: none; }
  .brand { font-size: 14.5px; }
  .brand-mark { width: 20px; height: 20px; }
  .nav .btn-primary {
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 12.5px !important;
    letter-spacing: -0.01em;
  }

  /* ─── Hero — premium mobile composition ─────────────── */
  .hero { padding: 110px 0 64px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: left;
  }
  .hero-glow {
    width: 700px; height: 700px;
    top: -260px;
    filter: blur(60px);
  }
  .hero-grid-bg {
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 100% 70% at 50% 25%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 25%, #000 30%, transparent 80%);
  }
  /* Wider mask so Three.js dots are visible across the mobile hero */
  .dotted-surface {
    mask-image: radial-gradient(ellipse 115% 90% at 50% 38%, #000 5%, transparent 65%);
    -webkit-mask-image: radial-gradient(ellipse 115% 90% at 50% 38%, #000 5%, transparent 65%);
  }

  /* Phone first on mobile, with breathing room */
  .hero-phone-wrap {
    order: -1;
    margin-bottom: 8px;
  }
  .hero-phone-wrap .phone {
    transform: rotate(-1.5deg) scale(1);
    margin: 0 auto;
  }
  .hero-phone-bg {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(29,158,117,0.38), transparent 62%);
    filter: blur(70px);
  }

  .hero-tag {
    margin-bottom: 24px;
    font-size: 11.5px;
    padding: 6px 12px 6px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* Headline — tighter, bigger feel on phones */
  .hero h1.h-display {
    font-size: clamp(40px, 11.5vw, 56px) !important;
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: balance;
  }
  .hero-sub {
    margin-top: 22px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--fg-dim);
    max-width: 100%;
  }

  .hero-ctas {
    margin-top: 32px;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
    height: 54px;
    font-size: 15px;
  }
  .hero-ctas .btn-ghost { background: rgba(255,255,255,0.02); }

  .hero-meta {
    margin-top: 36px;
    padding-top: 20px;
    gap: 20px 28px;
  }
  .hero-meta-item .k { font-size: 10px; }
  .hero-meta-item .v { font-size: 13px; }

  /* ─── Phone mockup — more refined for mobile ────────── */
  .phone {
    --pw: 288px;
    --ph: 618px;
    border-radius: 48px;
    padding: 10px;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.11),
      0 0 0 2px rgba(0,0,0,0.65),
      0 32px 70px -18px rgba(0,0,0,0.9),
      0 0 80px -8px var(--emerald-glow),
      inset 0 0 0 1px rgba(255,255,255,0.05);
  }
  .phone-screen { border-radius: 40px; }
  .phone-island {
    top: 10px;
    width: 96px;
    height: 28px;
    border-radius: 18px;
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.06);
  }
  .phone-status {
    height: 50px;
    padding: 16px 22px 0;
    font-size: 13.5px;
  }
  .phone-content { inset: 50px 0 0 0; }

  /* ─── iMessage hero screen — more authentic ─────────── */
  .imsg-screen { padding: 0 12px; }
  .imsg-header { padding: 10px 0 14px; }
  .imsg-header .avatar {
    width: 42px; height: 42px;
    background: linear-gradient(145deg, #1e3d2e 0%, #0e2219 100%);
    border: 0.5px solid rgba(29,158,117,0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 0 14px -4px rgba(29,158,117,0.35);
    position: relative;
  }
  .imsg-header .avatar::after {
    content: 'R';
    position: absolute;
    inset: 0;
    display: grid; place-items: center;
    color: rgba(255,255,255,0.72);
    font-family: 'Inter Tight', sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .imsg-header .name {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: -0.01em;
    margin-top: 2px;
  }
  .imsg-header .name::after {
    content: ' ›';
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    letter-spacing: 0;
  }
  .imsg-time {
    font-size: 9.5px;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255,255,255,0.38);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin: 8px 0 10px;
  }
  .imsg-bubble {
    background: #2c2c2e;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    padding: 8px 13px;
    font-size: 14px;
    line-height: 1.32;
    margin-bottom: 6px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.3);
    max-width: 75%;
  }
  .imsg-bubble.kw {
    background: linear-gradient(180deg, #1FAA7E 0%, #16835F 100%);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-bottom-left-radius: 5px;
    box-shadow:
      0 1px 0 rgba(255,255,255,0.18) inset,
      0 0 24px -6px var(--emerald-glow),
      0 4px 12px -4px rgba(0,0,0,0.4);
  }
  .imsg-bubble.kw::after { display: none; }

  .imsg-banner {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(29,158,117,0.12), rgba(29,158,117,0.04));
    border: 1px solid rgba(29,158,117,0.32);
    box-shadow: 0 0 30px -10px var(--emerald-glow), inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .imsg-banner .head { font-size: 9.5px; }
  .imsg-status-row { font-size: 11px; }

  /* ─── Section headlines on mobile ───────────────────── */
  .h-section {
    font-size: clamp(30px, 8vw, 40px) !important;
    letter-spacing: -0.03em;
    line-height: 1.05;
  }
  .lead {
    font-size: 15px;
    line-height: 1.55;
  }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.16em; }

  /* ─── Value section ─────────────────────────────────── */
  .value-grid { grid-template-columns: 1fr; gap: 40px; }
  .value-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .v-card {
    padding: 18px 16px;
    border-radius: 14px;
  }
  .v-card .ico { width: 28px; height: 28px; margin-bottom: 14px; }
  .v-card .ico svg { width: 14px; height: 14px; }
  .v-card .t { font-size: 13.5px; line-height: 1.25; }
  .v-card .d { font-size: 12px; line-height: 1.45; }
  .contrast-block {
    margin-top: 28px;
    padding: 18px 18px 18px 16px;
    border-radius: 0 12px 12px 0;
  }
  .contrast-block p { font-size: 14px; }

  /* ─── SCROLLY — vertical timeline rebuild on mobile ─── */
  /* Hide the desktop 2-col layout; show the custom mobile timeline. */
  .scrolly .how-demo { display: none; }
  .scrolly .mobile-timeline { display: block; }

  .mobile-timeline {
    position: relative;
    padding: 8px 0;
  }
  .mobile-timeline::before {
    content: '';
    position: absolute;
    left: 22px; top: 18px; bottom: 18px;
    width: 1.5px;
    background: linear-gradient(180deg, transparent, var(--line-strong) 8%, var(--line-strong) 92%, transparent);
  }
  .mobile-timeline::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 18px;
    width: 1.5px;
    height: var(--mt-progress, 0%);
    background: linear-gradient(180deg, var(--emerald), rgba(29,158,117,0.4));
    box-shadow: 0 0 8px var(--emerald-glow);
    transition: height 0.4s var(--ease);
    pointer-events: none;
    z-index: 1;
  }

  .mt-step {
    position: relative;
    padding: 14px 0 14px 56px;
    opacity: 0.55;
    transition: opacity 0.5s var(--ease);
  }
  .mt-step.is-active, .mt-step.is-done { opacity: 1; }

  .mt-step .dot {
    position: absolute;
    left: 14px;
    top: 18px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #161616;
    border: 1.5px solid var(--line-strong);
    z-index: 2;
    transition: all 0.4s var(--ease);
    display: grid;
    place-items: center;
  }
  .mt-step .dot::after {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--fg-mute);
    transition: all 0.4s var(--ease);
  }
  .mt-step.is-active .dot {
    border-color: var(--emerald);
    background: rgba(29,158,117,0.12);
    box-shadow: 0 0 0 4px rgba(29,158,117,0.14), 0 0 14px var(--emerald-glow);
    animation: mtpulse 2s ease-in-out infinite;
  }
  .mt-step.is-active .dot::after { background: var(--emerald); width: 7px; height: 7px; }
  .mt-step.is-done .dot {
    background: var(--emerald);
    border-color: var(--emerald);
  }
  .mt-step.is-done .dot::after {
    width: 8px; height: 5px;
    background: transparent;
    border-left: 1.5px solid #00130c;
    border-bottom: 1.5px solid #00130c;
    border-radius: 0;
    transform: rotate(-45deg) translate(1px, -1px);
  }
  @keyframes mtpulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(29,158,117,0.14), 0 0 14px var(--emerald-glow); }
    50% { box-shadow: 0 0 0 7px rgba(29,158,117,0.05), 0 0 22px var(--emerald-glow); }
  }

  .mt-step .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.16em;
    color: var(--fg-mute);
    text-transform: uppercase;
    margin-bottom: 4px;
    transition: color 0.3s var(--ease);
  }
  .mt-step.is-active .num, .mt-step.is-done .num { color: var(--emerald); }

  .mt-step h3 {
    font-family: 'Inter Tight', sans-serif;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 6px;
    color: var(--fg);
  }
  .mt-step p {
    margin: 0;
    font-size: 13.5px;
    color: var(--fg-dim);
    line-height: 1.5;
  }

  /* Mobile demo phone (small, sits at top of scrolly section) */
  .mobile-demo-phone {
    display: flex;
    justify-content: center;
    margin: 0 0 32px;
    position: relative;
  }
  .mobile-demo-phone::before {
    content: '';
    position: absolute;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(29,158,117,0.22), transparent 65%);
    filter: blur(50px);
    z-index: -1;
  }
  .mobile-demo-phone .phone {
    --pw: 230px;
    --ph: 470px;
    transform: rotate(-1deg);
  }
  .mobile-demo-phone .proto-screen {
    padding: 12px 12px 14px;
    gap: 6px;
  }
  .mobile-demo-phone .phone-status { height: 40px; padding: 14px 18px 0; font-size: 11px; }
  .mobile-demo-phone .phone-island { width: 76px; height: 22px; top: 8px; }
  .mobile-demo-phone .phone-content { inset: 40px 0 0 0; }
  .mobile-demo-phone .proto-row {
    padding: 6px 8px;
    font-size: 10px;
    gap: 8px;
  }
  .mobile-demo-phone .proto-row .ico { width: 16px; height: 16px; border-radius: 4px; }
  .mobile-demo-phone .proto-row .ico svg { width: 8px; height: 8px; }
  .mobile-demo-phone .proto-row .state { font-size: 7px; }
  .mobile-demo-phone .proto-head .pill { font-size: 7.5px; padding: 3px 7px; }
  .mobile-demo-phone .proto-head .ts { font-size: 7.5px; }
  .mobile-demo-phone .proto-title { font-size: 8.5px; padding: 4px 0 2px; }

  /* ─── How it works ──────────────────────────────────── */
  .how-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 40px;
  }
  .how-card { padding: 22px 20px; }
  .how-card .num { margin-bottom: 22px; font-size: 10.5px; }
  .how-card h4 { font-size: 17px; }
  .how-card p { font-size: 13px; }
  .how-microcopy { font-size: 11px; margin-top: 28px; }

  /* ─── Receive section ───────────────────────────────── */
  .receive-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .receive-phone-wrap .phone { transform: rotate(1deg); margin: 0 auto; }
  .receive-phone-wrap::before {
    width: 320px; height: 320px;
    filter: blur(60px);
  }
  /* iMessage receipt — more authentic on mobile */
  .recv-screen { padding: 8px 10px 0; }
  .recv-header { padding: 6px 0 10px; }
  .recv-header .av {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--emerald), #0a3d2a);
    box-shadow: 0 0 14px -4px var(--emerald-glow);
    position: relative;
  }
  .recv-header .av::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
      radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 50%);
  }
  .recv-header .nm {
    font-size: 11.5px;
    color: rgba(255,255,255,0.78);
    font-weight: 500;
    margin-top: 2px;
  }
  .recv-header .nm::after {
    content: ' ›';
    color: rgba(255,255,255,0.3);
    font-weight: 400;
  }
  .recv-time {
    font-size: 9px;
    color: rgba(255,255,255,0.4);
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin: 6px 0 6px;
  }
  .recv-bubble {
    background: #2c2c2e;
    padding: 8px;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.3);
    max-width: 86%;
  }
  .recv-alert {
    border-radius: 10px;
    padding: 8px 10px 9px;
    background: linear-gradient(135deg, rgba(29,158,117,0.22), rgba(29,158,117,0.06));
    border: 1px solid rgba(29,158,117,0.34);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }
  .recv-alert .body strong { font-size: 8px; }
  .recv-alert .body span { font-size: 10.5px; line-height: 1.35; }
  .recv-photos { gap: 3px; }
  .recv-photo { border-radius: 8px; }
  .recv-photo::after { font-size: 6.5px; }
  .recv-map { height: 96px; border-radius: 10px; }
  .recv-map::after { font-size: 7.5px; }

  /* Status under bubble — "delivered" stamp */
  .recv-bubble + .recv-delivered {
    font-size: 9px;
    color: rgba(255,255,255,0.38);
    font-weight: 600;
    margin: 4px 0 0 8px;
    text-align: left;
  }

  .recv-bullets { margin-top: 28px; gap: 10px; }
  .recv-bullets li {
    font-size: 14.5px;
    padding-bottom: 12px;
    gap: 12px;
  }
  .recv-bullets li .dot { width: 26px; height: 26px; border-radius: 7px; }
  .recv-bullets li .dot svg { width: 12px; height: 12px; }

  /* ─── Benefits ──────────────────────────────────────── */
  .bn-grid {
    grid-template-columns: 1fr;
    margin-top: 40px;
    border-radius: 16px;
  }
  .bn-card { padding: 22px 20px; }
  .bn-card .ico { margin-bottom: 18px; }
  .bn-card h4 { font-size: 17px; }
  .bn-card p { font-size: 13.5px; }

  /* ─── What you get — pricing card ───────────────────── */
  .gets-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .gets-card {
    padding: 26px 22px;
    border-radius: 18px;
  }
  .gets-card .price { font-size: 48px; }
  .gets-card .price span { font-size: 18px !important; }
  .gets-card .price-meta { font-size: 12px; margin-bottom: 22px; }
  .gets-list li { font-size: 14px; padding: 12px 0; }
  .gets-card .btn-primary { height: 54px; font-size: 14.5px; }

  /* ─── Compatibility ─────────────────────────────────── */
  .compat-grid { grid-template-columns: 1fr; gap: 30px; }
  .compat-list li { padding: 14px 0; gap: 14px; }
  .compat-list li .t { font-size: 13.5px; line-height: 1.5; }

  /* ─── FAQ ───────────────────────────────────────────── */
  .faq-list { margin-top: 40px; }
  .faq-q {
    padding: 22px 0;
    font-size: 16px;
    gap: 18px;
  }
  .faq-q .toggle { width: 26px; height: 26px; }
  .faq-a p { font-size: 14px; padding-bottom: 22px; }

  /* ─── CTA ───────────────────────────────────────────── */
  .cta { padding: 90px 0; }
  .cta h2 { font-size: clamp(34px, 9vw, 48px) !important; }
  .cta p { font-size: 15.5px; padding: 0 8px; }
  .cta .hero-ctas { padding: 0 4px; }
  .cta-trust {
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
  }
  .cta-payments { margin-top: 24px; }

  /* ─── Footer ────────────────────────────────────────── */
  footer { padding: 48px 0 32px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
    margin-bottom: 40px;
  }
  .footer-brand { grid-column: 1 / -1; max-width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* ─── Dotted surface — enabled on mobile, lighter settings applied in JS ─ */
  .dotted-surface { display: block; }
}

/* On wide phones / small tablets — slight tighten */
@media (min-width: 481px) and (max-width: 768px) {
  .value-cards, .how-grid, .bn-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bn-grid { grid-template-columns: 1fr 1fr; }
}

/* Tiny phones (≤360px) — squeeze gracefully */
@media (max-width: 360px) {
  :root { --m-pad-x: 18px; }
  .hero h1.h-display { font-size: 38px !important; }
  .phone { --pw: 260px; --ph: 540px; }
  .h-section { font-size: 28px !important; }
  .gets-card .price { font-size: 42px; }
}

/* Hide mobile-only blocks on desktop */
.mobile-timeline, .mobile-demo-phone { display: none; }

/* =================================================================
   MOBILE PREMIUM REFINEMENT — header, hero, mockup polish, particles
   ================================================================= */
@media (max-width: 768px) {

  /* ─── Refined top bar ───────────────────────────────── */
  .nav {
    padding: 10px 0;
    background: rgba(10,10,10,0.55);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
  .nav.scrolled {
    background: rgba(10,10,10,0.78);
    box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(0,0,0,0.6);
  }
  .nav-inner {
    padding: 6px 8px 6px 6px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.005));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .brand {
    gap: 8px;
    padding-left: 8px;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }
  .brand-mark {
    width: 26px; height: 26px;
    border-radius: 7px;
    box-shadow: 0 0 12px -2px var(--emerald-glow), inset 0 1px 0 rgba(255,255,255,0.18);
  }
  .nav .btn-primary {
    height: 36px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    border-radius: 999px;
  }

  /* ─── Hero — stronger composition + tech accents ────── */
  .hero-corner { display: none; }
  .hero-corner.tl, .hero-corner.tr {
    display: block;
    top: 76px;
    width: 26px; height: 26px;
    border-color: rgba(29,158,117,0.35);
  }
  .hero-corner.tl { left: 12px; }
  .hero-corner.tr { right: 12px; }

  /* Hero phone — refined floating, bigger glow halo */
  .hero-phone-wrap {
    margin-bottom: 4px;
    padding: 8px 0 12px;
  }
  .hero-phone-wrap .phone {
    transform: rotate(-1.5deg);
    animation: phoneFloatM 6.5s ease-in-out infinite;
  }
  @keyframes phoneFloatM {
    0%, 100% { transform: rotate(-1.5deg) translateY(0); }
    50%      { transform: rotate(-0.8deg) translateY(-8px); }
  }
  .hero-phone-bg {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(29, 158, 117, 0.4), transparent 60%);
    filter: blur(70px);
  }
  .hero-phone-particles {
    inset: -30px;
  }
  .hero-phone-particles .p { width: 4px; height: 4px; }
  .hero-phone-particles .p:nth-child(1) { top: 8%;  left: 4%; }
  .hero-phone-particles .p:nth-child(2) { top: 22%; right: 2%; }
  .hero-phone-particles .p:nth-child(3) { bottom: 24%; left: 2%; width: 3px; height: 3px; }
  .hero-phone-particles .p:nth-child(4) { bottom: 6%;  right: 6%; width: 3px; height: 3px; }
  .hero-phone-particles .p:nth-child(5) { top: 50%; left: 0%; width: 3px; height: 3px; }
  .hero-phone-particles .p:nth-child(6) { top: 64%; right: 0%; }

  /* Subtle scan grid behind the phone (very low opacity) */
  .hero-phone-wrap::after {
    content: '';
    position: absolute;
    inset: 30% 5%;
    background-image:
      linear-gradient(rgba(29,158,117,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(29,158,117,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 60% 60%, #000, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60%, #000, transparent 80%);
    z-index: -1;
    pointer-events: none;
  }

  .hero-tag {
    background: rgba(255,255,255,0.035);
    border-color: rgba(255,255,255,0.08);
  }
  .hero-tag .dot { width: 5px; height: 5px; }

  .hero h1.h-display {
    font-size: clamp(42px, 12vw, 60px) !important;
    line-height: 0.96;
    letter-spacing: -0.045em;
    font-weight: 400;
  }
  .hero h1 .em {
    background: linear-gradient(180deg, #2BC393, #16835F);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* ─── iPhone mockup — more realistic chrome ─────────── */
  .phone {
    background:
      linear-gradient(162deg, rgba(255,255,255,0.07) 0%, transparent 16%),
      linear-gradient(150deg, #1f1f1f 0%, #0a0a0a 35%, #1c1c1c 65%, #0a0a0a 100%);
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.12),
      0 0 0 2px rgba(0,0,0,0.72),
      inset 0 0 0 1px rgba(255,255,255,0.05),
      0 28px 72px -16px rgba(0,0,0,0.92),
      0 0 110px -14px var(--emerald-glow);
  }
  /* Side button highlights — purely visual; absolutely positioned on the bezel */
  .phone::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 110px;
    width: 3px;
    height: 32px;
    border-radius: 2px 0 0 2px;
    background: linear-gradient(180deg, #2a2a2a, #0d0d0d);
    box-shadow: inset 1px 0 0 rgba(255,255,255,0.08);
    z-index: -1;
  }
  /* Right-side button (power) */
  .phone-screen::after {
    content: '';
    position: absolute;
    right: -14px;
    top: 130px;
    width: 4px;
    height: 70px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, #2a2a2a, #0d0d0d);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.08);
    pointer-events: none;
  }
  .phone-island {
    background: #000;
    box-shadow:
      inset 0 0 0 0.5px rgba(255,255,255,0.04),
      0 0 0 1px rgba(0,0,0,0.6);
    position: relative;
  }
  /* Tiny camera + sensor inside dynamic island */
  .phone-island::before,
  .phone-island::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
  }
  .phone-island::before {
    left: 14px;
    width: 6px; height: 6px;
    background: radial-gradient(circle at 30% 30%, #1a3d3a, #050c0b);
    box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.06);
  }
  .phone-island::after {
    right: 14px;
    width: 7px; height: 7px;
    background: radial-gradient(circle at 30% 30%, #2a4d4a, #050c0b);
    box-shadow:
      inset 0 0 0 0.5px rgba(255,255,255,0.08),
      0 0 4px rgba(29,158,117,0.4);
  }

  /* ─── Protocol screen — extra polish on mobile demo ─── */
  .mobile-demo-phone .proto-screen {
    background:
      radial-gradient(ellipse at top, rgba(29,158,117,0.06), transparent 50%),
      #000;
  }
  .mobile-demo-phone .proto-head {
    padding-bottom: 7px;
  }
  .mobile-demo-phone .proto-head .pill {
    background: linear-gradient(180deg, rgba(29,158,117,0.18), rgba(29,158,117,0.08));
    border-color: rgba(29,158,117,0.4);
    box-shadow: 0 0 12px -4px var(--emerald-glow);
  }
  .mobile-demo-phone .proto-row.active {
    background: linear-gradient(90deg, rgba(29,158,117,0.18), rgba(29,158,117,0.06));
    box-shadow: 0 0 18px -6px var(--emerald-glow), inset 0 1px 0 rgba(255,255,255,0.04);
  }
  /* Subtle scan-line shimmer over the proto screen */
  .mobile-demo-phone .proto-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 3px,
      rgba(255,255,255,0.012) 3px,
      rgba(255,255,255,0.012) 4px
    );
    pointer-events: none;
    border-radius: inherit;
  }

  /* ─── iMessage hero — refined keyword bubble glow ──── */
  .imsg-bubble.kw {
    position: relative;
    overflow: hidden;
  }
  .imsg-bubble.kw::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: kwShimmer 3.6s ease-in-out infinite;
  }
  @keyframes kwShimmer {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
  }

  .imsg-banner {
    position: relative;
    overflow: hidden;
  }
  .imsg-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--emerald), transparent);
    opacity: 0.6;
  }
  .imsg-banner .head::after {
    content: '';
    flex: 1;
    height: 1px;
    margin-left: 8px;
    background: linear-gradient(90deg, rgba(29,158,117,0.4), transparent);
  }
  .imsg-banner .head { display: flex; align-items: center; }

  /* ─── Section eyebrow with side accent line ─────────── */
  .eyebrow {
    position: relative;
  }

  /* Ambient CSS dots — performance-safe, softly animated */
  .hero::before {
    content: '';
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(29,158,117,0.8);
    top: 22%;
    left: 6%;
    box-shadow:
      0 0 8px rgba(29,158,117,0.5),
      80vw 14vh 0 -1px rgba(29,158,117,0.5),
      4vw 60vh 0 -1px rgba(29,158,117,0.55),
      86vw 66vh 0 -1px rgba(29,158,117,0.38),
      36vw 86vh 0 -1px rgba(29,158,117,0.48);
    pointer-events: none;
    z-index: 0;
    animation: heroAmbientDots 7s ease-in-out infinite;
  }
  @keyframes heroAmbientDots {
    0%, 100% { opacity: 0.38; }
    50%      { opacity: 0.72; }
  }
}

/* Tiny phones — keep the new tech accents proportional */
@media (max-width: 380px) {
  .nav-inner { padding: 5px 6px 5px 5px; }
  .brand-mark { width: 24px; height: 24px; }
  .nav .btn-primary { height: 34px !important; padding: 0 12px !important; font-size: 11.5px !important; }
  .hero-phone-bg { width: 300px; height: 300px; }
}
