/* Masari website — design tokens & base */
:root {
  --teal: #1A6B8A;
  --teal-deep: #134F6B;
  --teal-soft: #E3EEF4;
  --gold: #E8A020;
  --gold-deep: #C48313;
  --gold-soft: #FDF0D5;
  --bg: #FBFBFD;
  --bg-warm: #F2F4F9;
  --ink: #18181C;
  --ink-2: #46464E;
  --ink-3: #7A7A85;
  --line: #E4E6EE;
  --card: #FFFFFF;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(15, 40, 70, 0.04), 0 2px 6px rgba(15, 40, 70, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 40, 70, 0.08), 0 2px 6px rgba(15, 40, 70, 0.04);
  --shadow-lg: 0 24px 60px rgba(15, 40, 70, 0.13), 0 6px 18px rgba(15, 40, 70, 0.07);

  --maxw: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; }
/* overflow-x: clip prevents any stray-wide element from expanding the
   layout viewport on mobile (which would stop the responsive media
   queries from firing). `clip` — not `hidden` — so the sticky nav
   keeps working. */
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }

html[dir="rtl"] body { font-family: "Tajawal", system-ui, sans-serif; }
html[dir="ltr"] body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }

body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

.display {
  font-family: "Reem Kufi", "Tajawal", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
html[dir="ltr"] .display {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 540px) { .container { padding: 0 20px; } }

section { padding: 96px 0; position: relative; }
@media (max-width: 720px) { section { padding: 64px 0; } }
@media (max-width: 480px) { section { padding: 56px 0; } }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 251, 253, 0.85);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--teal);
  display: grid; place-items: center;
  color: white;
  font-family: "Reem Kufi", serif;
  font-size: 20px; font-weight: 700;
  position: relative;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: auto -3px -3px auto;
  width: 11px; height: 11px;
  border-radius: 3px;
  background: var(--gold);
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text > span:first-child {
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.logo-en {
  font-family: "Plus Jakarta Sans", sans-serif !important;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  margin-top: 3px;
}
html[dir="ltr"] .logo-text > span:first-child { display: none; }
html[dir="ltr"] .logo-en {
  font-family: "DM Serif Display", serif !important;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 0;
  color: var(--ink);
}
.nav-cta { display: flex; align-items: center; gap: 8px; }
@media (max-width: 540px) {
  .nav-login { display: none; }
  .nav-inner { gap: 8px; }
  .nav-cta { gap: 6px; }
}
@media (max-width: 420px) {
  .nav-inner { height: 64px; }
  .nav-cta .btn-sm { padding: 8px 12px; font-size: 12px; }
  .logo-text > span:first-child { font-size: 18px; }
  .logo-en { font-size: 10px; }
  html[dir="ltr"] .logo-en { font-size: 19px; }
  .logo-mark { width: 34px; height: 34px; font-size: 18px; }
}

/* Lang toggle */
.lang-toggle {
  display: inline-flex;
  background: var(--bg-warm);
  border-radius: 999px;
  padding: 4px;
  font-weight: 600;
  border: 1px solid var(--line);
  font-size: 12px;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-3);
  font-family: inherit;
  font-weight: 600;
}
.lang-toggle button.active {
  background: white;
  color: var(--teal);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 480px) {
  .lang-toggle button { padding: 5px 10px; font-size: 11px; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 6px 16px rgba(26, 107, 138, 0.28);
}
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: #2A1F00;
  box-shadow: 0 6px 16px rgba(232, 160, 32, 0.30);
}
.btn-gold:hover { background: var(--gold-deep); color: #1A1300; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ============ Eyebrow ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.eyebrow-on-dark { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.95); }
.eyebrow-on-dark .dot { background: var(--gold); }

.sect-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.sect-head.left { text-align: start; margin: 0 0 36px; }
@media (max-width: 540px) {
  .sect-head { margin-bottom: 40px; }
  .sect-head p { font-size: 16px; }
}
.sect-head .eyebrow { margin-bottom: 16px; }
.sect-head h2 {
  font-size: clamp(30px, 4.5vw, 50px);
  margin: 0 0 14px;
  text-wrap: balance;
}
.sect-head p {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.6;
  text-wrap: pretty;
}

/* ============ Hero ============ */
.hero {
  padding-top: 56px;
  padding-bottom: 110px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hero-bg svg { width: 100%; height: 100%; }
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; text-align: center; justify-items: center; }
}
.hero .eyebrow { margin-bottom: 24px; }
.hero-title {
  font-size: clamp(36px, 5.8vw, 68px);
  margin: 0 0 18px;
  max-width: 16ch;
  text-wrap: balance;
}
.hero-title .dash { color: var(--ink-3); }
.hero-title .accent {
  color: var(--teal);
  display: inline-block;
  position: relative;
}
.hero-title .accent::after {
  content: "";
  position: absolute;
  inset: auto 4% -4px 4%;
  height: 10px;
  background: var(--gold);
  border-radius: 5px;
  opacity: 0.55;
  z-index: -1;
}
.hero-title .ar-brand { font-family: "Reem Kufi", serif; }
html[dir="ltr"] .hero-title .ar-brand { font-family: inherit; }
.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-2);
  max-width: 42ch;
  margin: 0 0 22px;
  line-height: 1.55;
  text-wrap: pretty;
}
.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
@media (max-width: 960px) { .hero-meta-row { justify-content: center; } }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.meta-chip svg { color: var(--teal); }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
@media (max-width: 960px) { .hero-cta { justify-content: center; } }
@media (max-width: 420px) {
  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-cta .btn-lg { width: 100%; padding: 14px 20px; font-size: 15px; }
  .hero-cta .store-mini { justify-content: center; }
}
.store-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.store-mini:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.store-mini .ic-store {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  color: var(--ink);
}

/* ============ Phone Mock ============ */
.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 640px;
}
@media (max-width: 480px) {
  .phone-stage { min-height: 640px; }
  .phone { width: 280px; height: 560px; padding: 8px; }
  .phone-notch { width: 88px; height: 22px; }
}
@media (max-width: 380px) {
  .phone { width: 260px; height: 520px; }
  .phone-stage { min-height: 600px; }
}
.phone {
  width: 312px;
  height: 620px;
  border-radius: 42px;
  background: #0a0a0a;
  padding: 9px;
  box-shadow: var(--shadow-lg), 0 40px 80px -30px rgba(26, 107, 138, 0.4);
  position: relative;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 26px;
  background: #0a0a0a;
  border-radius: 14px;
  z-index: 3;
}
.phone-status {
  display: flex; justify-content: space-between;
  padding: 16px 24px 8px;
  font-size: 12px; font-weight: 600;
  color: var(--ink);
}
.phone-header {
  padding: 8px 20px 14px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}
.phone-greet {
  font-size: 17px; font-weight: 700; color: var(--ink);
  font-family: "Reem Kufi", serif;
}
.phone-greet small {
  display: block;
  font-family: "Tajawal", sans-serif;
  font-size: 11px; color: var(--ink-3); font-weight: 500;
  margin-top: 2px;
}
.phone-streak {
  background: var(--gold-soft);
  color: #7A5800;
  padding: 6px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap;
}
.phone-progress {
  margin: 4px 20px 16px;
  background: var(--teal);
  border-radius: 18px;
  padding: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.phone-progress::after {
  content: "";
  position: absolute;
  inset: -50% -20% auto auto;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(232, 160, 32, 0.18);
}
.phone-progress .label { font-size: 11px; opacity: 0.85; font-weight: 500; }
.phone-progress .pct { font-size: 28px; font-weight: 700; font-family: "Reem Kufi", serif; line-height: 1.1; }
.phone-progress .bar {
  height: 6px; background: rgba(255,255,255,0.2); border-radius: 4px; margin-top: 10px;
  overflow: hidden;
}
.phone-progress .bar > div {
  height: 100%; width: 68%; background: var(--gold); border-radius: 4px;
}
.phone-section-title {
  padding: 4px 20px 10px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between;
}
.phone-section-title a { color: var(--teal); font-weight: 600; font-size: 11px; text-decoration: none; }
.subject-grid {
  padding: 0 20px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sub-card {
  background: white;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--line);
}
.sub-card .dot-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 14px;
  font-family: "Reem Kufi", serif;
  margin-bottom: 8px;
}
.sub-card .name { font-size: 12px; font-weight: 700; color: var(--ink); }
.sub-card .meta { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.sub-card .mini-bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.sub-card .mini-bar > div { height: 100%; border-radius: 2px; }
.phone-tabbar {
  margin-top: auto;
  padding: 10px 20px 22px;
  display: flex; justify-content: space-around;
  border-top: 1px solid var(--line);
  background: white;
}
.phone-tabbar .tab {
  display: grid; place-items: center; gap: 3px;
  font-size: 9px; color: var(--ink-3); font-weight: 600;
}
.phone-tabbar .tab.active { color: var(--teal); }
.phone-tabbar .tab-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--bg-warm);
}
.phone-tabbar .tab.active .tab-icon { background: var(--teal-soft); }

.float-card {
  position: absolute;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  z-index: 3;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  font-weight: 600;
  max-width: 200px;
}
.float-card .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: white; font-size: 16px; font-weight: 700;
  font-family: "Reem Kufi", serif;
  flex-shrink: 0;
}
.float-card .meta { color: var(--ink-3); font-size: 11px; font-weight: 500; margin-top: 2px; }
.float-card.fc-1 { top: 10%; inset-inline-start: -8%; }
.float-card.fc-2 { bottom: 16%; inset-inline-end: -10%; }
@media (max-width: 960px) {
  .float-card.fc-1 { inset-inline-start: -2%; }
  .float-card.fc-2 { inset-inline-end: -2%; }
}
@media (max-width: 540px) {
  .float-card { display: none; }
}

/* Floating letter tiles (Masari v2 hero) */
.lt-float {
  position: absolute;
  width: 64px;
  height: 72px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(255,255,255,0.6);
  z-index: 3;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  animation: lt-bob 5s ease-in-out infinite;
}
.lt-float:hover { transform: scale(1.08) rotate(0deg) !important; z-index: 5; }
@keyframes lt-bob {
  0%, 100% { transform: var(--lt-rest); }
  50% { transform: var(--lt-rest) translateY(-6px); }
}
.lt-f-1 { top: 6%;  inset-inline-start: -2%; --lt-rest: rotate(-9deg); transform: rotate(-9deg); animation-delay: 0s; }
.lt-f-2 { top: 18%; inset-inline-end: -4%; --lt-rest: rotate(7deg); transform: rotate(7deg); animation-delay: 0.6s; width: 56px; height: 64px; font-size: 30px; }
.lt-f-3 { top: 44%; inset-inline-start: -6%; --lt-rest: rotate(5deg); transform: rotate(5deg); animation-delay: 1.2s; width: 52px; height: 60px; font-size: 28px; }
.lt-f-4 { bottom: 22%; inset-inline-end: -5%; --lt-rest: rotate(-6deg); transform: rotate(-6deg); animation-delay: 1.8s; }
.lt-f-5 { bottom: 6%; inset-inline-start: 4%; --lt-rest: rotate(-3deg); transform: rotate(-3deg); animation-delay: 2.4s; width: 48px; height: 56px; font-size: 26px; }
.lt-f-6 { top: 52%; inset-inline-end: -2%; --lt-rest: rotate(10deg); transform: rotate(10deg); animation-delay: 3s; width: 44px; height: 52px; font-size: 24px; }

@media (max-width: 960px) {
  .lt-f-1 { inset-inline-start: 2%; }
  .lt-f-2 { inset-inline-end: 2%; }
  .lt-f-3 { inset-inline-start: 0%; }
  .lt-f-4 { inset-inline-end: 0%; }
}
@media (max-width: 540px) {
  .lt-float { width: 44px; height: 50px; font-size: 22px; border-radius: 12px; }
  .lt-f-2, .lt-f-3, .lt-f-5, .lt-f-6 { width: 38px; height: 44px; font-size: 18px; }
  .lt-f-1 { inset-inline-start: 4%; }
  .lt-f-2 { inset-inline-end: 4%; }
  .lt-f-3 { display: none; }
  .lt-f-6 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lt-float { animation: none; }
}

/* ============ Problem ============ */
.problem-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) 1.3fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 720px) {
  .problem-grid { grid-template-columns: 1fr; gap: 28px; }
}
.problem-stat .big-num {
  font-family: "DM Serif Display", "Reem Kufi", serif;
  font-size: clamp(72px, 11vw, 120px);
  font-weight: 400;
  line-height: 0.95;
  color: var(--teal);
  letter-spacing: -0.04em;
}
html[dir="rtl"] .problem-stat .big-num { font-family: "Reem Kufi", serif; }
.problem-stat .big-lead {
  font-family: "Reem Kufi", "DM Serif Display", serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin-top: 12px;
  text-wrap: balance;
}
html[dir="ltr"] .problem-stat .big-lead { font-family: "DM Serif Display", serif; font-weight: 400; }
.problem-body {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0;
  max-width: 50ch;
  text-wrap: pretty;
}

/* ============ Games ============ */
.games { background: var(--bg-warm); }
.games-scroll {
  margin: 0 -24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.games-scroll::-webkit-scrollbar { height: 8px; }
.games-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.games-row {
  display: flex;
  gap: 18px;
  padding: 8px 24px 24px;
  min-width: min-content;
}
.game-reveal { scroll-snap-align: start; flex: 0 0 auto; }
.game-card {
  width: 280px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.game-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gm {
  height: 200px;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  position: relative;
  padding: 14px;
}
.gm-screen {
  background: white;
  border-radius: 14px;
  width: 100%; height: 100%;
  padding: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 0 1px rgba(15, 40, 70, 0.04);
}
.gm-pill {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.gm-big-letter {
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  margin: 4px 0 6px;
  text-align: center;
}
.gm-options { display: flex; gap: 6px; justify-content: center; margin-top: auto; }
.gm-opt {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-warm);
  display: grid; place-items: center;
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  border: 2px solid transparent;
}
.gm-opt.right { background: #E6F7EF; color: #066644; border-color: #10B981; }
.gm-trace { width: 100%; height: 100%; flex: 1; align-self: stretch; }
.gm-word { display: flex; gap: 6px; justify-content: center; margin: 6px 0; }
.gm-tile {
  width: 38px; height: 44px;
  border-radius: 10px;
  border: 2px solid;
  display: grid; place-items: center;
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 22px;
}
.gm-tray {
  margin-top: auto;
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 6px 8px;
  background: var(--bg-warm);
  border-radius: 10px;
}
.gm-chip {
  width: 28px; height: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-2);
}
.gm-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.gm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}
.gm-row > span:first-child { flex: 0 0 50px; }
.gm-bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.gm-bar > div { height: 100%; border-radius: 3px; }
.gm-row strong { font-size: 11px; color: var(--ink); width: 30px; text-align: end; }
.gm-stars { display: flex; gap: 4px; justify-content: center; margin-top: auto; font-size: 16px; }

.game-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.game-card-body p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.5; text-wrap: pretty; }

/* ============ Trust ============ */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.trust-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.trust-ic {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid; place-items: center;
  margin-bottom: 20px;
}
.tc-1 .trust-ic { background: var(--gold-soft); color: var(--gold-deep); }
.tc-2 .trust-ic { background: #ECE4F8; color: #6E45C7; }
.trust-card h3 {
  font-family: "Reem Kufi", serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
}
html[dir="ltr"] .trust-card h3 { font-family: "DM Serif Display", serif; font-weight: 400; font-size: 22px; }
.trust-card p { color: var(--ink-2); margin: 0; font-size: 15px; line-height: 1.6; text-wrap: pretty; }

/* ============ Subjects ============ */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .subjects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .subjects-grid { grid-template-columns: 1fr; } }
.subject {
  position: relative;
  border-radius: var(--r-lg);
  padding: 28px;
  color: white;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}
.subject:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.subject .glyph {
  position: absolute;
  inset-inline-end: -8px;
  bottom: -18px;
  font-size: 140px;
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  color: rgba(255,255,255,0.16);
  line-height: 1;
  pointer-events: none;
}
.subject h4 {
  font-family: "Reem Kufi", serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  position: relative;
}
html[dir="ltr"] .subject h4 { font-family: "DM Serif Display", serif; font-weight: 400; font-size: 24px; }
.subject .en { font-size: 12px; opacity: 0.85; font-family: "Plus Jakarta Sans", sans-serif; position: relative; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.subject .stats {
  display: flex; gap: 12px;
  font-size: 13px;
  position: relative;
  font-weight: 600;
}
.subject .stats span { opacity: 0.92; }

/* ============ Numbers ============ */
.numbers { background: var(--bg-warm); }
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 800px) { .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 480px) {
  .numbers-grid { gap: 12px; }
  .num-card { padding: 24px 16px; }
  .num-l { font-size: 13px; }
}
.num-card {
  background: white;
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  height: 100%;
}
.num-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -50px auto;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--teal-soft);
  opacity: 0.5;
  z-index: 0;
}
.num-card-1::before { background: var(--gold-soft); }
.num-card-2::before { background: #ECE4F8; }
.num-card-3::before { background: #DFF5EA; }
.num-n {
  font-family: "DM Serif Display", "Reem Kufi", serif;
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 400;
  line-height: 1;
  color: var(--teal);
  position: relative;
  z-index: 1;
  letter-spacing: -0.03em;
}
html[dir="rtl"] .num-n { font-family: "Reem Kufi", serif; }
.num-card-1 .num-n { color: var(--gold-deep); }
.num-card-2 .num-n { color: #6E45C7; }
.num-card-3 .num-n { color: #0F8A5A; }
.num-l { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-top: 8px; position: relative; z-index: 1; }

/* "+ / وأكثر" suffix on numbers */
.num-n { display: inline-flex; align-items: baseline; gap: 4px; }
.num-more {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.32em;
  color: var(--ink-3);
  letter-spacing: 0;
  white-space: nowrap;
  position: relative;
  top: -0.4em;
}
html[dir="rtl"] .num-more {
  font-family: "Tajawal", sans-serif;
  font-weight: 700;
}
.num-card-1 .num-more { color: var(--gold-deep); opacity: 0.7; }
.num-card-2 .num-more { color: #6E45C7; opacity: 0.7; }
.num-card-3 .num-more { color: #0F8A5A; opacity: 0.7; }

/* ============ Pricing ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 460px));
  justify-content: center;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 720px) { .pricing-grid { grid-template-columns: 1fr; max-width: 460px; } }
@media (max-width: 480px) {
  .plan { padding: 28px 22px; border-radius: 22px; }
  .plan-badge { top: 14px; inset-inline-end: 16px; font-size: 10px; padding: 4px 10px; }
}
.plan {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.plan-featured {
  background: linear-gradient(180deg, #144C66 0%, #1A6B8A 100%);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}
.plan-featured:hover { box-shadow: var(--shadow-lg), 0 24px 60px -20px rgba(26, 107, 138, 0.5); }
.plan-badge {
  position: absolute;
  top: 16px;
  inset-inline-end: 20px;
  background: var(--gold);
  color: #2A1F00;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.plan-name {
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
html[dir="ltr"] .plan-name { font-family: "Plus Jakarta Sans", sans-serif; }
.plan-featured .plan-name { color: rgba(255,255,255,0.85); }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.plan-cur {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-2);
  font-family: "Plus Jakarta Sans", sans-serif;
}
.plan-featured .plan-cur { color: rgba(255,255,255,0.7); }
.plan-amount {
  font-family: "DM Serif Display", "Reem Kufi", serif;
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 400;
  line-height: 1;
  color: var(--teal);
  letter-spacing: -0.03em;
}
html[dir="rtl"] .plan-amount { font-family: "Reem Kufi", serif; }
.plan-featured .plan-amount { color: white; }
.plan-unit {
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 600;
}
.plan-featured .plan-unit { color: rgba(255,255,255,0.7); }
.plan-tag {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}
.plan-featured .plan-tag { color: rgba(255,255,255,0.88); }
.plan-features {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.plan-features li svg {
  color: var(--teal);
  flex-shrink: 0;
}
.plan-featured .plan-features li { color: rgba(255,255,255,0.95); }
.plan-featured .plan-features li svg { color: var(--gold); }
.plan-cta { margin-top: auto; align-self: stretch; }
.plan-featured .btn-primary { background: white; color: var(--teal-deep); box-shadow: none; }
.plan-featured .btn-primary:hover { background: rgba(255,255,255,0.92); }

.pay-note {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.mtn-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFCC00;
  color: #000;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.mtn-dot {
  width: 8px; height: 8px;
  background: #000;
  border-radius: 50%;
  display: inline-block;
}

/* ============ Signup CTA ============ */
.join-block {
  background: var(--teal-deep);
  background-image: linear-gradient(135deg, #134F6B 0%, #1A6B8A 60%, #2289B0 100%);
  border-radius: var(--r-xl);
  padding: 80px 48px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) { .join-block { padding: 56px 24px; border-radius: 24px; } }
.join-pattern { position: absolute; inset: 0; opacity: 0.15; pointer-events: none; }
.join-pattern svg { width: 100%; height: 100%; }
.join-pattern circle { fill: var(--gold) !important; }
.join-pattern polygon { stroke: white !important; }
.join-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.join-inner h2 {
  font-size: clamp(28px, 4.5vw, 48px);
  margin: 0;
  color: white;
  text-wrap: balance;
}
.join-inner p {
  margin: 0;
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  max-width: 50ch;
  text-wrap: pretty;
}
.join-inner .btn { margin-top: 6px; }
.already {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}
.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}
.link-btn:hover { color: white; }

/* ============ Schools ============ */
.schools-row {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
@media (max-width: 720px) {
  .schools-row { flex-direction: column; align-items: flex-start; padding: 32px 24px; border-radius: 24px; }
}
.schools-row h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 10px 0 8px;
  color: var(--ink);
  text-wrap: balance;
}
.schools-row p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 50ch; }

/* ============ Footer ============ */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  background: var(--bg);
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; flex-direction: column; gap: 8px; }
.foot-tag { margin: 0; font-size: 13px; color: var(--ink-3); }
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: white;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.foot-social a:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-soft); }
.foot-copy { font-size: 13px; color: var(--ink-3); }
@media (max-width: 540px) {
  .foot-inner { flex-direction: column; align-items: flex-start; }
  .foot-copy { order: 3; }
}

/* ============ Sticky CTA ============ */
.sticky-cta {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  z-index: 40;
  background: var(--teal);
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(26, 107, 138, 0.4);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.sticky-cta:hover { transform: translateY(-2px); }
.sticky-cta.hide { opacity: 0; pointer-events: none; transform: translateY(20px); }
@media (min-width: 800px) { .sticky-cta { display: none; } }
@media (max-width: 420px) {
  .sticky-cta { bottom: 14px; inset-inline-end: 14px; padding: 12px 18px; font-size: 14px; }
}

/* ============ Modal ============ */
.modal-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 30, 50, 0.55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white;
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 460px;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: pop 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  margin: auto;
}
@media (max-width: 480px) { .modal { padding: 28px 24px; border-radius: 22px; } }
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-x {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink-2);
}
.modal-x:hover { color: var(--ink); border-color: var(--ink-3); }
.modal h3 { font-size: 26px; margin: 4px 0 6px; }
.modal-sub { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.form input, .form select {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.form input:focus, .form select:focus {
  border-color: var(--teal);
  background: white;
  box-shadow: 0 0 0 4px var(--teal-soft);
}
.form [aria-invalid="true"] {
  border-color: #E26A6A;
  box-shadow: 0 0 0 4px rgba(226, 106, 106, 0.15);
}
.form-row-aside {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}
.link-muted {
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 600;
}
.link-muted:hover { color: var(--teal); text-decoration: underline; }
.form-submit { margin-top: 8px; align-self: stretch; }
.link-switch {
  background: none;
  border: none;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 8px;
  font-family: inherit;
  font-size: 14px;
  margin-top: 2px;
}
.link-switch:hover { text-decoration: underline; }

.thanks {
  text-align: center;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.thanks-ic {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid; place-items: center;
}
.thanks h3 { margin: 4px 0 0; font-size: 22px; }

/* ============ Grades availability (v3) ============ */
.grades-table {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: white;
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
}
.grades-row {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.2fr 1.1fr;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  gap: 12px;
}
.grades-row:last-child { border-bottom: 0; }
.grades-head {
  background: var(--bg-warm);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.g-grade {
  font-family: "Reem Kufi", serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
html[dir="ltr"] .g-grade { font-family: "DM Serif Display", serif; font-weight: 400; font-size: 19px; }
.g-age, .g-subs, .g-q {
  color: var(--ink-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.g-q { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; color: var(--ink); }
html[dir="rtl"] .g-q { font-family: "Tajawal", sans-serif; }
.g-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.g-ready .g-pill { background: #DFF5EA; color: #0F7549; }
.g-soon .g-pill  { background: var(--gold-soft); color: #8A5800; }
.g-planned .g-pill { background: var(--bg-warm); color: var(--ink-3); }
.grades-row.g-soon, .grades-row.g-planned { background: rgba(0,0,0,0.005); }
.grades-row.g-ready { position: relative; }
.grades-row.g-ready::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  width: 4px;
  background: #0F7549;
}
@media (max-width: 720px) {
  .grades-table { border-radius: 22px; }
  .grades-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 18px;
    padding: 16px 18px;
  }
  .grades-head { display: none; }
  .g-grade { grid-column: 1; grid-row: 1; }
  .g-age, .g-subs, .g-q {
    font-size: 13px;
    color: var(--ink-3);
    font-weight: 600;
  }
  .g-age { grid-column: 1; grid-row: 2; }
  .g-subs { grid-column: 2; grid-row: 2; justify-self: end; }
  .g-q { grid-column: 1 / -1; grid-row: 3; font-size: 14px; color: var(--ink-2); }
}

/* ============ Compare (v3) ============ */
.compare { background: var(--bg-warm); }
.cmp-table {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
}
.cmp-row {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
  font-size: 15px;
}
.cmp-row:last-child { border-bottom: 0; }
.cmp-row > .cmp-us { background: rgba(26, 107, 138, 0.05); }
.cmp-row > .cmp-us, .cmp-row > .cmp-them { justify-self: center; width: 100%; text-align: center; padding: 8px; border-radius: 10px; }
.cmp-head {
  background: var(--bg);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 24px;
}
.cmp-head .cmp-us {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: var(--teal);
  color: white;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.cmp-head .cmp-them {
  background: white;
  color: var(--ink-3);
}
.cmp-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  font-size: 14px;
}
.cmp-mark::after { display: none; }
.cmp-f {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  text-wrap: pretty;
}
.cmp-yes {
  display: inline-flex;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #DFF5EA;
  color: #0F7549;
  align-items: center; justify-content: center;
}
.cmp-no {
  display: inline-flex;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #FCE9E9;
  color: #B43232;
  align-items: center; justify-content: center;
}
.cmp-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 540px) {
  .cmp-row { grid-template-columns: 1.4fr 0.7fr 0.7fr; padding: 14px 16px; font-size: 14px; }
  .cmp-head { padding: 12px 16px; }
  .cmp-head .cmp-us, .cmp-head .cmp-them { font-size: 10px; padding: 6px; }
  .cmp-mark { display: none; }
}
@media (max-width: 420px) {
  .cmp-row { grid-template-columns: 1.3fr 56px 56px; gap: 8px; padding: 12px 12px; font-size: 13px; }
  .cmp-row > .cmp-us, .cmp-row > .cmp-them { padding: 6px 4px; }
  .cmp-yes, .cmp-no { width: 26px; height: 26px; }
  .cmp-text { font-size: 12px; }
  .cmp-f { line-height: 1.35; }
}

/* ============ Newsletter (v3) ============ */
.newsletter { padding: 64px 0; background: var(--bg-warm); }
.news-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .news-block { flex-direction: column; align-items: stretch; padding: 32px 24px; border-radius: 24px; }
}
.news-block::before {
  content: "";
  position: absolute;
  inset-inline-end: -80px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0.5;
  z-index: 0;
}
.news-text { position: relative; z-index: 1; flex: 1; }
.news-text h3 { font-size: clamp(22px, 2.4vw, 28px); margin: 10px 0 6px; text-wrap: balance; }
.news-text p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 44ch; text-wrap: pretty; }
.news-form {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  min-width: 320px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.news-form:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
@media (max-width: 720px) {
  .news-form { width: 100%; min-width: 0; }
}
@media (max-width: 480px) {
  .news-form { border-radius: 18px; padding: 8px; flex-direction: column; }
}
.news-form input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  padding: 8px 16px;
  color: var(--ink);
  min-width: 0;
}
.news-form input::placeholder { color: var(--ink-3); }
.news-form input[aria-invalid="true"] { color: #B43232; }
.news-form .btn { padding: 11px 20px; font-size: 14px; }
.news-thanks {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #DFF5EA;
  color: #0F7549;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

/* Newsletter v2 (email OR phone) */
.news-form-v2 {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 360px;
  max-width: 420px;
}
@media (max-width: 720px) {
  .news-form-v2 { min-width: 0; width: 100%; }
}
.news-fields {
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 2px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.news-fields:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.news-fields input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  color: var(--ink);
  border-radius: 10px;
}
.news-fields input::placeholder { color: var(--ink-3); }
.news-fields input[aria-invalid="true"]::placeholder { color: #C66; }
.news-or {
  align-self: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 6px;
  position: relative;
  white-space: nowrap;
}
.news-or::before, .news-or::after {
  content: "";
  display: block;
  position: absolute;
  inset-block: 8px;
  width: 1px;
  background: var(--line);
}
.news-or::before { inset-inline-start: 0; }
.news-or::after  { inset-inline-end: 0; }
.news-submit { width: 100%; padding: 12px 22px; font-size: 15px; }
.news-hint {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
@media (max-width: 540px) {
  .news-fields { flex-direction: column; padding: 8px; gap: 6px; }
  .news-or {
    padding: 4px 0;
  }
  .news-or::before, .news-or::after {
    inset-block: auto;
    inset-inline: 12px;
    inset-block-start: 50%;
    height: 1px;
    width: auto;
  }
  .news-or::before { inset-inline-end: calc(50% + 24px); inset-inline-start: 12px; }
  .news-or::after  { inset-inline-start: calc(50% + 24px); inset-inline-end: 12px; }
}

/* ============ Mobile preview frame ============ */
.mobile-preview-stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(1100px 700px at 50% 0%, rgba(26, 107, 138, 0.18), transparent 60%),
    linear-gradient(180deg, #0d1620 0%, #0a1019 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 16px 40px;
  overflow: hidden;
}
.mobile-preview-frame {
  position: relative;
  width: 412px;
  height: min(880px, calc(100vh - 110px));
  max-height: 880px;
  background: #111418;
  border-radius: 52px;
  padding: 12px;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.08) inset,
    0 0 0 8px #1a1d22,
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 12px 30px rgba(0, 0, 0, 0.4);
}
.mobile-preview-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 28px;
  background: #000;
  border-radius: 18px;
  z-index: 2;
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.05) inset;
}
.mobile-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 42px;
  background: var(--bg);
  display: block;
}
.mobile-preview-caption {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
@media (max-width: 480px) {
  .mobile-preview-frame {
    width: min(100%, 360px);
    padding: 8px;
    border-radius: 40px;
  }
  .mobile-preview-iframe { border-radius: 32px; }
  .mobile-preview-notch { width: 100px; height: 22px; top: 14px; }
}

/* Inside the iframe child, drop scroll-padding so anchored sections sit flush */
html.is-mobile-preview-child { scroll-padding-top: 64px; }

/* ============ Contact (v3) ============ */
.contact-section { padding-bottom: 96px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
.contact-left h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin: 14px 0 16px;
  text-wrap: balance;
}
.contact-left p {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
  max-width: 45ch;
  text-wrap: pretty;
}
.contact-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 480px) {
  .contact-card { padding: 28px 22px; border-radius: 22px; }
}
.contact-card .form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 96px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  line-height: 1.5;
}
.contact-card .form textarea:focus {
  border-color: var(--teal);
  background: white;
  box-shadow: 0 0 0 4px var(--teal-soft);
}
.contact-card .form [aria-invalid="true"] {
  border-color: #E26A6A;
  box-shadow: 0 0 0 4px rgba(226, 106, 106, 0.15);
}
