/* ================================================================
   Droos — landing page stylesheet
   ----------------------------------------------------------------
   Page-scoped CSS for pages/landing.php, loaded only when the page
   sets $page_css (see components/header.php). Follows the auth.css
   precedent of a separate file, but conditionally linked so these
   rules never reach the other 20+ pages.

   Everything here is landing-only. Nothing in this file is used by
   another surface — if a rule stops being landing-only, it belongs
   in main.css instead.

   Tokens only: no literal palette values. Translucent overlays use
   color-mix() against the brand token so the scrim tracks the
   palette (a hard-coded rgba is how the old hero ended up frozen on
   the retired MTN yellow #FFCC00 long after the Item 9 swap).
================================================================ */


/* ================================================================
   HERO — static full-bleed photo with overlaid text
   ----------------------------------------------------------------
   Composition note: in hero-student-1.jpg the student sits on the
   RIGHT (~57% across) and the open ground — path, trees, minaret
   (~38%) — is on the LEFT. So the text block is pinned to the
   PHYSICAL left in BOTH directions, not the logical inline-start:
   in RTL, inline-start would drop Arabic straight onto her face.
   The photo is a fixed physical composition; it does not mirror.
================================================================ */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 460px;
  padding-block: var(--space-12);
  /* Base colour shows through before the photo paints. */
  background-color: var(--color-brand-yellow);
  background-image: url('../images/hero-student-1.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  /* Mobile: the band is taller than the 3:2 photo, so WIDTH crops.
     60% keeps her face (57%) and the minaret (38%) both in frame. */
  background-position: 60% center;
}

@media (min-width: 768px) {
  .hero {
    min-height: 620px;
    /* Desktop: the band is wider than 3:2, so HEIGHT crops. 18%
       keeps headroom above the hijab and holds her face (~29%) and
       the minaret (~31%) in the upper third. */
    background-position: center 18%;
  }
}

/* Readability bed for the black text, fading out before it reaches
   her face. Left→right in both directions (see composition note). */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--color-brand-yellow) 94%, transparent) 0%,
    color-mix(in srgb, var(--color-brand-yellow) 76%, transparent) 34%,
    transparent 66%
  );
}

@media (max-width: 767px) {
  /* Mobile can't put text beside her — the band is too narrow — so it goes
     BELOW her instead of on top of her. At this width the band is far taller
     than the 3:2 photo, so `cover` fills the HEIGHT and crops the width: the
     whole photo height shows and her face lands around 29% down, well clear
     of the text zone at the foot.
     The scrim is weighted to the text end rather than washed flat: fully
     transparent across her face, ramping to a solid bed only where the copy
     sits. Her face stays untinted; the text still gets its contrast. */
  .hero {
    min-height: 560px;
    align-items: flex-end;
    padding-block: var(--space-8) var(--space-10);
  }

  .hero__scrim {
    background: linear-gradient(
      to bottom,
      transparent 0%,
      transparent 40%,
      color-mix(in srgb, var(--color-brand-yellow) 58%, transparent) 56%,
      color-mix(in srgb, var(--color-brand-yellow) 92%, transparent) 76%,
      color-mix(in srgb, var(--color-brand-yellow) 98%, transparent) 100%
    );
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content-inner {
  width: 100%;
  text-align: center;
}

/* `text-shadow: none` / `animation: none` neutralise the retired carousel
   rules that still live in main.css while both pages run side by side: the
   old .hero__title carried a glow in the long-dead MTN yellow, and the old
   .hero__subtitle was animated to opacity 0 for most of an 18s cycle (it
   only showed during slide 1). Both become no-ops once the main.css
   deletion commit lands; they stay as a guard against silent reappearance. */
.hero__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-black);
  line-height: var(--line-height-tight);
  margin-block-end: var(--space-4);
  text-shadow: none;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-brand-black);
  max-width: 560px;
  margin-inline: auto;
  margin-block-end: var(--space-6);
  animation: none;
  opacity: 1;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
}

.hero__microcopy {
  margin-block-start: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-brand-black);
  opacity: 0.7;
}

/* Hero primary CTA — BLACK, a documented exception to the unified gold CTA.
   The hero is a full-bleed gold field, so a gold primary dissolves into it.
   Item 11's on-gold shadow definer deliberately does NOT reach here: it
   covers .site-header and .landing-cta-banner — small gold fields where
   elevation alone is enough to read. Across a whole hero, elevation isn't;
   black is the system's answer on a large gold field, and the retired hero
   (main.css:2046) did exactly this for exactly this reason.
   Hover uses --color-text-primary (#18181B) rather than the old rule's
   hard-coded #1a1a1a — same value in spirit, but tokenised. */
.hero__content .btn--primary {
  background-color: var(--color-brand-black);
  color:            var(--color-brand-white);
  border-color:     var(--color-brand-black);
}

.hero__content .btn--primary:hover {
  background-color: var(--color-text-primary);
  border-color:     var(--color-text-primary);
}

/* Quiet text link — deliberately not a button (single-CTA hero). */
.hero__signin {
  display: inline-block;
  margin-block-start: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__signin:hover {
  color: var(--color-brand-black);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .hero__title    { font-size: var(--font-size-4xl); }
  .hero__subtitle { font-size: var(--font-size-xl); margin-inline: 0; }

  /* Pin the text block to the physical left, in BOTH directions. */
  .hero__content {
    display: flex;
    justify-content: flex-start;
  }
  [dir="rtl"] .hero__content {
    justify-content: flex-end;   /* flex-end = left when RTL */
  }

  .hero__content-inner {
    max-width: 460px;
    text-align: start;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  /* The block is pinned physically left, so its contents align physically
     left too. In RTL, `start`/`flex-start` mean RIGHT — which would push
     the CTA and microcopy out of the scrim and onto her face. The Arabic
     still reads right-to-left; only the alignment is physical, because the
     photo underneath is a fixed composition that does not mirror. */
  [dir="rtl"] .hero__content-inner { text-align: left; }
  [dir="rtl"] .hero__actions      { justify-content: flex-end; }
}


/* ================================================================
   TRUST STRIP — live catalogue counts, directly under the hero
================================================================ */

.trust-strip {
  background-color: var(--color-surface);
  border-block-end: 1px solid var(--color-border);
  padding-block: var(--space-4);
}

.trust-strip__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

/* Separator dots between items (not after the last). Logical border
   so the dot falls on the correct side in both directions. */
/* Weight + colour match .section__title (main.css:1080) so the strip holds
   its own against the white band instead of reading as fine print. */
.trust-strip__item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  white-space: nowrap;
}

.trust-strip__item + .trust-strip__item {
  padding-inline-start: var(--space-6);
  border-inline-start: 1px solid var(--color-border);
}

.trust-strip__value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}


/* ================================================================
   FEATURES STRIP — black band, gold icon tiles
   (moved verbatim from main.css; design unchanged by Mohamed's call)
================================================================ */

.features-strip {
  background-color: var(--color-brand-black);
  padding-block: var(--space-8);
}

.features-strip__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .features-strip__list {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
}

.features-strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  color: var(--color-brand-white);
}

@media (min-width: 768px) {
  .features-strip__item {
    flex-direction: row;
    text-align: start;
    align-items: flex-start;
  }
}

.features-strip__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background-color: var(--color-brand-yellow);
  color: var(--color-brand-black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.features-strip__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand-white);
  margin-block-end: var(--space-1);
}

.features-strip__body {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: var(--line-height-snug);
}


/* ================================================================
   STAGE CARDS — now the shared components/card-stage.php
   (stats + grade pills hidden here via the component's show_* flags)
================================================================ */

.landing-stages {
  background-color: var(--color-surface-sunken);
}

.landing-stages__grid {
  gap: var(--space-5);
}


/* ================================================================
   WHAT'S FREE
   ----------------------------------------------------------------
   Section rhythm: the page alternates white / sunken / pale-gold so
   it isn't one slab after the black strip. Tokens only.
     feature strip  black    · stage cards  --color-surface-sunken
     what's free    --color-brand-yellow-light
     teachers       white    · how it works --color-surface-sunken
     parent block   white    · gold banner  gold
   Bands use --color-surface-sunken (#F4F4F5), NOT --color-bg-subtle
   (#F9F9FA): the page body is --color-surface-alt (#FAFAFA), so
   bg-subtle lands 1/255 from it and the rhythm is invisible. Sunken
   sits 11/255 from white, which actually reads.
================================================================ */

.free-block {
  background-color: var(--color-brand-yellow-light);
}

.free-block__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  max-width: 720px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .free-block__list {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3) var(--space-6);
  }
}

.free-block__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
}

.free-block__check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background-color: var(--color-brand-yellow);
  color: var(--color-brand-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.free-block__note {
  margin-block-start: var(--space-6);
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}


/* ================================================================
   TEACHERS — real faces from get_teachers_for_listing()
================================================================ */

/* Explicitly white: the page body is --color-surface-alt (#FAFAFA), so a
   section left transparent renders grey-ish, not white, and the intended
   alternation never appears. */
.landing-teachers {
  background-color: var(--color-surface);
}

.landing-teachers__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .landing-teachers__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }
}

.landing-teacher {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
}

.landing-teacher__avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background-color: var(--color-surface-sunken);
  border: 3px solid var(--color-brand-yellow);
}

.landing-teacher__name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.landing-teacher__subject {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}


/* ================================================================
   HOW IT WORKS — three steps
================================================================ */

.how-block {
  background-color: var(--color-surface-sunken);
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  counter-reset: how-step;
}

@media (min-width: 768px) {
  .how-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.how-step {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-align: start;
}

.how-step__num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--color-brand-yellow);
  color: var(--color-brand-black);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-step__text {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}


/* ================================================================
   PARENT BLOCK — photo + reassurance, live entry price
================================================================ */

.parent-block {
  background-color: var(--color-surface);
}

.parent-block__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 900px) {
  .parent-block__inner {
    flex-direction: row;
    gap: var(--space-12);
  }
  .parent-block__media,
  .parent-block__text { flex: 1 1 0; }
}

.parent-block__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 42%;   /* holds the four faces */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  display: block;
}

.parent-block__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-block-end: var(--space-4);
}

.parent-block__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-block-end: var(--space-6);
}

.parent-block__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

.parent-block__check {
  flex-shrink: 0;
  color: var(--color-success);
  margin-block-start: 2px;
}

.parent-block__price {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
}

.parent-block__price strong {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}


/* ================================================================
   GOLD CTA BANNER — slimmed: headline + one CTA
================================================================ */

/* Slimmed: headline + one CTA, so the vertical padding drops from
   --space-12 to --space-8 and the row gap tightens. No dead space. */
.landing-cta-banner {
  background-color: var(--color-brand-yellow);
  padding-block: var(--space-8);
}

.landing-cta-banner__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

@media (min-width: 768px) {
  .landing-cta-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.landing-cta-banner__title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-black);
}

@media (min-width: 768px) {
  .landing-cta-banner__title { font-size: var(--font-size-3xl); }
}

.landing-cta-banner__actions {
  flex-shrink: 0;
}
