/* khouli.co landing page (/ and /<language>/). The pages are generated: tools/landing-page/build.py */
@font-face {
  font-family: "Cairo";
  src: url("/app/assets/fonts/cairo-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --green-950: #03241a;
  --green-900: #06301f;
  --green-800: #07503c;
  --deep: #021710;
  --c950: 3, 36, 26;
  --c800: 7, 80, 60;
  --gold: #d9b667;
  --gold-soft: #f1dca5;
  --ivory: #fff8e7;
  --muted: rgba(255, 248, 231, 0.74);
  --line: rgba(217, 182, 103, 0.3);
  --card: rgba(255, 255, 255, 0.045);
  --radius: 20px;
}

/* The app's other three colours; the variable names keep "green" because green is the default. */
:root[data-theme="blue"] { --green-950: #081828; --green-900: #0a1f38; --green-800: #12406b; --deep: #050f1c; --c950: 8, 24, 40; --c800: 18, 64, 107; }
:root[data-theme="brown"] { --green-950: #1c1108; --green-900: #2a1a0c; --green-800: #5a3a1a; --deep: #120a04; --c950: 28, 17, 8; --c800: 90, 58, 26; }
:root[data-theme="gray"] { --green-950: #121315; --green-900: #191b1d; --green-800: #33373b; --deep: #0c0d0e; --c950: 18, 19, 21; --c800: 51, 55, 59; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ivory);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", "Noto Sans", Tahoma, Arial, sans-serif;
  line-height: 1.8;
  background:
    radial-gradient(1100px 620px at 85% -10%, rgba(217, 182, 103, 0.13), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, rgba(var(--c800), 0.55), transparent 65%),
    linear-gradient(160deg, var(--green-950), var(--green-900) 55%, var(--deep));
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(var(--c950), 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--ivory); }
.brand img { flex: none; border-radius: 12px; }
.brand span { display: grid; min-width: 0; line-height: 1.35; }
.brand strong { font-size: 1.1rem; font-weight: 800; color: var(--gold-soft); }
.brand small { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { display: flex; align-items: center; gap: 12px; flex: none; }
/* Colour dots, the same four as the app. */
.themes { display: flex; gap: 6px; }
.dot { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4); cursor: pointer; }
.dot[aria-pressed="true"] { border: 2px solid var(--gold); }
.dot-green { background: linear-gradient(145deg, #03241a, #07503c); }
.dot-blue { background: linear-gradient(145deg, #0a1f38, #12406b); }
.dot-brown { background: linear-gradient(145deg, #2a1a0c, #5a3a1a); }
.dot-gray { background: linear-gradient(145deg, #191b1d, #33373b); }

/* One language button; its panel lists every language by its own name. */
.langmenu { position: relative; flex: none; }
.langmenu summary { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--gold-soft); font-weight: 700; font-size: 0.9rem; cursor: pointer; list-style: none; user-select: none; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.langpanel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 20; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: rgba(var(--c950), 0.8); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.langpanel a { padding: 8px 12px; border-radius: 10px; color: var(--ivory); text-decoration: none; font-weight: 600; font-size: 0.95rem; text-align: start; }
.langpanel a:hover, .langpanel a:focus-visible { background: rgba(255, 255, 255, 0.08); }
.langpanel a[aria-current="page"] { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: var(--green-950); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px; padding-block: 64px 48px; }
.eyebrow { display: inline-block; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold-soft); font-weight: 700; font-size: 0.86rem; }
h1 { margin-top: 18px; font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.5; font-weight: 900; text-wrap: balance; }
.lead { margin-top: 16px; max-width: 34em; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); }

.stores { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; margin-top: 26px; }
.store { display: grid; align-content: center; min-width: 0; padding: 10px 16px; border-radius: 16px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: var(--green-950); text-decoration: none; line-height: 1.4; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.store small { font-size: 0.74rem; font-weight: 600; opacity: 0.82; }
.store strong { font-size: 1.16rem; font-weight: 800; }
.store:hover, .store:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36); }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

.phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 480px; direction: ltr; }
.phone { flex: none; width: 34%; max-width: 220px; padding: 6px; border-radius: 30px; background: #0c0f0e; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45); }
.phone img { width: 100%; border-radius: 24px; }
.phone.p0 { position: relative; z-index: 2; transform: scale(1.14); }
.phone.p1 { order: -1; margin-inline-end: -5%; transform: rotate(-5deg); opacity: 0.94; }
.phone.p2 { margin-inline-start: -5%; transform: rotate(5deg); opacity: 0.94; }

/* Sections */
.block { padding-block: 44px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.4; color: var(--gold-soft); }
.sub { margin-top: 8px; max-width: 44em; color: var(--muted); }

.badge { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; line-height: 1.7; vertical-align: middle; white-space: nowrap; }
.badge.live { background: rgba(128, 214, 160, 0.16); color: #a9e6c0; border: 1px solid rgba(128, 214, 160, 0.4); }
.badge.soon { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px dashed rgba(255, 248, 231, 0.34); }

.platforms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.platform { display: grid; align-content: start; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ivory); text-decoration: none; }
.platform h3 { font-size: 1.08rem; font-weight: 800; line-height: 1.4; }
.platform .badge { justify-self: start; }
.platform p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
a.platform { transition: border-color 0.15s ease, transform 0.15s ease; }
a.platform:hover, a.platform:focus-visible { border-color: var(--gold); transform: translateY(-2px); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 32px; }
.watches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.watch { margin: 0; display: grid; justify-items: center; gap: 12px; text-align: center; }
.watch-face { display: block; width: min(100%, 150px); padding: 7px; background: #0c0f0e; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4); }
.watch-face.tall { border-radius: 34px; }
.watch-face.tall img { border-radius: 27px; }
.watch-face.round, .watch-face.round img { border-radius: 50%; }
.watch figcaption { display: grid; justify-items: center; gap: 3px; line-height: 1.5; }
.watch figcaption span:not(.badge) { color: var(--muted); font-size: 0.86rem; }

.mac-shot { position: relative; display: block; justify-self: center; width: min(100%, 300px); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45); }
.mac .mac-panel { width: 100%; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.16); }
.mac h2 .badge { margin-inline-start: 6px; }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.feature { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.feature svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin-top: 10px; font-size: 1.05rem; font-weight: 800; }
.feature p { margin-top: 4px; color: var(--muted); font-size: 0.92rem; line-height: 1.75; }

.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.langs a { display: block; padding: 5px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ivory); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease; }
.langs a:hover, .langs a:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.langs a[aria-current="page"] { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: var(--green-950); border-color: transparent; }
.note { margin-top: 18px; padding: 12px 16px; border-inline-start: 3px solid var(--gold); border-radius: 0 12px 12px 0; background: rgba(217, 182, 103, 0.08); color: var(--ivory); max-width: 46em; }
[dir="rtl"] .note { border-radius: 12px 0 0 12px; }

.faq { display: grid; gap: 10px; margin-top: 22px; max-width: 54em; }
.qa { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; color: var(--gold); font-size: 1.4rem; font-weight: 400; line-height: 1; }
.qa[open] summary::after { content: "\2212"; }
.qa h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.6; }
.qa p { padding: 0 18px 16px; color: var(--muted); }

/* Feedback: five stars and a comment. The stars are written 5 to 1 and shown reversed, so a chosen
   star and the ones before it light up with plain CSS. */
.fb { display: grid; gap: 16px; margin-top: 22px; max-width: 40em; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stars { margin: 0; padding: 0; border: 0; min-width: 0; }
.stars legend, .fb-text span { padding: 0; font-weight: 700; color: var(--gold-soft); }
.stars-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; direction: ltr; }
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-row label { font-size: 2.1rem; line-height: 1.2; color: rgba(255, 248, 231, 0.28); cursor: pointer; transition: color 0.12s ease, transform 0.12s ease; }
.stars-row label:hover, .stars-row label:hover ~ label, .stars-row input:checked ~ label { color: var(--gold); }
.stars-row label:hover { transform: scale(1.12); }
.stars-row input:focus-visible + label { outline: 2px solid var(--gold-soft); outline-offset: 2px; border-radius: 6px; }
.fb-text { display: grid; gap: 6px; }
.fb textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, 0.22); color: var(--ivory); font: inherit; line-height: 1.7; resize: vertical; }
.fb-trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.fb-send { padding: 10px 30px; border: 0; border-radius: 14px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: var(--green-950); font: inherit; font-weight: 800; cursor: pointer; }
.fb-send:disabled { opacity: 0.6; cursor: default; }
.fb-status { min-height: 1.6em; }
.fb-status.ok { color: #a9e6c0; }
.fb-status.bad { color: #f3b3a6; }

/* Cards rise into view once. Without JavaScript they are simply shown. */
.js .store, .js .platform, .js .feature, .js .watch, .js .qa, .js .mac-panel { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.15s ease, border-color 0.15s ease; }
.js .store.in, .js .platform.in, .js .feature.in, .js .watch.in, .js .qa.in, .js .mac-panel.in { opacity: 1; transform: none; }
.js .store.in:hover, .js .store.in:focus-visible, .js a.platform.in:hover, .js a.platform.in:focus-visible { transform: translateY(-2px); }

/* A band of light that crosses the download buttons and the Mac panel now and then. */
.store { position: relative; overflow: hidden; }
.store::after, .mac-shot::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, 0.6) 50%, transparent 64%); transform: translateX(-130%); animation: sheen 5s ease-in-out infinite; }
.mac-shot::after { background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.22) 50%, transparent 62%); animation-duration: 7s; }
.store:nth-child(2)::after { animation-delay: 0.35s; }
.store:nth-child(3)::after { animation-delay: 0.7s; }
.store:nth-child(4)::after { animation-delay: 1.05s; }
.store:nth-child(5)::after { animation-delay: 1.4s; }
@keyframes sheen { 0%, 60% { transform: translateX(-130%); } 90%, 100% { transform: translateX(130%); } }

/* A soft glow that breathes around the status badges, with a slow light crossing them. */
.badge.live, .badge.soon { position: relative; overflow: hidden; isolation: isolate; }
.badge.live { animation: glowLive 2.8s ease-in-out infinite; }
.badge.soon { border-style: solid; border-color: rgba(217, 182, 103, 0.5); color: var(--gold-soft); animation: glowSoon 3.2s ease-in-out infinite; }
.badge.live::after, .badge.soon::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%); transform: translateX(-120%); animation: badgeSheen 3.6s ease-in-out infinite; }
@keyframes glowLive { 0%, 100% { box-shadow: 0 0 4px rgba(127, 220, 164, 0.25), 0 0 0 rgba(127, 220, 164, 0); } 50% { box-shadow: 0 0 10px rgba(127, 220, 164, 0.75), 0 0 24px rgba(127, 220, 164, 0.4); } }
@keyframes glowSoon { 0%, 100% { box-shadow: 0 0 4px rgba(241, 220, 165, 0.2), 0 0 0 rgba(217, 182, 103, 0); } 50% { box-shadow: 0 0 10px rgba(241, 220, 165, 0.7), 0 0 26px rgba(217, 182, 103, 0.42); } }
@keyframes badgeSheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.platform .badge.live { position: relative; }
.platform .badge.live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 6px; border-radius: 50%; background: #7fdca4; animation: livePulse 2.4s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 0.45; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }

.dedication { text-align: center; }
.dedication p { margin: 12px auto 0; max-width: 42em; color: var(--muted); font-size: 1.05rem; }
.dedication img { margin: 26px auto 0; width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); }

.cta { text-align: center; padding-bottom: 64px; }
.cta .stores { max-width: 900px; margin-inline: auto; }

.foot { border-top: 1px solid var(--line); background: rgba(var(--c950), 0.6); color: var(--muted); font-size: 0.9rem; }
.foot a { color: var(--gold-soft); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-block: 18px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-block: 40px 28px; text-align: center; }
  .lead { margin-inline: auto; }
  .phones { min-height: 0; padding-block: 26px; }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 560px) {
  .brand small { display: none; }
  .stores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stores .store:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .store { text-align: center; padding-inline: 10px; }
  .store strong { font-size: 1.02rem; }
  .langmenu summary { padding-inline: 11px; }
  .tools { gap: 8px; }
  .dot { width: 20px; height: 20px; }
  .brand strong { font-size: 1rem; }
  .platforms, .features { grid-template-columns: 1fr; }
  .block { padding-block: 32px; }
  .watches { gap: 8px; }
  .phone { border-radius: 22px; padding: 4px; }
  .phone img { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store, a.platform { transition: none; }
  .js .store, .js .platform, .js .feature, .js .watch, .js .qa, .js .mac-panel { opacity: 1; transform: none; transition: none; }
  .platform .badge.live::before, .badge.live, .badge.soon, .badge.live::after, .badge.soon::after, .store::after, .mac-shot::after { animation: none; }
}
