/* Tudo landing. Colors come from the app palette (config/color.ts). */

/* DM Sans variable font, latin subset, served from the site (no Google Fonts request). */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
}

:root {
  --sky-top: #d2e9f8;
  --sky-bottom: #f4fbfe;
  --near-snow: #bcd9ed;
  --ink: #2e2c30;
  --ink-soft: rgba(46, 44, 48, 0.7);
  --ink-faint: rgba(46, 44, 48, 0.72);
  --primary: #5264bf;
}

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

html,
body {
  margin: 0;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--sky-bottom);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Landing ---------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 8px;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(46, 44, 48, 0.15);
}

h1 {
  margin: 24px 0 0;
  max-width: 13ch;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.subline {
  margin: 12px 0 0;
  max-width: 28ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 0 #16151a;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.badge:hover {
  transform: translateY(-2px);
}

.badge:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #16151a;
}

.badge svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.badge span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.badge small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.badge strong {
  margin-top: 2px;
  font-size: 18px;
}

/* ---------- Waitlist form (landing and content pages) ---------- */

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

.waitlist {
  width: 100%;
  max-width: 460px;
  text-align: left;
}

.waitlist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.waitlist-row input[type='email'] {
  flex: 1 1 200px;
  min-width: 0;
}

/* 16px keeps iOS Safari from zooming in when a field gets focus. */
.waitlist input,
.waitlist select {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #c9ccd6;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.waitlist .cta-button {
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 0 #16151a;
  cursor: pointer;
}

.waitlist .cta-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.waitlist-row.small {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.waitlist-row.small label {
  display: flex;
  flex: 1 1 150px;
  flex-direction: column;
  gap: 4px;
}

.waitlist-row.small input,
.waitlist-row.small select {
  height: 40px;
  font-weight: 400;
}

.waitlist-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.waitlist-consent input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  padding: 0;
}

.waitlist-consent a {
  text-decoration: underline;
}

.waitlist-msg {
  margin: 10px 0 0;
  font-size: 14px;
}

.waitlist-msg:empty {
  display: none;
}

.waitlist-msg.ok {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(46, 44, 48, 0.08), 0 8px 24px rgba(46, 44, 48, 0.08);
  text-align: left;
  animation: wl-pop 360ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wl-check {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3fae6a;
}

.wl-check svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.wl-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.wl-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.wl-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.waitlist-msg .wl-survey {
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 3px 0 #16151a;
}

@keyframes wl-pop {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-msg.ok {
    animation: none;
  }
}

.waitlist-msg.error {
  color: #b3261e;
}

.waitlist-msg a {
  text-decoration: underline;
}

/* After a successful sign-up only the message stays visible. */
.waitlist.is-done > :not(.waitlist-msg) {
  display: none;
}

.hero-waitlist {
  margin-top: 28px;
}

/* Phones: email and button stack, the button spans the full width. */
@media (max-width: 520px) {
  .waitlist-row:not(.small) {
    flex-direction: column;
  }

  .waitlist-row:not(.small) input[type='email'],
  .waitlist .cta-button {
    flex: none;
    width: 100%;
  }

  .waitlist .cta-button {
    height: 52px;
    font-size: 16px;
  }
}

/* A phone sees only its own store. The class is set by scene.js. */
.is-ios .badge-play,
.is-android .badge-apple {
  display: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 4px 16px 20px;
  background: var(--near-snow);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-faint);
}

/* Landing footer that sits below the full-height first screen. */
.footer-below {
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 16px 36px;
  font-size: 14px;
  color: rgba(46, 44, 48, 0.85);
}

.footer-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.footer-small {
  font-size: 12px;
}

.footer-below a:hover {
  color: var(--primary);
}

@media (min-width: 640px) {
  h1 {
    font-size: 60px;
  }

  .subline {
    font-size: 18px;
  }
}

/* ---------- Arctic scene ---------- */

.scene {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.sun,
.sun-halo {
  position: absolute;
  right: 18%;
  border-radius: 50%;
}

/* Centres sit 184px above the scene bottom, where the app puts the sun. */
.sun-halo {
  bottom: 106px;
  width: 156px;
  height: 156px;
  margin-right: -78px;
  background: radial-gradient(
    circle,
    rgba(255, 239, 194, 0.85) 0%,
    rgba(255, 239, 194, 0.3) 45%,
    rgba(255, 239, 194, 0) 70%
  );
}

.sun {
  bottom: 160px;
  width: 48px;
  height: 48px;
  margin-right: -24px;
  background: #fff6dc;
}

.layer {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
}

.strip {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  animation: parallax linear infinite;
  will-change: transform;
}

.strip svg {
  flex-shrink: 0;
  display: block;
}

/* Slides a strip by one copy width (UNIT in scene.js). */
@keyframes parallax {
  to {
    transform: translate3d(-800px, 0, 0);
  }
}

.walker {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 5;
  width: 101px;
  height: 130px;
  margin-left: -50px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.walker-body,
.walker-costume,
.walker-costume > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.walker-body {
  transform-origin: 50% 50%;
}

/* A new costume lands with a small squash and stretch. */
.pop {
  animation: pop 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 100%;
}

@keyframes pop {
  0% {
    transform: scale(0.82, 1.12);
    opacity: 0.4;
  }
  55% {
    transform: scale(1.08, 0.94);
    opacity: 1;
  }
  100% {
    transform: none;
  }
}

/* Page content rises in once, on load. */
.rise {
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rise:nth-child(2) {
  animation-delay: 80ms;
}

.rise:nth-child(3) {
  animation-delay: 160ms;
}

.rise:nth-child(4) {
  animation-delay: 240ms;
}

@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .strip,
  .pop,
  .rise {
    animation: none;
  }
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  line-height: 1.6;
}

.legal .back {
  display: inline-block;
  margin-bottom: 32px;
  font-weight: 600;
  color: var(--primary);
}

.legal h1 {
  max-width: none;
  margin: 0 0 8px;
  font-size: 36px;
}

.legal .updated {
  margin: 0 0 40px;
  color: var(--ink-faint);
}

.legal h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  color: var(--primary);
}

.legal h3 {
  margin: 20px 0 8px;
  font-size: 18px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 24px;
}

.legal li + li {
  margin-top: 6px;
}

.legal .next {
  display: block;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #d9d9d9;
  font-weight: 600;
  color: var(--primary);
}
