/* Tokens do app (studify/src/theme.js): papel de caderno, tinta de caneta e margem vermelha */
@font-face { font-family: Bricolage; font-weight: 400; src: url(assets/fontes/BricolageGrotesque_400Regular.ttf); font-display: swap; }
@font-face { font-family: Bricolage; font-weight: 500; src: url(assets/fontes/BricolageGrotesque_500Medium.ttf); font-display: swap; }
@font-face { font-family: Bricolage; font-weight: 600; src: url(assets/fontes/BricolageGrotesque_600SemiBold.ttf); font-display: swap; }
@font-face { font-family: Bricolage; font-weight: 700; src: url(assets/fontes/BricolageGrotesque_700Bold.ttf); font-display: swap; }
@font-face { font-family: Bricolage; font-weight: 800; src: url(assets/fontes/BricolageGrotesque_800ExtraBold.ttf); font-display: swap; }
@font-face { font-family: Lucide; src: url(assets/fontes/Lucide-site.ttf); font-display: block; }

:root {
  --bg: #F3EFE6;
  --alt: #ECE6DA;
  --card: #FBF9F4;
  --primary: #1F3A93;
  --on-primary: #FBF9F4;
  --primary-soft: #DCE1EE;
  --red: #C8442F;
  --text: #22201C;
  --body: #4A463F;
  --muted: #7A746A;
  --border: #E4DED1;
  --line: rgba(31, 58, 147, .08);
  --nav-bg: rgba(243, 239, 230, .85);
  --shadow: 0 30px 60px rgba(34, 32, 28, .18), 0 8px 20px rgba(34, 32, 28, .10);
  --radius: 8px;
  --max: 1120px;
}
:root[data-theme="dark"] {
  --bg: #16181D;
  --alt: #1B1E24;
  --card: #1F2229;
  --primary: #8EA4E8;
  --on-primary: #16181D;
  --primary-soft: #272E42;
  --red: #E07A62;
  --text: #ECE8DF;
  --body: #C3BEB4;
  --muted: #8F8A80;
  --border: #2C2F36;
  --line: rgba(142, 164, 232, .07);
  --nav-bg: rgba(22, 24, 29, .85);
  --shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 8px 20px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: Bricolage, sans-serif; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .3s, color .3s;
}
.ic { font-family: Lucide; font-style: normal; line-height: 1; display: inline-block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
em { font-style: normal; color: var(--primary); }
a { color: inherit; text-decoration: none; }
.so-escuro, :root[data-theme="dark"] .so-claro { display: none; }
:root[data-theme="dark"] .so-escuro { display: block; }

/* Topo */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: var(--nav-bg); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { height: 32px; width: auto; }
.nav ul { list-style: none; display: flex; gap: 26px; padding: 0; font-size: 15px; color: var(--muted); }
.nav ul a:hover { color: var(--text); }
.nav ul a { white-space: nowrap; }
.nav-r { display: flex; gap: 10px; align-items: center; }
.theme-btn { width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-size: 17px; display: grid; place-items: center; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 6px; font-weight: 600; font-size: 16px; border: 1px solid transparent; transition: transform .18s, background .18s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--card); }
.btn-sm { padding: 9px 16px; font-size: 15px; }

/* Folha pautada com margem: o fundo do hero e do final */
.pautado {
  position: relative;
  background-image: repeating-linear-gradient(to bottom, transparent 0 45px, var(--border) 45px 46px);
}
.pautado::after { content: ""; position: absolute; top: 0; bottom: 0; left: max(24px, calc(50% - 600px)); width: 2px; background: var(--red); opacity: .7; }

/* Hero */
.hero { padding: 80px 0 96px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.pill { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; background: var(--card); border: 1px solid var(--border); color: var(--body); padding: 6px 12px; border-radius: 4px; }
.pill .ic { color: var(--primary); }
h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -2px; font-weight: 800; margin: 20px 0 18px; }
h1 em { position: relative; z-index: 0; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .2em; background: var(--red); opacity: .85; z-index: -1; transform: rotate(-1.5deg); }
.lead { font-size: 19px; color: var(--body); max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; gap: 6px; align-items: center; }
.hero-note .ic { color: var(--primary); }

/* Celular */
.phone { width: 290px; margin: 0 auto; background: #111; border-radius: 40px; padding: 8px; box-shadow: var(--shadow); position: relative; }
.phone::before { content: ""; position: absolute; left: 50%; top: 15px; width: 9px; height: 9px; margin-left: -4.5px; background: #000; border-radius: 50%; z-index: 3; }
.screen { border-radius: 32px; overflow: hidden; position: relative; aspect-ratio: 390 / 844; background: var(--bg); }
.screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero .phone { transform: rotate(3deg); }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Seções */
section { padding: 96px 0; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
h2 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -1.4px; font-weight: 800; margin: 10px 0 14px; }
.sub { color: var(--body); font-size: 18px; max-width: 560px; }
.center { text-align: center; }
.center .sub { margin: 0 auto; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature.flip .text { order: 2; }
.ticks { list-style: none; padding: 0; margin-top: 22px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; color: var(--body); font-size: 16.5px; }
.ticks .ic { color: var(--primary); background: var(--primary-soft); width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; font-size: 14px; flex: none; }
.alt { background: var(--alt); }

.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.yt { width: min(100%, 340px); margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; border: 2px solid var(--border); background: #000; box-shadow: 0 40px 80px rgba(34,32,28,.18); }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.stage { position: relative; }

/* Em ação (GIFs) */
.acao { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; }
.acao figure { margin: 0; }
.acao .phone { width: 100%; max-width: 230px; border-radius: 34px; padding: 6px; }
.acao .phone::before { top: 12px; }
.acao .screen { border-radius: 28px; }
.acao figcaption, .gallery figcaption { text-align: center; margin-top: 14px; font-weight: 700; font-size: 16px; }
.acao figcaption small, .gallery figcaption small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; margin-top: 2px; }

/* Como funciona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; text-align: left; }
.step, .tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step .n { width: 34px; height: 34px; border-radius: 4px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; margin-bottom: 16px; }
.step h3, .tile h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.step p, .tile p { color: var(--muted); font-size: 16px; }

/* Grade */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; text-align: left; }
.tile { padding: 24px; transition: transform .2s, border-color .2s; }
.tile:hover { transform: translateY(-4px); border-color: var(--primary); }
.tile .ic { width: 42px; height: 42px; border-radius: 6px; display: grid; place-items: center; font-size: 20px; margin-bottom: 14px; background: var(--primary-soft); color: var(--primary); }

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; }
.gallery figure { margin: 0; }
.gallery .phone { width: 100%; max-width: 230px; border-radius: 34px; padding: 6px; }
.gallery .phone::before { top: 12px; }
.gallery .screen { border-radius: 28px; }

/* Privacidade + CTA */
.lock { width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 34px; }
.final { text-align: center; }
.final .wrap { position: relative; z-index: 1; }
.final .icone { display: block; width: 104px; height: 104px; margin: 0 auto 24px; border-radius: 24px; box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.final .sub { margin: 0 auto; }
.final .cta { justify-content: center; }
footer { padding: 30px 0; color: var(--muted); font-size: 14px; text-align: center; border-top: 1px solid var(--border); }

/* Entrada ao rolar */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } .float, .final .icone { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 1040px) { .nav ul { gap: 18px; } }
@media (max-width: 960px) {
  .acao, .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .video-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero .wrap, .feature { grid-template-columns: 1fr; }
  .feature.flip .text { order: 0; }
  .steps, .grid { grid-template-columns: 1fr; }
  .nav ul { display: none; }
  section { padding: 64px 0; }
  .hero { padding-top: 48px; }
  .phone { width: 260px; }
  .pautado::after { left: 12px; }
}
@media (max-width: 420px) {
  .acao, .gallery { gap: 12px; }
  h1 em { white-space: normal; }
}
