/* Biseri — "Sedef" (mother-of-pearl). Tokens mirror shared/design/tokens.json. */
@font-face {
  font-family: "Srbija Sans";
  src: url("/fonts/SrbijaSans.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: light-dark(#F7F4F1, #14111B);
  --card: light-dark(#FFFFFF, #1E1A26);
  --ink: light-dark(#241F30, #F3EEF4);
  --muted: light-dark(#76707F, #9B94A6);
  --accent: light-dark(#6E55A8, #B39DE0);
  --accent-soft: light-dark(#EEE7F4, #2A2238);
  --champagne: light-dark(#B9975B, #D9BE7C);
  --divider: light-dark(#E8E2E6, #2C2735);
  --danger: light-dark(#C2410C, #F97316);
  --ok: light-dark(#2E8B6E, #5FC9A3);
  --rose: light-dark(#F2C9D6, #5A3A4C);
  --seafoam: light-dark(#CDE9E3, #2F4F4A);
  --champ: light-dark(#F3E3C2, #5A4A2E);
  --lavender: light-dark(#D9CCEF, #3F3358);
  --sheen-opacity: light-dark(0.6, 0.35);
  --font-ui: "Srbija Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --radius: 18px;
  --radius-button: 12px;
  accent-color: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  isolation: isolate;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Nacre sheen: four blurred blobs drifting slowly behind everything. */
.sheen { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: var(--sheen-opacity); }
.sheen::before, .sheen::after,
.sheen-b, .sheen-c {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform;
}
.sheen::before { width: 60vmax; height: 60vmax; left: -15vmax; top: -20vmax;
  background: radial-gradient(circle at 40% 40%, var(--rose), transparent 65%); animation: drift-a 38s ease-in-out infinite alternate; }
.sheen::after { width: 55vmax; height: 55vmax; right: -20vmax; top: 5vmax;
  background: radial-gradient(circle at 50% 50%, var(--seafoam), transparent 65%); animation: drift-b 34s ease-in-out infinite alternate; }
.sheen-b { width: 50vmax; height: 50vmax; left: 10vmax; bottom: -25vmax;
  background: radial-gradient(circle at 50% 50%, var(--champ), transparent 65%); animation: drift-c 40s ease-in-out infinite alternate; }
.sheen-c { width: 45vmax; height: 45vmax; right: 5vmax; bottom: -10vmax;
  background: radial-gradient(circle at 50% 50%, var(--lavender), transparent 65%); animation: drift-a 36s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vmax, 6vmax) scale(1.08); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1.05); } to { transform: translate(-7vmax, 8vmax) scale(0.95); } }
@keyframes drift-c { from { transform: translate(0, 0); } to { transform: translate(6vmax, -7vmax); } }
@media (prefers-reduced-motion: reduce) {
  .sheen::before, .sheen::after, .sheen-b, .sheen-c { animation: none; }
}

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; max-width: 1040px; width: 100%; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark { display: block; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 25%, transparent)); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; }
.script-toggle {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--card); border: 1px solid var(--divider);
  border-radius: 999px; padding: 0 18px; min-height: 44px; cursor: pointer;
}
.script-toggle:hover { border-color: var(--accent); }

/* Hero */
main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px; }
.hero { text-align: center; padding: 48px 0 24px; }
.hero .pearl { width: clamp(110px, 20vw, 160px); height: auto; margin: 0 auto 20px; display: block; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.12; letter-spacing: -0.015em; margin: 0 auto 16px; max-width: 18ch; text-wrap: balance; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 42ch; margin: 0 auto; text-wrap: pretty; }

/* Waitlist card */
.waitlist {
  margin: 32px auto 0; max-width: 520px; background: var(--card); border: 1px solid var(--divider);
  border-radius: var(--radius); padding: 28px; box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 10%, transparent);
}
.waitlist h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin: 0 0 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
label { font-size: 1rem; }
.field input[type="email"] {
  font: inherit; font-size: max(1rem, 1em); color: var(--ink); background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--muted) 60%, var(--divider)); border-radius: var(--radius-button);
  min-height: 48px; padding: 0 14px; width: 100%;
}
.field input:focus-visible { border-color: var(--accent); outline-offset: 2px; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0; }
.error { display: none; color: var(--danger); font-size: 0.95rem; margin: 0; }
.field input:user-invalid { border-color: var(--danger); }
.field input:user-invalid ~ .error { display: block; }
.field input:user-valid { border-color: var(--ok); }
button.primary {
  font: inherit; font-size: 1rem; color: #fff; background: var(--accent); border: 0; border-radius: var(--radius-button);
  min-height: 48px; padding: 0 22px; width: 100%; cursor: pointer; transition: filter 0.15s;
}
button.primary:hover { filter: brightness(1.08); }
button.primary[disabled] { opacity: 0.7; cursor: default; }
.status { margin: 14px 0 0; min-height: 1.5em; font-size: 1rem; }
.status[data-kind="ok"] { color: var(--ok); }
.status[data-kind="err"] { color: var(--danger); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Features */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 48px auto 24px; max-width: 880px; }
.feature { background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px solid var(--divider); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); }
.feature h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }

/* Legal pages */
.legal { max-width: 680px; padding-block: 24px 48px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-align: left; margin: 0 0 20px; max-width: none; }
.legal h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 1.05rem; }
.legal strong { color: var(--accent); font-weight: 400; }

/* Footer */
.foot { text-align: center; color: var(--muted); font-size: 0.95rem; padding: 32px 24px 40px; border-top: 1px solid var(--divider); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 12px; }
.foot-links a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }
.foot p { margin: 4px 0; }
.credit { font-size: 0.85rem; }
