/* =========================================================
   CoWORKER — single-screen splash page
   Tokens mirror the Figma collection "CoWORKER / Brand"
   ========================================================= */
:root {
  --navy:   #1E0C3C;
  --cyan:   #2AA5FF;
  --violet: #C966FF;
  --purple: #8C54FD;
  --blue:   #6194FC;
  --ice:    #E6F6FF;
  --white:  #FFFFFF;
  --brand-gradient: linear-gradient(90deg, var(--violet) 0%, var(--purple) 33%, var(--blue) 66%, var(--cyan) 100%);

  --font-display: "Poppins", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --pad: clamp(20px, 10.4vw, 200px);   /* 200px at 1920px wide */
  --content: 1520px;
  --cycle: 3.2s;                        /* workflow animation period */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- Screen ---------- */
.screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: calc(48px + env(safe-area-inset-top, 0px));
  padding-inline: max(var(--pad), (100% - var(--content)) / 2);
}

/* Background glows — radial gradients instead of filter: blur() (same look, far cheaper to animate) */
.glow {
  position: absolute;
  z-index: -1;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  animation: drift 14s ease-in-out infinite alternate;
}
.glow--purple { width: 62vw; left: 49.5vw; top: -24vw; background: radial-gradient(closest-side, rgb(140 84 253 / .75), rgb(140 84 253 / .32) 55%, transparent); --dx: -3.6vw; --dy: 2.6vw; }
.glow--cyan   { width: 52vw; left: 68vw;   top: 16vw;  background: radial-gradient(closest-side, rgb(42 165 255 / .5), rgb(42 165 255 / .2) 55%, transparent); --dx: 3.1vw;  --dy: -2.1vw; }
.glow--violet { width: 52vw; left: -25vw;  top: 20vw;  background: radial-gradient(closest-side, rgb(201 102 255 / .38), rgb(201 102 255 / .14) 55%, transparent); --dx: 2.6vw;  --dy: -3.1vw; }

@keyframes drift {
  to { transform: translate(var(--dx), var(--dy)); }
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: block; line-height: 0; }
.logo img { width: clamp(150px, 10vw, 192px); height: auto; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgb(255 255 255 / .07);
  border: 1px solid rgb(255 255 255 / .18);
  font: 500 14px/1.2 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .85);
}
.chip__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--cyan); }
.chip__dot--gradient { background: var(--brand-gradient); }
.chip__dot--live { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Main ---------- */
.main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(40px, 3.2vw, 64px);
  padding-block: clamp(40px, 4vw, 64px);
}
.copy {
  flex: 0 1 760px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}
h1 {
  margin: 0;
  font: 700 clamp(40px, 3.44vw, 66px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--white);
}
h1 .gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.lead {
  margin: 0;
  max-width: 680px;
  font-size: clamp(18px, 1.15vw, 22px);
  line-height: 1.55;
  color: rgb(255 255 255 / .78);
}

/* ---------- Form ---------- */
.signup { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; width: 100%; }
.signup__row { display: flex; flex-wrap: wrap; gap: 12px; }
.signup input {
  flex: 0 1 420px;
  min-width: 0;
  padding: 19px 26px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / .25);
  background: rgb(255 255 255 / .08);
  color: var(--white);
  font: 400 18px/1.2 var(--font-body);
  transition: border-color .2s, background-color .2s;
}
.signup input::placeholder { color: rgb(255 255 255 / .55); }
.signup input:hover { border-color: rgb(255 255 255 / .4); }
.signup input:focus-visible { outline: none; border-color: var(--cyan); background: rgb(255 255 255 / .12); }
.signup button {
  padding: 19px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--white);
  font: 600 18px/1.2 var(--font-body);
  cursor: pointer;
  transition: filter .2s, transform .2s;
}
.signup button:hover { filter: brightness(1.08); }
.signup button:active { transform: translateY(1px); }
.signup__note { margin: 0; font-size: 15px; line-height: 1.5; color: rgb(255 255 255 / .55); }
.signup__note[data-state="success"] { color: var(--ice); }

/* ---------- Visual ---------- */
.visual { flex: 0 1 700px; min-width: 0; }
.visual object, .visual img { display: block; width: 100%; height: auto; aspect-ratio: 700 / 620; }

/* ---------- Funding bar ---------- */
.funding {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  padding: 28px 0 calc(36px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgb(255 255 255 / .14);
}
.placeholder {
  display: grid;
  place-items: center;
  height: 56px;
  padding-inline: 16px;
  border: 1px dashed rgb(255 255 255 / .35);
  border-radius: 10px;
  font: 500 11px/1.2 var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .7);
}
.placeholder--eu img { width: 200px; }
.placeholder--ju img { width: 200px; }
.funding__disclaimer {
  flex: 1 1 420px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgb(255 255 255 / .55);
}
.funding__meta {
  margin: 0;
  font: 500 13px/1.4 var(--font-mono);
  letter-spacing: .02em;
  color: rgb(255 255 255 / .7);
}

/* ---------- Page-load sequence (runs once) ---------- */
.enter { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
.fade  { animation: fade .6s ease-out both; }
@keyframes fade { from { opacity: 0; } }
.appear { animation: appear .8s cubic-bezier(.2, .7, .2, 1) .3s both; }
@keyframes appear { from { opacity: 0; transform: scale(.96); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main { flex-direction: column; align-items: stretch; }
  .copy { flex-basis: auto; }
  .visual { flex-basis: auto; width: 100%; max-width: 700px; align-self: center; }
}
@media (max-width: 640px) {
  .screen { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
  .chip { font-size: 11px; padding: 8px 14px; gap: 10px; }
  .nav .chip { display: none; }
  .copy { gap: 24px; }
  .signup__row { flex-direction: column; }
  .signup input, .signup button { flex: none; width: 100%; }
  .placeholder--eu , .placeholder--ju  { width: 100%; }
  .placeholder--eu img, .placeholder--ju img { width: calc(50% - 16px); }
}

/* ---------- Reduced motion: show the resting state ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
