/*
 * Lily website: the look both pages share (the share card at / and /share, and /privacy).
 *
 * It follows the app's look: the aurora backdrop (rose, peach and lilac light, like
 * `LilyAurora`), a glass card for the share page, Lily's colours from the asset catalog
 * (light and dark), Nunito for the Latin languages and Zain for Arabic. Nothing here loads
 * from another site: fonts and pictures are served by Lily's own hosting.
 */

@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Zain"; src: url("/assets/fonts/zain-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zain"; src: url("/assets/fonts/zain-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Lily's colours (asset catalog: AppBackground, BoxBackground, TextPrimary, ButtonStrong,
   Primary, AuroraPeach, Secondary), light first, dark below. */
:root {
  --page: #FCF5F2;
  --surface: rgba(255, 253, 252, 0.74);
  --rim: rgba(255, 255, 255, 0.85);
  --line: rgba(194, 64, 100, 0.14);
  --text: #373033;
  --muted: #6E6266;
  --rose: #C24064;
  --glow-rose: rgba(245, 104, 142, 0.32);
  --glow-peach: rgba(255, 194, 163, 0.55);
  --glow-lilac: rgba(190, 160, 230, 0.38);
  --shadow: 0 24px 60px rgba(150, 70, 95, 0.16), 0 2px 8px rgba(150, 70, 95, 0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #070607;
    --surface: rgba(28, 19, 23, 0.72);
    --rim: rgba(255, 255, 255, 0.08);
    --line: rgba(255, 255, 255, 0.10);
    --text: #EFEBE7;
    --muted: #B9AEB1;
    --rose: #E8698C;
    --glow-rose: rgba(208, 64, 102, 0.30);
    --glow-peach: rgba(222, 133, 107, 0.20);
    --glow-lilac: rgba(140, 100, 190, 0.24);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.5;
}

/* Arabic reads in Zain, which runs smaller than Nunito at the same size. */
:lang(ar) body { font-family: "Zain", "Nunito", -apple-system, "Segoe UI", Tahoma, sans-serif; font-size: 1.12em; }

/* The aurora: three soft lights fixed behind everything, as in the app. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vmax 50vmax at 12% 8%, var(--glow-rose), transparent 60%),
    radial-gradient(55vmax 45vmax at 92% 20%, var(--glow-peach), transparent 62%),
    radial-gradient(60vmax 55vmax at 50% 105%, var(--glow-lilac), transparent 60%);
}

a { color: var(--rose); }

a:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 10px; }

.site-footer {
  padding: 20px 16px 28px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer a { color: var(--muted); }

/* ───────── Share card (/ and /share) ───────── */

.share-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 0;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: 32px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  overflow: hidden;
}

/* Lily's garden. On a phone a wide band around her; beside the words on a wide screen. */
.card-scene {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 72% 62%;
}

/* In right-to-left the scene is mirrored, as the app's share cards are, so Lily stays on
   the side away from the words. */
[dir="rtl"] .card-scene { transform: scaleX(-1); }

.card-body { padding: 22px 26px 28px; }

.brand { display: flex; align-items: center; gap: 14px; }

.brand img { width: 60px; height: 60px; border-radius: 15px; box-shadow: 0 4px 14px rgba(194, 64, 100, 0.25); }

.brand h1 { margin: 0; font-size: 2.1rem; font-weight: 700; line-height: 1.05; }

.brand p { margin: 2px 0 0; font-weight: 700; color: var(--muted); }

.pitch { margin: 18px 0 0; font-size: 1.08rem; }

.free { margin: 4px 0 0; color: var(--rose); font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.badges a { display: block; line-height: 0; border-radius: 10px; }

.badges img { height: 50px; width: auto; }

/* Shown only while a phone is being sent to its store. */
.opening { margin: 16px 0 0; color: var(--muted); font-size: 0.95rem; }

.opening[hidden] { display: none; }

/* The QR code is for a computer: a phone is already where Lily installs. */
.scan { display: none; }

@media (min-width: 860px) and (hover: hover) and (pointer: fine) {
  .card {
    max-width: 880px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .card-scene { aspect-ratio: auto; height: 100%; object-position: 70% 60%; }

  .card-body { padding: 44px 44px 40px; align-self: center; }

  .brand img { width: 72px; height: 72px; border-radius: 18px; }

  .brand h1 { font-size: 2.6rem; }

  .scan {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
  }

  /* A QR code must stay dark on light to scan, in the dark look too. */
  .scan img { width: 104px; height: 104px; padding: 8px; background: #FFFFFF; border-radius: 14px; }

  .scan p { margin: 0; color: var(--muted); font-weight: 700; max-width: 16ch; }
}

/* ───────── Privacy policy (/privacy) ───────── */

.doc {
  max-width: 760px;
  margin: 32px auto 0;
  padding: 36px 28px 40px;
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: 28px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

@media (max-width: 800px) { .doc { margin: 16px 12px 0; padding: 26px 20px 30px; border-radius: 22px; } }

.doc-head { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }

.doc-head img { width: 48px; height: 48px; border-radius: 12px; }

.doc-head span { font-weight: 700; font-size: 1.3rem; }

.doc h1 { margin: 26px 0 4px; font-size: 2rem; line-height: 1.2; }

.doc .updated { margin: 0 0 22px; color: var(--muted); font-size: 0.95rem; }

.doc h2 { margin: 34px 0 8px; font-size: 1.3rem; scroll-margin-top: 16px; }

.doc h3 { margin: 22px 0 6px; font-size: 1.06rem; }

.doc p, .doc li { font-size: 1rem; }

.doc ul { padding-inline-start: 22px; }

.doc li { margin: 6px 0; }

.doc nav ol { columns: 2; column-gap: 28px; padding-inline-start: 22px; margin: 0; }

/* No top margin in the contents list, so both of its columns start on the same line. */
.doc nav li { margin: 0 0 8px; break-inside: avoid; }

@media (max-width: 560px) { .doc nav ol { columns: 1; } }

.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0; }

.doc dt { color: var(--muted); }

.doc dd { margin: 0; }

@media (max-width: 560px) { .doc dl { grid-template-columns: 1fr; } .doc dd { margin-bottom: 8px; } }
