/* aliflane.com. Tokens from brand/style-guide.md; roles from .claude/skills/alif-lane-brand/references/contrast.md.
   Text is ink or teal on paper and sand, paper on teal. Coral, gold, sky and leaf never carry text. Nothing moves
   unless the visitor moved it. */

@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Scheherazade New"; src: url("/fonts/scheherazade-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #FFFDF7;
  --sand: #F6E7C1;
  --sand-2: #E8D4A2;
  --sky: #4FC3F7;
  --leaf: #66BB6A;
  --coral: #FF8A65;
  --teal: #00695C;
  --gold: #F9C74F;
  --ink: #2E3440;

  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "Scheherazade New", "Amiri", "Noto Naskh Arabic", serif;

  --step-1: 1.125rem;
  --step-2: 1.333rem;
  --step-3: 1.777rem;
  --step-4: 2.369rem;
  --step-5: 3.157rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --wrap: 64rem;
  --measure: 68ch;
  --radius-s: 0.75rem;
  --radius-l: 1.5rem;
}

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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}
@media (min-width: 40em) { html { font-size: 18px; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }
b, strong { font-weight: 700; }
em { font-style: normal; font-weight: 700; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--teal);
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); margin-top: var(--space-5); }
h3 { font-size: var(--step-2); }
@media (min-width: 40em) { h1 { font-size: var(--step-5); } }

p { margin: 0 0 var(--space-2); }
.lead { font-size: var(--step-1); }
.measure, .prose { max-width: var(--measure); }
.muted { color: var(--teal); font-size: 0.95rem; }

a { color: var(--teal); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.16em; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.skip {
  position: absolute; left: var(--space-2); top: -4rem;
  background: var(--teal); color: var(--paper); padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-s); z-index: 10;
}
.skip:focus { top: var(--space-2); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--space-5); }
.band { background: var(--sand); }
.section + .section:not(.band) { padding-top: var(--space-2); }
.section__more { margin-top: var(--space-3); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); align-items: baseline; }

/* buttons: coral with ink text (5.4:1), or quiet teal outline; 44 px tall at least */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 2.75rem; padding: 0.6rem 1.4rem;
  background: var(--coral); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
  border: 2px solid var(--coral); border-radius: var(--radius-s);
  text-decoration: none;
}
.btn:hover { background: #ff9a7b; border-color: #ff9a7b; }
.btn--quiet { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn--quiet:hover { background: var(--paper); border-color: var(--teal); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

/* header */
.top { background: var(--paper); border-bottom: 3px solid var(--sand); }
.top__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding-block: var(--space-2); }
.brand img { width: auto; height: 3rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-3); }
.nav li { margin: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 0.12em; }

/* the lane */
.hero { padding-bottom: var(--space-3); }
.hero__scene { position: relative; overflow: hidden; background: var(--sky); }
.hero__scene > picture img { width: 100%; height: auto; }
.hero__family {
  list-style: none; margin: 0; padding: 0 5%;
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 1.5%;
  height: 31%;
}
.hero__person { margin: 0; height: 100%; display: flex; align-items: flex-end; transform: translateY(2%); }
.hero__person--yusuf { margin-right: auto; } /* Mama, Maryam and Yusuf on the left; Raiha, Noor and Baba on the right; the panel sits between */
.hero__person picture, .hero__person img { height: 100%; width: auto; }
.hero__person--mama, .hero__person--baba { height: 100%; }
.hero__person--maryam { height: 90%; }
.hero__person--yusuf { height: 80%; }
.hero__person--raiha, .hero__person--noor { height: 56%; }
@media (max-width: 40em) {
  /* a phone shows the sign end of the lane, taller, with the children on the pavement and the panel below */
  .hero__scene > picture img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 12% bottom; }
  .hero__person--mama, .hero__person--baba { display: none; }
  .hero__family { gap: 3%; height: 36%; padding: 0 6%; }
  .hero__person--yusuf { margin-right: auto; }
  .hero__panel { margin-top: -1rem; }
  .nav a { font-size: 1rem; }
  .nav ul { gap: 0 var(--space-2); }
}
.hero__panel {
  position: relative;
  width: min(100% - 2rem, 42rem); margin: -2.5rem auto 0;
  background: var(--paper); border: 3px solid var(--sand); border-radius: var(--radius-l);
  padding: var(--space-4) var(--space-4) var(--space-3);
}
@media (min-width: 64em) { .hero__panel { margin-top: -4rem; } }
.hero__panel h1 { margin-bottom: var(--space-2); }

/* episode cards */
.grid { display: grid; gap: var(--space-4) var(--space-3); grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); margin-top: var(--space-3); }
.ep-card { margin: 0; }
.ep-card__link { display: block; text-decoration: none; color: inherit; border-radius: var(--radius-s); }
.ep-card__thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-s); border: 3px solid var(--sand); }
.ep-card__title { font-size: var(--step-2); margin: var(--space-2) 0 var(--space-1); }
.ep-card__link:hover .ep-card__title { text-decoration: underline; text-underline-offset: 0.2em; }
.ep-card__n { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.ep-card__soon { margin: var(--space-1) 0 0; font-size: 0.95rem; color: var(--teal); }

/* the three-line phrase: Arabic, how to say it, what it means */
.phrase { margin: 0; display: grid; gap: 0.15em; }
.phrase__ar { font-family: var(--font-arabic); font-weight: 700; color: var(--teal); font-size: 1.9em; line-height: 1.7; unicode-bidi: isolate; }
.phrase__latin { font-family: var(--font-display); font-weight: 600; font-size: 1.1em; color: var(--ink); }
.phrase__meaning { color: var(--ink); }
.phrase__when { color: var(--teal); font-size: 0.95em; font-weight: 600; margin-bottom: 0.25em; }
.phrase--inline .phrase__ar { font-size: 1.55em; line-height: 1.5; text-align: left; } /* keeps the Arabic over its transliteration in a left-aligned card */

.phrase-card {
  background: var(--paper); border: 3px solid var(--gold); border-radius: var(--radius-l);
  padding: var(--space-3) var(--space-3); text-align: center; display: grid; gap: var(--space-3);
}
.phrase-card .phrase__ar { font-size: 2.6em; }
.phrase--more { padding-top: var(--space-3); border-top: 2px solid var(--sand); }
.phrase--more .phrase__ar { font-size: 2em; }

/* episode page */
.episode__head { max-width: var(--measure); }
.meta { color: var(--teal); font-weight: 600; font-size: 0.95rem; margin-bottom: var(--space-1); }
.episode__media { display: grid; gap: var(--space-3); margin-block: var(--space-3) var(--space-5); }
@media (min-width: 64em) {
  .episode__media { grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr); align-items: start; }
}
.video { position: relative; }
.video__play { display: block; position: relative; border-radius: var(--radius-s); overflow: hidden; border: 3px solid var(--sand); background: var(--ink); }
.video__play img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video__btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 2.75rem; padding: 0.6rem 1.4rem;
  background: var(--coral); color: var(--ink); border-radius: var(--radius-s);
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
  box-shadow: 0 0 0 4px var(--paper);
}
.video__play:hover .video__btn { background: #ff9a7b; }
.video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 3px solid var(--sand); border-radius: var(--radius-s); }
.video--playing .video__note { display: none; }
.video > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-s); border: 3px solid var(--sand); }
.video__note { font-size: 0.9rem; color: var(--teal); margin: var(--space-1) 0 0; }

.sources li, .chapters li { margin-top: 0.4em; }
.chapters { list-style: none; padding: 0; }
.chapters__time { display: inline-block; min-width: 3.2em; font-weight: 700; color: var(--teal); font-variant-numeric: tabular-nums; }
.episode__correct { margin-top: var(--space-4); padding: var(--space-2) var(--space-3); background: var(--sand); border-radius: var(--radius-s); }
.episode__nav { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 3px solid var(--sand); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.episode__nav a { font-family: var(--font-display); font-weight: 600; }

/* promise, family */
.promise { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.promise li { padding-left: 1.4em; position: relative; }
.promise li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--gold); border: 2px solid var(--teal); }
.family { list-style: none; padding: 0; margin: var(--space-3) 0 var(--space-2); display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.family li { margin: 0; text-align: center; }
.family img { height: 11rem; width: auto; margin-inline: auto; }
.family h3 { font-size: var(--step-1); margin: var(--space-1) 0 0.25rem; }
.family p { font-size: 0.95rem; margin: 0; }

/* letter form, placeholders */
.letter-form { margin-block: var(--space-2) var(--space-3); }
.letter-form input, .letter-form button { font: inherit; min-height: 2.75rem; }
.letter-form input[type="email"] { width: 100%; max-width: 24rem; padding: 0.5rem 0.75rem; border: 2px solid var(--teal); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); }
.letter-form button { background: var(--coral); color: var(--ink); border: 2px solid var(--coral); border-radius: var(--radius-s); padding: 0.5rem 1.4rem; font-family: var(--font-display); font-weight: 600; cursor: pointer; }
.todo { background: var(--sand); padding: var(--space-2); border-radius: var(--radius-s); border: 2px dashed var(--teal); }

/* footer */
.foot { background: var(--teal); color: var(--paper); margin-top: var(--space-6); padding-block: var(--space-5) var(--space-3); }
.foot a { color: var(--paper); }
.foot :focus-visible { outline-color: var(--paper); }
.foot__grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.foot__grid img { width: 11rem; height: auto; margin-bottom: var(--space-2); }
.foot__lead { font-family: var(--font-display); font-size: var(--step-1); }
.foot__links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-1); }
.foot__links a { display: inline-flex; min-height: 2.75rem; align-items: center; }
.foot__small { margin-top: var(--space-4); font-size: 0.9rem; opacity: 0.9; }

/* smooth scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* the header settles once the page has scrolled */
.top { position: sticky; top: 0; z-index: 20; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.top--scrolled { background: rgba(255, 253, 247, 0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(46, 52, 64, 0.08); }

/* small answers to the hand */
.btn { transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.ep-card__link { transition: transform 0.25s ease; }
.ep-card__link:hover { transform: translateY(-4px); }
.ep-card__thumb { transition: transform 0.4s ease; }
.ep-card__link:hover .ep-card__thumb { transform: scale(1.02); }
.video__btn { transition: transform 0.2s ease, background-color 0.2s ease; }
.video__play:hover .video__btn { transform: translate(-50%, -50%) scale(1.05); }
.family li img { transition: transform 0.3s ease; }
.family li:hover img { transform: translateY(-6px); }

/* starting states for what motion.js brings in; only when scripts and motion are both on */
html.js.motion .reveal, html.js.motion .grid > *, html.js.motion .family > li, html.js.motion .promise > li,
html.js.motion .prose > h2, html.js.motion .prose > p:not(.lead), html.js.motion .prose > ul, html.js.motion .prose > ol,
html.js.motion .episode__nav { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .top, .foot, .video__btn, .video__note, .episode__nav, .skip { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* the shop */
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.product-card__thumb { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; object-position: top; border-radius: var(--radius-s); border: 3px solid var(--sand); background: #fff; }
.product-card__blurb { margin: 0 0 var(--space-1); }
.product-card__price { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); margin: 0; }
.badge { display: inline-block; background: var(--sand); color: var(--ink); border-radius: 999px; padding: 0.15em 0.7em; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; vertical-align: middle; }
.product__media { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-top: var(--space-3); }
@media (min-width: 48em) { .product__media { grid-template-columns: 3fr 2fr; align-items: start; } }
.product__previews { display: grid; gap: var(--space-2); grid-template-columns: repeat(2, 1fr); }
.product__previews img { width: 100%; height: auto; border-radius: var(--radius-s); border: 3px solid var(--sand); background: #fff; }
.product__previews img:first-child { grid-column: 1 / -1; }
.product__buy { background: var(--sand); border-radius: var(--radius-l); padding: var(--space-3); }
@media (min-width: 48em) { .product__buy { position: sticky; top: var(--space-6); } }
.product__buy h2 { font-size: var(--step-1); margin: var(--space-3) 0 var(--space-1); }
.product__buy ul { padding-left: 1.2em; margin: 0; }
.product__buy .actions { margin-top: 0; }
.product__price { font-family: var(--font-display); font-weight: 700; font-size: var(--step-3); margin: 0 0 var(--space-2); color: var(--teal); }
.product__soon { font-weight: 600; margin: 0 0 var(--space-2); }
.pack { display: grid; gap: var(--space-3); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 40em) { .pack { grid-template-columns: 11rem 1fr; } }
.pack img { width: 100%; height: auto; border-radius: var(--radius-s); border: 3px solid var(--sand); background: #fff; }
.pack .actions { margin-top: var(--space-2); }
