/* Safi Work — marketing web layer. Load after colors_and_type.css */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-arabic); font-size: var(--text-base); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
.container { max-width: 1120px; margin-inline: auto; padding-inline: 28px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: var(--text-base); line-height: 1; border-radius: var(--r-md); border: 1px solid transparent; padding: 14px 24px; transition: background 140ms, border-color 140ms, transform 140ms; white-space: nowrap; }
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--safi-300); color: var(--safi-700); background: var(--safi-50); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--safi-50); color: var(--safi-700); }
.btn-white { background: #fff; color: var(--safi-800); border-color: transparent; }
.btn-white:hover { background: var(--safi-100); }
.btn-lg { padding: 17px 32px; font-size: var(--text-lg); }
.btn-sm { padding: 9px 16px; font-size: var(--text-sm); }
.btn-block { width: 100%; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(245,247,250,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; height: 72px; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--safi-700); display: flex; align-items: center; justify-content: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; color: #fff; }
.nav-links { display: flex; gap: 28px; font-size: var(--text-sm); font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { color: var(--safi-700); }
.nav-end { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.lang-btn { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-full); padding: 7px 14px; font-size: var(--text-sm); font-weight: 600; color: var(--ink-3); }
.lang-btn:hover { border-color: var(--safi-300); color: var(--safi-700); }

/* Eyebrow chips */
.eyebrow-chip { display: inline-block; white-space: nowrap; font-size: var(--text-xs); font-weight: 700; color: var(--safi-700); background: var(--safi-100); border-radius: var(--r-full); padding: 5px 15px; margin-bottom: 18px; }

/* Hero */
.hero { padding-block: 96px 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 420px; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 3.9rem); font-weight: 700; line-height: 1.08; margin: 0 0 22px; letter-spacing: -0.015em; }
.hero h1 em { font-style: normal; color: var(--safi-700); }
.hero-sub { font-size: var(--text-lg); color: var(--ink-2); line-height: 1.6; max-width: 30rem; margin: 0 0 32px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { display: flex; align-items: center; gap: 7px; font-size: var(--text-sm); color: var(--ink-3); margin-top: 16px; }
.check-ic { color: var(--positive); }

/* Phone mockup */
.phone-wrap { position: relative; display: flex; justify-content: center; align-items: flex-start; padding-top: 20px; }
.phone-glow { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: 320px; height: 320px; background: radial-gradient(circle, var(--safi-100) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }
.phone { position: relative; width: 285px; background: #111827; border-radius: 46px; padding: 10px; box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.08); transition: transform 0.3s var(--ease-out); }
.phone-screen { border-radius: 38px; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; height: 580px; }

/* Status bar — white text on brand blue */
.ph-status { background: var(--safi-700); display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 6px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.9); font-family: var(--font-mono); }
.ph-status-icons { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.85); }

/* POS app bar */
.ph-appbar { background: var(--safi-700); display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 10px; color: #fff; }
.ph-appbar-title { font-size: 14px; font-weight: 700; letter-spacing: 0; }
.ph-appbar-actions { display: flex; align-items: center; gap: 10px; }
.ph-appbar-ic { width: 18px; height: 18px; color: rgba(255,255,255,0.88); display: block; }
.ph-appbar-cart { position: relative; display: flex; }
.ph-cart-badge { position: absolute; top: -5px; right: -6px; background: #f43f5e; color: #fff; font-size: 8px; font-weight: 700; width: 13px; height: 13px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); }

/* Search row */
.ph-search-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; background: var(--paper); }
.ph-search { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; }
.ph-search-placeholder { font-size: 11px; color: var(--ink-4); }
.ph-scan-btn { width: 34px; height: 34px; background: var(--safi-100); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--safi-700); flex: none; }

/* Category filter chips */
.ph-chips { display: flex; gap: 5px; padding: 4px 10px 6px; overflow: hidden; }
.ph-chip { font-size: 10px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.ph-chip-on { background: var(--safi-700); color: #fff; border-color: var(--safi-700); }

/* Product grid — 2 columns, faithful to POS GridView */
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 0 10px 6px; flex: 1; overflow: hidden; }
.ph-tile { background: var(--surface); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; }
.ph-tile--oos .ph-tile-img { filter: saturate(0.2) brightness(0.95); }

/* Tile image area — coloured placeholder matching Flutter's MaterialColor.shade100 approach */
.ph-tile-img { position: relative; aspect-ratio: 1 / 0.85; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ph-tile-img svg { width: 44px; height: 44px; opacity: 0.9; }
.ph-tile-img--blue { background: #E3EEFB; }         /* safi-100 */
.ph-tile-img--clay { background: #F8E9DF; }         /* clay-100 */
.ph-tile-img--green { background: #DEF1E6; }        /* positiveBg */
.ph-tile-img--gray { background: #EBEFF4; }         /* paper-2 */

/* Stock qty badge — top-right corner, like the real app */
.ph-tile-stock { position: absolute; top: 5px; right: 5px; font-size: 8.5px; font-weight: 700; padding: 2px 5px; border-radius: 4px; font-family: var(--font-mono); color: #fff; }
.ph-tile-stock--ok { background: var(--positive); }
.ph-tile-stock--oos { background: var(--destructive); }

/* "Options" variants badge — top-left, blue pill, matches SafiPalette.safi600 */
.ph-tile-vars { position: absolute; top: 5px; left: 5px; font-size: 8px; font-weight: 700; padding: 2px 5px; border-radius: 4px; background: #2A78D0; color: #fff; }

/* Out-of-stock overlay badge — centred, matches Flutter error container */
.ph-tile-oos-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 8.5px; font-weight: 700; color: transparent; background: transparent; pointer-events: none; }
.ph-tile--oos .ph-tile-oos-badge { color: #fff; background: rgba(192,57,43,0.82); font-size: 8.5px; border-radius: 6px; inset: auto; padding: 3px 8px; width: max-content; }

/* Tile body — name + type chip + price row */
.ph-tile-body { padding: 6px 7px 7px; display: flex; flex-direction: column; gap: 3px; }
.ph-tile-name { font-size: 11px; font-weight: 700; color: var(--ink); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 1px; }
.ph-tile-cat { font-size: 8.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.ph-tile-cat--blue { background: var(--safi-100); color: var(--safi-700); border: 1px solid var(--safi-200); }
.ph-tile-cat--clay { background: var(--clay-100); color: var(--clay-700); border: 1px solid var(--clay-200); }
.ph-tile-cat--green { background: var(--positive-bg); color: var(--positive); border: 1px solid #b6dfc7; }
.ph-tile-price { font-size: 10.5px; font-weight: 700; color: var(--safi-700); font-family: var(--font-mono); white-space: nowrap; }

/* Cart FAB — Extended FloatingActionButton replica */
.ph-fab { margin: 0 10px 6px; background: var(--safi-700); color: #fff; border-radius: 999px; height: 36px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 700; box-shadow: 0 4px 14px rgba(21,101,192,0.38); }

/* Bottom nav */
.ph-nav { display: flex; border-top: 1px solid var(--line); background: var(--surface); padding: 8px 4px 12px; }
.ph-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--ink-3); }
.ph-tab svg { width: 18px; height: 18px; }
.ph-tab.on { color: var(--safi-700); font-weight: 600; }

/* Chicken-egg trap section */
.chickegg { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 72px; }
.chickegg-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.chickegg-copy h2 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); font-weight: 700; line-height: 1.18; margin: 0 0 16px; letter-spacing: -0.01em; }
.chickegg-copy p { font-size: var(--text-lg); color: var(--ink-2); line-height: 1.7; margin: 0; max-width: 30rem; }

.chickegg-vis-col { display: flex; flex-direction: column; }
.ca-stats-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 28px; }
.ca-stats-row .ce-stat { flex: 1; min-width: 120px; }
.ce-stat { display: flex; flex-direction: column; gap: 4px; padding-inline-start: 16px; border-inline-start: 3px solid var(--safi-300); }
.ce-stat-val { font-size: 2rem; font-weight: 700; color: var(--safi-700); line-height: 1; }
.ce-stat-label { font-size: var(--text-xs); color: var(--ink-3); margin-top: 3px; }

/* Features */
.features { padding-block: 88px; }
.section-head { margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); font-weight: 700; line-height: 1.18; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-2); font-size: var(--text-lg); max-width: 36rem; margin: 0; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; transition: box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out); }
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feat-ic { width: 44px; height: 44px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feat-ic svg { width: 22px; height: 22px; }
.ic-blue { background: var(--safi-100); color: var(--safi-700); }
.ic-clay { background: var(--clay-100); color: var(--clay-700); }
.feat h3 { font-size: var(--text-h4); font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
.feat p { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.6; margin: 0; }

/* Pricing */
.pricing { padding-block: 88px; }
.pricing-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: var(--r-full); padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: var(--r-full); padding: 9px 20px; font-weight: 600; font-size: var(--text-sm); color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--safi-800); box-shadow: var(--shadow-sm); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; min-height: 520px; }
.plan-pop { border-color: var(--safi-400); box-shadow: var(--shadow-md); }
.pop-badge { position: absolute; top: -13px; inset-inline-start: 24px; background: var(--safi-700); color: #fff; font-size: var(--text-xs); font-weight: 600; border-radius: var(--r-full); padding: 4px 14px; }
.plan-name { font-size: var(--text-h4); font-weight: 600; }
.plan-tag { font-size: var(--text-sm); color: var(--ink-3); margin-bottom: 20px; min-height: 20px; }
.price-row { display: flex; align-items: baseline; gap: 3px; margin-bottom: 4px; }
.price-cur { font-size: var(--text-h4); font-weight: 600; color: var(--ink-2); }
.price-num { font-size: 2.6rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.price-unit { font-size: var(--text-sm); color: var(--ink-3); }
.billed-note { font-size: var(--text-xs); color: var(--ink-3); min-height: 18px; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: var(--text-sm); color: var(--ink-2); line-height: 1.5; }
.plan li svg { width: 15px; height: 15px; color: var(--positive); flex: none; margin-top: 3px; }
.pricing-note { margin-top: 28px; font-size: var(--text-sm); color: var(--ink-3); }

/* CTA band */
.cta-band { background: var(--safi-700); color: #fff; padding-block: 88px; position: relative; overflow: hidden; }
.cta-band::after { content: 'ص'; position: absolute; inset-inline-end: -60px; bottom: -260px; font-size: 540px; line-height: 1; font-weight: 700; color: rgba(255,255,255,0.04); pointer-events: none; font-family: var(--font-arabic); }
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: var(--text-h1); font-weight: 600; line-height: 1.2; margin: 0 0 8px; }
.cta-band p { color: var(--safi-200); margin: 0; }
.cta-note { font-size: var(--text-sm); color: var(--safi-200); margin-top: 12px; }

/* Footer */
.footer { padding-block: 52px 40px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-tag { font-size: var(--text-sm); color: var(--ink-3); margin-top: 8px; max-width: 220px; line-height: 1.6; }
.footer-links { display: flex; gap: 28px; font-size: var(--text-sm); color: var(--ink-2); flex-wrap: wrap; align-items: center; }
.footer-links a:hover { color: var(--safi-700); }
.footer-copy { margin-top: 32px; font-size: var(--text-xs); color: var(--ink-4); }

/* Animation Utils */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@keyframes phone-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.phone-wrap .phone { animation: phone-float 4s var(--ease-in-out) infinite; }

/* Leak ledger (cash-leak callout) */
.leak-ledger { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 8px 22px 14px; text-align: start; }
.ll-head { font-size: var(--text-xs); font-weight: 600; color: var(--ink-3); padding: 12px 0 4px; }
.ll-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.ll-label { color: var(--ink-2); line-height: 1.45; }
.ll-amt { color: var(--destructive); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ll-cur { font-size: 0.85em; font-weight: 500; opacity: 0.8; }
.ll-total { border-top: 1.5px solid var(--line-2); margin-top: 2px; padding-top: 13px; }
.ll-total .ll-label { color: var(--ink); font-weight: 700; }
.ll-total .ll-amt { color: var(--destructive); font-weight: 700; font-size: var(--text-base); }
.ll-catch { font-size: var(--text-sm); color: var(--ink-2); line-height: 1.6; margin: 18px 0 0; text-align: start; }
.ll-catch strong { color: var(--safi-700); font-weight: 700; }

/* Cash-gap flip card — front teaser, back breakdown */
.leak-flip {
  perspective: 1200px;
  min-height: 332px;           /* fits the taller face: BACK = 4 rows + total + catch; FRONT = ~178px vessel + labels + caption + cue */
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.leak-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.leak-flip.flipped .leak-flip-inner { transform: rotateY(180deg); }
.leak-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow .25s ease, transform .25s ease;
}
.leak-back { transform: rotateY(180deg); }
/* hover lift only on the face currently facing the user, signalling tappability */
.leak-flip:not(.flipped):hover .leak-front,
.leak-flip.flipped:hover .leak-back { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.leak-flip.flipped:hover .leak-back { transform: rotateY(180deg) translateY(-3px); }
.leak-flip:focus-visible .leak-face { box-shadow: var(--shadow-lg), 0 0 0 3px var(--safi-300); }

/* FRONT face — draining-vessel visual (cash in << cash out) */
.leak-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 22px 24px;
  /* flow tokens: green IN (positive), red OUT (destructive), danger-tinted low fill */
  --lf-in: var(--positive);
  --lf-out: var(--destructive);
  --lf-fill: var(--destructive-bg);
  --lf-fill-2: var(--warning-bg);
}
.lf-flow { position: relative; }
.lf-flow-svg { display: block; height: clamp(150px, 38vw, 178px); width: auto; }

/* In/Out size-asymmetry labels */
.lf-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.lf-tag-in  { top: 8px;  inset-inline-start: 0;  font-size: var(--text-xs); color: var(--positive); }
.lf-tag-out { bottom: 2px; inset-inline-end: 0;  font-size: var(--text-base); color: var(--destructive); }
.lf-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.lf-dot-in  { background: var(--positive); }
.lf-dot-out { width: 11px; height: 11px; background: var(--destructive); }

/* caption — one short pre-attentive reinforcement line */
.lf-cap { font-size: var(--text-base); font-weight: 700; color: var(--ink); line-height: 1.3; }

/* subtle, tasteful loop: streams drift, level eases. Disabled in reduced-motion. */
.lf-stream-in  { animation: lf-drip-in 2.6s ease-in-out infinite; transform-origin: center; }
.lf-stream-out { animation: lf-drip-out 1.4s ease-in-out infinite; transform-origin: center; }
.lf-fill, .lf-fill-top { animation: lf-level 3.4s ease-in-out infinite; }
@keyframes lf-drip-in  { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes lf-drip-out { 0%,100% { opacity: .8; transform: translateY(0); } 50% { opacity: 1; transform: translateY(2px); } }
@keyframes lf-level    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

.lf-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--safi-700);
  background: var(--safi-50);
  border: 1px solid var(--safi-100);
  border-radius: 999px;
  padding: 7px 14px;
}
.lf-flip-ic { color: var(--safi-700); flex: none; }
.leak-flip:not(.flipped):hover .lf-flip-ic { animation: lf-spin .6s ease; }
@keyframes lf-spin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }

/* BACK face — full breakdown */
.leak-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 22px 16px;
}
.leak-back .leak-ledger { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
.leak-back .ll-catch { margin-top: 14px; }

/* Feature grid: 4-up desktop → 2-up tablet */
@media (max-width: 1040px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-inner { justify-content: space-between; }
  .nav-links { display: none; }
  .hero { padding-block: 56px 48px; text-align: center; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-sub { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .hero-note { justify-content: center; }
  .chickegg-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .chickegg-copy p { margin-inline: auto; }
  .ll-catch, .leak-ledger { text-align: start; }
  .leak-flip { max-width: 30rem; margin-inline: auto; width: 100%; }
  .ca-stats-row { gap: 16px; }
  .ce-stat { border-inline-start: 0; border-top: 3px solid var(--safi-300); padding-inline-start: 0; padding-top: 12px; align-items: center; }
  .plans { grid-template-columns: 1fr; }
  .plan { min-height: 0; }
  .plan-pop { order: -1; }
  .pricing-top { flex-direction: column; align-items: center; text-align: center; }
  .cta-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-tag { max-width: none; }
}

@media (max-width: 560px) {
  .feat-grid { grid-template-columns: 1fr; }
  /* both faces fit within the desktop min-height at 375px; keep it equal so the
     card doesn't resize mid-flip (vessel front is smaller here than the back) */
  .leak-flip { min-height: 332px; }
  .leak-back { padding-inline: 18px; }
}

/* Reduced motion: keep the flip functional, just drop the animated transitions */
@media (prefers-reduced-motion: reduce) {
  .leak-flip-inner { transition: none; }
  .leak-face { transition: none; }
  .leak-flip:not(.flipped):hover .lf-flip-ic { animation: none; }
  .lf-stream-in, .lf-stream-out, .lf-fill, .lf-fill-top { animation: none; }
}
