/* OmniSync "Launching soon" page
   Colours are set once below as light-dark(light, dark) pairs.
   The theme is chosen by data-theme on <html> (set in index.html / script.js);
   without JavaScript the page follows the system preference. */

:root {
  color-scheme: light dark;

  --bg:      light-dark(#F6F7FB, #0A0A0F);
  --surface: light-dark(#FFFFFF, #14141C);
  --ink:     light-dark(#0A0A0F, #F2F3F8);
  --muted:   light-dark(#55586A, #A4A8BC);
  --line:    light-dark(#D9DCE8, #2A2B38);
  --control: light-dark(#7E8299, #6B6F86);   /* input borders */
  --focus:   light-dark(#3D5AFE, #33CCFF);

  --sky:     light-dark(#00B4F0, #33CCFF);
  --cobalt:  light-dark(#3D5AFE, #5C7CFF);
  --iris:    light-dark(#7C4DFF, #9B7BFF);
  --fuchsia: light-dark(#FF3FC8, #FF66D9);

  --error:   light-dark(#C4162A, #FF8A95);
  --success: light-dark(#0B7A4B, #5FD6A0);
  --notice:  light-dark(#8A5300, #F2B866);

  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* Theme-specific elements (logos, toggle icons) */
.show-dark { display: none; }
:root[data-theme="dark"] .show-light { display: none; }
:root[data-theme="dark"] .show-dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .show-light { display: none; }
  :root:not([data-theme]) .show-dark  { display: block; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.logo { height: 3rem; width: auto; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--control); }
.theme-toggle:focus-visible { border-radius: 50%; }
:root:not([data-theme]) .theme-toggle { display: none; } /* needs JavaScript */

/* Hero */
.hero {
  align-self: center;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
}
.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--cobalt), var(--iris), var(--fuchsia));
}

.tagline {
  margin: 0;
  font-size: clamp(2.375rem, 6.6vw, 4.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.tagline span { display: block; }

.hero-body {
  display: grid;
  gap: 3rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 56rem) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
  }
}

.lead {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--muted);
}

/* Signup form */
.signup { max-width: 34rem; }
.signup label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.signup input {
  flex: 1 1 14rem;
  min-width: 0;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1.5px solid var(--control);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.signup input::placeholder { color: var(--muted); opacity: 1; }
.signup input:focus-visible { outline-offset: 2px; border-radius: 0.75rem; }
.signup input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

.button {
  flex: 0 0 auto;
  height: 3.25rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.button:hover { background: var(--cobalt); color: light-dark(#FFFFFF, #0A0A0F); }
.button:focus-visible { border-radius: 0.75rem; }
.button:disabled { opacity: 0.6; cursor: progress; }
@media (max-width: 30rem) {
  .button { flex: 1 1 100%; }
}

.trap { position: absolute; left: -9999px; }

#signup-turnstile:not(:empty) { margin-top: 0.75rem; }

.form-message {
  min-height: 1.6em;
  margin: 0.625rem 0 0;
  font-size: 1rem;
  font-weight: 500;
}
.form-message[data-state="error"]  { color: var(--error); }
.form-message[data-state="notice"] { color: var(--notice); }

.signup-success {
  max-width: 34rem;
  margin: 0;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--success);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--success);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Motif: loose workflow steps become fitted pieces */
.motif { margin: 0; max-width: 35rem; }
.motif svg { display: block; width: 100%; height: auto; }
.motif-line  { stroke: var(--control); stroke-width: 2; stroke-linecap: round; }
.motif-node  { stroke: var(--bg); stroke-width: 5; }
.motif-frame { stroke: var(--line); stroke-width: 2; }
.c-sky     { fill: var(--sky); }
.c-cobalt  { fill: var(--cobalt); }
.c-iris    { fill: var(--iris); }
.c-fuchsia { fill: var(--fuchsia); }

.motif-caption {
  display: grid;
  grid-template-columns: 55.4% 1fr; /* second label lines up with the frame */
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* One page-load sequence: the line draws, then the pieces settle in. */
@media (prefers-reduced-motion: no-preference) {
  .motif-line {
    stroke-dasharray: 1;
    animation: draw 1.4s ease-out both;
  }
  .motif-tile { animation: settle 0.5s ease-out both; }
  .motif-tile.c-sky     { animation-delay: 1.2s; }
  .motif-tile.c-cobalt  { animation-delay: 1.35s; }
  .motif-tile.c-iris    { animation-delay: 1.5s; }
  .motif-tile.c-fuchsia { animation-delay: 1.65s; }
}
@keyframes draw   { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes settle { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}
.footer-row p { margin: 0; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a { color: inherit; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--ink); }
