/* Routly landing — shared styles.
   Colours come from the app (Routlyy/furniture-calculator):
   - neutrals: the .calc-theme / .light tokens in frontend/src/index.css
   - lilac accent, button gradient, aurora backdrop: frontend/src/pages/Login.tsx
   - logo tile gradient: frontend/src/components/BrandMark.tsx (blue-500 -> violet-600) */

:root {
  --bg: hsl(210 20% 98%);            /* slate-50, app --background */
  --ink: hsl(222 47% 11%);           /* slate-900, app --foreground */
  --muted: hsl(215 16% 40%);         /* app --muted-foreground */
  --card: #fff;
  --line: hsl(270 30% 88%);          /* login card border */
  --line-input: hsl(270 30% 85%);    /* login input border */
  --primary: hsl(265 52% 60%);       /* login --primary */
  --primary-ink: hsl(265 45% 45%);   /* darker primary for small text on light */
  --primary-glow: hsl(272 70% 72%);
  --lilac: hsl(278 52% 74%);         /* app --accent */
  --danger: hsl(0 72% 51%);
  --brand-from: #3b82f6;
  --brand-to: #7c3aed;
  --btn: linear-gradient(100deg, hsl(228 62% 64%) 0%, hsl(262 52% 70%) 48%, hsl(283 55% 70%) 100%);
  --text-grad: linear-gradient(100deg, hsl(228 62% 56%) 0%, hsl(262 52% 58%) 50%, hsl(283 55% 56%) 100%);
  --shadow-lilac: 0 30px 70px -25px hsl(265 52% 55% / 0.45);
  --shadow-btn: 0 10px 15px -3px hsl(265 52% 55% / 0.3), 0 4px 6px -4px hsl(265 52% 55% / 0.3);
  --shadow-btn-hover: 0 20px 25px -5px hsl(265 52% 55% / 0.35), 0 8px 10px -6px hsl(265 52% 55% / 0.3);
  --radius: 0.75rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Fraunces, Georgia, Cambria, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --grid-line: hsl(265 45% 60% / 0.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 24px; }
@media (min-width: 640px) { .wrap { padding: 0 40px; } }

/* ── brand ─────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand b { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.025em; }

/* ── buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap;
  transition: box-shadow .2s, filter .2s, transform .2s var(--ease), background-color .2s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-grad { background: var(--btn); color: #fff; box-shadow: var(--shadow-btn); }
.btn-grad:hover { filter: brightness(1.03); box-shadow: var(--shadow-btn-hover); transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 20px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 0.9375rem; }

/* ── aurora backdrop (same layers as the app's login page) ─ */
.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(90% 70% at 50% -10%, hsl(272 65% 90%) 0%, transparent 60%),
    radial-gradient(70% 60% at 12% 8%, hsl(240 70% 90%) 0%, transparent 55%),
    radial-gradient(70% 60% at 92% 88%, hsl(288 60% 90%) 0%, transparent 55%),
    linear-gradient(180deg, hsl(266 50% 96%) 0%, hsl(210 30% 98%) 70%);
}
.aurora::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(hsl(265 45% 60% / 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 80%);
          mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 80%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(64px); will-change: transform; }
.orb.a { left: -160px; top: 12%; width: 480px; height: 480px; opacity: .7;
  background: radial-gradient(circle, hsl(244 78% 76%) 0%, transparent 68%); animation: drift-a 16s ease-in-out infinite; }
.orb.b { right: -128px; bottom: 6%; width: 460px; height: 460px; opacity: .6;
  background: radial-gradient(circle, hsl(286 64% 80%) 0%, transparent 68%); animation: drift-b 19s ease-in-out infinite; }
.orb.c { left: 58%; top: -8%; width: 360px; height: 360px; opacity: .5;
  background: radial-gradient(circle, hsl(266 72% 82%) 0%, transparent 70%); animation: drift-c 22s ease-in-out infinite; }
@keyframes drift-a { 50% { transform: translate(40px, -28px) scale(1.08); } }
@keyframes drift-b { 50% { transform: translate(-34px, 26px) scale(1.1); } }
@keyframes drift-c { 50% { transform: translate(-26px, 30px); } }

/* ── reveal (only hides things once JS is known to run) ── */
.js .reveal { opacity: 0; transform: translateY(24px); filter: blur(8px);
  transition: opacity .85s var(--ease), transform .85s var(--ease), filter .85s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb { animation: none; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ── EN | LT switch (same choice key as the app: rr_lang) ── */
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid hsl(240 10% 60% / .35); }
.lang button { height: 28px; min-width: 34px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
               letter-spacing: .04em; opacity: .7; transition: opacity .15s, background-color .15s; }
.lang button:hover { opacity: 1; }
.lang button.on { background: var(--btn); color: #fff; opacity: 1; }
