/* Proporção áurea: phi = 1.618. Colunas 1.618fr/1fr, tipo em potências de phi, espaço em Fibonacci. */
:root {
  --red: #C8102E;
  --red-hi: #DE1F3C;
  --red-deep: #8A0A1F;
  --blue: #0038A8;
  --blue-hi: #1F4FD1;
  --blue-deep: #0A1A5C;
  --white: #FFFFFF;
  --flag-red: #E0301F;
  --gold: #E8B923;
  --silver: #D9DCE3;
  --silver-dark: #9EA4B0;
  --on-blue-soft: #D6DCFF;

  --paper: #FFFFFF;
  --paper-2: #F5F4F0;
  --card: #FFFFFF;
  --field: #FAFAF8;
  --ink: #1A1D2B;
  --muted: #4E5366;
  --line: #DCDAD4;
  --line-strong: #7A7F92;
  --red-text: #C8102E;
  --blue-text: #0038A8;
  --focus: #0038A8;
  --shadow: 0 13px 34px rgba(10, 26, 92, 0.14);

  /* Fibonacci */
  --s1: 5px; --s2: 8px; --s3: 13px; --s4: 21px; --s5: 34px; --s6: 55px; --s7: 89px; --s8: 144px;
  --r1: 8px; --r2: 13px; --pill: 999px;

  /* 17px x phi^n */
  --t-sm: 0.8125rem;                                  /* 17 / sqrt(phi) */
  --t-0: 1.0625rem;                                   /* 17 */
  --t-1: 1.35rem;                                     /* 17 x sqrt(phi) */
  --t-2: 1.72rem;                                     /* 17 x phi */
  --t-3: clamp(2.125rem, 1.6rem + 2.2vw, 2.78rem);    /* 17 x phi^2 */
  --t-4: clamp(2.78rem, 1.9rem + 3.6vw, 4.5rem);      /* 17 x phi^3 */
  --lh: 1.618;

  --f: "Myriad Pro", "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --ease: 160ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-0)/var(--lh) var(--f); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.06; }
h1 { font-size: var(--t-4); }
h2 { font-size: var(--t-3); }
h3 { font-size: var(--t-1); line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
.red { color: var(--red-text); }
.blue { color: var(--blue-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r1); }
.on-brand :focus-visible { outline-color: var(--white); }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--s4); }
@media (min-width: 768px) { .wrap { padding-inline: var(--s5); } }

.skip { position: absolute; left: var(--s4); top: -100px; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); border-radius: var(--r1); z-index: 3; }
.skip:focus { top: var(--s4); }

.defs { position: absolute; width: 0; height: 0; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 55px; padding: var(--s3) var(--s5); border: 0; border-radius: var(--r1); font: 700 var(--t-0)/1.2 var(--f); text-decoration: none; cursor: pointer; transition: filter var(--ease), box-shadow var(--ease); }
.btn:hover { filter: brightness(0.92); }
.btn-red { background: linear-gradient(180deg, var(--red-hi), var(--red)); color: var(--white); box-shadow: 0 8px 21px rgba(200, 16, 46, 0.3); }
.btn-blue { background: linear-gradient(180deg, var(--blue-hi), var(--blue)); color: var(--white); box-shadow: 0 8px 21px rgba(0, 56, 168, 0.28); }
.btn-white { background: var(--white); color: var(--red); }
.btn-line { background: transparent; color: var(--blue-text); border: 2px solid currentColor; }
.btn-line:hover { filter: none; background: var(--card); }
.btn-wide { width: 100%; }

.kicker { display: inline-flex; align-items: center; gap: var(--s3); font-size: var(--t-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted); }
.kicker svg { width: 34px; height: 21px; flex: none; border-radius: 2px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }

/* Topo */
.top { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding-block: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 900; font-size: var(--t-1); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--red-text); }
.ig { font-size: var(--t-sm); font-weight: 600; color: var(--muted); text-decoration: none; padding-block: var(--s2); }
.ig:hover { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { display: grid; gap: var(--s5); padding-block: var(--s3) var(--s6); }
.hero-text { display: grid; gap: var(--s4); align-content: center; }
.hero h1 .blue { display: block; }
.lead { font-size: var(--t-0); color: var(--muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s4) var(--s5); margin: var(--s2) 0 0; padding: var(--s4) 0 0; list-style: none; border-top: 1px solid var(--line); }
.facts b { display: block; font-size: var(--t-2); font-weight: 900; line-height: 1; color: var(--blue-text); letter-spacing: -0.02em; }
.facts span { font-size: var(--t-sm); color: var(--muted); }
.photo { position: relative; margin: 0; aspect-ratio: 1.618 / 1; border-radius: var(--r2); overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.22), transparent 58%), linear-gradient(160deg, var(--red-hi), var(--red-deep)); display: grid; place-items: center; box-shadow: var(--shadow); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
/* Bandeira no mastro: fica no lugar da foto até o maycon.jpg chegar */
.emblema { height: 82%; width: auto; max-width: 60%; filter: drop-shadow(0 13px 13px rgba(0, 0, 0, 0.35)); }
.emblema .mastro { fill: var(--silver); }
.emblema .mastro-sombra { fill: var(--silver-dark); }
.emblema .ouro { fill: var(--gold); }
.emblema .pano-vermelho { fill: var(--flag-red); }
.emblema .pano-branco { fill: var(--white); }
.emblema .pano-azul { fill: var(--blue-hi); }
.emblema .brasao { fill: none; stroke: var(--blue); stroke-width: 1.6; }
.photo-tag { position: absolute; left: var(--s3); bottom: var(--s3); display: flex; align-items: center; gap: var(--s2); background: var(--white); color: #1A1D2B; font-size: var(--t-sm); font-weight: 700; padding: var(--s1) var(--s3); border-radius: var(--pill); }
.photo-tag svg { width: 21px; height: 13px; }
@media (max-width: 899px) { .photo { order: -1; } .emblema { height: 70%; margin-bottom: 14%; } }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.618fr 1fr; gap: var(--s6); padding-block: var(--s5) var(--s6); }
  .hero-text { gap: var(--s5); }
  .lead { font-size: var(--t-1); line-height: 1.5; }
  .photo { aspect-ratio: 1 / 1.618; max-height: 640px; }
}

/* Formulário (azul) */
.form-sec { background: var(--paper); color: var(--ink); padding-bottom: var(--s7); }
.form-grid { display: grid; gap: var(--s5); padding-top: var(--s4); scroll-margin-top: var(--s4); }
.form-intro { display: grid; gap: var(--s4); align-content: start; }
.form-intro p { color: var(--muted); }
.steps { margin: var(--s3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s4); counter-reset: s; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: var(--s3); align-items: center; counter-increment: s; font-weight: 600; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--pill); background: var(--red); color: var(--white); font-weight: 900; }
.card { background: var(--card); color: var(--ink); border-radius: var(--r2); padding: var(--s4); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .form-grid { grid-template-columns: 1fr 1.618fr; gap: var(--s6); }
  .form-intro { position: sticky; top: var(--s5); }
  .card { padding: var(--s5) var(--s6); }
}
form { display: grid; gap: var(--s4); }
.field { display: grid; gap: var(--s2); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
label, legend { font-weight: 700; padding: 0; }
.hint { font-size: var(--t-sm); color: var(--muted); }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--r1); padding: var(--s3) var(--s4); min-height: 55px; }
textarea { resize: vertical; min-height: 144px; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--focus); }
input:user-invalid, textarea:user-invalid { border-color: var(--red-text); }
.phone { display: grid; grid-template-columns: 89px 1fr; gap: var(--s2); margin-top: var(--s2); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; font-weight: 400; font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }
.check input { width: 24px; height: 24px; min-height: 0; margin: 0; accent-color: var(--red); }
.status { font-weight: 700; color: var(--blue-text); }
.status:empty { display: none; }

/* Documentação (vermelho, corte diagonal sobre o azul) */
.doc { position: relative; margin-top: calc(-1 * var(--s6)); padding-block: calc(var(--s6) + var(--s6)) var(--s6); background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%); color: var(--white); clip-path: polygon(0 var(--s6), 100% 0, 100% 100%, 0 100%); }
.doc-grid { display: grid; gap: var(--s4); }
.doc .eyebrow { font-size: var(--t-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; opacity: 0.9; }
.doc h2 { font-size: var(--t-4); }
.doc p { font-size: var(--t-1); line-height: 1.5; max-width: 26em; }
.doc small { font-size: var(--t-sm); opacity: 0.9; }
.doc-cta { display: grid; gap: var(--s4); justify-items: start; }
@media (min-width: 900px) { .doc-grid { grid-template-columns: 1.618fr 1fr; gap: var(--s6); align-items: end; } }

/* Ofertas */
.offers-sec { padding-bottom: var(--s7); }
.offers { display: grid; gap: var(--s5); padding-top: var(--s4); }
.offers-head { display: grid; gap: var(--s3); max-width: 38em; }
.offers-head p { color: var(--muted); font-size: var(--t-1); line-height: 1.5; }
.offer-grid { display: grid; gap: var(--s4); }
@media (min-width: 900px) { .offer-grid { grid-template-columns: 1.618fr 1fr; gap: var(--s5); align-items: start; } }
.offer { background: var(--card); border-radius: var(--r2); overflow: hidden; box-shadow: var(--shadow); display: grid; }
.offer-top { padding: var(--s4) var(--s4) var(--s5); color: var(--white); display: grid; gap: var(--s2); }
.offer-main .offer-top { background: linear-gradient(160deg, var(--red-hi), var(--red-deep)); }
.offer-alt .offer-top { background: linear-gradient(160deg, var(--blue-hi), var(--blue-deep)); }
.label { font-size: var(--t-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; opacity: 0.92; }
.price { font-size: var(--t-4); font-weight: 900; line-height: 1; letter-spacing: -0.03em; }
.price small { display: block; margin-top: var(--s2); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0; opacity: 0.92; }
.offer-body { padding: var(--s4); display: grid; gap: var(--s4); }
@media (min-width: 900px) { .offer-top, .offer-body { padding-inline: var(--s5); } .offer-body { padding-bottom: var(--s5); } }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.ticks li { display: grid; grid-template-columns: 21px 1fr; gap: var(--s2); }
.ticks li::before { content: ""; width: 13px; height: 8px; margin-top: 8px; border-left: 3px solid var(--red-text); border-bottom: 3px solid var(--red-text); transform: rotate(-45deg); }

/* Rodapé */
footer { background: var(--paper-2); color: var(--muted); font-size: var(--t-sm); padding-block: var(--s5); }
.flagline { height: 8px; background: linear-gradient(var(--red) 0 33.4%, var(--white) 33.4% 66.7%, var(--blue) 66.7%); }
.foot { display: grid; gap: var(--s3); }
.foot a { display: inline-block; padding-block: var(--s2); color: var(--ink); font-weight: 700; }
@media (min-width: 900px) { .foot { grid-template-columns: 1fr 1.618fr; gap: var(--s5); } }

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

/* Pagamento: aviso curto embaixo das ofertas */
.pay-note { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0; padding: 0; list-style: none; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.pay-note li { display: flex; align-items: center; gap: var(--s2); }
.pay-note li::before { content: ""; width: 8px; height: 8px; border-radius: var(--pill); background: var(--red); }
.erro { font-weight: 700; color: var(--red-text); }
.erro:empty { display: none; }
.btn:disabled { opacity: 0.7; cursor: progress; }

/* Página da conversa */
.price-card { display: grid; gap: var(--s3); align-content: center; padding: var(--s5); border-radius: var(--r2); color: var(--white); background: linear-gradient(160deg, var(--red-hi), var(--red-deep)); box-shadow: var(--shadow); }
.price-card .price small { opacity: 0.92; }
.price-card ul { margin: var(--s2) 0 0; padding: var(--s3) 0 0; list-style: none; display: grid; gap: var(--s2); border-top: 1px solid rgba(255, 255, 255, 0.3); font-weight: 600; }
.info { display: grid; gap: var(--s5); padding-bottom: var(--s6); }
.info h2 { margin-bottom: var(--s4); }
.rules { background: var(--card); border-radius: var(--r2); padding: var(--s4); box-shadow: var(--shadow); display: grid; gap: var(--s3); align-content: start; }
@media (min-width: 900px) { .info { grid-template-columns: 1.618fr 1fr; gap: var(--s6); } .rules { padding: var(--s5); } }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.chip span { display: grid; place-items: center; min-width: 89px; min-height: 55px; padding: var(--s2) var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r1); background: var(--field); font-weight: 700; line-height: 1.2; text-align: center; }
.chip small { display: block; font-size: var(--t-sm); font-weight: 400; color: var(--muted); }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.chip input:checked + span small { color: var(--on-blue-soft); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.agenda-status { color: var(--muted); font-weight: 600; }
.agenda-status:empty { display: none; }

/* Página de confirmação */
.result { padding-block: var(--s6) var(--s7); }
.result .card { max-width: 610px; margin-inline: auto; display: grid; gap: var(--s4); justify-items: start; box-shadow: var(--shadow); }
.result h1 { font-size: var(--t-3); }
.result p { color: var(--muted); }
.result .quando { color: var(--ink); font-size: var(--t-1); font-weight: 700; }
.result .actions { width: 100%; }
[hidden] { display: none !important; }
.quando:empty { display: none; }
.ribbon-foot { background: var(--paper-2); }

/* Fita tricolor: fita.svg (gerada por tools/fita.mjs) por cima da borda entre duas seções.
   O corte e a imagem usam o mesmo viewBox e o mesmo "cover", então a borda fica sempre embaixo da fita. */
.fita { position: relative; width: 100%; aspect-ratio: 2000 / 560; min-height: 170px; margin-top: -1px; }
.fita > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.fita img { object-fit: cover; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.22)); }
.fita.espelho { transform: scaleX(-1); }
.corte-papel { fill: var(--paper); }
.corte-vermelho { fill: var(--red-deep); }
