@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400&family=Manrope:wght@300;800&display=swap");
@import url("logo-pulse.css");

:root {
  --sp-bg: #09090b;
  --sp-surface: #18181b;
  --sp-border: #3f3f46;
  --sp-text: #fafafa;
  --sp-muted: #a1a1aa;
  --sp-gradient: linear-gradient(135deg, #20b8ff 0%, #5b6cff 48%, #a14dff 100%);
  --sp-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sp-tagline-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.marketing-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--sp-bg);
  color: var(--sp-text);
  font-family: var(--sp-font);
  line-height: 1.5;
}

.marketing-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

/* —— Brand —— */
.sp-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sp-brand-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.sp-brand-wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  line-height: 1;
}

.sp-brand-social {
  font-weight: 800;
  font-size: 1.755rem;
  letter-spacing: -0.02em;
}

.sp-brand-pulse {
  font-weight: 300;
  font-size: 1.755rem;
  letter-spacing: -0.01em;
}

.sp-brand-tagline {
  margin-top: 0.35rem;
  font-family: var(--sp-tagline-font);
  font-weight: 300;
  font-size: 0.884rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sp-muted);
}

.sp-brand-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

/* —— Landing splash —— */
body.splash-active {
  overflow: hidden;
}

body.splash-active .landing-page {
  visibility: hidden;
  opacity: 0;
}

.landing-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sp-bg);
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.landing-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.landing-splash-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1.5rem;
}

.landing-splash-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  max-width: min(100%, 28rem);
}

.landing-splash-logo {
  display: block;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

/* Splash: mesma onda da logo do sistema, 3× seguidas, sem pausa de 10s */
.sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-bar {
  animation-duration: 1.807s;
  animation-iteration-count: 3;
}

.sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-bar-1 {
  animation-name: sp-logo-splash-pulse-bar-1;
}

.sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-bar-2 {
  animation-name: sp-logo-splash-pulse-bar-2;
}

.sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-bar-3 {
  animation-name: sp-logo-splash-pulse-bar-3;
}

.sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-check {
  animation: sp-logo-splash-pulse-check 1.807s ease-in-out 3;
}

@keyframes sp-logo-splash-pulse-bar-1 {
  0%,
  8.5%,
  29.8%,
  100% {
    transform: scaleY(1);
    opacity: 0.82;
    filter: brightness(1);
  }

  19.15% {
    transform: scaleY(1.22);
    opacity: 1;
    filter: brightness(1.35);
  }
}

@keyframes sp-logo-splash-pulse-bar-2 {
  0%,
  31.9%,
  53.2%,
  100% {
    transform: scaleY(1);
    opacity: 0.82;
    filter: brightness(1);
  }

  42.55% {
    transform: scaleY(1.22);
    opacity: 1;
    filter: brightness(1.35);
  }
}

@keyframes sp-logo-splash-pulse-bar-3 {
  0%,
  55.3%,
  76.6%,
  100% {
    transform: scaleY(1);
    opacity: 0.82;
    filter: brightness(1);
  }

  65.96% {
    transform: scaleY(1.22);
    opacity: 1;
    filter: brightness(1.35);
  }
}

@keyframes sp-logo-splash-pulse-check {
  0%,
  78.7%,
  100% {
    transform: scale(1);
    opacity: 0.82;
    filter: brightness(1);
  }

  89.36% {
    transform: scale(1.1);
    opacity: 1;
    filter: brightness(1.35);
  }
}

.landing-splash-wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  min-width: 0;
  min-height: 1em;
  white-space: nowrap;
  font-size: clamp(1.65rem, 6vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--sp-text);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.landing-splash-wordmark.is-visible {
  opacity: 1;
}

.splash-word-social {
  font-weight: 800;
}

.splash-word-pulse {
  font-weight: 300;
  letter-spacing: -0.01em;
}

.splash-word-cursor-slot {
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
  width: 4px;
  margin-left: 0.05rem;
}

.splash-word-cursor {
  display: block;
  width: 2px;
  height: 0.95em;
  background: var(--sp-text);
  animation: splash-word-cursor-blink 0.65s step-end infinite;
}

.splash-word-cursor.is-hidden {
  opacity: 0;
  animation: none;
}

@keyframes splash-word-cursor-blink {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-bar,
  .sp-logo-splash-animated.sp-logo-icon-animated .sp-logo-check {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .landing-splash-wordmark {
    opacity: 1;
  }
}

/* —— Landing —— */
.landing-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  transition: opacity 0.42s ease;
}

.landing-hero {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.landing-headline {
  margin: 2.5rem 0 1.25rem;
  font-size: clamp(2rem, 7vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.landing-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(250, 250, 250, 0.88);
  max-width: 22rem;
}

.landing-platforms {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin-top: 2rem;
}

.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.platform-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.platform-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.platform-sep {
  color: #52525b;
  font-weight: 300;
  user-select: none;
}

.platform-item-active .platform-label {
  color: var(--sp-text);
}

.platform-item-active .platform-icon {
  filter: none;
}

.platform-item-soon {
  opacity: 0.38;
}

.platform-item-soon .platform-icon {
  fill: #a1a1aa;
}

.platform-item-soon .platform-label {
  color: #71717a;
}

.landing-hero .btn-cta {
  margin-top: 2rem;
}

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: var(--sp-gradient);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-cta:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-cta-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

/* —— Login —— */
.login-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.login-back {
  appearance: none;
  background: none;
  border: none;
  color: var(--sp-muted);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  align-self: flex-start;
  margin-bottom: 2rem;
  cursor: pointer;
}

.login-back:hover {
  color: var(--sp-text);
}

.login-header {
  margin-bottom: 2rem;
}

.login-title {
  margin: 2rem 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--sp-muted);
  font-size: 0.95rem;
}

.login-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 2rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn-oauth svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #fff;
}

.btn-google:hover:not(:disabled) {
  background: #f4f4f5;
}

.btn-google:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
  color: var(--sp-muted);
  font-size: 0.82rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sp-border);
}

.login-email-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.login-email-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sp-muted);
}

.login-email-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--sp-border);
  background: var(--sp-surface);
  color: var(--sp-text);
  font: inherit;
  font-size: 0.95rem;
}

.login-email-input:focus {
  outline: none;
  border-color: rgba(91, 108, 255, 0.55);
}

.btn-email {
  background: var(--sp-surface);
  color: var(--sp-text);
  border: 1px solid var(--sp-border);
}

.btn-email:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.08);
}

.login-flash {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.1);
  color: var(--sp-text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.login-note {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--sp-muted);
  line-height: 1.55;
}

.login-note code {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (min-width: 768px) {
  .marketing-shell {
    max-width: 520px;
    padding-top: 3.5rem;
  }

  .landing-headline {
    font-size: 2.5rem;
  }
}
