/* www.lactena.com, the "coming soon" page (docs/OPERATIONS.md "The landing page").
   Animation and texts mirror lactena_flutter/lib/screens/start_screen.dart; keep them in step.
   Served under a CSP without 'unsafe-inline': every style lives in this file. */

/* Nunito, self-hosted (OFL, fonts/OFL.txt): the app's files, lactena_flutter/assets/fonts. */
@font-face { font-family: Nunito; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/Nunito-Regular.ttf) format("truetype"); }
@font-face { font-family: Nunito; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/Nunito-Bold.ttf) format("truetype"); }
@font-face { font-family: Nunito; font-style: normal; font-weight: 900; font-display: swap; src: url(fonts/Nunito-Black.ttf) format("truetype"); }

/* Brand tokens from lactena_flutter/lib/theme/app_colors.dart (guide §2). One light look on purpose: the „каймак“ ground is the brand. */
:root {
  --ground: #F5F2EA; --teal: #007C83; --teal-light: rgba(0,124,131,.55);
  --deep: #004E53; --ink: #1D3530; --muted: #566A62;
  --soft: cubic-bezier(.22,1,.36,1);           /* Motion.soft = easeOutQuint */
  --spring: cubic-bezier(.175,.885,.32,1.275); /* Motion.spring = easeOutBack */
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ground); color: var(--ink);
  font-family: Nunito, "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.5;
  display: flex; flex-direction: column; align-items: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.lang { align-self: flex-end; display: flex; gap: 2px; margin-top: max(12px, env(safe-area-inset-top, 0px));
  padding: 3px; border-radius: 999px; background: rgba(0,124,131,.08); }
.lang button { font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--deep);
  background: none; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--teal); color: #fff; }

main { flex: 1; width: 100%; max-width: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-block: 16px 48px; text-align: center; }

/* The pool: the guide's 240 × 240 „Капка и верига“ (start_screen.dart _PoolPainter). */
.pool { width: min(240px, 60vw); aspect-ratio: 1; max-width: 100%; overflow: visible; margin-bottom: -40px; }
.float { animation: float 2s ease-in-out 3.4s infinite alternate; }
@keyframes float { from { transform: translateY(-4px); } to { transform: translateY(4px); } }

.drop { transform-box: view-box; transform-origin: 120px 142px; opacity: 0; animation: fall 620ms linear forwards; }
@keyframes fall {
  0%   { transform: translateY(-260px) scale(.7,1.15); opacity: 0; animation-timing-function: cubic-bezier(.55,0,1,.45); }
  15%  { opacity: 1; }
  90%  { transform: translateY(0) scale(.9,1.12); opacity: 1; animation-timing-function: linear; }
  100% { transform: translateY(8px) scale(1.4,.4); opacity: 0; }
}
.crown circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: crown 500ms var(--soft) 600ms forwards; }
@keyframes crown { 0% { transform: translateY(0) scale(0); opacity: 1; } 99% { opacity: .01; } 100% { transform: translateY(-34px) scale(1); opacity: 0; } }

.ring { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 238.76 400; stroke-dashoffset: 238.76; opacity: 0;
  transform-box: fill-box; transform-origin: center; }
.ring.c { stroke: var(--teal); transform: rotate(-90deg); animation: draw 900ms var(--soft) 620ms forwards, show 180ms linear 620ms forwards; }
.ring.l { stroke: var(--teal-light); transform: rotate(-90deg); animation: draw 900ms var(--soft) 740ms forwards, show 180ms linear 740ms forwards; }
.ring.r { stroke: var(--teal-light); transform: rotate(90deg); animation: draw 900ms var(--soft) 860ms forwards, show 180ms linear 860ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }
.slide-l { transform: translateX(38px); animation: slide 800ms var(--spring) 900ms forwards; }
.slide-r { transform: translateX(-38px); animation: slide 800ms var(--spring) 900ms forwards; }
@keyframes slide { to { transform: translateX(0); } }

.wordmark { margin: 0; font-weight: 900; font-size: clamp(44px, 13vw, 64px); line-height: 1.05; color: var(--teal);
  letter-spacing: .06em; opacity: 0; transform: translateY(18px) scale(.92);
  animation: word-o 700ms ease-out 1350ms forwards, word-t 700ms var(--spring) 1350ms forwards; }
@keyframes word-o { to { opacity: 1; } }
@keyframes word-t { to { transform: none; letter-spacing: -.03em; } }
.tagline { margin: 8px 0 0; color: var(--muted); font-size: 17px; opacity: 0; transform: translateY(10px);
  animation: rise 600ms var(--soft) 1600ms forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

.soon { margin-top: 48px; display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: 0; transform: translateY(10px);
  animation: rise 700ms var(--soft) 2400ms forwards; }
.soon h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--deep); display: flex; align-items: center; gap: 12px; }
.soon h2::before, .soon h2::after { content: ""; width: 32px; height: 2px; border-radius: 1px; background: var(--teal-light); }

footer { padding-block: 16px max(16px, env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
}

/* The language switch needs script: hidden (its space kept, so nothing moves) until landing.js runs. */
.lang[hidden] { display: flex; visibility: hidden; }
