/* Sanabel's public page. One sheet for the three languages: logical properties (inline-start/end)
   mirror it for Arabic without a second file; the few shapes that cannot mirror themselves have [dir="rtl"] rules.
   Look: "Honey window", a white page of cream tickets with hard shadows. Colours are the app's own (src/theme/kidTheme.ts). */

@font-face { font-family: "Tajawal"; src: url("/fonts/tajawal-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("/fonts/tajawal-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Marhey"; src: url("/fonts/marhey-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --ground: #FFFFFF;
  --cream: #FFF6DC;
  --ink: #3A2A10;
  --ink-soft: #5E5440;
  --forest: #2D5F3F;
  --forest-deep: #1F4A2D;
  --honey: #E9B949;
  --honey-deep: #D4A24C;
  --clay: #C77B58;
  --clay-text: #A5593A;
  --teal: #3FA6A6;
  --plum: #8B6FA0;
  --olive: #8A9A3F;
  --leaf: #4F9A5B;
  --bezel: #1D1A14;
  --muted: #7A6A4A;

  --display: "Marhey", "Tajawal", "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif;
  --body: "Tajawal", "Segoe UI", "Noto Sans Arabic", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
:lang(ar) body, body:lang(ar) { font-size: 1.125rem; line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); }
:focus-visible { outline: 3px solid var(--honey-deep); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* Headings in Marhey: Tajawal Bold's i at heading sizes runs its dot into the stem and reads as I. */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; text-wrap: balance; color: var(--ink); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--forest-deep); max-width: 24ch; }
.lede { font-size: 1.2rem; max-width: 40ch; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; inset-inline-start: 12px; top: 0; transform: translateY(-150%); background: var(--forest); color: var(--cream); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { transform: translateY(12px); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
section { padding-block-start: 64px; }

/* Hard shadows sit on tickets, so they read as things to pick up. They fall toward the reading direction's end. */
.hard { filter: drop-shadow(7px 7px 0 var(--ink)); }
[dir="rtl"] .hard { filter: drop-shadow(-7px 7px 0 var(--ink)); }

/* Top bar */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.95rem; }
.langs a { padding: 4px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); }
.langs a[aria-current="page"] { background: var(--ink); color: var(--cream); font-weight: 700; }

/* A ticket: a body and a stub, notched where they tear apart. */
.ticket { --n: 16px; --stub: 300px; --tx: calc(100% - var(--stub)); display: grid; grid-template-columns: 1fr var(--stub); background: var(--cream);
  -webkit-mask: radial-gradient(circle var(--n) at var(--tx) 0, #0000 97%, #000), radial-gradient(circle var(--n) at var(--tx) 100%, #0000 97%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--n) at var(--tx) 0, #0000 97%, #000), radial-gradient(circle var(--n) at var(--tx) 100%, #0000 97%, #000); mask-composite: intersect; }
[dir="rtl"] .ticket { --tx: var(--stub); }
.ticket .body { padding: clamp(26px, 4vw, 52px); display: grid; gap: 22px; align-content: center; }
.ticket .stub { background: var(--forest-deep); color: var(--cream); padding: 26px; display: grid; gap: 6px; align-content: center; justify-items: start; border-inline-start: 3px dashed rgba(255, 246, 220, 0.55); }
.stub .n { font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; }
.stub .n small { font-family: var(--body); font-size: 1.05rem; font-weight: 700; color: var(--honey); display: block; line-height: 1.3; }
.stub .arrow { color: var(--honey); font-size: 1.4rem; line-height: 1; }
@media (max-width: 759px) {
  .ticket { --stub: 0px; --sh: 150px; grid-template-columns: 1fr; grid-template-rows: auto var(--sh);
    -webkit-mask: radial-gradient(circle var(--n) at 0 calc(100% - var(--sh)), #0000 97%, #000), radial-gradient(circle var(--n) at 100% calc(100% - var(--sh)), #0000 97%, #000);
    mask: radial-gradient(circle var(--n) at 0 calc(100% - var(--sh)), #0000 97%, #000), radial-gradient(circle var(--n) at 100% calc(100% - var(--sh)), #0000 97%, #000); }
  [dir="rtl"] .ticket { --tx: 0; }
  .ticket .stub { grid-auto-flow: column; grid-template-columns: repeat(5, auto); justify-content: space-between; align-items: center; border-inline-start: 0; border-block-start: 3px dashed rgba(255, 246, 220, 0.55); padding: 16px 20px; gap: 4px; }
  .stub .n { font-size: 1.7rem; }
  .stub .n small { font-size: 0.85rem; }
  .stub .arrow { transform: rotate(-90deg); }
  [dir="rtl"] .stub .arrow { transform: rotate(90deg); }
}
@media (min-width: 760px) { [dir="rtl"] .stub .arrow { transform: scaleX(-1); } }

/* Hero */
.hero .ticket-wrap { transform: rotate(-1.2deg); margin-block-start: 12px; }
[dir="rtl"] .hero .ticket-wrap { transform: rotate(1.2deg); }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); color: var(--forest-deep); }
.name-note { font-size: 0.95rem; color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 700; font-size: 0.98rem; }
.facts li::before { content: "✓ "; content: "✓ " / ""; color: var(--forest); }

/* Where to get it. Plain text until each store is live; the launch-day swap puts the store's own badge in the same list. */
.stores { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.stores li { display: grid; line-height: 1.15; }
.stores span { font-size: 0.78rem; font-weight: 700; }
.stores strong { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.stores li { color: var(--clay-text); border: 3px solid var(--clay-text); outline: 2px solid var(--clay-text); outline-offset: 3px; border-radius: 12px; padding: 6px 18px; background: var(--cream); transform: rotate(-2.5deg); }
.stores li:nth-child(2) { transform: rotate(2deg); }
.stores .badge { padding: 0; border: 0; outline: 0; background: none; transform: none; }
.stores .badge img { height: 56px; width: auto; }

/* The garden, in a ticket window. The same screenshot twice, grey under colour, and the colour sweeps in once. */
.window-wrap { margin-block-start: 56px; transform: rotate(0.8deg); }
[dir="rtl"] .window-wrap { transform: rotate(-0.8deg); }
.window { --n: 16px; --cap: 72px; background: var(--cream); display: grid; grid-template-rows: auto var(--cap);
  -webkit-mask: radial-gradient(circle var(--n) at 0 calc(100% - var(--cap)), #0000 97%, #000), radial-gradient(circle var(--n) at 100% calc(100% - var(--cap)), #0000 97%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--n) at 0 calc(100% - var(--cap)), #0000 97%, #000), radial-gradient(circle var(--n) at 100% calc(100% - var(--cap)), #0000 97%, #000); mask-composite: intersect; }
.window .stack { position: relative; margin: 14px; background: var(--bezel); border-radius: 14px; overflow: hidden; }
.window img { width: 100%; aspect-ratio: 1440 / 610; object-fit: cover; }
@media (max-width: 599px) { .window img { aspect-ratio: 3 / 2; } }
.window figcaption { display: grid; place-items: center; padding-inline: 20px; text-align: center; border-block-start: 3px dashed rgba(58, 42, 16, 0.5); font-family: var(--display); font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--forest-deep); line-height: 1.25; }
@media (max-width: 480px) { .window { --cap: 104px; } .window figcaption { font-size: 1rem; padding-inline: 14px; } }
.window .asleep { filter: grayscale(1) contrast(0.9) brightness(1.06); }
.window .awake { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); animation: wake 2s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
[dir="rtl"] .window .awake { clip-path: inset(0 50% 0 0); animation-name: wake-rtl; }
.window .edge { position: absolute; inset-block: 0; inset-inline-start: 50%; width: 4px; margin-inline-start: -2px; background: var(--honey); box-shadow: 0 0 18px 2px rgba(244, 221, 168, 0.9); animation: edge 2s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.window .tag { position: absolute; inset-block-end: 12px; background: rgba(31, 74, 45, 0.9); color: var(--cream); font-weight: 700; font-size: 0.9rem; padding: 4px 12px; border-radius: 999px; }
.window .tag.l { inset-inline-start: 12px; } .window .tag.r { inset-inline-end: 12px; }
@keyframes wake { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 50%); } }
@keyframes wake-rtl { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 50% 0 0); } }
@keyframes edge { from { inset-inline-start: 100%; } to { inset-inline-start: 50%; } }
@media (prefers-reduced-motion: reduce) { .window .awake, .window .edge { animation: none; } }

/* How it works: one long ticket, torn into four */
.how .answer { margin-block-start: 14px; max-width: 62ch; font-size: 1.12rem; }
.line { display: grid; gap: 26px; margin-block-start: 38px; }
@media (min-width: 560px) { .line { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .line { grid-template-columns: repeat(4, 1fr); gap: 0; } .line li + li .mini { border-inline-start: 3px dashed rgba(58, 42, 16, 0.4); } }
.line > li { display: grid; }
.mini { --c: var(--teal); --n: 14px; background: var(--cream); border-block-start: 14px solid var(--c); padding: 20px 22px 26px; display: grid; gap: 8px; align-content: start; min-height: 190px;
  -webkit-mask: radial-gradient(circle var(--n) at 0 50%, #0000 97%, #000), radial-gradient(circle var(--n) at 100% 50%, #0000 97%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--n) at 0 50%, #0000 97%, #000), radial-gradient(circle var(--n) at 100% 50%, #0000 97%, #000); mask-composite: intersect; }
.line > li:nth-child(2) .mini { --c: var(--honey-deep); } .line > li:nth-child(3) .mini { --c: var(--clay); } .line > li:nth-child(4) .mini { --c: var(--plum); }
.mini .num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--ink); font-family: var(--display); font-size: 1.4rem; transform: rotate(-8deg); }
.mini h3 { font-size: 1.5rem; }

/* Five subjects: small tickets, one colour each (the colours the app gives them) */
.learns .lede { margin-block-start: 12px; }
.subjects { display: grid; gap: 22px; margin-block-start: 34px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.subjects .mini { min-height: 0; padding-block-end: 22px; }
.subjects .mini h3 { font-size: 1.3rem; }
.subjects > li:nth-child(1) .mini { --c: var(--teal); } .subjects > li:nth-child(2) .mini { --c: var(--clay); } .subjects > li:nth-child(3) .mini { --c: var(--plum); }
.subjects > li:nth-child(4) .mini { --c: var(--olive); } .subjects > li:nth-child(5) .mini { --c: var(--leaf); }
.subjects > li { display: grid; }

/* A look inside the app: the same ticket window as the garden, smaller */
.screens .window-wrap { margin-block-start: 0; }
.shots { display: grid; gap: 34px; margin-block-start: 34px; }
@media (min-width: 760px) { .shots { grid-template-columns: 1fr 1fr; gap: 40px; } .shots > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.shots .window { --cap: 84px; }
@media (max-width: 599px) { .shots .window img { aspect-ratio: 1440 / 610; } } /* the whole frame: the captions' text runs to its edges */
.shots .window figcaption { font-size: clamp(1rem, 2vw, 1.2rem); }
.shots-note { margin-block-start: 26px; color: var(--ink-soft); font-size: 0.95rem; }
.shots > li:nth-child(odd) .window-wrap { transform: rotate(-0.6deg); }
.shots > li:nth-child(even) .window-wrap { transform: rotate(0.6deg); }
@media (max-width: 480px) { .shots .window { --cap: 104px; } }

/* Free to start: two passes */
.plus .lede { margin-block-start: 12px; }
.pair { display: grid; gap: 28px; margin-block-start: 34px; max-width: 880px; }
@media (min-width: 760px) { .pair { grid-template-columns: 1fr 1fr; } }
.pass { --n: 14px; background: var(--cream); padding: 26px 26px 20px; display: grid; align-content: start;
  -webkit-mask: radial-gradient(circle var(--n) at 0 70px, #0000 97%, #000), radial-gradient(circle var(--n) at 100% 70px, #0000 97%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--n) at 0 70px, #0000 97%, #000), radial-gradient(circle var(--n) at 100% 70px, #0000 97%, #000); mask-composite: intersect; }
.pass.big { background: var(--forest-deep); color: var(--cream); }
.pass.big h3 { color: var(--cream); }
.pass h3 { font-size: 1.7rem; padding-block-end: 18px; border-block-end: 3px dashed currentColor; }
.pass h3 small { font-family: var(--body); font-size: 0.9rem; font-weight: 700; margin-inline-start: 6px; }
.pass.big h3 small { color: var(--honey); }
.pass dl > div { display: grid; gap: 2px; padding-block: 14px; }
.pass dl > div + div { border-block-start: 1px solid rgba(58, 42, 16, 0.18); }
.pass.big dl > div + div { border-color: rgba(255, 246, 220, 0.25); }
.pass dt { font-size: 0.92rem; font-weight: 700; opacity: 0.8; }
.pass dd { margin: 0; font-family: var(--display); font-size: 1.35rem; line-height: 1.25; }
.plans { margin-block-start: 22px; max-width: 64ch; }

/* Questions: a ticket each. The stub is the toggle, and turns into a cross when the ticket is open. Native <details>, no script. */
.qs { display: grid; gap: 22px; max-width: 860px; margin-block-start: 34px; }
.qt { --stub: 76px; --n: 14px; --tx: calc(100% - var(--stub)); position: relative; display: block; background: linear-gradient(to right, var(--cream) var(--tx), var(--forest-deep) 0);
  -webkit-mask: radial-gradient(circle var(--n) at var(--tx) 0, #0000 97%, #000), radial-gradient(circle var(--n) at var(--tx) 100%, #0000 97%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--n) at var(--tx) 0, #0000 97%, #000), radial-gradient(circle var(--n) at var(--tx) 100%, #0000 97%, #000); mask-composite: intersect; }
[dir="rtl"] .qt { --tx: var(--stub); background: linear-gradient(to left, var(--cream) calc(100% - var(--stub)), var(--forest-deep) 0); }
.qt::after { content: ""; position: absolute; inset-block: 18px; inset-inline-end: var(--stub); border-inline-start: 3px dashed rgba(255, 246, 220, 0.55); pointer-events: none; }
.qt summary { display: grid; grid-template-columns: 1fr var(--stub); align-items: center; min-height: 80px; list-style: none; cursor: pointer; }
.qt summary::-webkit-details-marker { display: none; }
.qt summary h3 { padding: 16px 24px; font-size: 1.2rem; line-height: 1.25; color: var(--ink); }
.qt .chip { justify-self: center; color: var(--honey); font-size: 24px; }
.mark { position: relative; display: block; width: 1em; height: 1em; transition: transform 0.2s; }
.mark::before, .mark::after { content: ""; position: absolute; inset-inline: 0; inset-block-start: 50%; height: 0.16em; margin-block-start: -0.08em; background: currentColor; border-radius: 2px; }
.mark::after { transform: rotate(90deg); }
details[open] > summary .mark { transform: rotate(45deg); }
.qt .a { padding: 0 calc(var(--stub) + 24px) 24px 24px; }
[dir="rtl"] .qt .a { padding: 0 24px 24px calc(var(--stub) + 24px); }
.qt .a p { max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .mark { transition: none; } }
@media (max-width: 400px) {
  .qt { --stub: 60px; }
  .qt summary h3 { padding-inline: 18px; font-size: 1.1rem; }
  .qt .a { padding-inline-start: 18px; padding-inline-end: calc(var(--stub) + 16px); }
  [dir="rtl"] .qt .a { padding: 0 18px 24px calc(var(--stub) + 16px); }
  .pass { padding-inline: 20px; }
  .stub .n { font-size: 1.5rem; }
  .stub .n small { font-size: 0.78rem; }
}

/* Closing band and footer: cream, torn off the page with a dashed line */
.closing { margin-block-start: 80px; background: var(--cream); color: var(--ink); border-block-start: 3px dashed rgba(58, 42, 16, 0.55); padding-block: 72px 40px; text-align: center; }
.closing .wrap { display: grid; gap: 22px; justify-items: center; }
.closing h2 { font-size: clamp(2.4rem, 7vw, 4.6rem); color: var(--forest-deep); max-width: none; }
.closing .stores { justify-content: center; }
.closing .stores li { background: transparent; color: var(--forest-deep); border-color: var(--forest-deep); outline-color: var(--forest-deep); }
.closing .stores .badge { border: 0; outline: 0; }
.qt .a { overflow-wrap: anywhere; } /* a long word in an answer must be able to break on a 320px phone */
.foot { background: var(--cream); color: var(--muted); font-size: 0.95rem; padding-block: 0 36px; text-align: center; }
.foot .wrap { display: grid; gap: 10px; justify-items: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.foot a { color: var(--forest-deep); }
.foot .legal { font-size: 0.85rem; }
