@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,600;9..40,700;9..40,800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Kufi+Arabic:wght@600;700;800;900&display=swap');

/* احسب معدلك — a digital academic notebook, made in Jordan */
:root {
  --ink: #14233a;
  --ink-soft: #526071;
  --blue: #1758d3;
  --blue-dark: #0d3f9f;
  --pink: #cf1959;
  --pink-dark: #9f1042;
  --yellow: #ffd45e;
  --paper: #f0f5f5;
  --paper-deep: #dfe9ea;
  --card: #fbfdfc;
  --line: #b9c9cb;
  --white: #ffffff;
  --display: "Noto Kufi Arabic", "DM Sans", sans-serif;
  --body: "IBM Plex Sans Arabic", "DM Sans", sans-serif;
  --utility: "DM Sans", "IBM Plex Sans Arabic", sans-serif;
  --shadow: 8px 8px 0 rgba(20, 35, 58, .13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  position: relative;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(23, 88, 211, .075) 36px, transparent 37px);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  direction: rtl;
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: 0;
  bottom: 0;
  inset-inline-start: 4.5vw;
  width: 1px;
  background: rgba(207, 25, 89, .22);
}
body.en { direction: ltr; }
.en-only { display: none; }
.ar-only { display: revert; }
body.en .en-only { display: revert; }
body.en .ar-only { display: none; }

a { color: var(--blue-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* Navigation — a slim notebook index tab */
nav {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(20, 35, 58, .16);
  background: rgba(240, 245, 245, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin-inline: auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: .95rem;
  font-weight: 800;
  text-decoration: none;
}
.nav-brand img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 3px 3px 0 rgba(20, 35, 58, .14); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  position: relative;
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}
.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.lang-toggle {
  min-width: 54px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  font-family: var(--utility);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .18s, color .18s, transform .18s;
}
.lang-toggle:hover { color: var(--white); background: var(--ink); transform: translateY(-1px); }
.store-btn {
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 9px 16px;
  color: var(--white) !important;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--yellow);
  font-family: var(--utility);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s, box-shadow .18s;
}
.store-btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--yellow); }

/* Hero — part landing page, part marked-up transcript */
.hero { position: relative; padding: clamp(62px, 9vw, 112px) 0 34px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .93fr) minmax(440px, 1.07fr); gap: clamp(50px, 7vw, 94px); align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-note {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--blue-dark);
  font-family: var(--utility);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero-note::before { content: "●"; margin-inline-end: 8px; color: var(--pink); }
.hero h1 {
  max-width: 760px;
  font-family: var(--display);
  font-size: clamp(2.55rem, 5.7vw, 5.35rem);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1.18;
}
body.en .hero h1 { font-family: var(--utility); font-weight: 800; line-height: .98; }
.hero h1 .accent {
  position: relative;
  display: inline;
  color: var(--pink);
  background: linear-gradient(transparent 72%, rgba(255, 212, 94, .88) 72%);
}
.hero .tagline { max-width: 620px; margin: 26px 0 30px; color: var(--ink-soft); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.85; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-primary, .btn-ghost {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 12px 23px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, background-color .18s;
}
.btn-primary { color: var(--white) !important; background: var(--blue); box-shadow: 5px 5px 0 var(--ink); }
.btn-primary:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn-ghost { color: var(--ink) !important; background: rgba(255, 255, 255, .52); }
.btn-ghost:hover { background: var(--yellow); }
.chips { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 26px; }
.chip { color: var(--ink-soft); font-size: .78rem; font-weight: 700; }
.chip > span:first-child { color: var(--pink); }

.hero-visual { position: relative; min-height: 590px; direction: ltr; }
.grade-sheet {
  position: absolute;
  z-index: 1;
  inset: 28px 20px auto auto;
  width: min(100%, 470px);
  min-height: 500px;
  border: 1px solid var(--ink);
  padding: 32px 30px 38px;
  background-color: #fffefa;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 34px, rgba(23, 88, 211, .12) 35px, transparent 36px);
  box-shadow: 14px 16px 0 rgba(20, 35, 58, .13);
  transform: rotate(3deg);
}
.grade-sheet::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 48px;
  width: 1px;
  background: rgba(207, 25, 89, .22);
}
.sheet-top { display: flex; justify-content: space-between; border-bottom: 3px solid var(--ink); padding: 0 0 12px; font-family: var(--utility); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.sheet-row { position: relative; display: grid; grid-template-columns: 1fr 60px 64px; gap: 8px; align-items: center; min-height: 56px; border-bottom: 1px solid rgba(20, 35, 58, .23); font-size: .86rem; }
.sheet-row strong { color: var(--blue); font-family: var(--utility); font-size: 1.25rem; }
.sheet-labels { min-height: 42px; color: var(--ink-soft); font-family: var(--utility); font-size: .62rem; font-weight: 800; letter-spacing: .06em; }
.sheet-result { display: flex; align-items: end; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--ink); font-weight: 700; }
.sheet-result b { color: var(--pink); font-family: var(--utility); font-size: 3.25rem; line-height: 1; letter-spacing: -.05em; }
.marker-note { position: absolute; right: 28px; bottom: 22px; color: var(--pink); font-family: var(--display); font-size: .72rem; font-weight: 800; transform: rotate(-7deg); }
.marker-note::after { content: ""; position: absolute; right: -6px; bottom: -5px; width: 100%; height: 7px; border-bottom: 3px solid var(--pink); border-radius: 50%; }
.hero-phone { position: absolute; z-index: 3; bottom: 0; left: 0; width: 216px; transform: rotate(-7deg); box-shadow: 12px 18px 0 rgba(20, 35, 58, .16); }
.tape { position: absolute; z-index: 4; top: 16px; right: 170px; width: 90px; height: 27px; background: rgba(255, 212, 94, .76); transform: rotate(-4deg); mix-blend-mode: multiply; }

/* Proof points are written into the same page, not separate floating cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(60px, 8vw, 96px); border-block: 1px solid var(--ink); }
.stat { min-height: 112px; padding: 20px 24px; border-inline-end: 1px solid rgba(20, 35, 58, .24); }
.stat:last-child { border-inline-end: 0; }
.stat b { display: block; color: var(--blue); font-family: var(--utility); font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.15; }
.stat span { color: var(--ink-soft); font-size: .76rem; font-weight: 700; }

section { position: relative; padding: clamp(70px, 9vw, 116px) 0; }
.section-head { max-width: 800px; margin: 0 auto clamp(36px, 6vw, 62px); text-align: center; }
.section-head h2, .split h2, .page h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.8vw, 3.35rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.3;
}
body.en .section-head h2, body.en .split h2, body.en .page h1 { font-family: var(--utility); line-height: 1.08; }
.section-head h2 .accent { color: var(--pink); }
.section-head p { margin-top: 14px; color: var(--ink-soft); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: var(--blue-dark);
  font-family: var(--utility);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.kicker::before { content: ""; width: 28px; height: 3px; background: var(--pink); transform: rotate(-3deg); }

/* Feature cards read like course notes; the stagger is the visual rhythm */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.feature {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr;
  column-gap: 20px;
  align-items: start;
  min-height: 188px;
  border: 1px solid var(--ink);
  border-radius: 13px;
  padding: 26px 28px;
  background: rgba(251, 253, 252, .94);
  box-shadow: 6px 6px 0 rgba(20, 35, 58, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:nth-child(4n + 2), .feature:nth-child(4n + 3) { transform: translateY(18px); }
.feature:hover { transform: translateY(-3px) rotate(-.35deg); box-shadow: 9px 9px 0 rgba(23, 88, 211, .18); }
.feature:nth-child(4n + 2):hover, .feature:nth-child(4n + 3):hover { transform: translateY(15px) rotate(.35deg); }
.feature .ic {
  grid-row: 1 / span 2;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--blue);
  background: var(--yellow);
  font-family: var(--utility);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.06em;
}
.feature:nth-child(3n + 2) .ic { color: var(--white); background: var(--pink); }
.feature:nth-child(3n + 3) .ic { color: var(--white); background: var(--blue); }
.feature h3 { margin: 2px 0 6px; font-family: var(--display); font-size: .98rem; font-weight: 800; line-height: 1.55; }
.feature p { color: var(--ink-soft); font-size: .87rem; line-height: 1.75; }

.split { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: clamp(50px, 9vw, 120px); align-items: center; }
.split > div:not(.phone) { position: relative; }
.split h2 { margin-bottom: 20px; }
.split p { color: var(--ink-soft); }
.split ul { display: grid; gap: 10px; margin-top: 24px; list-style: none; }
.split li { position: relative; padding-inline-start: 26px; font-size: .9rem; font-weight: 650; }
.split li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 1px; color: var(--pink); font-family: var(--utility); font-weight: 800; }
.split:nth-child(even) { direction: ltr; }

/* Devices keep a physical silhouette; no glassmorphism */
.phone { width: min(290px, 78vw); margin-inline: auto; border: 4px solid var(--ink); border-radius: 42px; padding: 8px; background: var(--ink); box-shadow: 12px 15px 0 rgba(20, 35, 58, .14); overflow: hidden; }
.phone img { width: 100%; border-radius: 30px; }
.phone-tilt-l { transform: rotate(-3deg); }
.phone-tilt-r { transform: rotate(3deg); }

.screens-section { border-block: 1px solid rgba(20, 35, 58, .18); background-color: var(--paper-deep); background-image: radial-gradient(rgba(20, 35, 58, .12) 1px, transparent 1px); background-size: 17px 17px; }
.gallery { display: flex; gap: 26px; overflow-x: auto; padding: 24px 16px 38px; scroll-snap-type: x mandatory; scrollbar-color: var(--blue) rgba(255, 255, 255, .35); scrollbar-width: thin; }
.gallery::-webkit-scrollbar { height: 7px; }
.gallery::-webkit-scrollbar-track { background: rgba(255, 255, 255, .4); }
.gallery::-webkit-scrollbar-thumb { background: var(--blue); }
.shot { position: relative; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.shot:nth-child(even) { transform: translateY(12px) rotate(.6deg); }
.shot:nth-child(odd) { transform: rotate(-.6deg); }
.shot .phone { width: 232px; border-width: 3px; border-radius: 36px; padding: 6px; box-shadow: 8px 10px 0 rgba(20, 35, 58, .18); }
.shot .phone img { border-radius: 27px; }
.shot figcaption { display: inline-block; margin-top: 17px; border-bottom: 4px solid var(--yellow); color: var(--ink); font-size: .78rem; font-weight: 800; line-height: 1.2; }

.pricing-preview { background: var(--ink); color: var(--white); }
.pricing-preview .section-head p, .pricing-preview .tier .per, .pricing-preview .tier .note { color: #5b687a; }
.pricing-preview .kicker { color: var(--yellow); }
.pricing-preview .section-head h2 { color: var(--white); }
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.tier { position: relative; display: flex; flex-direction: column; min-height: 225px; border: 1px solid var(--ink); border-radius: 10px; padding: 27px 21px 24px; color: var(--ink); background: var(--card); box-shadow: 5px 5px 0 rgba(20, 35, 58, .18); text-align: start; }
.tier::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; border-radius: 9px 9px 0 0; background: var(--blue); }
.tier:nth-child(2n)::before { background: var(--pink); }
.tier.hot { transform: translateY(-10px) rotate(-1deg); border-width: 2px; border-color: var(--yellow); box-shadow: 7px 7px 0 var(--pink); }
.tier .ribbon { position: absolute; top: -18px; inset-inline-end: 13px; border: 1px solid var(--ink); padding: 4px 10px; color: var(--ink); background: var(--yellow); font-size: .67rem; font-weight: 800; transform: rotate(2deg); }
.tier h3 { font-family: var(--display); font-size: .94rem; font-weight: 800; }
.tier .price { margin: 10px 0 2px; color: var(--blue); font-family: var(--utility); font-size: 2.35rem; font-weight: 800; letter-spacing: -.06em; line-height: 1.15; }
.tier .per { margin-bottom: 16px; color: var(--ink-soft); font-size: .72rem; }
.tier .note { margin-top: auto; color: var(--ink-soft); font-size: .78rem; line-height: 1.6; }
.pricing-preview > .wrap > p a { color: var(--yellow); }

.final-cta { padding-block: clamp(74px, 11vw, 134px); }
.final-cta .section-head { position: relative; max-width: 880px; border: 1px solid var(--ink); padding: clamp(36px, 6vw, 66px); background: var(--yellow); box-shadow: 10px 10px 0 var(--pink); transform: rotate(-.6deg); }
.final-cta .section-head::before { content: ""; position: absolute; top: -14px; left: 50%; width: 112px; height: 27px; background: rgba(255, 255, 255, .72); transform: translateX(-50%) rotate(2deg); }

footer { margin-top: 30px; padding: 58px 0 28px; color: #bac4d3; background: var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 46px; }
.foot-brand { display: flex; align-items: center; gap: 11px; color: var(--white); font-family: var(--display); font-size: 1rem; font-weight: 800; }
.foot-brand img { width: 42px; height: 42px; border-radius: 9px; }
footer h4 { margin-bottom: 13px; color: var(--white); font-size: .85rem; }
footer ul { display: grid; gap: 8px; list-style: none; font-size: .84rem; }
footer a { color: #bac4d3; }
footer a:hover { color: var(--yellow); }
.foot-bottom { margin-top: 36px; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 20px; font-family: var(--utility); font-size: .72rem; text-align: center; }

/* Content pages are long-form notebook pages */
.page { width: min(900px, calc(100% - 40px)); margin-inline: auto; padding: clamp(58px, 9vw, 100px) 0; }
.page > .wrap { width: 100%; }
.page h1 { position: relative; display: inline-block; margin-bottom: 9px; }
.page h1::after { content: ""; position: absolute; inset-inline: 0 -12px; bottom: -2px; z-index: -1; height: 13px; background: var(--yellow); transform: rotate(-1deg); }
.page .updated, .page .page-updated { margin-bottom: 38px; color: var(--ink-soft); font-size: .83rem; }
.page h2 { margin: 38px 0 12px; color: var(--blue-dark); font-family: var(--display); font-size: 1.17rem; font-weight: 800; line-height: 1.6; }
.page h3 { margin: 31px 0 7px; color: var(--ink); font-family: var(--display); font-size: 1rem; font-weight: 800; line-height: 1.65; }
.page p, .page li { color: #354256; font-size: .95rem; line-height: 1.9; }
.page ul { margin: 10px 0; padding-inline-start: 24px; }
.page .tiers {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  width: min(1120px, calc(100vw - 40px));
  margin-inline: calc((min(900px, calc(100vw - 40px)) - min(1120px, calc(100vw - 40px))) / 2);
}
.card-block { border: 1px solid var(--ink); border-radius: 10px; padding: clamp(24px, 5vw, 40px); background: var(--card); box-shadow: var(--shadow); }
details { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 17px 20px; background: rgba(251, 253, 252, .92); }
details[open] { border-color: var(--blue); box-shadow: 4px 4px 0 rgba(23, 88, 211, .13); }
details summary { color: var(--ink); font-weight: 800; cursor: pointer; }
details p { margin-top: 10px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
  .hero-visual { width: min(620px, 100%); margin-inline: auto; }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page .tiers { width: 100%; margin-inline: 0; }
}

@media (max-width: 780px) {
  body::before { display: none; }
  .nav-links { display: none; }
  .nav-inner { gap: 10px; }
  .nav-brand { margin-inline-end: auto; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: clamp(2.3rem, 12vw, 3.6rem); }
  .hero-visual { min-height: 540px; }
  .grade-sheet { right: 0; width: calc(100% - 22px); }
  .hero-phone { width: 185px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid rgba(20, 35, 58, .24); }
  .features { grid-template-columns: 1fr; }
  .feature:nth-child(n) { transform: none; }
  .feature:nth-child(n):hover { transform: translateY(-2px); }
  .split { grid-template-columns: 1fr; }
  .split > .phone { grid-row: 2; }
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap, .nav-inner, .page { width: min(100% - 28px, 1180px); }
  .nav-inner { min-height: 64px; }
  .nav-brand span { display: none; }
  .nav-brand img { width: 34px; height: 34px; }
  .store-btn { padding: 8px 11px; font-size: .69rem; }
  .lang-toggle { min-width: 48px; padding-inline: 8px; }
  .hero-note { font-size: .63rem; letter-spacing: .05em; }
  .hero-ctas { align-items: stretch; flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; }
  .hero-visual { min-height: 455px; margin-top: 8px; }
  .grade-sheet { min-height: 405px; padding: 22px 18px 28px; }
  .grade-sheet::before { left: 34px; }
  .sheet-row { grid-template-columns: 1fr 45px 48px; min-height: 46px; font-size: .72rem; }
  .sheet-labels { min-height: 35px; font-size: .54rem; }
  .sheet-result { margin-top: 18px; padding-top: 13px; font-size: .75rem; }
  .sheet-result b { font-size: 2.35rem; }
  .marker-note { right: 18px; bottom: 15px; font-size: .6rem; }
  .hero-phone { width: 148px; }
  .tape { right: 106px; width: 74px; }
  .stat { padding: 17px 12px; }
  .feature { grid-template-columns: 50px 1fr; min-height: 0; padding: 21px 18px; column-gap: 14px; }
  .feature .ic { width: 48px; height: 48px; font-size: .92rem; }
  .tiers { grid-template-columns: 1fr; }
  .tier.hot { transform: rotate(-.5deg); }
  .final-cta .section-head { padding: 38px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
