/* Lignee Kids, public welcome page « la veilleuse ».
   The first screen is night blue: one thread, drawn like the logo, runs from a loop (the grandparents)
   through the child's photos to a golden dot (the child, the little light the album keeps on).
   It draws itself once when the page opens: the only movement of the page. Then bright milk-white and
   pale-sky bands, one night band for the promises, and the last call at night again. */

.page.landing-page { max-width: none; padding: 0; }
.landing { --land-w: 1160px; overflow-x: clip; }
.landing .wrap { max-width: var(--land-w); margin: 0 auto; padding: 0 28px; }
.landing h1 { font-weight: 500; font-size: clamp(2.6rem, 4.6vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 22px; max-width: 13ch; }
.landing h2 { font-weight: 500; font-size: clamp(1.9rem, 3.3vw, 2.75rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 16px; max-width: 20ch; }
.landing h3 { font-weight: 600; font-size: var(--fs-heading); letter-spacing: -.015em; margin: 0 0 6px; }
.landing p { max-width: 60ch; }

/* --- The top bar over the night ---------------------------------------------------------------------- */
body.on-night { background: var(--night); }
body.on-night .topbar { background: color-mix(in srgb, var(--night) 90%, transparent); border-bottom-color: rgba(255, 255, 255, .08);
  padding-inline: max(28px, calc((100vw - 1160px) / 2 + 28px)); }
body.on-night .brand { color: #fff; }
body.on-night .brand span { color: var(--gold); }
body.on-night .brand::before { background-image: url("/static/icons/logo-night.svg"); }
body.on-night .page.landing-page { background: var(--bg); }

/* --- First screen: the words and the form, the thread of a childhood ---------------------------------- */
.hero { background: var(--night); color: #fff; padding: 56px 0 96px; position: relative; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(255, 255, 255, .06); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.hero .lead { font-size: 1.2rem; line-height: 1.55; color: var(--night-soft); max-width: 36ch; margin: 0 0 30px; }
.hero .fine { font-size: var(--fs-meta); color: var(--night-soft); margin: 14px 0 0; }
.hero .auth-box { max-width: 460px; background: #fff; color: var(--ink); border-radius: 20px; padding: 24px;
  box-shadow: 0 2px 4px rgba(8, 13, 24, .2), 0 30px 60px -24px rgba(8, 13, 24, .6); }

.stage { position: relative; aspect-ratio: 560 / 640; max-width: 560px; width: 100%; margin: 0 0 0 auto; }
.thread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.thread .line { fill: none; stroke: rgba(255, 255, 255, .88); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: thread 2.6s cubic-bezier(.45, .05, .25, 1) .25s forwards; }
.thread .dot { fill: var(--gold); opacity: 0; animation: light .7s ease-out 2.7s forwards; }
.thread .glow { fill: var(--gold); opacity: 0; filter: blur(14px); transform-origin: 416px 573px; animation: glow 1.4s ease-out 2.8s forwards; }
@keyframes thread { to { stroke-dashoffset: 0; } }
@keyframes light { to { opacity: 1; } }
@keyframes glow { from { opacity: 0; transform: scale(.4); } to { opacity: .45; transform: none; } }

.print.photo img { background: var(--surface-alt); }
.stage .print { position: absolute; width: 37%; padding: 6px 6px 30px; opacity: 0; animation: settle .8s cubic-bezier(.2, .8, .2, 1) forwards;
  box-shadow: 0 2px 4px rgba(8, 13, 24, .25), 0 26px 44px -18px rgba(8, 13, 24, .7); }
.stage .print figcaption { font-size: 1.35rem; padding-top: 8px; }
.stage .t1 { left: 61%; top: 1%; --r: 4deg; animation-delay: .7s; }
.stage .t2 { left: 64%; top: 39%; width: 33%; --r: -3deg; animation-delay: 1.3s; }
.stage .t3 { left: 0; top: 64%; width: 35%; --r: -5deg; animation-delay: .35s; z-index: 2; }
@keyframes settle {
  from { opacity: 0; transform: translateY(14px) rotate(calc(var(--r) * 1.8)); }
  to { opacity: 1; transform: rotate(var(--r)); }
}

.bubble { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; background: #fff; color: var(--ink);
  border-radius: 999px; font-size: var(--fs-meta); white-space: nowrap; opacity: 0; animation: light .5s ease-out forwards;
  box-shadow: 0 2px 4px rgba(8, 13, 24, .2), 0 16px 30px -12px rgba(8, 13, 24, .55); }
.bubble b { font-weight: 600; }
.bubble .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 600; flex: none; background: var(--cheek); color: var(--ink); }
.bubble.b2 .av { background: #C9D8F5; }
.bubble .heart { color: #C2410C; }
.b1 { left: 0; top: 37%; animation-delay: 3.1s; }
.b2 { right: 0; top: 75%; animation-delay: 3.5s; }

/* --- Bands ---------------------------------------------------------------------------------------- */
.band { padding: 96px 0; }
.band.sky { background: var(--surface-alt); }
.band.night { background: var(--night); color: #fff; }
.band .intro { max-width: 640px; margin-bottom: 48px; }
.band .intro p { font-size: 1.1rem; }

/* The family: real prints with handwritten captions */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.trio .print { width: 100%; max-width: 320px; margin-bottom: 28px; }
.trio article:nth-child(1) .print { transform: rotate(-2.5deg); }
.trio article:nth-child(2) .print { transform: rotate(2deg); }
.trio article:nth-child(3) .print { transform: rotate(-1.5deg); }
.trio p { color: var(--ink-soft); margin: 0; }

/* Grandparents: the album in their language */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.split p { color: var(--ink-soft); font-size: 1.1rem; }
.phone { width: 310px; margin: 0 auto; background: var(--night); border-radius: 44px; padding: 12px;
  box-shadow: 0 2px 4px rgba(28, 34, 54, .1), 0 40px 70px -30px rgba(28, 34, 54, .55); }
.phone .screen { border-radius: 33px; background: #fff; padding: 22px 16px 18px; display: grid; gap: 14px; }
.phone .langs { display: flex; gap: 12px; font-size: .74rem; font-weight: 500; color: var(--ink-soft); justify-content: flex-end; }
.phone .langs .on { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.phone .hello { font-weight: 500; font-size: 1.4rem; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.phone .print { width: 100%; padding: 6px 6px 28px; transform: rotate(-1deg); }
.phone .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.phone .acts span { border: 1px solid var(--line); border-radius: 999px; padding: 11px 0; text-align: center; font-size: .92rem; background: #fff; }
.phone .acts .voice { grid-column: span 2; }
.phone .acts .liked { background: var(--night); border-color: var(--night); color: #fff; }
.quote { margin: 30px 0 0; }
.quote p { color: var(--ink); font: 500 2.1rem/1.1 var(--hand); margin: 0 0 6px; }
.quote small { color: var(--ink-soft); font-size: var(--fs-meta); }

/* The monthly gazette */
.paper { position: relative; width: 320px; margin: 0 auto; background: #fff; padding: 26px 24px 22px; border-radius: 4px; transform: rotate(-2deg);
  box-shadow: 0 2px 4px rgba(28, 34, 54, .08), 0 30px 60px -24px rgba(28, 34, 54, .45); }
.paper::after { content: ""; position: absolute; inset: 12px -12px -12px 12px; background: #fff; border-radius: 4px; z-index: -1; transform: rotate(4deg);
  box-shadow: 0 14px 34px -14px rgba(28, 34, 54, .35); }
.paper .k { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; letter-spacing: -.01em; }
.paper .k img { width: 13px; height: 15px; }
.paper .k span { color: var(--ink-soft); font-weight: 400; }
.paper .t { font-weight: 500; font-size: 1.75rem; letter-spacing: -.03em; line-height: 1.05; margin: 18px 0 2px; }
.paper .m { color: var(--ink-soft); font-size: .85rem; margin: 0 0 14px; }
.paper .ph { width: 100%; display: block; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 3px; }
.paper .c { font: 500 1.5rem/1 var(--hand); margin: 12px 0 0; }

/* Promises, at night */
.band.night h2 { color: #fff; }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.promises div { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 18px; }
.promises h3 { color: #fff; }
.promises p { color: var(--night-soft); margin: 0; font-size: var(--fs-body); }

/* Questions */
.faq { max-width: 820px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-size: 1.2rem; font-weight: 500; letter-spacing: -.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--night); }
.faq details p { color: var(--ink-soft); margin: -6px 0 22px; font-size: 1.05rem; }

/* Last call, at night: the loop of the logo, a golden button */
.final { text-align: center; padding: 104px 0 48px; background: var(--night); color: #fff; }
.final .loop { width: 64px; height: auto; margin: 0 auto 26px; }
.final h2 { max-width: 16ch; margin: 0 auto 30px; color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--night); font-weight: 600; padding: 0 34px; }
.btn.gold:hover { background: color-mix(in srgb, var(--gold) 86%, #fff); }
.landing .legal-links { display: flex; justify-content: center; gap: 22px; margin: 72px auto 0; }
.landing .legal-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--night-soft); }

/* --- Tablets and phones: the thread first, smaller, then the words -------------------------------------- */
@media (max-width: 960px) {
  .hero { padding: 24px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .stage { order: -1; margin: 0 auto; max-width: 440px; }
  .stage .print figcaption { font-size: 1.1rem; }
  .bubble { font-size: var(--fs-tiny); padding: 6px 12px 6px 6px; } .bubble .av { width: 24px; height: 24px; font-size: .7rem; }
  .trio, .split, .promises { grid-template-columns: 1fr; }
  .split { gap: 40px; }
  .split .phone, .split .paper { order: -1; }
  .promises { grid-template-columns: 1fr 1fr; }
  .band { padding: 72px 0; }
}
@media (max-width: 520px) {
  .landing .wrap { padding: 0 20px; }
  .stage { max-width: 360px; }
  .promises { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .thread .line { animation: none; stroke-dashoffset: 0; }
  .thread .dot, .bubble { animation: none; opacity: 1; }
  .thread .glow { animation: none; opacity: .45; }
  .stage .print { animation: none; opacity: 1; transform: rotate(var(--r)); }
}
