/*
  Rirrofer conectada: azul-anil e vermelho-tijolo da fachada e das artes da
  loja, cinza de cimento no fundo e a fiada de tijolos como marca. Uma só
  família (Archivo), larga e pesada nos títulos como letreiro de loja.
  O momento marcante é o 3D do topo; o resto fica quieto.
*/
:root {
  --anil: #1b2a9c;
  --noite: #0d1450;
  --tijolo: #e3104f;
  --cimento: #eceef3;
  --concreto: #646b88;
  --tinta: #141a3a;
  --branco: #ffffff;
  --linha: #d6d9e4;
  --wide: 'Archivo', system-ui, sans-serif;
  --max: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--branco);
  color: var(--tinta);
  font-family: var(--wide);
  font-variation-settings: 'wdth' 100;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tijolo); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-family: var(--wide);
  font-variation-settings: 'wdth' 118;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-size: clamp(20px, 2vw, 24px); font-variation-settings: 'wdth' 110; font-weight: 800; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }

/* Topo */
.preview-note {
  background: var(--noite);
  color: #c9cff5;
  font-size: 13px;
  padding: 8px var(--gutter);
  text-align: center;
}
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linha);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--anil); }
.brand svg { width: 32px; height: 32px; fill: var(--tijolo); }
.brand span { font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 22px; letter-spacing: 0.02em; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--concreto); padding: 6px 10px; border-radius: 8px; }
.site-header nav a:hover, .site-header nav a.active { color: var(--anil); background: var(--cimento); }
@media (max-width: 760px) { .site-header nav { display: none; } }

/* Botões */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 16px;
  padding: 13px 22px; border-radius: 10px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
}
.button-brick { background: var(--tijolo); color: var(--branco); }
.button-brick:hover { background: #c20b42; }
.button-royal { background: var(--anil); color: var(--branco); }
.button-royal:hover { background: #142080; }
.button-ghost { background: transparent; color: var(--branco); border-color: rgba(255, 255, 255, 0.45); }
.button-ghost:hover { border-color: var(--branco); }

/* Passeio pela loja em 3D: o palco fica parado e os textos passam por cima */
.story { position: relative; background: var(--noite); }
.story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.story-stage canvas, .story-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-poster { object-fit: cover; transition: opacity 0.6s ease; }
.has-3d .story-poster { opacity: 0; }
.story-stage canvas { opacity: 0; transition: opacity 0.6s ease; }
.has-3d .story-stage canvas { opacity: 1; }
.story-beats { position: relative; margin-top: -100vh; margin-top: -100svh; z-index: 2; }
.beat {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--gutter);
  max-width: var(--max); margin: 0 auto;
  pointer-events: none;
}
.beat > * { pointer-events: auto; }
.beat h1, .beat h2, .beat p, .beat .hero-actions {
  max-width: 520px;
  background: rgba(13, 20, 80, 0.86);
  color: var(--branco);
  backdrop-filter: blur(6px);
}
.beat h2 { padding: 22px 26px 6px; border-radius: 16px 16px 0 0; font-size: clamp(28px, 3.4vw, 44px); }
.beat p { padding: 10px 26px 24px; border-radius: 0 0 16px 16px; color: #d5daf7; font-size: 18px; }
.beat .hero-actions { margin: 0; padding: 0 26px 24px; border-radius: 0 0 16px 16px; display: flex; flex-wrap: wrap; gap: 12px; }
.beat-close p { border-radius: 0; }
.beat { opacity: 0.25; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.beat.is-active { opacity: 1; transform: none; }
.beat-open {
  opacity: 1; transform: none; justify-content: flex-start;
  max-width: none; margin: 0;
  padding: 14vh max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) 96px;
  background: linear-gradient(90deg, rgba(207, 220, 242, 0.96) 0%, rgba(207, 220, 242, 0.85) 34%, rgba(207, 220, 242, 0) 62%);
}
.beat-open h1, .beat-open p, .beat-open .beat-place { background: none; backdrop-filter: none; padding: 0; }
.beat-open .beat-place { color: var(--anil); font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.beat-open h1 {
  color: var(--anil);
  font-size: clamp(46px, 7vw, 96px);
  font-variation-settings: 'wdth' 125;
  font-weight: 900;
  line-height: 0.95;
  max-width: 11ch;
}
.beat-open p:last-child { color: var(--tinta); margin-top: 20px; font-size: clamp(17px, 1.6vw, 21px); max-width: 34ch; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .beat, .story-poster, .story-stage canvas { transition: none; } }
@media (max-width: 760px) {
  .beat { justify-content: flex-end; padding-bottom: 40px; }
  .in-story .agent-float { opacity: 0; pointer-events: none; }
  .agent-float { transition: opacity 0.3s ease; }
  .beat-open { justify-content: flex-start; padding-top: 10vh; background: linear-gradient(180deg, rgba(207, 220, 242, 0.97) 0%, rgba(207, 220, 242, 0.85) 46%, rgba(207, 220, 242, 0) 70%); }
}

/* Fiada de tijolos: a marca das artes da loja */
.brick-strip {
  height: 26px;
  background-color: #f6d3dd;
  background-image:
    linear-gradient(90deg, transparent 3px, var(--tijolo) 3px),
    linear-gradient(90deg, transparent 3px, var(--tijolo) 3px);
  background-size: 52px 11px, 52px 11px;
  background-position: 0 2px, 26px 15px;
  background-repeat: repeat-x, repeat-x;
}

/* Seções */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 112px) var(--gutter); }
.section-night, .section-concrete {
  max-width: none;
  padding-left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  padding-right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}
.section-night { background: var(--noite); color: var(--branco); }
.section-night p { color: #c9cff5; }
.section-concrete { background: var(--cimento); }
.section-head { display: grid; gap: 18px; margin-bottom: 44px; }
.section-head h2 { max-width: 20ch; }
.section-head p { max-width: 60ch; color: var(--concreto); font-size: 18px; }

/* Partes: lista de verdade, não cartões iguais */
.parts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--tinta); }
.part { display: grid; grid-template-columns: 13ch 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--linha); }
.part:nth-child(odd):not(.part-core) { padding-right: 28px; }
.part:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--linha); }
.part dt { font-weight: 800; font-variation-settings: 'wdth' 110; color: var(--anil); }
.part dd { margin: 0; color: var(--concreto); }
.part-core { grid-column: 1 / -1; padding: 26px 0; grid-template-columns: 13ch 1fr; }
.part-core dt { color: var(--tijolo); font-size: 20px; }
.part-core dd { color: var(--tinta); font-size: 19px; max-width: 56ch; }
.part-core ~ .part:nth-child(even) { padding-left: 0; border-left: 0; padding-right: 28px; }
.part-core ~ .part:nth-child(odd) { padding-left: 28px; padding-right: 0; border-left: 1px solid var(--linha); }
@media (max-width: 760px) {
  .parts { grid-template-columns: 1fr; }
  .part, .part-core { grid-template-columns: 1fr; gap: 4px; }
  .part-core ~ .part:nth-child(odd), .part-core ~ .part:nth-child(even) { padding-left: 0; padding-right: 0; border-left: 0; }
}

/* Core */
.core-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.core-grid h2 { max-width: 14ch; }
.core-grid > div p { margin-top: 20px; font-size: 18px; max-width: 44ch; }
.core-list { list-style: none; margin: 0; padding: 0; }
.core-list li { display: grid; gap: 2px; padding: 16px 0 16px 20px; border-left: 4px solid var(--tijolo); margin-bottom: 14px; background: rgba(255, 255, 255, 0.04); border-radius: 0 10px 10px 0; }
.core-list b { font-size: 18px; }
.core-list span { color: #c9cff5; }
@media (max-width: 860px) { .core-grid { grid-template-columns: 1fr; } }

/* Painel */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split h2 { max-width: 16ch; }
.split > div p { margin-top: 18px; color: var(--concreto); font-size: 18px; max-width: 46ch; }
.panel-mock { margin: 0; border-radius: 16px; overflow: hidden; background: var(--noite); box-shadow: 0 30px 60px -30px rgba(13, 20, 80, 0.55); }
.panel-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #0a103f; color: #aab2e8; font-size: 13px; font-weight: 600; }
.panel-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3590; }
.panel-bar span { margin-left: 8px; }
.panel-body { padding: 18px; display: grid; gap: 10px; }
.panel-notice { background: var(--branco); color: var(--tinta); border-left: 4px solid var(--tijolo); padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.panel-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); color: #d5daf7; }
.panel-row b { font-size: 24px; font-variation-settings: 'wdth' 118; color: var(--branco); }
.panel-mock figcaption { padding: 0 18px 14px; font-size: 12px; color: #8f98d6; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Sr. Riro */
.agent { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.agent-photo { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--anil); box-shadow: 0 0 0 10px var(--cimento), 0 0 0 12px var(--tijolo); }
.agent h2 { max-width: 15ch; }
.agent p { margin-top: 18px; color: var(--concreto); font-size: 18px; max-width: 48ch; }
.agent-rules { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.agent-rules li { padding: 6px 12px; border-radius: 999px; background: var(--cimento); color: var(--anil); font-weight: 600; font-size: 15px; }
.channels { margin-top: clamp(48px, 7vw, 80px); }
.channels h3 { margin-bottom: 16px; }
.channels dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--tinta); }
.channels dl div { padding: 16px 18px 0 0; }
.channels dt { font-weight: 800; color: var(--anil); }
.channels dd { margin: 4px 0 0; color: var(--concreto); font-size: 15px; }
@media (max-width: 860px) { .agent { grid-template-columns: 1fr; } .agent-photo { max-width: 240px; } .channels dl { grid-template-columns: 1fr 1fr; row-gap: 12px; } }

/* Loja */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.products figure { margin: 0; background: var(--branco); border-radius: 14px; overflow: hidden; }
.products img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #e6e3df; }
.products figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px; }
.products figcaption b { font-variation-settings: 'wdth' 110; }
.products figcaption span { font-size: 14px; color: var(--concreto); }
.products-note { margin-top: 12px; font-size: 14px; color: var(--concreto); }
.pilot { margin-top: 48px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px 48px; }
.pilot h3 { max-width: 18ch; }
.pilot > p { color: var(--concreto); grid-column: 1; }
.pilot ul { list-style: none; margin: 0; padding: 0; grid-column: 2; grid-row: 1 / span 2; }
.pilot li { display: grid; grid-template-columns: 12ch 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.pilot li b { color: var(--anil); }
.pilot li span { color: var(--concreto); }
@media (max-width: 860px) {
  .products { grid-template-columns: 1fr 1fr; }
  .pilot { grid-template-columns: 1fr; }
  .pilot ul { grid-column: 1; grid-row: auto; }
  .pilot li { grid-template-columns: 1fr; gap: 2px; }
}

/* Passos: aqui a ordem importa, então são numerados */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: passo; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.steps-wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.steps li { counter-increment: passo; position: relative; padding: 52px 18px 0 0; display: grid; gap: 4px; }
.steps li::before {
  content: counter(passo);
  position: absolute; top: 0; left: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--anil); color: var(--branco);
  font-weight: 800; font-size: 16px;
}
.steps li::after { content: ''; position: absolute; top: 17px; left: 44px; right: 8px; height: 2px; background: var(--linha); }
.steps li:last-child::after { display: none; }
.steps b { font-variation-settings: 'wdth' 110; font-size: 18px; }
.steps span { color: var(--concreto); font-size: 15px; }
@media (max-width: 860px) {
  .steps, .steps-wide { grid-template-columns: 1fr; }
  .steps li { padding: 0 0 22px 54px; }
  .steps li::after { top: 40px; bottom: 4px; left: 17px; right: auto; width: 2px; height: auto; }
}
.zones { margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.zones div { padding: 18px 20px; border-radius: 12px; background: var(--cimento); }
.zones div:first-child { background: var(--anil); color: var(--branco); }
.zones div:first-child dd { color: #c9cff5; }
.zones dt { font-weight: 800; font-size: 18px; }
.zones dd { margin: 4px 0 0; color: var(--concreto); }
@media (max-width: 760px) { .zones { grid-template-columns: 1fr; } }

/* Campanhas */
.campaign { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.campaign h2 { max-width: 14ch; }
.campaign > div > p { margin-top: 18px; font-size: 18px; max-width: 44ch; }
.campaign-pilot { padding: 26px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.campaign-pilot h3 { color: var(--branco); }
.campaign-pilot p { margin-top: 12px; }
.campaign-measure { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 15px; }
@media (max-width: 860px) { .campaign { grid-template-columns: 1fr; } }

/* Confiança */
.trust { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.trust div { border-left: 4px solid var(--tijolo); padding-left: 18px; }
.trust dt { font-weight: 800; font-size: 18px; color: var(--anil); }
.trust dd { margin: 4px 0 0; color: var(--concreto); }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }

/* Fechamento */
.closing { background: var(--anil); color: var(--branco); padding: clamp(72px, 10vw, 128px) var(--gutter); }
.closing-inner { max-width: var(--max); margin: 0 auto; }
.closing h2 { font-size: clamp(34px, 5vw, 64px); font-variation-settings: 'wdth' 125; font-weight: 900; max-width: 18ch; }
.closing p { margin-top: 20px; color: #d5daf7; font-size: 19px; max-width: 52ch; }
.closing .button { margin-top: 30px; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px var(--gutter);
  background: var(--noite); color: #aab2e8; font-size: 14px;
}

/* Botão e conversa do Sr. Riro */
.agent-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; border-radius: 999px; border: 0;
  background: var(--branco); color: var(--anil);
  font: inherit; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 30px rgba(13, 20, 80, 0.3);
}
.agent-float img { width: 44px; height: 44px; border-radius: 50%; background: var(--anil); }
.chat-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  width: min(380px, calc(100vw - 36px)); max-height: min(620px, calc(100vh - 36px));
  display: flex; flex-direction: column;
  background: var(--branco); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(13, 20, 80, 0.4);
  transform: translateY(16px); opacity: 0; visibility: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
}
.chat-panel.open { transform: none; opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .chat-panel { transition: none; } }
.chat-panel header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--anil); color: var(--branco); }
.chat-panel header img { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.chat-panel header h2 { font-size: 18px; }
.chat-panel header p { font-size: 13px; color: #c9cff5; }
.chat-panel header button { margin-left: auto; background: none; border: 0; color: var(--branco); font-size: 26px; cursor: pointer; line-height: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--cimento); min-height: 220px; }
.agent-message, .user-message { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 15px; }
.agent-message { background: var(--branco); align-self: flex-start; border-bottom-left-radius: 4px; }
.user-message { background: var(--anil); color: var(--branco); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-suggestions { display: flex; gap: 8px; padding: 10px 16px 0; flex-wrap: wrap; }
.chat-suggestions button { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--linha); background: var(--branco); color: var(--anil); cursor: pointer; }
#chat-form { display: flex; gap: 8px; padding: 12px 16px; }
#chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--linha); }
#chat-form button { font: inherit; font-weight: 700; padding: 10px 14px; border-radius: 10px; border: 0; background: var(--tijolo); color: var(--branco); cursor: pointer; }
.chat-panel > small { padding: 0 16px 12px; font-size: 12px; color: var(--concreto); }
.chat-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(13, 20, 80, 0.35); border: 0; }
