/* Shared Lelune product UI: Fredoka headings, dark cards and restrained motion.
   Decorative animation pauses in hidden tabs and stops with reduced motion. */
@font-face {
  font-family: "Fredoka";
  src: url("./fonts/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --blue: #5865f2;
  --blue-hi: #8f98ff;
  --green: #57f287;
  --green-btn: #248046;
  --gold: #faa61a;
  --red: #ed4245;
  --red-btn: #da373c;
  --grey: #4f545c;
  --bg: #1e1f22;
  --card: #2b2d31;
  --card2: #313338;
  --line: #3f4147;
  --text: #dbdee1;
  --muted: #a5a9b0;
  --head: #f2f3f5;
  --r: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, .brand { margin: 0; font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; color: var(--head); }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.1; letter-spacing: -0.015em; }
h2 { font-size: 1.2rem; line-height: 1.25; }
h3 { font-size: 1.15rem; line-height: 1.3; }
p { margin: 0 0 .6rem; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue-hi); outline-offset: 2px; border-radius: 6px; }
.small { font-size: .88rem; color: var(--muted); }
.skip {
  position: absolute; top: 8px; left: 12px; z-index: 60;
  transform: translateY(-200%); display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 14px; border-radius: 8px;
  color: #fff; background: var(--blue);
}
.skip:focus { transform: none; }
.site-top {
  max-width: 1232px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 0;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 1.25rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.site-top { flex-wrap: wrap; gap: 8px 20px; }
.top-nav, .foot nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.top-nav a[aria-current] { color: var(--head); }
.project-links { display: flex; gap: 20px; }
.project-links a { display: inline-flex; min-height: 44px; align-items: center; }
.status-panel h2 { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); }
.status-panel[data-state="online"] .status-dot { background: #5dade2; }
.status-panel[data-state="degraded"] .status-dot { background: var(--gold); }
.status-panel[data-state="offline"] .status-dot { background: var(--red); }
.status-metrics { margin: 24px 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.status-metrics dt { color: var(--muted); font-size: .88rem; }
.status-metrics dd { margin: 4px 0 0; color: var(--head); }
main { max-width: 1232px; margin: 0 auto; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center; gap: 24px; min-height: calc(100svh - 66px);
}
.hero h1 { font-size: clamp(3rem, 9vw, 5.5rem); letter-spacing: -0.03em; line-height: 1; }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 34ch; color: var(--head); margin: 14px 0 26px; }
.about { max-width: 43ch; margin-bottom: 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-pic { justify-self: center; }
.hero-pic img { display: block; width: clamp(160px, 26vw, 280px); height: auto; animation: float 6s ease-in-out 700ms infinite alternate; }
.hero-text > *, .hero-pic { animation: enter 640ms var(--ease-out) both; }
.hero-text > :nth-child(2) { animation-delay: 70ms; }
.hero-text > :nth-child(3) { animation-delay: 140ms; }
.hero-text > :nth-child(4) { animation-delay: 210ms; }
.hero-pic { animation-delay: 120ms; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
@keyframes float { to { transform: translateY(-10px); } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px;
  font: 600 .95rem Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #fff; background: var(--blue); text-align: center; text-decoration: none;
  box-shadow: 0 1px 0 rgb(255 255 255 / .08) inset, 0 6px 16px -8px rgb(0 0 0 / .6);
  transition: transform 140ms ease-out; touch-action: manipulation;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.big { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; border-radius: 14px; }
.card { background: var(--card); border-radius: var(--r); padding: 18px 20px; box-shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 12px 32px -20px rgb(0 0 0 / .7); }
.lift { transition: transform 220ms var(--ease-out), background-color 160ms ease, box-shadow 220ms var(--ease-out); }
.more { margin-top: clamp(56px, 9vw, 112px); padding-bottom: 24px; scroll-margin-top: 24px; }
.more > h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); letter-spacing: -0.01em; margin-bottom: 20px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.more-grid h3 { margin-bottom: 6px; }
.project-heading { display: flex; align-items: center; gap: 10px; }
.project-heading img { width: 36px; height: 36px; flex: none; }
.more-grid p { margin: 0; max-width: 60ch; }
.project-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; }
.foot {
  max-width: 1232px; margin: clamp(48px, 8vw, 96px) auto 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid rgb(255 255 255 / .06);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; color: var(--muted); font-size: .88rem;
}
.foot p { margin: 0; max-width: 64ch; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.legal .site-top, .legal main, .legal .foot { max-width: 912px; }
.legal .page-head { padding: clamp(24px, 6vw, 56px) 0 18px; }
.legal .page-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.02em; }
.legal .page-head .small { margin: 6px 0 0; }
.legal main > .card { margin: 0 0 16px; padding: 22px 24px; line-height: 1.65; }
.legal .card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.legal .card p:last-child { margin-bottom: 0; }
.legal .card { overflow-wrap: anywhere; }
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, rgb(88 101 242 / .12), transparent 60%), radial-gradient(90% 70% at 50% 120%, rgb(0 0 0 / .35), transparent 70%);
}
.bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; opacity: .16; filter: blur(60px); }
.bg i:first-of-type { background: var(--blue); top: -30vmax; right: -20vmax; animation: drift 46s ease-in-out infinite alternate; }
.bg i:last-of-type { background: #23408f; bottom: -36vmax; left: -24vmax; animation: drift 58s ease-in-out infinite alternate-reverse; }
.bg .stars {
  position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 72% 12%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 86% 46%, #fff5 50%, transparent 51%), radial-gradient(1px 1px at 30% 70%, #fff5 50%, transparent 51%), radial-gradient(1.5px 1.5px at 56% 84%, #fff4 50%, transparent 51%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-8vmax, 6vmax) scale(1.08); } }
@keyframes twinkle { to { opacity: .25; } }
.paused .bg i, .paused .stars, .paused .hero-pic img { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) {
  .brand img { transition: transform 420ms var(--ease-out); }
  .brand:hover img { transform: rotate(-14deg) scale(1.08); }
  .lift:hover { transform: translateY(-3px); background: var(--card2); box-shadow: 0 1px 0 rgb(255 255 255 / .05) inset, 0 22px 40px -24px rgb(0 0 0 / .9); }
  .btn:hover { filter: brightness(1.1); }
  .btn { position: relative; overflow: hidden; }
  .btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .22) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
  .btn:hover::after { transform: translateX(120%); transition: transform 700ms var(--ease-out); }
  .foot a { position: relative; }
  .foot a::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 10px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease-out); }
  .foot a:hover { text-decoration: none; }
  .foot a:hover::after { transform: scaleX(1); }
}
@media (max-width: 720px) {
  .site-top { justify-content: center; }
  .hero { grid-template-columns: 1fr; align-content: center; text-align: center; min-height: calc(100svh - 66px); padding: 12px 0 24px; }
  .hero-pic { order: -1; }
  .hero .lead, .about { margin-inline: auto; }
  .cta { justify-content: center; }
  .cta .btn { width: 100%; }
  .foot { flex-direction: column; text-align: center; }
  .legal main > .card { padding: 18px; }
}
@media (prefers-contrast: more) {
  :root { --muted: #c4c9ce; --line: #80848e; }
  .card, .lift:hover { box-shadow: inset 0 0 0 1px var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .bg i, .bg .stars, .hero-pic img, .hero-text > *, .hero-pic { animation: none; }
  .lift, .brand img, .btn, .foot a::after { transition: none; }
  .lift:hover, .brand:hover img, .btn:active { transform: none; }
  .btn::after { display: none; }
}
