/* ============================================================
   RUBI — Estúdio de aplicativos
   Tema: rubi (carmesim) sobre fundo escuro profundo
   ============================================================ */

:root {
  /* Marca */
  --ruby:        #e01e5a;
  --ruby-light:  #ff5e87;
  --ruby-deep:   #9b0e3e;
  --ruby-glow:   rgba(224, 30, 90, 0.55);

  /* Fundo */
  --bg:          #08040c;
  --bg-2:        #0f0714;
  --surface:     rgba(255, 255, 255, 0.04);
  --surface-2:   rgba(255, 255, 255, 0.06);
  --border:      rgba(255, 255, 255, 0.09);

  /* Texto */
  --text:        #f4eef2;
  --text-soft:   #b9aec0;
  --text-dim:    #7d7388;

  --radius:      22px;
  --radius-sm:   14px;
  --maxw:        1180px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   FUNDO INTERATIVO
   ============================================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  display: block;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(224,30,90,0.20), transparent 70%),
    radial-gradient(45% 40% at 85% 30%, rgba(123,11,51,0.22), transparent 70%),
    radial-gradient(50% 45% at 10% 80%, rgba(255,94,135,0.10), transparent 70%);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   LOGO / GEMA
   ============================================================ */
.gem { display: block; filter: drop-shadow(0 6px 22px var(--ruby-glow)); }
.gem--sm { width: 26px; height: 26px; }
.gem--md { width: 70px; height: 70px; }
.gem--lg { width: 132px; height: 132px; }

.float { animation: float 5.5s var(--ease) infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), padding .35s var(--ease);
}
.nav.is-scrolled {
  background: rgba(8, 4, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 18px;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-soft);
  transition: color .2s;
}
.nav__links a:hover { color: var(--text); }
.nav__cta {
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
}
.nav__cta:hover { border-color: var(--ruby-light); color: var(--text) !important; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn--lg { padding: 18px 38px; font-size: 17px; }
.btn--primary {
  background: linear-gradient(135deg, var(--ruby-light), var(--ruby-deep));
  color: #fff;
  box-shadow: 0 10px 32px var(--ruby-glow);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 44px var(--ruby-glow); }
.btn--ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--ruby-light); transform: translateY(-3px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
}
.hero__inner { max-width: 860px; }
.hero__logo { margin-bottom: 30px; display: flex; justify-content: center; }
.hero__eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 13px;
  color: var(--ruby-light);
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}
.grad-text {
  background: linear-gradient(120deg, var(--ruby-light), var(--ruby), var(--ruby-light));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto 38px;
}
.hero__sub strong { color: var(--text); }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 4px; height: 8px;
  background: var(--ruby-light);
  border-radius: 999px;
  animation: scrolldot 1.8s var(--ease) infinite;
}
@keyframes scrolldot {
  0% { opacity: 0; transform: translateY(-4px); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(14px); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 12vw, 140px) clamp(20px, 5vw, 40px);
}
.section__head { text-align: center; margin-bottom: 64px; }
.section__kicker {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 12px;
  color: var(--ruby-light);
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -1px;
  line-height: 1.1;
}
.section__lead { color: var(--text-soft); margin-top: 14px; font-size: 1.05rem; }

/* ============================================================
   APP CARDS
   ============================================================ */
.apps { display: flex; flex-direction: column; gap: 80px; }

.app-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(28px, 4vw, 52px);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(160deg, var(--surface-2), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 100% 0%, var(--accent-glow, var(--ruby-glow)), transparent 60%);
  opacity: .5;
  pointer-events: none;
}
.app-card:nth-child(even) { grid-template-columns: 1fr 1.05fr; }
.app-card:nth-child(even) .app-card__media { order: -1; }

.app-card__body { position: relative; z-index: 1; }
.app-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-card__icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.app-card__titles h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -.5px;
}
.app-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, var(--ruby-light));
  background: var(--accent-soft, rgba(224,30,90,.12));
  padding: 3px 12px;
  border-radius: 999px;
  margin-top: 4px;
}
.app-card__badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent, var(--ruby-light));
  box-shadow: 0 0 8px var(--accent, var(--ruby-light));
}
.app-card__desc { color: var(--text-soft); margin-bottom: 22px; }

.app-card__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-bottom: 28px;
  list-style: none;
}
.app-card__features li {
  font-size: 14px;
  color: var(--text-soft);
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.app-card__features li::before {
  content: "";
  flex: 0 0 auto;
  margin-top: 7px;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--accent, var(--ruby-light));
}
.app-card__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-weight: 600;
  font-size: 14px;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.store-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.store-btn svg { width: 20px; height: 22px; }
.store-btn small { display: block; font-size: 10px; font-weight: 500; opacity: .65; line-height: 1; }
.store-btn b { font-size: 15px; line-height: 1.1; }
.store-btn--soon { background: var(--surface); color: var(--text-soft); cursor: default; border: 1px solid var(--border); }
.store-btn--soon:hover { transform: none; box-shadow: none; }

/* Galeria de telas (mockups de celular) */
.app-card__media {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-end;
  perspective: 1400px;
}
.phone {
  flex: 0 0 auto;
  width: clamp(150px, 20vw, 215px);
  aspect-ratio: 1080 / 2340;
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(160deg, #2a2230, #14101a);
  box-shadow: 0 30px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .5s var(--ease);
}
.phone > img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 24px;
  display: block;
}

/* Carrossel dentro do celular da frente */
.carousel {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 24px;
  overflow: hidden;
  cursor: grab;
  background: #14101a;
}
.carousel:active { cursor: grabbing; }
.carousel__track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.carousel__track img {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel__dots {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.phone__dot {
  width: 6px; height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: width .35s var(--ease), background .35s var(--ease);
  -webkit-backdrop-filter: blur(2px);
}
.phone__dot.is-active {
  width: 18px;
  background: #fff;
}
.phone--back {
  transform: translateY(26px) rotate(-7deg) scale(.9);
  opacity: .92;
}
.phone--front { transform: rotate(3deg); z-index: 2; }
.app-card__media:hover .phone--front { transform: rotate(0) translateY(-8px); }
.app-card__media:hover .phone--back { transform: translateY(18px) rotate(-9deg) scale(.9); }

/* ============================================================
   SOBRE
   ============================================================ */
.section--about { }
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.about__text .section__title { margin-bottom: 18px; }
.about__text p { color: var(--text-soft); margin-bottom: 22px; max-width: 540px; }
.about__list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.about__list li {
  padding-left: 26px;
  position: relative;
  color: var(--text-soft);
}
.about__list li strong { color: var(--text); }
.about__list li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 9px; height: 9px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--ruby-light), var(--ruby-deep));
}
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.stat:first-child { grid-column: 1 / -1; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--ruby-light), var(--ruby));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { color: var(--text-dim); font-size: 13px; }

/* ============================================================
   CONTATO
   ============================================================ */
.section--contact { text-align: center; }
.contact { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.contact .section__title { margin-top: 10px; }
.contact .btn { margin-top: 16px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(8,4,12,.6);
  backdrop-filter: blur(8px);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer p { color: var(--text-dim); font-size: 13px; }

/* ============================================================
   REVEAL (animação ao rolar)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 860px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .app-card,
  .app-card:nth-child(even) { grid-template-columns: 1fr; }
  .app-card:nth-child(even) .app-card__media { order: 0; }
  .app-card__media { margin-top: 10px; }
  .about { grid-template-columns: 1fr; }
  .app-card__features { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .float, .grad-text, .hero__scroll span { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
