/* Mizaluna. Colors and type come from the app's design system. */
@font-face { font-family: Fraunces; src: url("assets/fonts/Fraunces-Regular.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: Fraunces; src: url("assets/fonts/Fraunces-SemiBold.ttf"); font-weight: 600; font-display: swap; }
@font-face { font-family: Jakarta; src: url("assets/fonts/PlusJakartaSans-Regular.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: Jakarta; src: url("assets/fonts/PlusJakartaSans-Medium.ttf"); font-weight: 500; font-display: swap; }
@font-face { font-family: Jakarta; src: url("assets/fonts/PlusJakartaSans-Bold.ttf"); font-weight: 700; font-display: swap; }
@font-face { font-family: Plex; src: url("assets/fonts/IBMPlexSansArabic-Regular.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url("assets/fonts/IBMPlexSansArabic-Medium.ttf"); font-weight: 500; font-display: swap; }
@font-face { font-family: Plex; src: url("assets/fonts/IBMPlexSansArabic-SemiBold.ttf"); font-weight: 600 700; font-display: swap; }

:root {
  --emerald: #0f4836;
  --deep: #0b3327;
  --leaf: #156048;
  --ivory: #f6f4ec;
  --paper: #fffdf6;
  --lime: #c9ee6e;
  --ink: #12211b;
  --muted: #55645d;
  --mist: #c2d6c8;
  --rule: rgb(18 33 27 / 16%);
  --display: Fraunces, Georgia, serif;
  --body: Jakarta, system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --wide: 1240px;
}
:lang(ar) { --display: Plex, system-ui, sans-serif; --body: Plex, system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; box-shadow: 0 0 0 6px var(--deep); border-radius: 4px; }

h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; text-wrap: balance; }
:lang(ar) h1, :lang(ar) h2 { letter-spacing: 0; line-height: 1.25; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h3 { font: 600 clamp(1.5rem, 2.4vw, 2rem)/1.2 var(--display); }
.eyebrow { font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--leaf); margin-block-end: 18px; }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 0.95rem; }

.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 20; padding: 12px 18px; background: var(--lime); color: var(--deep); border-radius: 8px; }
.skip:focus { top: 12px; }

/* The header sits on the hero. */
.top { position: absolute; z-index: 5; inset-inline: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); color: var(--ivory); }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; font: 600 1.45rem var(--display); }
:lang(ar) .brand { font-family: Fraunces, serif; }
.brand-mark { width: 34px; }
.half-a { fill: var(--ivory); }
.half-b { fill: var(--lime); }
.langs { display: flex; gap: 4px; }
.langs a { display: grid; place-items: center; min-width: 48px; min-height: 48px; padding-inline: 8px; text-decoration: none; font-weight: 500; font-size: 0.9rem; border-radius: 999px; }
.langs a:hover { background: rgb(255 255 255 / 12%); }
html[lang="en"] .langs a[hreflang="en"], html[lang="fr"] .langs a[hreflang="fr"], html[lang="ar"] .langs a[hreflang="ar"] { box-shadow: inset 0 0 0 1.5px var(--lime); }

/* Hero: a very large moon, its two halves meeting as the page opens. */
.hero { position: relative; min-height: min(100svh, 980px); background: var(--emerald); color: var(--ivory); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px; align-items: center; padding: 120px var(--gutter) 0; overflow: hidden; }
.hero-moon { position: absolute; width: clamp(560px, 62vw, 980px); inset-inline-end: -8vw; top: 50%; translate: 0 -50%; opacity: 0.2; }
.hero-moon .half-a { animation: meet-a 1.4s cubic-bezier(.2,.8,.2,1) both; }
.hero-moon .half-b { animation: meet-b 1.4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes meet-a { from { transform: translateY(-70px); } }
@keyframes meet-b { from { transform: translateY(70px); } }
.hero-copy { position: relative; padding-block-end: 96px; max-width: 760px; }
.hero .eyebrow { color: var(--lime); }
h1 { font-size: clamp(2.8rem, 6.6vw, 5.6rem); }
h1 em { display: block; font-style: normal; color: var(--lime); }
.lede { margin-block-start: 28px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--mist); max-width: 560px; }
.soon { display: inline-flex; align-items: center; gap: 12px; margin-block-start: 32px; padding: 12px 20px; font-weight: 500; border: 1.5px solid rgb(201 238 110 / 55%); border-radius: 999px; }
.soon-dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(90deg, var(--ivory) 50%, var(--lime) 50%); }

.phone { position: relative; overflow: hidden; background: var(--deep); border: 9px solid #0a1410; border-radius: 42px; box-shadow: 0 40px 80px -30px rgb(4 20 14 / 60%); }
.phone img { width: 100%; }
.hero-phone { position: relative; justify-self: center; align-self: end; width: min(360px, 100%); margin-block-end: -180px; }

/* The receipt. */
.receipt-band { background: var(--lime); color: var(--deep); display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(72px, 10vw, 136px) var(--gutter); }
.receipt-band .eyebrow { color: var(--emerald); }
.receipt-intro > p:last-child { margin-block-start: 22px; font-size: 1.15rem; max-width: 460px; }
.receipt { --tooth: 10px; background: var(--paper); padding: 36px 32px 44px; rotate: 1.2deg; filter: drop-shadow(0 26px 30px rgb(11 51 39 / 28%));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--tooth)), 95% 100%, 90% calc(100% - var(--tooth)), 85% 100%, 80% calc(100% - var(--tooth)), 75% 100%, 70% calc(100% - var(--tooth)), 65% 100%, 60% calc(100% - var(--tooth)), 55% 100%, 50% calc(100% - var(--tooth)), 45% 100%, 40% calc(100% - var(--tooth)), 35% 100%, 30% calc(100% - var(--tooth)), 25% 100%, 20% calc(100% - var(--tooth)), 15% 100%, 10% calc(100% - var(--tooth)), 5% 100%, 0 calc(100% - var(--tooth))); }
[dir="rtl"] .receipt { rotate: -1.2deg; }
.receipt-head { display: flex; justify-content: space-between; font-weight: 700; padding-block-end: 14px; border-block-end: 2px solid var(--deep); }
.receipt-head span:first-child { font: 600 1.15rem Fraunces, serif; }
.receipt dl div { display: flex; justify-content: space-between; gap: 20px; padding-block: 11px; border-block-end: 1px dashed var(--rule); }
.receipt dd { font: 600 1.1rem Fraunces, serif; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding-block: 16px 14px; font-weight: 700; }
.receipt-total span:last-child { font: 600 3.4rem/1 Fraunces, serif; color: var(--leaf); }
.receipt-note { font-size: 0.9rem; line-height: 1.5; color: var(--muted); }

/* The ledger, ruled like a page with a margin. */
.book { padding: clamp(80px, 11vw, 150px) var(--gutter) clamp(64px, 8vw, 110px); }
.section-head { max-width: 860px; margin-block-end: clamp(40px, 6vw, 72px); }
.section-head > p:last-child:not(.eyebrow) { margin-block-start: 20px; font-size: 1.15rem; color: var(--muted); max-width: 620px; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(32px, 7vw, 110px); max-width: var(--wide); }
.entry { display: grid; grid-template-columns: 72px 1fr; column-gap: 8px; align-content: center; min-height: 66vh; border-block-start: 1px solid var(--rule); padding-block: 36px; opacity: 0.45; transition: opacity 0.3s; }
.entry.is-active { opacity: 1; }
.entry-no { grid-row: span 2; font: 400 1.7rem/1.2 Fraunces, serif; color: var(--leaf); }
.entry p { margin-block-start: 14px; font-size: 1.15rem; max-width: 520px; color: var(--muted); }
.entry-phone { display: none; }
.book-stage { position: sticky; top: max(24px, calc(50vh - 380px)); align-self: start; }
.stage-phone { width: 100%; max-height: calc(100vh - 48px); aspect-ratio: 640 / 1385; }
.also { max-width: var(--wide); margin-block-start: clamp(48px, 7vw, 88px); padding-block-start: 32px; border-block-start: 2px solid var(--ink); }
.also ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 4px 40px; margin-block-start: 22px; }
.also li { padding-block: 13px; border-block-end: 1px solid var(--rule); }

/* Airplane mode. */
.airplane { background: var(--deep); color: var(--ivory); display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(72px, 10vw, 136px) var(--gutter); }
.airplane .eyebrow, .deal .eyebrow { color: var(--lime); }
.airplane-copy > p:nth-of-type(2) { margin-block-start: 20px; color: var(--mist); font-size: 1.15rem; max-width: 460px; }
.air-switch { display: inline-flex; align-items: center; gap: 16px; min-height: 56px; margin-block-start: 32px; padding: 10px 26px 10px 12px; font: 700 1.05rem var(--body); color: var(--deep); background: var(--lime); border: 0; border-radius: 999px; cursor: pointer; }
[dir="rtl"] .air-switch { padding: 10px 12px 10px 26px; }
.air-track { position: relative; width: 56px; height: 32px; background: var(--deep); border-radius: 999px; }
.air-thumb { position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; background: var(--ivory); border-radius: 50%; transition: inset-inline-start 0.2s; }
[aria-pressed="true"] .air-thumb { inset-inline-start: 28px; background: var(--lime); }
.air-panel { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 14%); border-radius: 26px; padding: 28px; }
.air-status { font: 600 clamp(1.25rem, 2.2vw, 1.6rem)/1.3 var(--display); padding-block-end: 16px; border-block-end: 1px solid rgb(255 255 255 / 22%); }
.air-panel li { display: flex; justify-content: space-between; gap: 18px; padding-block: 13px; border-block-end: 1px solid rgb(255 255 255 / 10%); }
.air-panel li:last-child { border: 0; padding-block-end: 0; }
.air-panel b { flex: none; color: var(--lime); font-weight: 700; }
[data-state="on"] .air-drive b { color: var(--mist); }
.air-drive { color: var(--mist); }

/* Currencies. */
.currency { display: grid; grid-template-columns: 1fr minmax(0, 500px); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(72px, 10vw, 136px) var(--gutter); }
.currency-copy > p:last-child { margin-block-start: 22px; font-size: 1.15rem; color: var(--muted); max-width: 520px; }
.ledger-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 26px; padding: 30px; box-shadow: 0 24px 50px -32px rgb(11 51 39 / 40%); }
.ledger-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-block: 14px; border-block-end: 1px solid var(--rule); }
.figure { font: 600 1.25rem Fraunces, serif; }
.rate { display: block; padding-block: 20px; font-weight: 500; }
.rate-input { display: flex; align-items: center; gap: 10px; margin-block-start: 10px; }
.rate-input input { flex: 1; min-width: 0; height: 52px; padding-inline: 14px; font: 600 1.15rem var(--body); color: var(--ink); background: var(--ivory); border: 1.5px solid var(--leaf); border-radius: 12px; }
.ledger-total { border-block: 2px solid var(--ink); align-items: baseline; font-weight: 700; }
.ledger-total output { font-weight: 500; color: var(--muted); }
.ledger-total output.has-total { font: 600 1.55rem Fraunces, serif; color: var(--leaf); direction: ltr; unicode-bidi: isolate; }
.ledger-note { margin-block-start: 14px; font-size: 0.9rem; color: var(--muted); }

/* Day and night. */
.split { background: var(--emerald); color: var(--ivory); display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(72px, 10vw, 136px) var(--gutter); }
.split .eyebrow { color: var(--lime); }
.split-copy > p:last-child { margin-block-start: 22px; font-size: 1.15rem; color: var(--mist); max-width: 480px; }
.compare { --x: 50%; justify-self: center; width: min(380px, 100%); }
.compare-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 3px; margin-left: -1.5px; background: var(--lime); pointer-events: none; }
.compare-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; translate: -50% -50%; border-radius: 50%; background: linear-gradient(90deg, var(--ivory) 50%, var(--lime) 50%); border: 3px solid var(--deep); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) { outline: 3px solid var(--lime); outline-offset: 4px; }

/* Languages. */
.tongues { padding: clamp(80px, 11vw, 150px) var(--gutter); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 320px)); justify-content: center; gap: clamp(16px, 3vw, 44px); }
.trio figure:nth-child(2) { translate: 0 -36px; }
.trio figcaption { margin-block-start: 16px; text-align: center; font-weight: 500; }

/* For buyers and partners. */
.deal { background: var(--deep); color: var(--ivory); padding: clamp(80px, 11vw, 150px) var(--gutter); }
.deal-head { max-width: 760px; }
.deal-head > p:last-child { margin-block-start: 22px; font-size: 1.15rem; color: var(--mist); }
.deal-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-start: clamp(40px, 6vw, 72px); border-block-start: 1px solid rgb(255 255 255 / 22%); }
.deal-facts div { padding: 30px 28px 30px 0; border-block-end: 1px solid rgb(255 255 255 / 22%); }
[dir="rtl"] .deal-facts div { padding: 30px 0 30px 28px; }
.deal-facts dt { font: 600 clamp(2.8rem, 6vw, 4.6rem)/1 Fraunces, serif; color: var(--lime); }
.deal-facts dd { margin-block-start: 12px; color: var(--mist); max-width: 300px; }
.deal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px; margin-block-start: 44px; }
.deal-status { max-width: 620px; }
.deal-contact { color: var(--mist); }
.button { display: inline-flex; align-items: center; min-height: 56px; padding-inline: 30px; font-weight: 700; text-decoration: none; border-radius: 999px; }
.button--lime { background: var(--lime); color: var(--deep); }

.foot { background: var(--emerald); color: var(--ivory); padding: 56px var(--gutter) 40px; }
.foot-line { font: 600 clamp(1.8rem, 4vw, 3rem)/1.15 var(--display); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-block-start: 22px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 48px; }
.foot-site { margin-block-start: 12px; font-size: 0.9rem; color: var(--mist); }

/* Privacy policy. */
.policy { max-width: 720px; margin-inline: auto; padding: 48px var(--gutter) 96px; }
.policy h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-block: 24px; }
.policy h2 { font-size: 1.6rem; margin-block: 40px 12px; }
.policy p, .policy li { margin-block-end: 12px; }
.policy ul { list-style: disc; padding-inline-start: 22px; }
.policy-draft { padding: 14px 18px; background: var(--lime); border-radius: 12px; font-weight: 500; }

/* The moon in the corner fills as you read. */
.phase { pointer-events: none; position: fixed; z-index: 10; inset-block-end: 20px; inset-inline-end: 20px; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: var(--deep); box-shadow: 0 0 0 2px var(--ivory), 0 8px 20px rgb(4 20 14 / 35%); }
.phase-light { --phase: 0; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); transform: translateX(calc((1 - var(--phase)) * 100%)); }

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding-block-start: 104px; min-height: 0; }
  .hero-copy { padding-block-end: 40px; }
  .hero-moon { width: 150vw; inset-inline-end: -55vw; top: 34%; }
  .hero-phone { width: min(300px, 76vw); margin-block-end: -120px; }
  .receipt-band { padding-block-start: 170px; }
  .receipt-band, .airplane, .currency, .split { grid-template-columns: minmax(0, 1fr); }
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .book-stage { display: none; }
  .entry { min-height: 0; opacity: 1; grid-template-columns: 56px 1fr; }
  .entry-phone { display: block; grid-column: 1 / -1; width: min(290px, 78vw); justify-self: center; margin-block-start: 30px; }
  .deal-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trio { grid-template-columns: repeat(3, 62vw); justify-content: start; overflow-x: auto; scroll-snap-type: x proximity; padding-block: 8px 16px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .trio figure { scroll-snap-align: center; }
  .trio figure:nth-child(2) { translate: none; }
}
@media (max-width: 480px) {
  .deal-facts { grid-template-columns: minmax(0, 1fr); }
  .receipt { padding-inline: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print { .phase { display: none; } }
