/* Nerd School — the showcase page.
   Layout: one column of parts, each a heading, its points, then the screens
   that prove them; phones scroll sideways on a phone, laptops sit in a grid.
   The palette is the app's own (items 80–82 of the app): a cream page nearly
   white with white cards by day, a dark navy by night, the brand green for
   what is pressed and the logo's cyan beside it. */

:root {
  --page: #fffefb;
  --card: #ffffff;
  --line: #ece9e2;
  --ink: #1e1b17;
  --ink-soft: #5d5850;
  --ink-faint: #8a847a;
  --brand: #16a34a;
  --brand-ink: #10803a;
  --brand-wash: #e7f6ec;
  --accent: #0891b2;
  --whatsapp: #1f9d55;
  --shadow: 0 24px 48px -28px rgba(30, 27, 23, 0.35);
  --font: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  /* Day colours only, for every visitor whatever their device says. */
  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-block-start: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-ink); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

h1, h2, h3 { line-height: 1.3; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  inset-block-start: -60px;
  padding: 8px 14px;
  background: var(--card);
  border-radius: 10px;
  z-index: 20;
}
.skip:focus { inset-block-start: 12px; }

/* ── the bar ─────────────────────────────────────────────────────────── */

.bar {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-block-end: 1px solid var(--line);
}

.bar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  direction: ltr;
}

.bar__nav {
  display: none;
  gap: 22px;
  margin-inline-start: auto;
}

.bar__nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.bar__nav a:hover { color: var(--ink); }

.bar .btn { margin-inline-start: auto; }

@media (min-width: 860px) {
  .bar__nav { display: flex; }
  .bar .btn { margin-inline-start: 0; }
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 26px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s, background-color 0.15s;
}

.btn--small { min-height: 42px; padding: 6px 18px; font-size: 0.95rem; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { filter: brightness(0.93); }
.btn--ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn--ghost:hover { border-color: var(--brand); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--whatsapp:hover { filter: brightness(0.93); }

.eyebrow {
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.95rem;
  margin-block-end: 8px;
}

.lede { color: var(--ink-soft); font-size: 1.12rem; max-width: 62ch; }

/* ── the hero ────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); overflow: hidden; }

.hero__inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero__text { display: grid; gap: 20px; }

/* The owner's four points, at the size of a medium heading: what the app is,
   who it serves, whose name it carries, and that it bends to the school. */
.pitch {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.55;
  text-wrap: pretty;
}

.pitch li { position: relative; padding-inline-start: 26px; }
.pitch li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.6em;
  inline-size: 11px;
  block-size: 11px;
  border-radius: 3px;
  background: var(--brand);
}

/* The product's name, first thing on the page, above the owner's four points. */
.hero__title { color: var(--ink); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 6px; }

.hero__visual {
  position: relative;
  padding-block-end: 40px;
}

.hero__visual .laptop { margin-inline-start: 56px; }

.phone--hero {
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: 0;
  inline-size: 34%;
  max-inline-size: 210px;
}

@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1fr 1.08fr; gap: 56px; }
}

/* ── device frames ───────────────────────────────────────────────────── */

figure { margin: 0; }

.laptop, .phone {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.laptop { border-radius: 14px; padding-block-start: 22px; position: relative; }
.laptop::before {
  /* The window's three dots, at the physical left as on every laptop. */
  content: '';
  position: absolute;
  inset-block-start: 8px;
  left: 12px;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 11px 0 0 var(--line), 22px 0 0 var(--line);
}
.laptop img { border-block-start: 1px solid var(--line); }

.phone { border-radius: 28px; padding: 8px; }
.phone img { border-radius: 21px; }

figure a { display: block; }

figcaption {
  padding: 10px 14px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
}
.phone figcaption { padding-block-end: 4px; }

/* ── the parts ───────────────────────────────────────────────────────── */

.part { padding-block: clamp(56px, 8vw, 104px); }
.part--tinted { border-block: 1px solid var(--line); }

.part__head { display: grid; gap: 8px; max-width: 760px; margin-block-end: 32px; }
.part__lede { color: var(--ink-soft); font-size: 1.08rem; }

.points {
  display: grid;
  gap: 14px 32px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--ink-soft);
}

.points li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.72em;
  inline-size: 9px;
  block-size: 9px;
  border-radius: 3px;
  background: var(--brand);
}

.points strong { display: block; color: var(--ink); font-weight: 700; }

@media (min-width: 760px) {
  .points { grid-template-columns: repeat(2, 1fr); }
  /* An odd last point takes the whole row rather than half of one. */
  .points li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* A row of phones: a sideways scroll on a phone, a grid on a wide screen. */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62%, 240px);
  gap: 18px;
  overflow-x: auto;
  padding-block: 4px 18px;
  padding-inline: 2px;
  scroll-snap-type: inline mandatory;
  overscroll-behavior-inline: contain;
}
.strip > * { scroll-snap-align: start; }

@media (min-width: 1100px) {
  .strip { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; }
}

.gallery { display: grid; gap: 22px; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery > :first-child:nth-last-child(3) { grid-column: auto; }
  .gallery--two { grid-template-columns: repeat(2, 1fr); }
}

/* ── everywhere ──────────────────────────────────────────────────────── */

.tiles {
  display: grid;
  gap: 16px;
  margin-block-end: 40px;
}
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.tile {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.tile p { color: var(--ink-soft); font-size: 0.98rem; }

.nightday {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 23%);
  gap: 18px;
  align-items: end;
}

/* ── how a school starts ─────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li {
  counter-increment: step;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.steps li::before {
  content: counter(step, arabic-indic);
  display: inline-grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  margin-block-end: 6px;
  border-radius: 12px;
  background: var(--brand-wash);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 1.15rem;
}
.steps p { color: var(--ink-soft); }

/* ── the appointment ─────────────────────────────────────────────────── */

.contact {
  padding-block: clamp(64px, 9vw, 112px);
  background: var(--brand-wash);
  border-block-start: 1px solid var(--line);
}

.contact__inner { display: grid; gap: 16px; justify-items: center; text-align: center; }
.contact .lede { margin-inline: auto; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block-start: 8px; }

/* ── the foot ────────────────────────────────────────────────────────── */

.foot { padding-block: 28px; border-block-start: 1px solid var(--line); color: var(--ink-faint); font-size: 0.92rem; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.foot__inner > :first-child { direction: ltr; font-weight: 700; color: var(--ink-soft); }
