/* ==========================================================================
   Otávio Gusto — paleta e tipografia do Brand Book v1.0
   ========================================================================== */
:root {
  --azul: #4B607F;          /* cor principal */
  --azul-claro: #7D90AE;
  --azul-escuro: #38485F;
  --azul-profundo: #2C3A4E;
  --creme: #E8D8C9;         /* fundo principal */
  --creme-card: #FCEEDB;    /* cards (tom claro usado no brand book) */
  --bege: #D8D3CF;          /* fundo de apoio */
  --preto: #1C1C1E;         /* contornos e textos */
  --laranja: #F3701E;       /* destaque, órbita */
  --ocre: #D89B38;          /* destaque, faísca */

  --radius: 28px;
  --gap: 16px;
  --font-title: "Archivo", "Arial Black", sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .11 0 0 0 0 .12 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--creme) var(--paper);
  color: var(--preto);
  font-family: var(--font-title);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- Moldura escura (estilo da referência) ---------- */
.frame {
  max-width: 1240px;
  margin: 40px auto;
  padding: 16px;
  background: var(--preto) var(--paper);
  border-radius: 36px;
}
main { display: flex; flex-direction: column; gap: var(--gap); }

/* ---------- Tipografia ---------- */
.display, .title, .stat__num, h3, .btn, .marquee span, .nav__links a, .chip, .product__price {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-wrap: balance;   /* evita palavra sozinha na última linha */
  hyphens: none;
}
p { text-wrap: pretty; }
.display { font-size: clamp(2.3rem, 5.4vw, 4.4rem); line-height: .95; }
.title { font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1; }
.display--light, .title--light { color: var(--creme-card); }
h3 { font-size: 1.25rem; line-height: 1.05; }
.lead { font-size: 1.08rem; max-width: 46ch; color: #3a3a3e; }
.lead--light { color: var(--creme); }
.mono, .label { font-family: var(--font-mono); }

.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--azul);
}
.label--light { color: var(--azul-claro); }
.dot {
  width: 10px; height: 10px; flex: none;
  background: var(--ocre);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 44px);
  overflow: hidden;
  container-type: inline-size;
}
.card--cream { background: var(--creme-card) var(--paper); }
.card--blue  { background: var(--azul) var(--paper); color: var(--creme-card); }
.card--dark  { background: #252528 var(--paper); color: var(--creme-card); border: 1.5px solid #34343a; }
.card--blue p, .card--dark p { color: var(--creme); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none;
  border: 2px solid var(--preto);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn--dark { background: var(--preto); color: var(--creme-card); }
.btn--outline { background: transparent; color: var(--preto); }
.btn--cream { background: var(--creme-card); color: var(--preto); }
.btn--ocre { background: var(--ocre); color: var(--preto); }
.btn--outline-light { background: transparent; color: var(--creme-card); border-color: var(--creme-card); }
.btn--ocre:hover, .btn--outline-light:hover { box-shadow: 4px 4px 0 var(--preto); }
.btn:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--ocre); }
.btn:active { transform: none; box-shadow: none; }
.btn:focus-visible, .chip:focus-visible, .nav__links a:focus-visible { outline: 3px solid var(--laranja); outline-offset: 3px; }

/* ---------- Navegação ---------- */
.nav {
  position: sticky; top: 14px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: fit-content; max-width: 100%;
  margin: 4px auto 20px;
  padding: 4px 8px 4px 12px;
  background: var(--creme-card);
  border-radius: 999px;
  box-shadow: 0 0 0 6px var(--preto);
}
/* Brand book: logotipo horizontal com no mínimo 160px de largura */
.nav__logo img { width: 160px; height: auto; }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 9px 15px; border-radius: 999px;
  font-size: .74rem; text-decoration: none; color: #55555b;
  transition: background .2s, color .2s;
}
.nav__links a:hover { color: var(--preto); background: var(--creme); }
.nav__links a.is-active { background: var(--preto); color: var(--creme-card); }
.nav__toggle { display: none; }

/* ---------- Grids bentô ---------- */
.bento { display: grid; gap: var(--gap); }
.bento > * { min-width: 0; }
.bento--hero { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.bento--stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento--about { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.bento--services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento--portfolio { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; }
.bento--products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bento--contact { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; gap: 22px; justify-content: center; min-height: 520px; }
.hero .display { max-width: 12ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.deco { position: absolute; pointer-events: none; }
/* sombra separa o planeta azul do fundo azul do card */
.deco--planet {
  width: 130px; right: 22px; bottom: 24px; transform: rotate(-8deg);
  filter: drop-shadow(5px 7px 0 rgba(28, 28, 30, .45)) drop-shadow(0 10px 18px rgba(28, 28, 30, .35));
}

/* Vídeo: o fundo do card é a mesma cor creme do vídeo, então "contain" encaixa sem cortes */
.hero-video { background: #FCEED9; padding: 0; min-height: 520px; }
.hero-video__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-video__url { position: absolute; bottom: 22px; left: 28px; z-index: 1; font-size: .82rem; color: var(--azul-escuro); }
.caret { animation: blink 1s steps(1) infinite; }

/* ---------- Destaques ---------- */
.stat { display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
/* tamanho acompanha a largura do card, para "NEGÓCIO" nunca quebrar */
.stat__num { font-size: clamp(1.6rem, 15cqi, 3rem); line-height: 1; margin-top: auto; }
.card--dark .stat__num { color: var(--creme-card); }
.stat__txt { font-size: .9rem; color: #55555b; max-width: 32ch; display: flex; align-items: center; gap: 8px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--laranja); flex: none; position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--laranja); animation: ping 1.8s ease-out infinite; }

/* ---------- Faixa ---------- */
.marquee { overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 28s linear infinite; }
.marquee span { color: var(--creme-card); font-size: 1.05rem; white-space: nowrap; }
.marquee i {
  width: 16px; height: 16px; background: var(--ocre); flex: none;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.marquee i:nth-of-type(even) { background: var(--azul-claro); }

/* ---------- Placeholders (campos vazios) ---------- */
.placeholder {
  position: absolute; inset: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 2px dashed rgba(75, 96, 127, .4);
  border-radius: calc(var(--radius) - 10px);
  background: #F2E3CF repeating-linear-gradient(-45deg, transparent 0 12px, rgba(75, 96, 127, .045) 12px 24px);
  color: var(--azul);
  text-align: center;
}
.placeholder img { width: 64px; opacity: .45; filter: grayscale(.4); }
.placeholder .mono { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.card--blue .placeholder { border-color: rgba(252, 238, 219, .4); color: var(--creme); background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(252, 238, 219, .05) 12px 24px); }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sobre ---------- */
.card--photo { background: var(--bege) var(--paper); min-height: 460px; padding: 0; }
.card--photo .cover { object-position: 50% 30%; }
.about { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.about > p:not(.label) { max-width: 58ch; color: #3a3a3e; }
.about .btn { align-self: flex-start; margin-top: 6px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0 0; }
.tags li {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--azul); color: var(--creme-card);
  display: inline-flex; align-items: center; gap: 7px;
}
.tags li::before { content: ""; width: 8px; height: 8px; background: var(--ocre); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.deco--spark { width: 74px; right: 34px; bottom: 30px; opacity: .85; animation: twinkle 4s ease-in-out infinite; }

/* ---------- Cabeçalhos de seção ---------- */
.section-head { padding: 52px clamp(8px, 2vw, 28px) 10px; display: flex; flex-direction: column; gap: 14px; }
.section-head .title { max-width: 22ch; }
.section-head--split { flex-direction: row; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.section-head--split > div:first-child { display: flex; flex-direction: column; gap: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .72rem; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--creme); border: 1.5px solid #4a4a52;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--creme); }
.chip.is-active { background: var(--creme-card); color: var(--preto); border-color: var(--creme-card); }

/* ---------- Serviços ---------- */
.service { display: flex; flex-direction: column; gap: 12px; transition: transform .25s ease; }
.service img { height: 130px; width: auto; object-fit: contain; align-self: flex-start; margin-bottom: 10px; }
.service p:not(.label) { color: #4a4a50; font-size: .95rem; }
.card--blue.service p:not(.label) { color: var(--creme); }
.service--wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 28px; }
.service--wide .service__body { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.service--wide h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.service--wide img { height: 200px; margin: 0; flex: none; max-width: 48%; }
.service:hover { transform: translateY(-4px); }

/* ---------- Portfólio ---------- */
.project { display: flex; flex-direction: column; padding: 14px; text-decoration: none; min-height: 360px; transition: transform .25s ease; }
.project__media { position: relative; flex: 1; min-height: 190px; border-radius: calc(var(--radius) - 10px); overflow: hidden; background: var(--bege); }
.project__media .placeholder { inset: 0; }
.project__info { padding: 18px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.project__info p:not(.label) { font-size: .9rem; color: #55555b; }
.project__go { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; color: var(--azul); text-decoration: none; transition: gap .2s ease; }
.project__go:hover { gap: 12px; text-decoration: underline; }
.project__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.project--featured { grid-column: span 2; grid-row: span 2; }
.project--featured .project__info h3 { font-size: 1.7rem; }
.project.is-empty h3 { color: #8a8a90; }

/* ---------- Infoprodutos ---------- */
.product { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 26px; }
.product > :not(.product__media) { margin-inline: 14px; }
.product__media { position: relative; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 10px); overflow: hidden; background: var(--bege); margin-bottom: 8px; }
.card--blue .product__media { background: var(--azul-escuro); }
.product__media .placeholder { inset: 0; }
.product p:not(.label) { font-size: .92rem; color: #55555b; }
.card--blue.product p:not(.label) { color: var(--creme); }
.product__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.product__price { font-size: 1.5rem; }
.product .btn { padding: 12px 20px; font-size: .8rem; }
.card--blue .btn--cream { border-color: var(--creme-card); }

/* ---------- Contato ---------- */
.bento--contact { margin-top: 52px; }
.cta { display: flex; flex-direction: column; gap: 18px; min-height: 520px; }
.cta .display { font-size: clamp(2.1rem, 4.6vw, 3.7rem); max-width: 13ch; position: relative; }
/* Linhas de velocidade (elemento de apoio) em CSS, com cores que contrastam com o azul */
.speed {
  position: absolute; top: 34px; right: 0; z-index: 0;
  display: grid; gap: 7px;
  width: 58%;
  pointer-events: none;
}
.cta > :not(.speed) { position: relative; z-index: 1; }
.speed span {
  display: block; height: 13px; justify-self: end;
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 54%);
}
.speed span:nth-child(1) { background: var(--ocre); width: 100%; height: 16px; }
.speed span:nth-child(2) { background: var(--creme-card); width: 86%; }
.speed span:nth-child(3) { background: var(--preto); width: 94%; height: 15px; margin-bottom: 9px; }
.speed span:nth-child(4) { background: var(--laranja); width: 92%; height: 16px; }
.speed span:nth-child(5) { background: var(--creme-card); width: 78%; }
.speed span:nth-child(6) { background: var(--preto); width: 100%; height: 15px; }
.contact-list { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 10px; }
.contact-list a {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 20px;
  background: rgba(28, 28, 30, .22); text-decoration: none;
  font-weight: 600; font-size: 1.02rem; word-break: break-word;
  transition: background .2s, transform .2s;
}
.contact-list a:hover { background: var(--preto); transform: translateX(4px); }
.contact-list svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--ocre); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list span { display: flex; flex-direction: column; line-height: 1.25; }
.contact-list small { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--azul-claro); font-weight: 400; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--azul-escuro); }
.form input, .form select, .form textarea {
  font: 500 1rem var(--font-title); color: var(--preto);
  padding: 13px 16px; border-radius: 16px;
  background: #fff8ee; border: 2px solid var(--preto);
  resize: vertical;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--azul); }
.form .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Rodapé ---------- */
.footer { margin-top: var(--gap); display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 26px 32px; }
.footer__logo { width: 170px; height: auto; }
.footer__copy { font-size: .78rem; color: var(--azul-claro); }
.footer__social { display: flex; gap: 10px; }
.footer__social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #34343a; transition: background .2s; }
.footer__social a:hover { background: var(--azul); }
.footer__social svg { width: 20px; height: 20px; fill: none; stroke: var(--creme-card); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Animações ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@keyframes twinkle { 50% { transform: scale(.7) rotate(20deg); opacity: .6; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .bento--hero, .bento--about, .bento--contact { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-video { min-height: 0; aspect-ratio: 4 / 5; }
  .card--photo { min-height: 380px; }
  .bento--services, .bento--portfolio, .bento--products { grid-template-columns: repeat(2, 1fr); }
  .service--wide { grid-column: span 2; }
  .cta { min-height: 0; }
}

/* hero em duas colunas: botões deixam espaço para o planeta */
@media (min-width: 1021px) {
  .hero .actions { padding-right: 96px; }
}

@media (max-width: 860px) {
  .nav { width: 100%; padding: 8px 8px 8px 16px; border-radius: 28px; flex-wrap: wrap; }
  .nav__toggle {
    display: grid; gap: 6px; place-content: center;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--preto); border: 0; cursor: pointer;
  }
  .nav__toggle span { width: 20px; height: 2px; background: var(--creme-card); transition: transform .25s; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__links { display: none; width: 100%; flex-direction: column; padding: 8px 0 6px; }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { font-size: .9rem; padding: 13px 16px; }
}

@media (max-width: 680px) {
  .frame { margin: 0; border-radius: 0; padding: 12px; }
  :root { --radius: 22px; --gap: 12px; }
  .bento--stats, .bento--services, .bento--portfolio, .bento--products { grid-template-columns: 1fr; }
  .service--wide, .project--featured { grid-column: auto; grid-row: auto; }
  .service--wide { flex-direction: column-reverse; align-items: flex-start; }
  .service--wide img { max-width: 100%; height: 160px; }
  .stat { min-height: 0; }
  .display { font-size: 2.05rem; }
  .title { font-size: 1.6rem; }
  .nav__logo img { width: 160px; }
  .stat__num { margin-top: 10px; }
  .deco--planet { width: 78px; right: 16px; bottom: 18px; }
  .speed { width: 80%; top: 20px; }
  .section-head { padding-top: 40px; }
  .footer { flex-direction: column; text-align: center; }
  .btn { padding: 14px 22px; }
}
