/*
 * Site público do Gary (gaary.si). Mesmas cores e fontes do app
 * (src/client/ui/tokens.css), sem nenhum recurso de terceiros.
 */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
}

:root {
  --font-body:
    'Inter Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display:
    'Bricolage Grotesque Variable', 'Inter Variable', system-ui, sans-serif;

  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --text: #17171a;
  --text-2: #56565e;
  --text-3: #8a8a93;
  --line: #e6e6e2;
  --accent: #f28c1f;
  --accent-strong: #c96a07;
  --accent-soft: #fdebd5;
  --success: #17825a;
  --success-soft: #dcf1e7;
  --primary-top: #3b3b40;
  --primary-bottom: #17171a;
  --primary-text: #ffffff;
  --sky-top: #ffffff;
  --sky-bottom: #cfe8fb;
  --bubble-gary: #f1f1ee;
  --bubble-me: #dcebfb;
  --bubble-me-text: #12355e;
  --highlight: #ffffff;

  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --shadow-md:
    0 8px 24px -10px rgb(20 20 25 / 18%), 0 2px 6px rgb(20 20 25 / 6%);
  --shadow-lg:
    0 34px 80px -24px rgb(20 40 70 / 34%), 0 6px 16px rgb(20 20 25 / 8%);
  --relief-primary:
    inset 0 1px 0 rgb(255 255 255 / 24%), inset 0 -1px 0 rgb(0 0 0 / 35%),
    0 1px 2px rgb(0 0 0 / 35%), 0 8px 16px -8px rgb(0 0 0 / 45%);
  --relief-surface:
    inset 0 1px 0 var(--highlight), 0 0 0 1px var(--line),
    0 1px 2px rgb(20 20 25 / 8%), 0 6px 14px -8px rgb(20 20 25 / 20%);
  --focus: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101012;
    --surface: #1a1a1d;
    --surface-2: #232327;
    --text: #f2f2f4;
    --text-2: #b6b6bf;
    --text-3: #8a8a94;
    --line: #2c2c32;
    --accent: #f59a33;
    --accent-strong: #ffb057;
    --accent-soft: #3d2a14;
    --success: #4fcf98;
    --success-soft: #14382a;
    --primary-top: #ffffff;
    --primary-bottom: #dcdce0;
    --primary-text: #17171a;
    --sky-top: #101012;
    --sky-bottom: #13263b;
    --bubble-gary: #26262b;
    --bubble-me: #1d3550;
    --bubble-me-text: #dcebfb;
    --highlight: #2f2f35;
    --shadow-md: 0 8px 24px -10px rgb(0 0 0 / 60%);
    --shadow-lg: 0 34px 80px -24px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

/* O topo é sempre o céu claro da arte da turma, nos dois temas. */
@media (prefers-color-scheme: dark) {
  .hero,
  .top:not(.scrolled) {
    --surface: #ffffff;
    --text: #17171a;
    --text-2: #56565e;
    --text-3: #8a8a93;
    --line: #e6e6e2;
    --accent-strong: #c96a07;
    --accent-soft: #fdebd5;
    --primary-top: #3b3b40;
    --primary-bottom: #17171a;
    --primary-text: #ffffff;
    --sky-top: #ffffff;
    --sky-bottom: #cfe8fb;
    --highlight: #ffffff;
    color: var(--text);
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}
p {
  margin: 0;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 10px;
}
.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 50;
  background: var(--surface);
  padding: 8px 14px;
}

/* Buttons: a little volume, like the app. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 15px/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms var(--ease),
    filter 160ms var(--ease);
}
.btn:hover {
  filter: brightness(1.06);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(var(--primary-top), var(--primary-bottom));
  color: var(--primary-text);
  box-shadow: var(--relief-primary);
}
.btn-surface {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--relief-surface);
}
.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  transition:
    background 200ms var(--ease),
    box-shadow 200ms var(--ease);
}
.top.scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font: 700 26px/1 var(--font-display);
  letter-spacing: -0.02em;
}
.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgb(30 60 100 / 18%));
  transition: transform 300ms var(--ease);
}
.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav a:not(.btn) {
  text-decoration: none;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}
.nav a:not(.btn):hover {
  color: var(--text);
}

/* Hero: céu claro como no vídeo do Muse e na arte da família. */
.hero {
  margin-top: -76px;
  padding: 150px 0 96px;
  background: linear-gradient(
    180deg,
    var(--sky-top) 0%,
    var(--sky-top) 30%,
    var(--sky-bottom) 100%
  );
  text-align: center;
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(42px, 7.4vw, 92px);
  font-weight: 650;
  max-width: 13ch;
  margin-inline: auto;
}
.mascot-inline {
  display: inline-block;
  width: auto;
  height: 1.08em;
  margin: 0 0.02em 0 0.06em;
  vertical-align: -0.2em;
  filter: drop-shadow(0 12px 18px rgb(40 80 130 / 28%));
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(-0.06em) rotate(3deg);
  }
}
.rotator {
  display: block;
  height: 1.25em;
  margin-block: -0.085em;
  overflow: hidden;
  color: var(--accent-strong);
}
.rotator-track {
  display: flex;
  flex-direction: column;
  transition: transform 650ms var(--ease);
}
.rotator-track span {
  display: block;
  height: 1.25em;
  line-height: 1.25em;
}
.hero-lead {
  max-width: 560px;
  margin: 26px auto 0;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-2);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}
.hero-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-3);
}
.hero-copy {
  will-change: opacity, transform;
}
.hero-video {
  max-width: 1040px;
  margin: 64px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 32px;
  overflow: hidden;
  background: var(--sky-bottom);
  box-shadow: var(--shadow-lg);
  transform: scale(var(--grow, 1));
  transform-origin: 50% 0;
}
.hero-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Entrada do topo ao abrir a página. */
.js .intro {
  opacity: 0;
  animation: intro 900ms var(--ease) forwards;
}
.js .hero-lead.intro {
  animation-delay: 120ms;
}
.js .hero-cta.intro {
  animation-delay: 220ms;
}
.js .hero-note.intro {
  animation-delay: 300ms;
}
.js .hero-video.intro {
  animation-delay: 380ms;
}
@keyframes intro {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.js .hero-video.intro {
  animation-name: intro-video;
}
@keyframes intro-video {
  from {
    opacity: 0;
    translate: 0 40px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* Sections */
.section {
  padding: 110px 0;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
}
.section-head {
  max-width: 680px;
  margin-bottom: 56px;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 650;
}
.section-head p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-2);
}

/* O que ele faz */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.card img {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
}
.card h3 {
  font-size: 22px;
  font-weight: 650;
}
.card p {
  margin-top: 8px;
  color: var(--text-2);
}

/* Cenas com o telefone */
.scenes {
  display: grid;
  gap: 120px;
}
.scene {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}
.scene:nth-child(even) .scene-text {
  order: 2;
}
.scene-text h3 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 650;
}
.scene-text p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 460px;
}
.scene-stage {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
}
.phone {
  width: 300px;
  max-width: 100%;
  padding: 10px;
  border-radius: 46px;
  background: #121214;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 9%),
    var(--shadow-lg);
}
.screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 470px;
  padding: 18px 14px 16px;
  border-radius: 37px;
  background: var(--surface);
  font-size: 13.5px;
  line-height: 1.45;
}
.screen-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-bottom: 8px;
}
.screen-head img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  background: var(--surface-2);
}
.screen-head strong {
  font-size: 14px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.bubble {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 18px;
}
.bubble.gary {
  align-self: flex-start;
  background: var(--bubble-gary);
  border-bottom-left-radius: 6px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--bubble-me);
  color: var(--bubble-me-text);
  border-bottom-right-radius: 6px;
}
.stamp {
  align-self: center;
  font-size: 11px;
  color: var(--text-3);
}
.approve {
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-2);
}
.approve-title {
  font-weight: 650;
}
.approve-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
}
.approve-line b {
  color: var(--text);
}
.approve-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.approve-actions span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}
.approve-actions .yes {
  background: linear-gradient(var(--primary-top), var(--primary-bottom));
  color: var(--primary-text);
  box-shadow: var(--relief-primary);
}
.approve-actions .soft {
  background: var(--surface);
  box-shadow: var(--relief-surface);
}
.goal {
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--surface-2);
}
.goal-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 650;
}
.goal-top small {
  font-weight: 500;
  color: var(--accent-strong);
}
.bar {
  height: 7px;
  margin-top: 10px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.checks {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
}
.checks li {
  display: flex;
  gap: 8px;
}
.checks li::before {
  content: '';
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px var(--text-3);
}
.checks li.done {
  color: var(--text-3);
  text-decoration: line-through;
}
.checks li.done::before {
  background: var(--success)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center/100% no-repeat;
  box-shadow: none;
}
.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 4px;
}

/* Você no controle */
.trust {
  background: var(--surface);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.trust-item h3 {
  font-size: 22px;
  font-weight: 650;
}
.trust-item p {
  margin-top: 10px;
  color: var(--text-2);
}
.trust-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: 700 18px/1 var(--font-display);
}

/* Turma */
.crew-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}
.crew-art {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--sky-bottom);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 4.4;
}
.crew-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.crew {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.crew img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.crew img:hover {
  animation: hop 600ms var(--ease);
}
@keyframes hop {
  40% {
    transform: translateY(-14px) rotate(-4deg);
  }
}

/* Perguntas */
.faq {
  max-width: 760px;
  margin-inline: auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font: 600 19px/1.3 var(--font-display);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-4px);
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}
.faq details p {
  padding: 0 0 22px;
  color: var(--text-2);
  max-width: 640px;
}

/* Chamada final */
.final {
  padding: 120px 0 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg), var(--sky-bottom));
  overflow: hidden;
}
.final h2 {
  font-size: clamp(38px, 5.6vw, 72px);
  font-weight: 650;
  max-width: 14ch;
  margin-inline: auto;
}
.final .hero-cta {
  margin-top: 30px;
}
.final-mascot {
  width: 240px;
  margin: 56px auto -30px;
}
.final-mascot.in {
  animation: bob 4s ease-in-out 800ms infinite;
}

/* Rodapé */
.foot {
  padding: 36px 0;
  background: var(--surface);
  font-size: 14px;
  color: var(--text-3);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
}

/* Páginas de texto (privacidade, termos) */
.doc {
  padding: 56px 0 100px;
}
.doc article {
  max-width: 720px;
  margin-inline: auto;
}
.doc h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 650;
}
.doc .updated {
  margin-top: 12px;
  color: var(--text-3);
}
.doc h2 {
  margin-top: 44px;
  font-size: 24px;
  font-weight: 650;
}
.doc p,
.doc li {
  color: var(--text-2);
}
.doc p {
  margin-top: 14px;
}
.doc ul {
  margin: 14px 0 0;
  padding-left: 20px;
}
.doc li + li {
  margin-top: 8px;
}
.doc strong {
  color: var(--text);
}

/* Entrada suave das seções */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(6px);
  transition:
    opacity 800ms var(--ease),
    transform 800ms var(--ease),
    filter 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Conversa animada nas telas de celular. */
.screen.chat {
  height: 568px;
  overflow: hidden;
}
.js .chat [data-seq] {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition:
    opacity 380ms var(--ease),
    transform 380ms var(--ease);
}
.js .chat .bubble.gary[data-seq],
.js .chat .approve[data-seq] {
  transform-origin: 0 100%;
}
.js .chat .bubble.me[data-seq] {
  transform-origin: 100% 100%;
}
.js .chat [data-seq].shown {
  opacity: 1;
  transform: none;
}
.js .chat [data-seq]:not(.shown) {
  display: none;
}
.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: var(--bubble-gary);
  animation: pop 260ms var(--ease);
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  animation: dot 1s ease-in-out infinite;
}
.typing i:nth-child(2) {
  animation-delay: 150ms;
}
.typing i:nth-child(3) {
  animation-delay: 300ms;
}
@keyframes dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
}
.status {
  transition: opacity 200ms var(--ease);
}
.status.swap {
  opacity: 0;
}
.js .chat .bar i {
  width: 0;
  transition: width 1200ms var(--ease) 300ms;
}
.js .chat .shown .bar i,
.bar i {
  width: var(--w);
}
.js .chat .goal:not(.shown) .bar i {
  width: 0;
}
.js .chat .approve.shown .yes {
  animation: nudge 1.8s ease-in-out 900ms 2;
}
@keyframes nudge {
  50% {
    transform: scale(1.04);
  }
}
.checks li.will-check {
  transition: color 300ms var(--ease);
}

@media (max-width: 900px) {
  .grid,
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }
  .scene {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .scene:nth-child(even) .scene-text {
    order: 0;
  }
  .crew-feature {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .scenes {
    gap: 80px;
  }
}
@media (max-width: 640px) {
  .nav a:not(.btn) {
    display: none;
  }
  .hero {
    padding-top: 120px;
  }
  .section {
    padding: 80px 0;
  }
  .grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    gap: 32px;
  }
  .hero-cta .btn {
    width: 100%;
    max-width: 340px;
  }
  .crew img {
    width: 72px;
    height: 72px;
  }
  .hero-video {
    margin-top: 48px;
    border-radius: 22px;
  }
  .scene-stage {
    padding: 32px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .rotator-track,
  .status::before,
  .mascot-inline,
  .final-mascot.in,
  .js .intro {
    transition: none;
    animation: none;
    opacity: 1;
  }
  .js .reveal {
    filter: none;
  }
  .js .chat [data-seq] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js .chat [data-seq]:not(.shown) {
    display: revert;
  }
  .hero-video {
    transform: none;
  }
}

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