/* ===== patodev — site institucional ===== */

@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("../fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }

:root {
  --amarelo: #FFC21A;
  --laranja: #FF7A1A;
  --grafite: #15171C;
  --grafite-2: #1C1F25;
  --surface: #20232A;
  --line: #2C3038;
  --papel: #F6F4EE;
  --branco: #FFFFFF;
  --cinza-texto: #4A4D55;
  --muted: #A2A6AF;

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 8px; --r-md: 14px; --r-lg: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--grafite); color: var(--branco);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; margin: 0; letter-spacing: -.02em; line-height: 1.05; }
p { margin: 0; }
::selection { background: var(--amarelo); color: var(--grafite); }
:focus-visible { outline: 2px solid var(--amarelo); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-weight: 500; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--amarelo); color: var(--grafite); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: 16px; }

.eyebrow { font: 500 15px/1 var(--f-mono); color: var(--amarelo); margin-bottom: 18px; letter-spacing: .02em; }
.eyebrow--dark { color: var(--grafite); }
.h2 { font-size: clamp(32px, 4.6vw, 56px); max-width: 18ch; }
.h2--xl { font-size: clamp(38px, 5.6vw, 72px); }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 46ch; margin-top: 22px; }
.hl { color: var(--amarelo); }

.caret { display: inline-block; width: .5em; height: .09em; background: var(--laranja); margin-left: .08em; vertical-align: baseline; animation: blink 1.05s steps(1) infinite; }
.caret--static { animation-duration: 1.4s; }
@keyframes blink { 50% { opacity: 0; } }

/* ===== botões ===== */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px; border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--f-body); text-decoration: none; cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--accent { background: var(--laranja); color: var(--grafite); }
.btn--accent:hover { background: var(--amarelo); }
.btn--ghost { border-color: var(--line); color: var(--branco); }
.btn--ghost:hover { border-color: var(--amarelo); color: var(--amarelo); }
.btn--sm { padding: 11px 18px; font-size: 15px; }
.btn--block { width: 100%; }

/* ===== navegação ===== */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(21, 23, 28, .78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav__logo img { height: 32px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; position: relative; transition: color .2s; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%; background: var(--amarelo); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--branco); }
.nav__links a:not(.btn):hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--branco); transition: transform .3s var(--ease); }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ===== hero ===== */
.hero { position: relative; min-height: min(100svh, 960px); display: flex; flex-direction: column; justify-content: center; padding: 120px 0 0; overflow: hidden; }
.hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; flex: 1; }
.hero__title { font-size: clamp(40px, 4.9vw, 70px); line-height: 1.02; margin-bottom: 28px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__title .line > span:first-child { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span:first-child { animation-delay: .1s; }
.hero__title .line:nth-child(3) > span:first-child { animation-delay: .2s; }
@keyframes rise { to { transform: none; } }
.hero__lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); max-width: 44ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero__art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero__art::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; background: var(--grafite-2); }
.ripples { position: absolute; inset: 0; display: grid; place-items: center; }
.ripples i { position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); animation: ripple 6s linear infinite; opacity: 0; }
.ripples i:nth-child(2) { animation-delay: 2s; }
.ripples i:nth-child(3) { animation-delay: 4s; }
@keyframes ripple { 0% { transform: scale(.75); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }

.duck { position: relative; width: 58%; margin-top: -22%; transition: transform .4s var(--ease); }
.duck__svg { width: 100%; height: auto; animation: bob 4.5s ease-in-out infinite; overflow: visible; }
@keyframes bob { 50% { transform: translateY(-14px); } }
.duck__code > * { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .7s var(--ease) forwards; }
.duck__code > :nth-child(1) { animation-delay: .7s; }
.duck__code > :nth-child(2) { animation-delay: .9s; }
.duck__code > :nth-child(3) { animation-delay: 1.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.term {
  position: absolute; right: -10%; bottom: -6%; width: min(82%, 320px);
  background: rgba(28, 31, 37, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(20px); animation: fadeUp .8s var(--ease) 1.2s forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.term__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.term__bar i:first-child { background: var(--laranja); }
.term__bar i:nth-child(2) { background: var(--amarelo); }
.term__bar span { margin-left: 8px; font: 500 12px var(--f-mono); color: var(--muted); }
.term__body { margin: 0; padding: 14px 16px 16px; min-height: 148px; font: 500 13px/1.7 var(--f-mono); color: var(--branco); white-space: pre-wrap; }
.term__body .p { color: var(--amarelo); }
.term__body .ok { color: #7EE2A8; }
.term__body .c { color: var(--muted); }
.term__body .cur { display: inline-block; width: 8px; height: 15px; background: var(--laranja); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

.marquee { position: relative; margin-top: 72px; border-block: 1px solid var(--line); padding: 20px 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 56px; width: max-content; animation: marquee 32s linear infinite; }
.marquee__track span { font: 500 18px var(--f-mono); color: var(--muted); white-space: nowrap; }
.marquee__track span::first-letter { color: var(--amarelo); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== seções ===== */
.section { padding: clamp(88px, 12vw, 150px) 0; position: relative; }
.section--alt { background: var(--grafite-2); }
.section--yellow { background: var(--amarelo); color: var(--grafite); }

/* cards de serviço com spotlight */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.card {
  --x: 50%; --y: 50%;
  position: relative; padding: 34px 30px 36px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), border-color .35s;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(255, 194, 26, .12), transparent 45%);
}
.cards:hover .card::before { opacity: 1; }
.card:hover { transform: translateY(-6px); border-color: rgba(255, 194, 26, .45); }
.card__icon { width: 44px; height: 44px; fill: none; stroke: var(--amarelo); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 52px; transition: transform .4s var(--ease); }
.card:hover .card__icon { transform: translateY(-4px) scale(1.06); }
.card h3 { font-size: 24px; margin-bottom: 12px; }
.card p { color: var(--muted); }

/* timeline */
.steps { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; position: relative; }
.steps__rail { position: absolute; top: 11px; left: 12px; right: 0; height: 2px; background: var(--line); }
.steps__rail span { position: absolute; inset: 0; background: var(--amarelo); transform: scaleX(var(--p, 0)); transform-origin: left; }
.step { position: relative; }
.step__dot { display: block; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--line); background: var(--grafite-2); margin-bottom: 30px; transition: border-color .4s, background .4s, transform .4s var(--ease); }
.step.is-on .step__dot { border-color: var(--amarelo); transform: scale(1.1); }
.step:last-child.is-on .step__dot { background: var(--amarelo); }
.step__n { font: 700 16px var(--f-mono); color: var(--amarelo); }
.step h3 { font-size: 24px; margin: 8px 0 10px; }
.step p { color: var(--muted); font-size: 16px; }
.step > :not(.step__dot) { opacity: .35; transition: opacity .5s; }
.step.is-on > * { opacity: 1; }

/* diferenciais */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 64px; }
.perk__glyph { display: inline-block; font: 700 38px/1 var(--f-mono); margin-bottom: 28px; transition: transform .4s var(--ease); }
.perk:hover .perk__glyph { transform: translateY(-6px); }
.perk h3 { font-size: 26px; margin-bottom: 12px; }
.perk p { color: var(--cinza-texto); }
.quote { margin: 80px 0 0; padding: 32px 36px; border: 2px solid var(--grafite); border-radius: var(--r-lg); max-width: 820px; }
.quote p { font-size: clamp(17px, 1.8vw, 21px); }
.quote .mono { background: var(--grafite); color: var(--amarelo); padding: 2px 8px; border-radius: 6px; font-size: .9em; }

/* contato */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
.mailcard { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding: 24px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: clamp(16px, 2vw, 22px); max-width: 480px; transition: border-color .3s, transform .3s var(--ease); }
.mailcard:hover { border-color: var(--amarelo); transform: translateY(-3px); }
.mailcard > span:last-child { color: var(--amarelo); font-family: var(--f-mono); }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px; display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.opt { font-weight: 400; opacity: .7; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--f-body); color: var(--branco);
  background: var(--grafite); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 13px 14px; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amarelo); box-shadow: 0 0 0 3px rgba(255, 194, 26, .18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--laranja); }
.form__note { font-size: 13px; color: var(--muted); text-align: center; }

/* rodapé */
.footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: 14px; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.footer__links a:hover { color: var(--amarelo); }

/* ===== revelar ao rolar ===== */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ===== responsivo ===== */
@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 420px; width: 100%; margin: 12px auto 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 48px; }
  .steps__rail { display: none; }
  .contact { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 76px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(21, 23, 28, .97); backdrop-filter: blur(14px); padding: 12px 24px 28px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 16px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links .btn { margin-top: 20px; }
  .cards, .perks { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .term { right: 0; bottom: -10%; }
  .form { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero__title .line > span:first-child { transform: none; }
  .duck__code > * { stroke-dashoffset: 0; }
  .term { opacity: 1; transform: none; }
}
