/* Sonda landing page.
 *
 * Hand-written, no framework. Values are lifted from the mobile app rather than
 * eyeballed — constants/colors.ts (light theme), components/AnimatedSplash.tsx for
 * the brand palette, and app/(tabs)/search/index.tsx for the button geometry.
 * Someone who reads this page and opens the app later should recognise it.
 *
 * Mobile-first. Two breakpoints, 640px and 960px, and that is all.
 */

/* ------------------------------------------------------------------ fonts ---
 * Poppins is self-hosted rather than pulled from fonts.googleapis.com, and that
 * is a privacy decision, not a performance one: a Google Fonts <link> hands every
 * visitor's IP address to Google in the US before they have agreed to anything,
 * which is what LG München I awarded damages over in 2022 (3 O 17493/20). The
 * files are the same ones the CSS2 API serves, subset the same way, so nothing
 * about the rendering changes — see fonts/OFL.txt for the licence.
 *
 * latin-ext earns its place: the placeholder copy is half Polish city names.
 */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/poppins-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/poppins-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/poppins-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/poppins-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/poppins-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/poppins-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Product UI — constants/colors.ts, light theme */
  --primary: #6C63FF;
  --primary-light: #A39BFF;
  --primary-dark: #4940C0;
  --primary-subtle: #EEF0FF;
  --accent: #FF9494;
  --text: #333333;
  --text-secondary: #717171;
  --background: #F5F5F5;
  --border: #E0E0E0;

  /* Brand — AnimatedSplash.tsx. Deliberately a different palette from the product
     UI: the app never shows both at once either. Here it is confined to the mark. */
  --brand-navy: #0E1226;
  --brand-ring: #E8845A;
  --brand-core: #FBC66B;
  --brand-wordmark: #F4EDE4;

  --radius-button: 12px;

  --gutter: 24px;
  --measure: 640px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
main { flex: 1 0 auto; }

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- ambient ---
 * Three blurred colour blobs drifting over the background, reproducing
 * AmbientBackground.tsx: 420px primary, 360px accent, 320px primary-light, all at
 * 0.22 opacity on cycles of 18s / 22s / 14s. Everything the glass cards float on.
 */

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.22;
  filter: blur(60px);
}

.blob-a {
  width: 420px; height: 420px;
  background: var(--primary);
  left: -110px; top: 6%;
  animation: drift-a 18s ease-in-out infinite;
}

.blob-b {
  width: 360px; height: 360px;
  background: var(--accent);
  right: -90px; top: 30%;
  animation: drift-b 22s ease-in-out infinite 1.2s;
}

.blob-c {
  width: 320px; height: 320px;
  background: var(--primary-light);
  left: 10%; top: 60%;
  animation: drift-c 14s ease-in-out infinite 2.4s;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(0.92); }
  50%      { transform: translate(26px, 34px) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1.08); }
  50%      { transform: translate(-34px, 28px) scale(0.92); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(0, 0) scale(0.96); }
  50%      { transform: translate(30px, -22px) scale(1.06); }
}

/* ----------------------------------------------------------------- header --- */

.site-header {
  position: relative;
  z-index: 1;
  padding: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-tile {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-navy);
}

/* Static on purpose. The splash animates the sweep by tweening `r`, which as a CSS
   property is not something to rely on across browsers, and a logo pulsing forever
   in the corner would compete with the typewriter and the blobs for attention. */
.mark { width: 28px; height: 28px; display: block; }

.wordmark {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 6px;
  color: var(--text);
}

/* ------------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 16px var(--gutter) 56px;
}

.headline {
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.subhead {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* --------------------------------------------------------------- coming ----
 * What used to be the signup form. Centred, because there is nothing to do here
 * and nothing to read left-to-right — just the radar, the line, and eventually
 * two store links.
 */

.coming {
  margin-top: 40px;
  text-align: center;
}

.coming-title { margin-top: 20px; font-size: 24px; }

.coming-body {
  max-width: 44ch;
  margin: 12px auto 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Waiting for the badge artwork Apple and Google both insist on. Until then these
   are plain buttons in the product's own colours, which is a legal placeholder in
   a way an approximated badge would not be. */
.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.store {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-button);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  padding: 12px 28px;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.store:hover { background: var(--primary-dark); }

/* -------------------------------------------------------------------- cta ---
 * Only error.html still uses this, as an <a>. */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 13px 32px;
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: var(--radius-button);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.cta:hover { background: var(--primary-dark); }

/* A quiet echo of the searching screen's radar. Decorative — it is not standing in
   for a search, because no search is running. */
.radar {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px; height: 80px;
  margin: 16px auto 0;
}

.radar-core {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
}

.pulse {
  position: absolute;
  width: 28px; height: 28px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: pulse 2.2s ease-out infinite;
}
.pulse-2 { animation-delay: 0.73s; }
.pulse-3 { animation-delay: 1.46s; }

@keyframes pulse {
  0%   { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ------------------------------------------------------------------ steps --- */

.steps {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gutter) 56px;
}

.steps ol {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-number {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle);
  border-radius: 50%;
}

.steps h3 { margin-top: 12px; font-size: 17px; }

.steps p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------------- footer --- */

.site-footer {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.site-footer a { color: var(--text-secondary); }

/* ------------------------------------------------------------- error page --- */

.error-page {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 64px var(--gutter);
  text-align: center;
}

.error-page .headline { font-size: 24px; }

/* ------------------------------------------------------------ breakpoints --- */

@media (min-width: 640px) {
  .headline { font-size: 34px; }
  .subhead { font-size: 16px; }
  .hero { padding-top: 40px; padding-bottom: 72px; }
  .coming-title { font-size: 28px; }
  .coming-body { font-size: 16px; }
}

@media (min-width: 960px) {
  .steps ol { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

/* Every animation here is decoration: the blobs and the radar. None of it carries
   meaning, so all of it can stop. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
