/* =========================================================
   NetLynk PH — Mobile-app-style landing page
   Design language: iOS/Android native feel, delivered on web.
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Design tokens (iOS-y) ---------- */
:root {
  --font-sans:
    "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-display: "Sora", "SF Pro Display", "Inter", sans-serif;

  /* light */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-tint: #eef1f8;
  --text: #0b1020;
  --text-soft: #55607a;
  --muted: #8a93a8;
  --border: rgba(11, 16, 32, 0.08);
  --border-strong: rgba(11, 16, 32, 0.14);

  --brand: #6a5cff;
  --brand-2: #00c2ff;
  --brand-grad: linear-gradient(135deg, #6a5cff 0%, #00c2ff 100%);
  --accent: #00e59a;
  --warn: #ff9f0a;
  --pink: #ff5b8a;

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;

  --shadow-sm:
    0 1px 2px rgba(11, 16, 32, 0.06), 0 2px 6px rgba(11, 16, 32, 0.04);
  --shadow:
    0 10px 30px rgba(11, 16, 32, 0.08), 0 2px 6px rgba(11, 16, 32, 0.05);
  --shadow-lg:
    0 30px 60px -20px rgba(20, 23, 55, 0.25),
    0 18px 36px -18px rgba(20, 23, 55, 0.2);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* dark */
html[data-theme="dark"] {
  --bg: #07091a;
  --surface: #10132a;
  --surface-2: #141838;
  --surface-tint: #0c1028;
  --text: #eef1ff;
  --text-soft: #a9b0cf;
  --muted: #7a83a8;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.55);
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--safe-bottom) + 0px);
}

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.86rem;
}
.center {
  text-align: center;
}

/* =========================================================
   App bar (top nav)
   ========================================================= */
.appbar {
  position: sticky;
  top: 0;
  z-index: 55;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.appbar-inner {
  width: min(1180px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
}
.brand-name {
  font-size: 1.1rem;
}
.brand-name span {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 4px;
}
.appbar-nav {
  display: flex;
  gap: 6px;
  margin-left: 18px;
}
.appbar-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 500;
  transition:
    background 0.2s,
    color 0.2s;
}
.appbar-nav a:hover {
  background: var(--surface-tint);
  color: var(--text);
}
.appbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--text);
  transition:
    transform 0.15s ease,
    background 0.2s;
}
.icon-btn:hover {
  background: var(--border-strong);
}
.icon-btn:active {
  transform: scale(0.92);
}
.only-mobile {
  display: none;
}
@media (max-width: 900px) {
  .appbar-nav {
    display: none;
  }
  .only-mobile {
    display: inline-grid;
  }
}

.i-sun,
.i-moon {
  display: none;
}
html[data-theme="light"] .i-moon {
  display: block;
}
html[data-theme="dark"] .i-sun {
  display: block;
}

/* Pills */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s,
    background 0.2s,
    color 0.2s;
  white-space: nowrap;
}
.pill-btn:active {
  transform: scale(0.97);
}
.pill-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(106, 92, 255, 0.55);
}
.pill-primary:hover {
  box-shadow: 0 12px 30px -8px rgba(106, 92, 255, 0.7);
}
.pill-outline {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
.pill-outline:hover {
  background: var(--surface-tint);
}
.pill-block {
  display: flex;
  width: 100%;
}

/* =========================================================
   Drawer (mobile menu)
   ========================================================= */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86%, 360px);
  background: var(--surface);
  z-index: 80;
  border-left: 1px solid var(--border);
  transform: translateX(110%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
  padding: 22px 20px calc(22px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}
.drawer-nav a {
  padding: 14px 14px;
  border-radius: 14px;
  background: var(--surface-tint);
  font-weight: 600;
}
.drawer-nav a:hover {
  background: var(--border-strong);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 30, 0.45);
  backdrop-filter: blur(4px);
  z-index: 75;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bloom {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.bloom-a {
  width: 520px;
  height: 520px;
  background: #7c5cff;
  top: -120px;
  left: -120px;
}
.bloom-b {
  width: 560px;
  height: 560px;
  background: #00c2ff;
  bottom: -200px;
  right: -140px;
  opacity: 0.45;
}
.grid-mask {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 40%,
    #000 0%,
    transparent 70%
  );
  opacity: 0.55;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-soft);
  white-space: nowrap;
}
.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 5%, transparent);
  }
}

/* Hero copy stack: unified vertical rhythm */
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.hero-copy > * {
  margin: 0;
}
.hero-copy .chip {
  align-self: flex-start;
}
.hero-copy h1 {
  margin-top: 4px;
}
.hero-copy .store-row {
  margin-top: 8px;
}
.hero-copy .kpi-row {
  margin-top: 10px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
}
.grad {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-soft);
  max-width: 52ch;
}

.store-row {
  display: flex;
  gap: 12px;
  margin: 26px 0 22px;
  flex-wrap: wrap;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  background: #0b0b0b;
  color: #fff;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
}
.store-btn:active {
  transform: scale(0.97);
}
.store-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.store-btn small {
  font-size: 0.68rem;
  opacity: 0.8;
}
.store-btn strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.kpi-row {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.kpi-row .kpi {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 0 0;
  background: transparent;
  box-shadow: none;
  transition: transform 0.25s ease;
}
.kpi-row .kpi + .kpi {
  padding-left: 22px;
}
.kpi-row .kpi + .kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 70%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--border-strong) 20%,
    var(--border-strong) 80%,
    transparent 100%
  );
}
.kpi-row .kpi:last-child {
  padding-right: 0;
}
.kpi-row .kpi:hover {
  transform: translateY(-2px);
}
.kpi-ic {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  background: transparent;
  box-shadow: none;
}
.kpi-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kpi-row strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.05;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kpi--star strong {
  background: linear-gradient(135deg, #ffd263 0%, #ff9d00 55%, #ff6a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kpi--accent strong {
  background: linear-gradient(135deg, #00e59a 0%, #00c2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kpi-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ----- Phone mockup ----- */
.phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: fit-content;
  margin-inline: auto;
  /* Reserve room for floating decorations so they don't get clipped */
  padding: 30px 32px;
}
.phone {
  --ph-w: 320px;
  --ph-h: 640px;
  width: var(--ph-w);
  height: var(--ph-h);
  border-radius: 50px;
  background: linear-gradient(180deg, #15172b, #0a0b1a);
  padding: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -24px rgba(30, 40, 90, 0.45),
    0 20px 40px -20px rgba(0, 0, 0, 0.4);
  position: relative;
  transform: rotate(-2.5deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.phone:hover {
  transform: rotate(-1deg) translateY(-4px);
}
.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  border-radius: 999px;
  background: #000;
  z-index: 3;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f8fc 0%, #eef1fb 100%);
  padding: 44px 14px 68px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #0b1020;
}
html[data-theme="dark"] .phone-screen {
  background: linear-gradient(180deg, #13172e 0%, #0a0d22 100%);
  color: #eef1ff;
}
.screen-status {
  position: absolute;
  top: 10px;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.screen-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mini-batt {
  display: inline-block;
  width: 18px;
  height: 9px;
  border: 1.3px solid currentColor;
  border-radius: 2.5px;
  padding: 1px;
  position: relative;
}
.mini-batt::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 1px;
}
.mini-batt i {
  display: block;
  height: 100%;
  width: 75%;
  background: currentColor;
  border-radius: 1px;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.screen-header small {
  color: #6b7290;
  font-size: 0.72rem;
}
.screen-header h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.balance-card {
  border-radius: 22px;
  padding: 14px;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 18px 30px -14px rgba(79, 70, 229, 0.55);
}
.balance-label {
  opacity: 0.9;
  font-size: 0.75rem;
}
.balance-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
}
.balance-amount em {
  font-style: normal;
  opacity: 0.7;
  font-size: 1rem;
  font-weight: 600;
  margin-left: 2px;
}
.balance-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  opacity: 0.95;
}
.trend.up {
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 999px;
}
.balance-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.balance-actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;
  padding: 8px;
  font-size: 0.72rem;
  font-weight: 600;
}
.balance-actions button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 10px 4px;
  font-size: 0.68rem;
  color: #0b1020;
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .quick-grid a {
  background: rgba(255, 255, 255, 0.06);
  color: #eef1ff;
}
.quick-grid .qi {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
}
.qi-a {
  background: linear-gradient(135deg, #ff5e7a, #ffb86b);
}
.qi-b {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}
.qi-c {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.qi-d {
  background: linear-gradient(135deg, #f43f5e, #8b5cf6);
}
.qi-e {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.qi-f {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.activity {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html[data-theme="dark"] .activity {
  background: rgba(255, 255, 255, 0.06);
}
.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 4px;
}
.activity-head a {
  color: #4f46e5;
  font-weight: 600;
}
.activity ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.activity li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
}
.activity li div {
  flex: 1;
  line-height: 1.2;
}
.activity li small {
  color: #6b7290;
  display: block;
  font-size: 0.68rem;
}
html[data-theme="dark"] .activity li small {
  color: #9aa3c7;
}
.activity li em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  color: #16a34a;
}
.ai {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.ai-ok {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.ai-sms {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
}
.ai-net {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.screen-tabbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .screen-tabbar {
  background: rgba(20, 24, 56, 0.85);
}
.screen-tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.62rem;
  color: #7b8399;
  padding: 4px 0;
  border-radius: 12px;
}
.screen-tabbar span.active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.float-toast,
.float-tile {
  position: absolute;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: floatY 5s ease-in-out infinite;
}
.float-toast {
  top: 24px;
  right: -20px;
  animation-delay: 0.3s;
}
.float-toast .ft-ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.float-toast strong {
  display: block;
  font-size: 0.85rem;
}
.float-toast small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}
.float-tile {
  bottom: 60px;
  left: -24px;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px;
  min-width: 150px;
}
.float-tile .tile-emoji {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 10px 24px -8px rgba(79, 70, 229, 0.55);
  margin-bottom: 4px;
}
.float-tile strong {
  font-size: 0.95rem;
}
.float-tile small {
  color: var(--muted);
  font-size: 0.78rem;
}
@keyframes floatY {
  50% {
    transform: translateY(-10px);
  }
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee-wrap {
  padding: 12px 0 36px;
}
.marquee {
  overflow: hidden;
  /* Softer edge fade so logos fade out gently but the loop stays visible */
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 6%,
    #000 94%,
    transparent 100%
  );
}
.marquee-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: max-content;
  padding: 18px 0;
  margin: 0;
  animation: scroll-x 40s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /*
   * The trailing gap is built into every item (including the last one of
   * each copy), so translateX(-50%) lands on an exact copy boundary and
   * the loop is perfectly seamless — no gap, no visible ending.
   */
  margin-right: 4rem;
  opacity: 0.85;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.marquee-item:hover {
  opacity: 1;
  transform: scale(1.05);
}
.marquee-track img {
  height: 38px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
}
html[data-theme="dark"] .marquee-track img {
  filter: brightness(1.2) contrast(0.95);
}

@keyframes scroll-x {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  padding: 72px 0;
  position: relative;
}
.section-tint {
  background: var(--surface-tint);
}
.section-head {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}
.section-head .eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 14px 0 8px;
  letter-spacing: -0.02em;
}
.section-head p {
  color: var(--text-soft);
  margin: 0 auto;
}

/* Segmented control (iOS) */
.segmented {
  display: inline-flex;
  background: var(--surface-tint);
  padding: 4px;
  border-radius: 14px;
  gap: 2px;
  box-shadow: inset 0 0 0 1px var(--border);
  margin-top: 18px;
}
.segmented button {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text-soft);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.segmented button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.segmented-sm button {
  padding: 6px 12px;
  font-size: 0.88rem;
}
.save {
  font-style: normal;
  background: var(--accent);
  color: #002017;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
}

/* Tabs row (wraps segmented control above a pane) */
.tabs-row {
  display: flex;
  justify-content: center;
  margin: 8px 0 36px;
}

/* Panes */
.panes {
  position: relative;
  margin-top: 40px;
}
.pane {
  display: none;
}
.pane.app-grid {
  display: none;
}
.pane[data-active="true"],
.pane.app-grid[data-active="true"] {
  display: grid;
}
.pane.pane-anim {
  animation: paneIn 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}
@keyframes paneIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* App grid like iOS home */
.app-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.app-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.ac-ic {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(30, 40, 90, 0.5);
}
.grad-1 {
  background: linear-gradient(135deg, #ff5e7a, #ffb86b);
}
.grad-2 {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}
.grad-3 {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.grad-4 {
  background: linear-gradient(135deg, #f43f5e, #8b5cf6);
}
.app-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.app-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* Swipe row */
.swipe-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 24px;
  margin: 0 -2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.swipe-row::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.int-card,
.quote-card {
  scroll-snap-align: start;
  flex: 0 0 260px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.int-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
}
.int-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.int-card small {
  color: var(--text-soft);
}
.quote-card {
  flex: 0 0 320px;
}
.quote-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.quote-card footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.quote-card strong {
  font-size: 0.95rem;
  display: block;
}
.quote-card small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
}
/* Testimonial carousel */
.quote-carousel {
  --qc-gap: 18px;
  --qc-per-view: 1;
  position: relative;
  margin-top: 28px;
  padding: 4px 0 52px;
}
.qc-viewport {
  overflow: hidden;
  border-radius: 18px;
  padding: 2px;
}
.qc-track {
  display: flex;
  gap: var(--qc-gap);
  transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform;
  touch-action: pan-y;
}
.qc-track .qc-slide {
  flex: 0 0
    calc((100% - (var(--qc-per-view) - 1) * var(--qc-gap)) / var(--qc-per-view));
  max-width: none;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .quote-carousel {
    --qc-per-view: 2;
  }
}
@media (min-width: 900px) {
  .quote-carousel {
    --qc-per-view: 3;
  }
}
@media (min-width: 1180px) {
  .quote-carousel {
    --qc-per-view: 4;
    --qc-gap: 20px;
  }
}
.qc-track.is-dragging {
  transition: none;
  cursor: grabbing;
}
.qc-arrow {
  position: absolute;
  top: calc(50% - 26px);
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -14px rgba(11, 16, 32, 0.35);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    opacity 0.2s ease;
  z-index: 2;
}
.qc-arrow:hover {
  transform: translateY(-50%) scale(1.06);
  background: var(--surface);
}
.qc-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.qc-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.qc-prev {
  left: -8px;
}
.qc-next {
  right: -8px;
}
.qc-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.qc-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease;
}
.qc-dots button[aria-current="true"] {
  width: 22px;
  background: var(--brand-grad);
}
@media (max-width: 640px) {
  .qc-arrow {
    width: 38px;
    height: 38px;
  }
  .qc-prev {
    left: 2px;
  }
  .qc-next {
    right: 2px;
  }
}

.avatar-s {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.78rem;
}

/* Ribbon */
.ribbon {
  background: var(--brand-grad);
  color: #fff;
}
.ribbon-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px 0;
  text-align: center;
}
.ribbon strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}
.ribbon span {
  opacity: 0.9;
  font-size: 0.88rem;
}
@media (max-width: 700px) {
  .ribbon-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .price-grid {
    grid-template-columns: 1fr;
  }
}
.price-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s;
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.price-card.featured {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand) 6%, var(--surface)) 0%,
    var(--surface) 60%
  );
  box-shadow:
    0 20px 50px -20px rgba(106, 92, 255, 0.55),
    var(--shadow);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.price-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pc-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
}
.pc-badge {
  background: var(--surface-tint);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text-soft);
}
.pc-badge.hot {
  background: var(--brand-grad);
  color: #fff;
}
.pc-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.pc-price .cur {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-soft);
}
.pc-price .amt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -0.03em;
}
.pc-price .per {
  color: var(--muted);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.price-card li {
  padding-left: 26px;
  position: relative;
  color: var(--text-soft);
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.price-card li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 11px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* FAQ */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 6px 18px;
  transition: box-shadow 0.2s;
}
.faq details[open] {
  box-shadow: var(--shadow);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-tint);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a5cff' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(180deg);
}
.faq p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

/* =========================================================
   CTA
   ========================================================= */
.cta {
  padding: 60px 0 80px;
}
.cta-inner {
  background: linear-gradient(135deg, #0b0d23 0%, #1b1a5a 60%, #0b3f6f 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 44px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-inner::before,
.cta-inner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.cta-inner::before {
  width: 300px;
  height: 300px;
  background: #6a5cff;
  top: -120px;
  left: -80px;
}
.cta-inner::after {
  width: 260px;
  height: 260px;
  background: #00c2ff;
  bottom: -120px;
  right: -60px;
}
.cta-copy {
  position: relative;
  z-index: 1;
}
.cta-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.cta-copy p {
  margin: 0;
  color: #c7cdf0;
}
.cta-stores {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cta-stores .store-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.cta-stores .store-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.cta-stores .store-btn small {
  color: #c7cdf0;
}
.cta-form {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.cta-form input {
  flex: 1;
  background: transparent;
  color: #fff;
  border: 0;
  outline: 0;
  padding: 12px 18px;
  border-radius: 999px;
}
.cta-form input::placeholder {
  color: #c7cdf0;
}
@media (max-width: 820px) {
  .cta-inner {
    grid-template-columns: 1fr;
    padding: 30px;
  }
  .cta-form {
    flex-direction: column;
    border-radius: 22px;
    padding: 14px;
  }
  .cta-form input {
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
  }
  .cta-form .pill-btn {
    width: 100%;
  }
}

/* =========================================================
   Footer
   ========================================================= */
.site-foot {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 100px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}
.foot-grid h4 {
  font-family: var(--font-display);
  margin: 0 0 10px;
  font-size: 1rem;
}
.foot-grid a {
  display: block;
  color: var(--text-soft);
  padding: 4px 0;
}
.foot-grid a:hover {
  color: var(--text);
}
.foot-base {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
@media (max-width: 760px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   FAB (floating action button)
   ========================================================= */
.fab {
  position: fixed;
  right: max(4vw, calc((100vw - 1180px) / 2));
  bottom: calc(84px + var(--safe-bottom));
  z-index: 65;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 20px 40px -12px rgba(106, 92, 255, 0.6);
  transition: transform 0.2s ease;
}
.fab:hover {
  transform: translateY(-2px) scale(1.02);
}
.fab:active {
  transform: scale(0.96);
}
@media (min-width: 900px) {
  .fab {
    bottom: 24px;
  }
}

/* =========================================================
   Bottom sheet
   ========================================================= */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 30, 0.5);
  z-index: 85;
  backdrop-filter: blur(4px);
}
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 12px 22px calc(22px + var(--safe-bottom));
  transform: translateY(110%);
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.2, 1);
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.bottom-sheet.open {
  transform: translateY(0);
}
.sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 4px auto 12px;
}
.bottom-sheet h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.bottom-sheet p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.bottom-sheet form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bottom-sheet label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 600;
}
.bottom-sheet input,
.bottom-sheet select {
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}
.bottom-sheet input:focus,
.bottom-sheet select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

/* =========================================================
   Sticky bottom tab bar (web, mobile)
   ========================================================= */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border);
  gap: 6px;
  justify-content: space-around;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 14px;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 600;
}
.tabbar a.active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
@media (max-width: 820px) and (pointer: coarse), (max-width: 640px) {
  .tabbar {
    display: flex;
  }
  .site-foot {
    padding-bottom: 110px;
  }
  .fab {
    bottom: calc(80px + var(--safe-bottom));
  }
}

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   DESIGN POLISH & RESPONSIVE UPGRADE
   Breakpoints:
   • >=1200px  desktop (default)
   • 1024-1199 small desktop
   •  820-1023 iPad landscape
   •  640-819  iPad portrait / large phone landscape
   •  420-639  phone
   •  <420     small phone
   ========================================================= */

/* ---------- Typographic scale via clamp ---------- */
h1,
.hero h1 {
  font-size: clamp(2rem, 3.2vw + 1rem, 4rem);
}
.section-head h2 {
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.6rem);
}
.lead {
  font-size: clamp(0.98rem, 0.5vw + 0.85rem, 1.15rem);
}

/* ---------- Container: safe inner padding ---------- */
.container {
  width: min(1200px, 100% - clamp(20px, 5vw, 64px));
}

/* ---------- Smoother reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track,
  .reveal {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ---------- Better tap targets (44x44 minimum) ---------- */
@media (hover: none) {
  .appbar-nav a,
  .tabbar a,
  .drawer-nav a,
  .segmented button,
  .pill-btn,
  .icon-btn,
  .store-btn,
  .fab,
  .faq summary {
    min-height: 44px;
  }
  .phone {
    transform: none;
  }
  .phone:hover {
    transform: none;
  }
}

/* ---------- Smoother micro-interactions ---------- */
.app-card,
.price-card,
.int-card,
.quote-card {
  transition:
    transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.2, 0.9, 0.2, 1),
    border-color 0.25s;
}

/* =========================================================
   iPad landscape & small desktop  (820 – 1199)
   ========================================================= */
@media (max-width: 1199px) {
  .container {
    width: min(1100px, 100% - clamp(20px, 5vw, 56px));
  }
  .hero-grid {
    gap: 40px;
  }
  .phone {
    --ph-w: 300px;
    --ph-h: 610px;
  }
  .foot-grid {
    gap: 22px;
  }
  .app-grid {
    gap: 16px;
  }
}

/* =========================================================
   iPad portrait  (640 – 1023)
   ========================================================= */
@media (max-width: 1023px) {
  /* Hero → stack but keep room for phone on iPad */
  .hero {
    padding: 56px 0 40px;
    overflow: hidden;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    text-align: center;
  }
  .hero-copy,
  .phone-wrap {
    min-width: 0;
  }
  .hero-copy {
    align-items: center;
  }
  .hero-copy .chip {
    align-self: center;
  }
  .hero-copy .kpi-row,
  .hero-copy .store-row {
    justify-content: center;
  }
  .hero-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }

  /* Phone area: constrain to the phone itself + room for floats */
  .phone-wrap {
    order: 2;
    padding: 40px 60px;
    max-width: 100%;
  }
  .phone {
    --ph-w: 300px;
    --ph-h: 640px;
    transform: none;
  }
  .phone-screen {
    padding: 40px 14px 70px;
  }

  /* Floats hug the phone edges (not the container edges) */
  .float-toast {
    top: 18px;
    right: -28px;
    scale: 0.9;
  }
  .float-tile {
    bottom: 80px;
    left: -34px;
    scale: 0.9;
  }

  /* 4-col grids collapse to 2-col */
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .price-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
  .price-card.featured {
    transform: none;
  }

  /* Footer: from 4 to 2 columns with the brand column spanning full width */
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-grid > :first-child {
    grid-column: 1 / -1;
  }

  /* Section rhythm */
  .section {
    padding: 60px 0;
  }

  /* CTA stacks earlier for iPad portrait */
  .cta-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cta-form {
    margin-inline: auto;
  }

  /* Ribbon: 2x2 */
  .ribbon-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 28px 0;
  }

  /* Phone shrinks but still prominent */
  .phone {
    --ph-w: 300px;
    --ph-h: 600px;
    transform: none;
  }
}

/* =========================================================
   Large phone  (641 – 819 landscape phone / small tablet)
   ========================================================= */
@media (max-width: 819px) {
  /* App bar: hide primary nav, rely on drawer */
  .appbar-nav {
    display: none;
  }
  .appbar-actions .pill-btn {
    display: none;
  }

  /* Carousel cards: wider for thumb-swipe */
  .int-card {
    flex: 0 0 78%;
  }
  .quote-card {
    flex: 0 0 85%;
  }

  /* Floating decorations hug the phone on small tablet / large phone */
  .phone-wrap {
    padding: 30px 40px;
  }
  .float-toast {
    top: 10px;
    right: -20px;
    scale: 0.85;
  }
  .float-tile {
    left: -24px;
    bottom: 70px;
    scale: 0.85;
  }

  .marquee-track {
    animation-duration: 32s;
  }
  .marquee-item {
    margin-right: 2.5rem;
  }
  .marquee-track img {
    height: 30px;
    max-width: 120px;
  }

  .cta-inner {
    padding: 34px 22px;
  }
  .cta-copy h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: 52px 0;
  }
}

/* =========================================================
   Phone (0 – 639)
   ========================================================= */
@media (max-width: 639px) {
  .hero {
    padding: 28px 0 16px;
  }
  .hero h1 {
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }

  /* Phone mockup: never wider than the viewport */
  .phone-wrap {
    padding: 20px 16px;
    max-width: 100%;
  }
  .phone {
    --ph-w: min(calc(100vw - 64px), 280px);
    --ph-h: calc(min(calc(100vw - 64px), 280px) * 2.05);
  }
  .phone-notch {
    width: 96px;
    height: 22px;
    top: 16px;
  }
  .phone-screen {
    padding: 38px 12px 66px;
  }
  .balance-amount {
    font-size: 1.5rem;
  }
  .quick-grid {
    gap: 8px;
  }

  /* Typography and section rhythm */
  .section {
    padding: 44px 0;
  }
  .section-head {
    margin-bottom: 26px;
  }
  .section-head h2 {
    letter-spacing: -0.02em;
  }

  /* Store buttons go full width and stack in 2 cols */
  .store-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0 18px;
  }
  .store-btn {
    justify-content: center;
    padding: 10px 14px;
  }

  /* KPIs: 3 equal columns that don't overflow */
  .kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 22px 0 0;
    text-align: center;
  }
  .kpi-row .kpi {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    min-width: 0;
  }
  .kpi-row .kpi + .kpi {
    padding-left: 8px;
  }
  .kpi-row .kpi + .kpi::before {
    height: 60%;
  }
  .kpi-ic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex: 0 0 34px;
  }
  .kpi-ic svg {
    width: 18px;
    height: 18px;
  }
  .kpi-text {
    align-items: center;
  }
  .kpi-row strong {
    font-size: 1.1rem;
    line-height: 1.2;
  }
  .kpi-row span {
    font-size: 0.74rem;
    line-height: 1.25;
    white-space: normal;
  }

  /* Chips and pills */
  .chip {
    font-size: 0.74rem;
  }
  .pill-btn {
    height: 44px;
    padding: 0 16px;
  }

  /* Feature cards in a native-list style (icon + title + description stacked) */
  .app-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .app-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: center;
    min-height: 0;
    padding: 16px 18px;
  }
  .app-card .ac-ic {
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.3rem;
    align-self: center;
  }
  .app-card h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    align-self: end;
  }
  .app-card p {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-soft);
    align-self: start;
  }

  /* Pricing card spacing */
  .price-card {
    padding: 22px;
  }
  .pc-price .amt {
    font-size: 2.3rem;
  }

  /* Segmented + tabs row */
  .segmented {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .segmented::-webkit-scrollbar {
    display: none;
  }
  .segmented button {
    white-space: nowrap;
    padding: 10px 14px;
  }
  .tabs-row {
    margin: 6px -4px 28px;
  }

  /* CTA */
  .cta-inner {
    padding: 28px 20px;
    border-radius: 24px;
  }
  .cta-form {
    padding: 10px;
  }
  .cta-form input {
    padding: 12px 14px;
  }

  /* Footer: 1 column, centered on phone */
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: center;
  }
  .foot-grid > :first-child {
    grid-column: auto;
  }
  .foot-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .foot-grid .brand {
    justify-content: center;
  }
  .foot-grid h4 {
    margin-bottom: 6px;
  }
  .foot-base {
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
  }

  /* FAB: shrink to icon-only on small screens */
  .fab {
    padding: 14px;
    right: max(4vw, calc((100vw - 1180px) / 2));
    bottom: calc(84px + var(--safe-bottom));
  }
  .fab span {
    display: none;
  }

  /* Tabbar clearer on mobile */
  .tabbar {
    padding-top: 10px;
  }
  .tabbar a small {
    font-size: 0.68rem;
  }

  /* Hero BG tuned for phone */
  .bloom-a {
    width: 320px;
    height: 320px;
    top: -80px;
    left: -120px;
  }
  .bloom-b {
    width: 360px;
    height: 360px;
    bottom: -180px;
    right: -120px;
  }
}

/* =========================================================
   Small phone (<=420)
   ========================================================= */
@media (max-width: 420px) {
  .brand-name {
    font-size: 1rem;
  }
  .appbar-inner {
    gap: 8px;
  }
  .kpi-row strong {
    font-size: 1.05rem;
  }
  .kpi-row span {
    font-size: 0.76rem;
  }
  .store-btn strong {
    font-size: 0.9rem;
  }
  .float-toast,
  .float-tile {
    display: none;
  }
  .phone {
    --ph-w: min(90vw, 300px);
    --ph-h: calc(min(90vw, 300px) * 2);
  }
  .cta-copy h2 {
    font-size: 1.35rem;
  }
}

/* =========================================================
   Short viewports — stop the hero from overflowing
   ========================================================= */
@media (max-height: 720px) and (min-width: 1024px) {
  .phone {
    --ph-h: 560px;
    --ph-w: 286px;
  }
}

/* =========================================================
   Wider screens polish (>= 1400)
   ========================================================= */
@media (min-width: 1400px) {
  .container {
    width: min(1260px, 92%);
  }
  .hero {
    padding: 88px 0 64px;
  }
  .section {
    padding: 96px 0;
  }
}

/* =========================================================
   Global polish: crisper fonts, smoother underlines, focus
   ========================================================= */
html {
  text-rendering: optimizeLegibility;
}
a {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}
.pill-primary:focus-visible {
  outline-color: #fff;
}

/* App bar scroll state (works with existing JS toggler) */
.appbar.scrolled {
  box-shadow: 0 10px 24px -18px rgba(11, 16, 32, 0.35);
  border-bottom-color: transparent;
}
