/* GymConecta - landing page (mobile-first) */

:root {
  --cobalt: #0067D2;
  --cobalt-deep: #0050A8;
  --navy: #032554;
  --chalk: #F1F6FD;
  --ink: #06214A;
  --signal: #FFD60A;
  --mist: #D5E3F6;
  --muted: #4B5F7D;
  --ok: #0F8A47;
  --alert: #D6343A;
  --white: #FFFFFF;
  --f-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

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

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.hero :focus-visible, .signup :focus-visible, .band :focus-visible, .footer :focus-visible { outline-color: var(--signal); }
.band :focus-visible { outline-color: var(--ink); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 2px solid transparent;
  border-radius: 14px;
  font: 700 1.0625rem/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: #FFE24D; }
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #12315F; }
.btn-sm { min-height: 44px; padding: 0 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(155deg, var(--navy) 0%, #05397F 58%, #0A5BC2 100%); color: var(--white); padding: calc(18px + var(--safe-top)) 0 56px; overflow: hidden; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 1.5rem/1 var(--f-display);
  letter-spacing: -.02em;
  color: inherit;
  text-decoration: none;
}
.logo { line-height: 0; }
.logo-img { display: block; height: 38px; width: auto; }

.hero-grid { display: grid; gap: 44px; }

.hero h1 {
  margin: 0 0 18px;
  max-width: 15em;
  font: 800 clamp(2rem, 7.6vw, 3.4rem)/1.08 var(--f-display);
  letter-spacing: -.028em;
  text-wrap: balance;
}
.hero-sub { margin: 0 0 26px; max-width: 34em; font-size: 1.15rem; color: #DCEBFF; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.hero-note { margin: 16px 0 0; font-size: .95rem; color: #BCD6F5; max-width: 30em; }

/* ---------- Celular de demonstração ---------- */
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.phone {
  width: min(300px, 100%);
  padding: 9px;
  background: var(--ink);
  border-radius: 38px;
  box-shadow: 0 30px 60px -22px rgba(2, 20, 60, .6);
}

.screen {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 500px;
  padding: 10px 16px 16px;
  background: var(--chalk);
  color: var(--ink);
  border-radius: 30px;
}

.s-top { display: flex; justify-content: center; padding-top: 4px; }
.s-notch { width: 64px; height: 7px; border-radius: 4px; background: var(--mist); }
.s-hello { margin: 4px 0 0; font: 800 1.35rem/1.1 var(--f-display); letter-spacing: -.02em; }

.s-block { display: grid; gap: 8px; padding: 12px; background: var(--white); border-radius: 16px; }
.s-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.s-title { margin: 0; font: 700 .95rem/1.2 var(--f-display); }
.s-meta { margin: 2px 0 0; font-size: .85rem; line-height: 1.35; color: var(--muted); }

.chip {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font: 700 .75rem/1.4 var(--f-body);
}
.chip-alert { background: #FDE7E8; color: #A12027; }
.chip-ok { background: #DDF4E7; color: #0B6B37; }

.s-btn {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: var(--cobalt);
  color: var(--white);
  font: 700 .9rem/1.2 var(--f-body);
  cursor: pointer;
  transition: background .2s;
}
.s-btn[aria-pressed="true"] { background: var(--ok); }
.s-btn-big { min-height: 52px; font-size: 1rem; border-radius: 14px; background: var(--ink); }
.s-btn-big[aria-pressed="true"] { background: var(--ok); }

.phone-hint { margin: 0; font-size: .9rem; color: #BCD6F5; }

@media (prefers-reduced-motion: no-preference) {
  .screen > * { animation: entra .5s cubic-bezier(.2, .7, .2, 1) both; }
  .screen > :nth-child(2) { animation-delay: .08s; }
  .screen > :nth-child(3) { animation-delay: .16s; }
  .screen > :nth-child(4) { animation-delay: .24s; }
  .screen > :nth-child(5) { animation-delay: .32s; }
  .screen > :nth-child(6) { animation-delay: .4s; }
}
@keyframes entra {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Seções ---------- */
.section { padding: 64px 0; }
.bg-chalk { background: var(--chalk); }

h2 {
  margin: 0 0 14px;
  max-width: 20em;
  font: 800 clamp(1.75rem, 5.5vw, 2.7rem)/1.08 var(--f-display);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.lead { margin: 0 0 36px; max-width: 36em; color: var(--muted); }

/* Trocas (antes e depois) */
.swap { list-style: none; margin: 0; padding: 0; }
.swap li { display: grid; gap: 4px; padding: 18px 0; border-top: 2px solid var(--mist); }
.swap li:last-child { border-bottom: 2px solid var(--mist); }
.swap .old { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--alert); }
.swap .new { font: 700 1.2rem/1.3 var(--f-display); }

/* Gestor e aluno */
.split { display: grid; gap: 44px; }
.who h3 { margin: 0 0 6px; font: 800 1.5rem/1.1 var(--f-display); letter-spacing: -.02em; }
.who .sub { margin: 0 0 20px; color: var(--muted); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background-color: var(--cobalt);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.who-aluno .ticks li::before {
  background-color: var(--signal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306214A' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* Faixa de pagamentos */
.band { padding: 60px 0; background: var(--signal); color: var(--ink); }
.band-text { margin: 0 0 28px; max-width: 36em; font-size: 1.15rem; }
.flow { list-style: none; counter-reset: passo; margin: 0 0 22px; padding: 0; display: grid; gap: 16px; max-width: 40em; }
.flow li { position: relative; padding-left: 48px; counter-increment: passo; font-weight: 500; }
.flow li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--signal);
  font: 800 1rem/1 var(--f-display);
}
.band-fine { margin: 0; max-width: 36em; font-size: .98rem; }

/* Como começar */
.steps { list-style: none; counter-reset: etapa; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; max-width: 40em; }
.steps li { position: relative; padding-left: 58px; counter-increment: etapa; }
.steps li::before {
  content: counter(etapa);
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--cobalt);
  color: var(--white);
  font: 800 1.25rem/1 var(--f-display);
}
.steps strong { display: block; font: 700 1.2rem/1.3 var(--f-display); }

/* Preço */
.price-grid { display: grid; gap: 28px; }
.price-box {
  max-width: 520px;
  padding: 28px 24px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 8px 8px 0 var(--signal);
}
.price { margin: 0 0 20px; font: 800 4rem/1 var(--f-display); letter-spacing: -.04em; }
.price small { font: 600 1.1rem/1 var(--f-body); letter-spacing: 0; color: var(--muted); }
.price-box .ticks { margin-bottom: 26px; }

/* FAQ */
.faq details { border-top: 2px solid var(--mist); }
.faq details:last-child { border-bottom: 2px solid var(--mist); }
.faq summary {
  position: relative;
  padding: 18px 44px 18px 0;
  font: 700 1.1rem/1.3 var(--f-display);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 1.7rem/1 var(--f-body);
  color: var(--cobalt);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; max-width: 42em; color: var(--muted); }
.faq h2 { margin-bottom: 24px; }

/* Cadastro */
.signup { background: linear-gradient(160deg, #0067D2 0%, #0050A8 100%); color: var(--white); }
.signup-grid { display: grid; gap: 28px; }
.signup-text { margin: 0; max-width: 28em; font-size: 1.15rem; color: #DCEBFF; }

.signup-box { padding: 24px 20px; background: var(--white); color: var(--ink); border-radius: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .98rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 2px solid var(--mist);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: 500 1rem/1.2 var(--f-body);
}
.field input:focus { border-color: var(--cobalt); outline: 0; box-shadow: 0 0 0 3px rgba(0, 103, 210, .25); }
.field input.invalido { border-color: var(--alert); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg { min-height: 1.4em; margin: 12px 0 0; font-weight: 700; color: var(--alert); }
.fine { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }

.form-ok h3 { margin: 0 0 8px; font: 800 1.5rem/1.1 var(--f-display); letter-spacing: -.02em; }
.form-ok p { margin: 0 0 18px; color: var(--muted); }
.form-ok .btn-signal { background: var(--ink); color: var(--white); }
[hidden] { display: none !important; }

/* Rodapé */
.footer { padding: 36px 0 110px; background: var(--ink); color: #B9CBE6; font-size: .95rem; }
.footer-row { display: grid; gap: 14px; }
.footer p { margin: 0; }
.footer a { color: inherit; }
.footer .logo { color: var(--white); }

/* Barra fixa (celular) */
.sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: var(--ink);
  color: var(--white);
  transform: translateY(110%);
  transition: transform .25s ease;
}
.sticky.show { transform: none; }
.sticky span { font-weight: 700; font-size: .95rem; }

/* ---------- Telas maiores ---------- */
@media (min-width: 760px) {
  .swap li { grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: baseline; }
  .footer-row { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
  .footer-row p:nth-of-type(1) { text-align: center; }
  .signup-box { padding: 32px; }
}

@media (min-width: 900px) {
  .section { padding: 96px 0; }
  .band { padding: 80px 0; }
  .hero { padding-bottom: 88px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .hero-cta { flex-direction: row; max-width: none; }
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .price-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
  .signup-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
  .footer { padding-bottom: 36px; }
  .sticky { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sticky, .btn, .s-btn { transition: none; }
}

/* =====================================================
   Dinamismo: movimento, notificação e efeitos de hover
   ===================================================== */

/* Luz que acompanha o mouse no hero (só com mouse) */
.hero { position: relative; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(460px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 255, 255, .15), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
}
.hero.spot::before { opacity: 1; }
.hero > .wrap { position: relative; }

/* Celular que inclina com o mouse */
.phone-stage { position: relative; padding: 18px; perspective: 900px; }
.phone {
  position: relative;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .18s ease-out;
  will-change: transform;
}

/* Notificação que cai do topo do celular */
.notif {
  position: absolute;
  z-index: 5;
  top: 22px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 16px 32px -12px rgba(2, 20, 60, .6);
  opacity: 0;
  transform: translateY(-150%) scale(.96);
  pointer-events: none;
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.15), opacity .25s;
}
.notif.on { opacity: 1; transform: none; }
.notif img { flex: none; width: 28px; height: 28px; border-radius: 7px; }
.notif b { display: block; font: 700 .85rem/1.2 var(--f-display); }
.notif span { display: block; margin-top: 2px; font-size: .8rem; line-height: 1.3; color: var(--muted); }

/* Botões do celular: reação ao toque */
.s-btn { transition: background .2s, transform .15s; }
.s-btn:active { transform: scale(.97); }
.chip { transition: background .3s, color .3s; }

/* Aparecer ao rolar a página (só quando o JS está ativo) */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease var(--d, 0ms), transform .6s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Risco que se desenha nas trocas */
.js .swap .old {
  text-decoration: none;
  background: linear-gradient(var(--alert), var(--alert)) left 56% / 0% 2px no-repeat;
  transition: background-size .7s ease calc(var(--d, 0ms) + 250ms);
}
.js .swap li.in .old { background-size: 100% 2px; }

/* Hover (somente quando há mouse) */
@media (hover: hover) and (pointer: fine) {
  .btn-signal { position: relative; overflow: hidden; }
  .btn-signal::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%);
    transform: translateX(-120%);
    pointer-events: none;
  }
  .btn-signal:hover::after { animation: brilho .7s ease; }
  .btn { transition: background .15s, transform .15s, box-shadow .15s; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 -3px rgba(16, 19, 34, .22); }
  .btn:active { transform: translateY(0); box-shadow: none; }

  .swap li { margin: 0 -14px; padding-left: 14px; padding-right: 14px; border-radius: 12px; transition: background .2s; }
  .swap li:hover { background: var(--chalk); }
  .swap .new { transition: transform .25s ease; }
  .swap li:hover .new { transform: translateX(8px); }

  .ticks li { transition: transform .2s ease; }
  .ticks li:hover { transform: translateX(5px); }
  .ticks li::before { transition: transform .3s cubic-bezier(.3, 1.7, .5, 1); }
  .ticks li:hover::before { transform: rotate(-10deg) scale(1.2); }

  .flow li::before, .steps li::before { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
  .flow li:hover::before { transform: rotate(360deg); }
  .steps li:hover::before { transform: scale(1.15) rotate(-6deg); }

  .price-box { transition: transform .25s ease, box-shadow .25s ease; }
  .price-box:hover { transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--signal); }

  .faq summary { transition: color .15s; }
  .faq summary:hover { color: var(--cobalt); }
  .faq summary::after { transition: transform .25s ease; }
  .faq summary:hover::after { transform: translateY(-50%) rotate(90deg); }
}

@keyframes brilho { to { transform: translateX(120%); } }

/* Sem animações para quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .swap .old { background-size: 100% 2px; transition: none; }
  .phone { transform: none !important; transition: none; }
  .notif { transition: opacity .2s; transform: none; }
  .btn-signal:hover::after { animation: none; }
}
