/* =========================================================================
   RakkoHQ — Single-page Coming Soon
   Grid + Aurora + Giant text · Glassmorphism pills · Diagonal marquee
   ========================================================================= */

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

* { margin: 0; padding: 0; }

:root {
  --bg: #08070D;
  --text: #F5F4F8;
  --text-muted: #9D99B0;
  --text-dim: #6F6B82;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-glow: rgba(155, 125, 255, 0.4);

  --violet-200: #C7B5FF;
  --violet-300: #B19BFF;
  --violet-400: #9B7DFF;
  --violet-500: #8B5CF6;
  --violet-600: #7C3AED;
  --violet-700: #6D28D9;

  --magenta: #C084FC;
  --pink: #E879F9;
  --green-soft: #4ADE80;

  --grad: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 45%, #C084FC 100%);
  --grad-text: linear-gradient(135deg, #C7B5FF 0%, #9B7DFF 50%, #E879F9 100%);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html, body { background: var(--bg); }

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  height: 100svh;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

input:focus, button:focus, a:focus { outline: none; }
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--violet-400);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

.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;
}

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Background --------------------------------------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
}

.bg__aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.55;
  animation: aurora 22s ease-in-out infinite alternate;
}

.bg__aurora--1 {
  top: -180px;
  left: -120px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.7), transparent 65%);
}

.bg__aurora--2 {
  bottom: -200px;
  right: -180px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.45), transparent 65%);
  animation-delay: -8s;
}

.bg__noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
}

@keyframes aurora {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 60px) scale(1.15); }
}

/* ---- Stage / Layout ----------------------------------------------------- */
.stage {
  position: relative;
  z-index: 1;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 24px;
  overflow: hidden;
}

/* ---- Marquee (rotacionado, no topo) ------------------------------------- */
.marquee {
  position: absolute;
  top: 56px;
  left: 50%;
  width: 130vw;
  transform: translateX(-50%) rotate(-2.5deg);
  border-block: 1px solid var(--border-strong);
  background: rgba(8, 7, 13, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px -20px rgba(109, 40, 217, 0.55);
  overflow: hidden;
  z-index: 2;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: scroll 48s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 16px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee__sep {
  color: var(--violet-400);
  font-size: 14px;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- Giant background text --------------------------------------------- */
.giant {
  position: absolute;
  bottom: 14vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 23vw;
  line-height: 0.82;
  font-weight: 900;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(155, 125, 255, 0.13) 0%, transparent 75%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

/* ---- Glassmorphism base ------------------------------------------------- */
.glass {
  background: linear-gradient(145deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  max-width: 760px;
  margin-inline: auto;
  padding: 120px 16px 24px;
  min-height: 0;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--violet-200);
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet-400);
  box-shadow: 0 0 12px var(--violet-400);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.hero__logo {
  height: clamp(56px, 9vw, 100px);
  width: auto;
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.55));
  margin: 4px 0 2px;
}

.hero__title {
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 820px;
}

.hero__title span { display: block; }

.hero__lede {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.65;
  max-width: 580px;
}

/* ---- Signup form (glass pill) ------------------------------------------ */
.signup {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 480px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  margin-top: 12px;
  gap: 10px;
}

.signup:focus-within {
  border-color: var(--border-glow);
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.6),
    0 0 0 4px rgba(139, 92, 246, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.signup__icon {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.signup input[type="email"] {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 12px 4px;
  font-size: 15px;
  color: var(--text);
  min-width: 0;
}

.signup input::placeholder { color: var(--text-dim); }

.signup__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  box-shadow:
    0 6px 24px -6px rgba(139, 92, 246, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.signup__btn svg { width: 16px; height: 16px; }

.signup__btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 36px -6px rgba(139, 92, 246, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.signup__btn:disabled,
.signup__btn[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  pointer-events: none;
}

/* ---- Stacks marquee (discreto, na base) -------------------------------- */
.stacks {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  margin-top: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 7, 13, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.stacks__label {
  flex-shrink: 0;
  padding-left: 4px;
  padding-right: 18px;
  border-right: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* Viewport que recorta o track e cria o fade — assim a label nunca é mascarada */
.stacks__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 64px,
    #000 calc(100% - 80px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 64px,
    #000 calc(100% - 80px),
    transparent 100%
  );
}

.stacks__track {
  display: flex;
  width: max-content;
  animation: scroll 72s linear infinite;
  min-width: 0;
}

.stacks__group {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-inline: 16px;
}

.stacks__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.stacks__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--violet-400));
  box-shadow: 0 0 8px var(--c, var(--violet-400));
}

/* ---- Language switcher (fixo no canto superior direito) ----------------- */
.lang {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: inline-flex;
  background: rgba(8, 7, 13, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.lang__btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang__btn:hover { color: var(--text); }

.lang__btn.is-active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 2px 12px -2px rgba(139, 92, 246, 0.5);
}

/* ---- Toast ------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 80px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(20, 18, 31, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow:
    0 20px 60px -10px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(139, 92, 246, 0.35);
  opacity: 0;
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-width: 92vw;
  text-align: center;
}

.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

.toast--error { border-color: rgba(248, 113, 113, 0.55); }
.toast--success::before {
  content: "✓";
  color: var(--green-soft);
  font-weight: 700;
  font-size: 15px;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  .stage { padding: 18px 18px 18px; }
  .marquee { top: 60px; width: 160vw; }
  .marquee__group { gap: 24px; font-size: 11.5px; padding: 12px 14px; }
  .hero { padding: 110px 4px 16px; gap: 14px; }
  .giant { font-size: 36vw; bottom: 24vh; }

  .lang { top: 12px; right: 12px; padding: 2px; }
  .lang__btn { padding: 5px 10px; font-size: 11px; }

  .stacks { gap: 12px; padding: 6px 0; }
  .stacks__label {
    font-size: 9px;
    letter-spacing: 0.16em;
    padding-right: 12px;
  }
  .stacks__group { gap: 22px; padding-inline: 12px; }
  .stacks__item { font-size: 11.5px; }

  .signup {
    flex-direction: column;
    border-radius: 18px;
    padding: 12px;
    gap: 8px;
  }
  .signup__icon { display: none; }
  .signup input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    text-align: center;
  }
  .signup__btn { width: 100%; justify-content: center; padding: 12px 20px; }
}

/* Telas baixas (notebooks ~720p) — encolhe ainda mais */
@media (max-height: 760px) and (min-width: 721px) {
  .hero { padding-top: 100px; gap: 14px; }
  .hero__logo { height: clamp(48px, 7vw, 80px); }
  .hero__title { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
  .hero__lede { font-size: 0.95rem; }
  .giant { font-size: 21vw; bottom: 18vh; }
}

/* ---- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bg__aurora { display: none; }
}
