/*
 * Lily's home page (/). Full-bleed paintings of Lily's world, one idea a screen, Lily's own
 * colours and fonts. The four cycle chapters are stacked panels (position: sticky): each slides
 * up over the last, with no script. No inline styles (the site's CSP forbids them), nothing
 * loaded from another site. Light first, dark below.
 */

@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; }

:root {
  --page: #FCF5F2; --soft: #F8E8E2; --card: #FFFFFF;
  --ink: #2E2528; --muted: #6B5E62;
  --rose: #C24064; --rose-deep: #A8294F;
  --line: rgba(120, 60, 80, .14);
  --period: #E0446A; --fertile: #5FAE74; --ovulation: #9A78D6;
  --shadow: 0 1px 2px rgba(90, 40, 60, .06), 0 14px 40px rgba(120, 60, 80, .10);
  --night: #160D13;
  --r: 28px; --wrap: 1160px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0D0A0B; --soft: #171013; --card: #1D1519;
    --ink: #F3EBEC; --muted: #B8A9AD; --rose: #EE7A9A; --rose-deep: #C23B63;
    --line: rgba(255, 255, 255, .10);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--page); line-height: 1.55; font-size: 1.0625rem; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 10px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 60; background: var(--rose-deep); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

/* ───── Header ───── */
.nav { position: fixed; inset-inline: 0; top: 0; z-index: 30; background: color-mix(in srgb, var(--page) 70%, transparent); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.mark img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 2px 8px rgba(194, 64, 100, .28); }
.links { display: flex; align-items: center; gap: 30px; }
.links a:not(.btn) { text-decoration: none; font-weight: 700; font-size: .98rem; color: var(--muted); position: relative; padding: 6px 0; }
.links a:not(.btn)::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.links a:not(.btn):hover { color: var(--ink); }
.links a:not(.btn):hover::after { transform: scaleX(1); }

/* ───── Buttons ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--rose-deep); color: #fff; font-weight: 700; text-decoration: none; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; box-shadow: 0 6px 18px rgba(168, 41, 79, .28); }
.btn:hover { transform: translateY(-2px); background: #961F44; }
.btn:active { transform: translateY(0) scale(.98); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: .94rem; }

h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.04; }
h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.8rem); }
.lead { margin: 24px 0 0; font-size: 1.25rem; color: var(--muted); max-width: 34em; }
.eyebrow { margin: 0 0 20px; font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rose-deep); }

.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.badges a { display: block; line-height: 0; border-radius: 10px; transition: transform .18s ease; }
.badges a:hover { transform: translateY(-2px); }
.badges a:active { transform: scale(.98); }
.badges img { height: 54px; width: auto; }

/* ───── Hero: the whole screen is a painting ───── */
.hero { position: relative; height: 100vh; min-height: 640px; display: flex; align-items: center; overflow: hidden; color: #2E2528; }
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .bg { object-position: 70% 50%; animation: settle 2.4s cubic-bezier(.2, .7, .2, 1) both; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(252, 245, 242, .86) 0%, rgba(252, 245, 242, .55) 38%, rgba(252, 245, 242, 0) 62%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 68px; }
.hero-text { max-width: 640px; }
.hero .lead { color: #4A3C41; }
.hero .fine { margin: 18px 0 0; font-weight: 700; font-size: .95rem; color: #5A4A50; }
.hero-text > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .1s; } .hero-text > :nth-child(3) { animation-delay: .2s; }
.hero-text > :nth-child(4) { animation-delay: .3s; } .hero-text > :nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }

/* ───── Chapters: stacked panels, each slides over the last ───── */
.chapter { position: sticky; top: 0; height: 100vh; min-height: 600px; display: flex; align-items: center; overflow: hidden; color: #fff; }
.chapter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 8, 12, .62) 0%, rgba(14, 8, 12, .25) 45%, rgba(14, 8, 12, 0) 70%); }
.chapter .bg { object-position: 62% 50%; }
.chapter .wrap { position: relative; z-index: 1; }
.panel { max-width: 520px; padding: 6px 0; }
.panel .step { margin: 0 0 18px; font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: #FFC3D2; }
.panel h2 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.panel p { margin: 22px 0 0; font-size: 1.2rem; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 14px rgba(0, 0, 0, .4); }
.panel .step + h2 + p { max-width: 30em; }
.rail { display: flex; gap: 8px; list-style: none; margin: 34px 0 0; padding: 0; }
.rail li { width: 54px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.rail li.on { background: #fff; }
.chapter.c-fertile::after { background: linear-gradient(90deg, rgba(10, 30, 14, .62) 0%, rgba(10, 30, 14, .25) 45%, rgba(10, 30, 14, 0) 70%); }
.chapter.c-fertile .bg { object-position: 40% 50%; }

/* ───── Showcase: real screenshots ───── */
.showcase { position: relative; padding-block: 120px; background: radial-gradient(70% 60% at 50% 100%, color-mix(in srgb, var(--rose) 22%, transparent), transparent 70%), var(--page); overflow: hidden; }
.showcase .wrap { text-align: center; }
.showcase .lead { margin-inline: auto; }
.phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 3vw, 44px); margin-top: 64px; }
.phone { margin: 0; border-radius: 46px; background: #0B0809; padding: 9px; box-shadow: 0 40px 80px -20px rgba(90, 20, 50, .45), 0 0 0 1.5px rgba(255, 255, 255, .12) inset; transition: transform .35s ease; width: min(26vw, 300px); }
.phone img { width: 100%; height: auto; border-radius: 38px; display: block; }
.phone.mid { width: min(31vw, 360px); }
.phone:hover { transform: translateY(-6px); }
.phone.side { transform: translateY(24px); }
.phone.side:hover { transform: translateY(18px); }

/* ───── Features and questions ───── */
.feat { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat li { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); transition: transform .2s ease; }
.feat li:hover { transform: translateY(-2px); }
.feat h3 { font-size: 1.2rem; line-height: 1.2; letter-spacing: -.01em; padding-inline-start: 22px; position: relative; }
.feat h3::before { content: ""; position: absolute; inset-inline-start: 0; top: .32em; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.feat p { margin: 10px 0 0; color: var(--muted); font-size: 1rem; }
.faq { max-width: 820px; }
.qa { margin-top: 40px; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-weight: 700; font-size: 1.2rem; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--rose); transition: transform .2s ease; }
.qa details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa summary:hover { color: var(--rose); }
.qa details p { margin: 0 0 22px; color: var(--muted); max-width: 40em; }

/* ───── Calm sections ───── */
.calm { position: relative; padding-block: 120px; background: var(--page); }
.calm.alt { background: var(--soft); }
.calm .lead { max-width: 38em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }

.forecast { margin-top: 56px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 36px; box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: repeat(14, 1fr); gap: 12px; }
.row + .row { margin-top: 12px; }
.forecast i { aspect-ratio: 1; border-radius: 50%; background: var(--line); display: block; }
.forecast i.p { background: var(--period); }
.forecast i.f { background: var(--fertile); opacity: .8; }
.forecast i.o { background: var(--ovulation); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ovulation) 28%, transparent); }
.forecast i.r { background: transparent; border: 3px dashed var(--period); }
.forecast i.t { box-shadow: 0 0 0 4px var(--card), 0 0 0 7px var(--ink); }
.key { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 28px 0 0; padding: 0; list-style: none; font-weight: 700; color: var(--muted); }
.key li { display: flex; align-items: center; gap: 9px; }
.key b { width: 14px; height: 14px; border-radius: 50%; display: block; }
.key .kp { background: var(--period); } .key .kf { background: var(--fertile); } .key .ko { background: var(--ovulation); } .key .kr { border: 2px dashed var(--period); }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin: 56px 0 0; padding: 0; list-style: none; }
.three li { border-top: 2px solid var(--rose); padding-top: 18px; }
.three strong { display: block; font-size: 1.2rem; margin-bottom: 6px; }
.three span { color: var(--muted); }

.facts { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 20px; }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
.facts li::before { content: ""; width: 10px; height: 10px; margin-top: 9px; margin-inline-start: 9px; border-radius: 50%; background: var(--rose); }
.facts strong { display: block; font-size: 1.1rem; }
.facts span { color: var(--muted); }

.diary { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 30px; box-shadow: var(--shadow); max-width: 500px; width: 100%; justify-self: center; transition: transform .25s ease; }
.diary:hover { transform: translateY(-2px); }
.diary-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.diary-head strong { font-size: 1.4rem; }
.diary-head span { color: var(--muted); font-weight: 700; font-size: .92rem; }
.drow { display: grid; grid-template-columns: 38px 1fr; gap: 16px; align-items: center; padding: 15px 0; }
.drow + .drow { border-top: 1px solid var(--line); }
.drow b { display: block; font-size: 1.08rem; }
.drow span { color: var(--muted); }
.dot { width: 38px; height: 38px; border-radius: 50%; display: block; }
.dot.p { background: var(--period); } .dot.m { background: #F2B544; } .dot.s { background: #E7895A; } .dot.d { background: var(--fertile); }
.level { display: flex; gap: 6px; padding-top: 4px; }
.level u { width: 34px; height: 8px; border-radius: 4px; background: var(--line); display: block; }
.level u.on { background: #E7895A; }

/* ───── Full-bleed worlds with a glass panel ───── */
.world { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; color: #fff; padding-block: 100px; }
.world::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 6, 16, .72) 0%, rgba(8, 6, 16, .35) 50%, rgba(8, 6, 16, 0) 75%); }
.world .bg { object-position: 70% 50%; }
.world .wrap { position: relative; z-index: 1; }
.panel.wide { max-width: 560px; }
.vault { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 4px; }
.vault li { display: grid; grid-template-columns: 38px 1fr; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.vault b { display: block; color: #fff; }
.vault span { color: rgba(255, 255, 255, .78); }
.tick { width: 38px; height: 38px; border-radius: 50%; background: rgba(95, 174, 116, .3); position: relative; display: block; }
.tick::after { content: ""; position: absolute; left: 14px; top: 8px; width: 8px; height: 16px; border: solid #8EE0A6; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.text-link { display: inline-block; margin-top: 30px; font-weight: 700; color: #FFC3D2; text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat; transition: background-size .25s ease; padding-bottom: 3px; }
.text-link:hover { background-size: 100% 2px; }
.langs { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.langs li { padding: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.langs a { display: block; padding: 9px 18px; border-radius: 999px; color: inherit; text-decoration: none; }
.langs a:hover { background: rgba(255, 255, 255, .14); }
.langs a[aria-current="page"] { background: rgba(255, 255, 255, .92); color: #2E2528; }

/* Arabic (the /ar page) reads in Zain, which runs smaller than Nunito at the same size. Right to
   left, the paintings and their shade are mirrored, so the words still sit on the open side. */
:lang(ar) body { font-family: "Zain", "Nunito", -apple-system, "Segoe UI", Tahoma, sans-serif; font-size: 1.15em; }
:lang(ar) .panel .step, :lang(ar) .eyebrow { letter-spacing: 0; }
[dir="rtl"] .bg, [dir="rtl"] .hero::after, [dir="rtl"] .chapter::after, [dir="rtl"] .world::after { scale: -1 1; }

/* ───── Close ───── */
.close { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; text-align: center; background: radial-gradient(60% 55% at 50% 40%, #4A1F33 0%, var(--night) 70%); color: #F7ECEE; padding-block: 100px 120px; }
.close .lead { margin-inline: auto; color: #CDB7BE; }
.close .badges { justify-content: center; }
.close .badges img { height: 60px; }
.big-icon { width: 120px; height: 120px; border-radius: 28px; margin: 0 auto 36px; box-shadow: 0 0 80px rgba(240, 100, 140, .45); }
.close h2 { font-size: clamp(3rem, 7vw, 5.5rem); }
.foot { position: absolute; inset-inline: 0; bottom: 0; border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 22px; color: #CDB7BE; font-size: .95rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; }
.foot a { text-decoration: none; font-weight: 700; }
.foot a:hover { color: #FFC3D2; }

/* ───── Narrow screens ───── */
@media (max-width: 960px) {
  .calm, .showcase { padding-block: 80px; }
  .feat { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .three { grid-template-columns: 1fr; gap: 24px; }
  .links a:not(.btn) { display: none; }
  .hero::after { background: linear-gradient(180deg, rgba(252, 245, 242, .88) 0%, rgba(252, 245, 242, .55) 55%, rgba(252, 245, 242, 0) 85%); }
  .hero { align-items: flex-start; height: 100svh; }
  .hero .wrap { padding-top: 104px; }
  .hero .bg { object-position: 72% 100%; }
  .chapter, .world { height: 100svh; min-height: 560px; flex-direction: column; align-items: stretch; justify-content: flex-start; background: #120A10; padding: 0; }
  .world { height: auto; min-height: 100svh; }
  .chapter::after, .world::after { display: none; }
  .chapter .bg, .world .bg { position: relative; inset: auto; height: 46svh; flex: none; object-position: 72% 50%; }
  .chapter .wrap, .world .wrap { flex: 1; display: flex; align-items: center; padding-block: 28px 40px; }
  .chapter.c-fertile .bg { object-position: 66% 50%; }
  .chapter.c-luteal .bg { object-position: 90% 50%; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 48px); }
  .nav .wrap { height: 60px; }
  .feat { grid-template-columns: 1fr; }
  .phones { gap: 10px; margin-top: 44px; }
  .phone { border-radius: 22px; padding: 4px; width: 30vw; }
  .phone.mid { width: 36vw; }
  .phone img { border-radius: 18px; }
  .phone.side { transform: translateY(12px); }
  .badges { flex-direction: column; align-items: flex-start; }
  .close .badges { align-items: center; }
  .badges img { height: 56px; }
  .forecast { padding: 18px; }
  .row { gap: 6px; }
  .row + .row { margin-top: 6px; }
  .panel p { font-size: 1.08rem; }
  .foot .wrap { flex-direction: column; gap: 6px; }
}

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