/* ==========================================================
   Savoia Tech — v5 (code storytelling)
   ========================================================== */
:root {
  --blue: #0b6fe6;
  --blue-600: #0959bd;
  --blue-300: #6fb2ff;
  --navy: #0a1633;
  --navy-800: #111f44;
  --navy-950: #060e22;
  --ink: #0b1530;
  --text: #3f4859;
  --muted: #687185;
  --line: #e2e6ed;
  --paper: #f7f8fa;
  --container: 1160px;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* sintaxe — fundo claro */
  --c-key: #6d4bd8;
  --c-fn: #0b6fe6;
  --c-str: #13875b;
  --c-bool: #c2410c;
  --c-com: #8a93a6;
  --c-op: #5b6475;
  --c-var: #0b1530;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(28px, 3.2vw, 38px); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
pre { margin: 0; }
::selection { background: var(--blue); color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mono, .mono-sm { font-family: var(--mono); }
.mono-sm { font-size: 13px; color: var(--muted); }

/* sintaxe */
.c-key { color: var(--c-key); }
.c-fn { color: var(--c-fn); }
.c-str { color: var(--c-str); }
.c-bool { color: var(--c-bool); }
.c-com { color: var(--c-com); }
.c-op { color: var(--c-op); }
.c-var { color: var(--c-var); }

/* rótulo de seção:  01 // o que fazemos */
.tag { font-family: var(--mono); font-size: 13px; color: var(--blue); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.tag .ln { color: var(--c-com); border-right: 1px solid var(--line); padding-right: 10px; }
.tag--light { color: var(--blue-300); }
.tag--light .ln { border-color: rgba(255,255,255,.15); }

.head { margin-bottom: 44px; max-width: 680px; }
.head__sub { margin-top: 14px; font-size: 16px; color: var(--muted); }
.head--split { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: end; }
.head--split > p { font-size: 16.5px; max-width: 480px; }

/* cursor piscando */
.cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--blue-300); vertical-align: -2px; margin-left: 3px; animation: blink 1.05s steps(1) infinite; }
.cursor--light { background: #fff; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans); padding: 12px 18px; border-radius: 6px;
  border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s; white-space: nowrap;
}
.btn--lg { padding: 15px 22px; font-size: 15.5px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-600); }
.btn--ghost { color: var(--ink); border-color: #c9d1dd; font-family: var(--mono); font-weight: 500; font-size: 14.5px; }
.btn--ghost .mono { color: var(--c-key); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: var(--blue); }
.btn--light:hover { background: var(--navy); color: #fff; }

/* ---------- Header (transparente → vidro fosco) ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.header__inner { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo { position: relative; display: block; }
.header__logo img { height: 34px; width: auto; transition: opacity .3s ease; }
.header__logo .logo--dark { position: absolute; top: 0; left: 0; opacity: 0; }
.nav { display: flex; gap: 26px; margin-left: auto; margin-right: 14px; }
.nav a { font-family: var(--mono); font-size: 14px; color: #fff; padding: 6px 0; position: relative; transition: color .3s ease; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.nav a i { font-style: normal; color: rgba(255,255,255,.55); transition: color .3s ease; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue-300); transform: scaleX(0); transition: transform .2s; }
.nav a:hover, .nav a.active { color: var(--blue-300); }
.nav a.active::after, .nav a:not(.btn):hover::after { transform: scaleX(1); }
.menu-toggle span { background: #fff; }

/* estado ao rolar */
.header.is-scrolled {
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
          backdrop-filter: blur(14px) saturate(170%);
  border-bottom-color: rgba(11,21,48,.08);
  box-shadow: 0 8px 24px -18px rgba(10,22,51,.35);
}
.header.is-scrolled .logo--light { opacity: 0; }
.header.is-scrolled .logo--dark { opacity: 1; }
.header.is-scrolled .nav a { color: var(--ink); text-shadow: none; }
.header.is-scrolled .nav a i { color: var(--c-com); }
.header.is-scrolled .nav a:hover, .header.is-scrolled .nav a.active { color: var(--blue); }
.header.is-scrolled .nav a:not(.btn)::after { background: var(--blue); }
.header.is-scrolled .menu-toggle span { background: var(--ink); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header.is-scrolled { background: rgba(255,255,255,.96); }
}
.nav__cta-mobile { display: none; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; border-radius: 2px; transition: .25s; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (banner) ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy-950); color: #d9e1ef; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__bg::before { /* escurece a foto, mais forte do lado do texto */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,14,34,.96) 0%, rgba(6,14,34,.88) 45%, rgba(8,22,58,.72) 100%);
}
.hero__bg::after { /* grade técnica por cima da foto */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 174px; padding-bottom: 104px; }
.hero .tag { color: var(--blue-300); }
.hero .tag .c-com { color: #6f7c98; }
.hero h1 { color: #fff; font-size: clamp(34px, 4.2vw, 52px); letter-spacing: -.03em; margin-bottom: 24px; }
.hero h1 span { color: var(--blue-300); }
.hero__lead { font-size: 18px; max-width: 540px; margin-bottom: 34px; color: #d3dcec; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn--ghost .mono { color: #b69cff; }
.hero .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn--ghost:hover .mono { color: var(--c-key); }
.hero .term { border-color: rgba(255,255,255,.12); background: rgba(10,22,51,.92); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }

/* terminal */
.term { background: var(--navy); border-radius: 10px; overflow: hidden; border: 1px solid var(--navy-800); font-family: var(--mono); font-size: 13.5px; color: #cdd6e7; box-shadow: 0 24px 48px -32px rgba(10,22,51,.55); }
.term__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--navy-800); border-bottom: 1px solid rgba(255,255,255,.07); }
.term__dots { display: flex; gap: 6px; }
.term__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.16); }
.term__title { font-size: 12.5px; color: #8ea0c2; }
.term__body { padding: 18px 18px 8px; min-height: 360px; }
.term__cmd { color: #fff; margin-bottom: 12px; }
.p { color: #6fe0a8; }
.term__out li { display: flex; gap: 12px; padding: 5px 0; line-height: 1.5; transition: opacity .35s ease, transform .35s ease; }
.term__out li.hidden { opacity: 0; transform: translateY(4px); }
.term__out time { color: var(--blue-300); flex-shrink: 0; }
.term__out .ok { color: #6fe0a8; font-weight: 700; flex-shrink: 0; }
.term__out .muted { color: #7d8aa6; }
.term__out .done { display: block; margin-top: 10px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.12); color: #fff; }
.term__out .done .ok { font-weight: 500; }
.term .c-com { color: #6f7c98; }
.term__note { padding: 8px 18px 14px; font-size: 11.5px; color: #6f7c98; }

/* ---------- Setores ---------- */
.sectors { background: #fff; border-bottom: 1px solid var(--line); }
.code-line { font-family: var(--mono); font-size: 15px; padding: 24px 0; color: var(--c-op); line-height: 1.8; }
.code-line .c-str { font-weight: 500; }

/* ---------- Situações (log) ---------- */
.issues { padding: 96px 0; }
.issues__log { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.issues__log li {
  display: grid; grid-template-columns: 70px 1fr 1fr; gap: 20px; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--line); transition: opacity .5s ease, transform .5s ease;
}
.issues__log li:last-child { border-bottom: 0; }
.issues__log li:nth-child(even) { background: #fbfcfd; }
.issue { color: var(--ink); font-weight: 500; font-size: 16px; line-height: 1.45; }
.fix { font-family: var(--mono); font-size: 13.5px; color: var(--c-str); display: flex; gap: 10px; align-items: baseline; line-height: 1.5; }
.lvl { font-family: var(--mono); font-size: 11.5px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; justify-self: start; letter-spacing: .04em; }
.lvl--warn { color: #9a5b00; background: #fff4e0; }
.lvl--err { color: #b42318; background: #fdecea; }
.lvl--info { color: var(--blue-600); background: #eaf2fd; }
.lvl--fix { color: var(--c-str); background: #e5f6ee; flex-shrink: 0; }
.pre { opacity: 0; transform: translateY(8px); }

/* ---------- Serviços ---------- */
.services { padding: 96px 0; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.services__list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.service { padding: 30px 36px 30px 0; border-bottom: 1px solid var(--line); }
.service:nth-child(odd) { border-right: 1px solid var(--line); }
.service:nth-child(even) { padding-left: 36px; padding-right: 0; }
.service__fn { font-family: var(--mono); font-size: 13px; margin-bottom: 10px; }
.service h3 { font-size: 19px; margin-bottom: 8px; }
.service > p:not(.service__fn) { font-size: 15.5px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-family: var(--mono); font-size: 12px; color: var(--navy-800); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; }

/* ---------- Processo (fundo escuro) ---------- */
.process {
  padding: 104px 0; background: var(--navy); color: #c3cde0;
  --c-key: #b69cff; --c-fn: #6fb2ff; --c-str: #6fe0a8; --c-bool: #ffab70; --c-com: #6f7c98; --c-op: #9aa6bf;
}
.process h2, .process h3 { color: #fff; }
.process__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.win-title { font-family: var(--mono); font-size: 13.5px; color: #8ea0c2; margin-bottom: 22px; }
.gitlog ol { position: relative; }
.gitlog ol::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: rgba(111,178,255,.35); }
.gitlog li { position: relative; padding: 0 0 30px 34px; transition: opacity .5s ease, transform .5s ease; }
.gitlog li:last-child { padding-bottom: 0; }
.gitlog li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--navy); border: 2px solid var(--blue-300); }
.gitlog li.head-ref::before { background: #6fe0a8; border-color: #6fe0a8; }
.gitlog__hash { font-family: var(--mono); font-size: 12.5px; color: #ffab70; display: block; margin-bottom: 4px; }
.gitlog .head-ref .gitlog__hash { color: #6fe0a8; }
.gitlog h3 { font-size: 18px; margin-bottom: 4px; }
.gitlog p { font-size: 15px; }

.editor { background: var(--navy-950); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; overflow: hidden; }
.editor__tab { background: var(--navy-800); border-bottom: 1px solid rgba(255,255,255,.07); display: flex; }
.editor__file { font-family: var(--mono); font-size: 12.5px; color: #fff; padding: 11px 18px; background: var(--navy-950); border-top: 2px solid var(--blue-300); }
.editor__code { font-family: var(--mono); font-size: 13.5px; line-height: 1.75; padding: 20px 22px; color: #dbe3f1; white-space: pre-wrap; counter-reset: l; }
.editor__code .c-com { font-style: italic; }

/* ---------- Sobre ---------- */
.about { padding: 104px 0; }
.about__inner { display: grid; grid-template-columns: .95fr 1.05fr; gap: 72px; align-items: center; }
.about__media { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 4.2; background: var(--paper); }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__caption { position: absolute; left: 14px; bottom: 14px; font-family: var(--mono); font-size: 12.5px; color: #fff; background: rgba(10,22,51,.8); padding: 5px 10px; border-radius: 4px; }
.about__caption .c-com { color: #8ea0c2; }
.about__text h2 { margin-bottom: 22px; }
.about__text > p:not(.tag) { font-size: 16.5px; margin-bottom: 16px; max-width: 540px; }
.about__quote { margin-top: 26px; font-family: var(--mono); font-size: 14.5px !important; line-height: 1.75; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }

/* ---------- FAQ ---------- */
.faq { padding: 96px 0; background: var(--paper); border-top: 1px solid var(--line); }
.faq__inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq .head { margin-bottom: 0; position: sticky; top: 110px; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 28px; font-weight: 600; font-size: 17px; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ">"; position: absolute; left: 2px; top: 22px; font-family: var(--mono); color: var(--blue); transition: transform .2s; }
.faq details[open] summary::before { transform: rotate(90deg); }
.faq summary::after { content: "--help"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--c-com); }
.faq details[open] summary::after { content: "--close"; }
.faq details p { padding: 0 40px 24px 28px; font-size: 15.5px; }

/* ---------- Contato ---------- */
.contact { background: var(--blue); color: #e5efff; }
.contact__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-top: 72px; padding-bottom: 72px; }
.contact__prompt { font-family: var(--mono); font-size: 14px; color: #fff; margin-bottom: 18px; opacity: .92; }
.contact__prompt .p { color: #bfe0ff; }
.contact h2 { color: #fff; margin-bottom: 10px; }
.contact__inner > div > p:last-child { font-size: 17px; max-width: 560px; }
.contact__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.contact__mail { font-family: var(--mono); font-size: 13.5px; color: #fff; opacity: .85; }
.contact__mail:hover { opacity: 1; text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-950); color: #9ba7bf; font-size: 14.5px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer__brand img { height: 36px; width: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 340px; }
.footer__nav, .footer__contact { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 13.5px; }
.footer__label { color: #5f6c88; margin-bottom: 4px; }
.footer a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.07); padding-top: 18px; padding-bottom: 22px; font-size: 12.5px; color: #6d7a94; font-family: var(--mono); }
.footer .c-com { color: #4f5b75; }

/* ==========================================================
   Responsivo
   ========================================================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .term { max-width: 600px; }
  .term__body { min-height: 0; }
  .process__grid { grid-template-columns: 1fr; }
  .issues__log li { grid-template-columns: 64px 1fr; }
  .issues__log .fix { grid-column: 2; }
}

@media (max-width: 900px) {
  .nav {
    position: fixed; top: 70px; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0;
    background: #fff; padding: 8px 24px 24px; border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: .2s ease;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); text-shadow: none; }
  .nav a i { color: var(--c-com); }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta-mobile { display: inline-flex; margin-top: 18px; font-family: var(--sans); }
  .header__cta { display: none; }
  .menu-toggle { display: block; }

  .head--split { grid-template-columns: 1fr; gap: 16px; }
  .services__list { grid-template-columns: 1fr; }
  .service, .service:nth-child(even) { padding: 28px 0; border-right: 0; }
  .about__inner { grid-template-columns: 1fr; gap: 40px; }
  .about__media { aspect-ratio: 16 / 10; }
  .faq__inner { grid-template-columns: 1fr; gap: 32px; }
  .faq .head { position: static; }
  .contact__inner { flex-direction: column; align-items: flex-start; }
  .contact__actions { align-items: flex-start; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .header__inner { height: 62px; }
  .header__logo img { height: 28px; }
  .nav { top: 62px; }
  .hero__inner { padding-top: 118px; padding-bottom: 56px; }
  .hero__lead { font-size: 16.5px; }
  .hero__actions .btn { width: 100%; }
  .term { font-size: 12.5px; }
  .term__body { padding: 16px 14px 6px; }
  .term__out li { gap: 8px; }
  .code-line { font-size: 13.5px; }
  .issues, .services, .faq { padding: 64px 0; }
  .process, .about { padding: 72px 0; }
  .issues__log li { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .issues__log .fix { grid-column: 1; }
  .editor__code { font-size: 12.5px; padding: 16px; }
  .faq summary::after { display: none; }
  .faq summary { padding-right: 8px; }
  .contact .btn, .contact__actions { width: 100%; }
  .footer__inner { grid-template-columns: 1fr; }
}

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

/* botão dentro do menu mobile mantém cor própria em qualquer estado do header */
.nav a.btn, .header.is-scrolled .nav a.btn { color: #fff; text-shadow: none; font-family: var(--sans); }
