/* ===================================================================
   Otávio Marques — Portfólio v2
   Paleta: lime #DBF227 · oliva #AFBF34 · marrom #593825
           tom-pele #D9A282 · preto #0D0D0D
   =================================================================== */

:root {
  --ink:      #0D0D0D;
  --ink-2:    #141310;
  --ink-3:    #1c1a15;
  --line:     rgba(244,239,230,.09);
  --lime:     #DBF227;
  --olive:    #AFBF34;
  --brown:    #593825;
  --brown-lo: #33200f;
  --tan:      #D9A282;
  --cream:    #F4EFE6;
  --muted:    #b3a794;

  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body:    "Instrument Sans", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  --wrap: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--lime); color: var(--ink); }

/* ---------- Barra de progresso ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--olive), var(--lime));
  z-index: 100;
  pointer-events: none;
}

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--olive);
}
.eyebrow__cmd { color: var(--muted); }

.hl {
  color: var(--lime);
  position: relative;
  white-space: nowrap;
}

/* cursor piscando no título */
.caret {
  display: inline-block;
  width: 4px;
  height: .62em;
  margin-left: .1ch;
  background: var(--lime);
  vertical-align: baseline;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: .85em 1.5em;
  background: var(--lime);
  color: var(--ink);
  border: 1px solid var(--lime);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 34px -10px rgba(219,242,39,.45); }
.btn:focus-visible { outline: 3px solid var(--tan); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--cream); border-color: rgba(244,239,230,.25); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); box-shadow: none; }
.btn--sm { padding: .6em 1.1em; font-size: .9rem; }
.btn--lg { padding: 1.05em 1.9em; font-size: 1.08rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: .9rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(13,13,13,.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; }
.brand__mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .9rem;
  color: var(--lime);
  background: var(--ink-3);
  border: 1px solid rgba(219,242,39,.35);
  padding: .3rem .55rem;
  border-radius: 8px;
}
.brand__name { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a { font-size: .95rem; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--lime); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(244,239,230,.07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 80% at 60% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 20%, #000 30%, transparent 75%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  top: -20%; right: -12%;
  width: 55vw; max-width: 760px; aspect-ratio: 1;
  background: radial-gradient(circle at 55% 45%, rgba(175,191,52,.17), transparent 60%);
  filter: blur(12px);
}
.hero__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(1.8rem, 3.5vh, 3rem) clamp(1.2rem, 4vw, 3rem) clamp(1.8rem, 3.5vh, 3rem);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: .85rem 0;
}
.hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--muted);
  max-width: 50ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.6rem; }

.stats { display: flex; flex-wrap: wrap; gap: clamp(1.4rem, 3.5vw, 2.6rem); margin-top: 2rem; }
.stat dt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--tan);
  line-height: 1;
}
.stat dd { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; margin-top: .4rem; }

/* ---- palco do navegador ---- */
.hero__stage { position: relative; }

.browser {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(219,242,39,.06);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform .6s var(--ease);
}
.hero__stage:hover .browser { transform: perspective(1200px) rotateY(0) rotateX(0); }

.browser__bar {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem .9rem;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.browser__dots { display: flex; gap: .35rem; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; }
.browser__dots i:nth-child(1) { background: #e0655a; }
.browser__dots i:nth-child(2) { background: #e0a35a; }
.browser__dots i:nth-child(3) { background: var(--olive); }
.browser__url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--muted);
  background: rgba(13,13,13,.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .32rem .7rem;
  overflow: hidden;
  white-space: nowrap;
}
.browser__lock { font-size: .65rem; }
.browser__caret {
  width: 1px; height: .95em;
  background: var(--lime);
  animation: blink 1s steps(1) infinite;
}
.browser__view { aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-3); }
.browser__view img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 1;
  transition: opacity .35s ease;
}
.browser__view img.is-swap { opacity: 0; }

/* chips flutuantes */
.chip {
  position: absolute;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  padding: .4rem .7rem;
  border-radius: 9px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.7);
  animation: float 5.5s ease-in-out infinite;
}
.chip--1 { top: -1.2rem; left: -1.4rem; color: var(--lime); border-color: rgba(219,242,39,.4); animation-delay: 0s; }
.chip--2 { bottom: 18%; left: -2.2rem; color: var(--tan); border-color: rgba(217,162,130,.4); animation-delay: 1.2s; }
.chip--3 { top: 22%; right: -1.6rem; color: var(--olive); border-color: rgba(175,191,52,.4); animation-delay: 2.1s; }
.chip--4 { bottom: -1.1rem; right: 12%; color: var(--ink); background: var(--lime); border-color: var(--lime); animation-delay: .6s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* ---------- Ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
  white-space: nowrap;
}
.ticker__track {
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  padding: .8rem 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(.8rem, 1.1vw, .95rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(244,239,230,.45);
  animation: scroll-x 40s linear infinite;
  will-change: transform;
}
.ticker__track i { color: var(--brown); font-style: normal; font-family: var(--font-mono); }
.ticker__end { color: var(--lime); }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Seções base ---------- */
.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 6.5rem) clamp(1.2rem, 4vw, 3rem);
}
.section__head { max-width: 62ch; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: .7rem 0 .8rem;
}
.section__sub { color: var(--muted); font-size: 1.08rem; }

/* ---------- Serviços ---------- */
.grid-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.service {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.service:hover { transform: translateY(-4px); border-color: rgba(219,242,39,.45); background: var(--ink-3); }
.service__num { font-family: var(--font-mono); font-size: .78rem; color: var(--olive); }
.service h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  margin: .7rem 0 .45rem;
  letter-spacing: -.01em;
}
.service:hover h3 { color: var(--lime); }
.service p { color: var(--muted); font-size: .97rem; flex: 1; }
.service__tag {
  display: inline-block;
  white-space: nowrap;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--tan);
  border: 1px dashed rgba(217,162,130,.45);
  padding: .32rem .65rem;
  border-radius: 999px;
}
.service:hover .service__tag { color: var(--lime); border-color: rgba(219,242,39,.5); }

.services__note {
  margin-top: 1.6rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.02rem;
}
.services__note strong { color: var(--lime); font-weight: 600; }

/* ---------- Trabalhos ---------- */
.grid-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.4rem);
}
.work {
  display: block;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.work:hover { transform: translateY(-5px); border-color: rgba(219,242,39,.5); box-shadow: 0 28px 60px -26px rgba(0,0,0,.85); }
.work:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.work__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .9rem;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.work__url {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work:hover .work__url { color: var(--lime); }

.work__shot {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-3);
}
.work__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* card-convite: o próximo pode ser o seu */
.work--cta { border-style: dashed; border-color: rgba(219,242,39,.35); }
.work--cta:hover { border-style: solid; }
.work__shot--cta {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .4rem;
  text-align: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 50% 70%, rgba(175,191,52,.12), transparent 65%),
    var(--ink-2);
}
.work-cta__plus {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--lime);
  transition: transform .3s var(--ease);
}
.work--cta:hover .work-cta__plus { transform: rotate(90deg) scale(1.1); }
.work-cta__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  letter-spacing: -.01em;
  color: var(--cream);
  max-width: 16ch;
}

.work__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.1rem; }
.work__cat { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.work__go { color: var(--lime); font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* ---------- Sobre ---------- */
.about { position: relative; }
.about::before {
  content: "";
  position: absolute;
  inset: 10% 0;
  background: linear-gradient(180deg, transparent, rgba(89,56,37,.14), transparent);
  z-index: -1;
}
.about__grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about__photo { justify-self: center; width: 100%; max-width: 400px; }
.about__frame {
  position: relative;
  border-radius: var(--radius);
}
.about__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(217,162,130,.55);
  border-radius: var(--radius);
  transform: translate(14px, 14px);
  z-index: 0;
  transition: transform .4s var(--ease);
}
.about__photo:hover .about__frame::before { transform: translate(8px, 8px); }
.about__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.about__badge {
  position: absolute;
  z-index: 2;
  bottom: 1rem; left: 1rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .82rem;
  background: var(--lime);
  color: var(--ink);
  padding: .42rem .85rem;
  border-radius: 9px;
}
.about__caption {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
}
.about__text p { margin-bottom: 1rem; font-size: 1.08rem; }
.about__text strong { color: var(--tan); }
.about__stack { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.3rem 0 1.6rem; }
.about__stack span {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--olive);
  border: 1px solid rgba(175,191,52,.35);
  padding: .3rem .7rem;
  border-radius: 999px;
}

/* ---------- FAQ ---------- */
.faq__list {
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.faq__item {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .3s var(--ease);
}
.faq__item:hover, .faq__item[open] { border-color: rgba(219,242,39,.4); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: var(--radius); }
.faq__icon {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--lime);
  transition: transform .3s var(--ease);
}
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__item > p { padding: 0 1.3rem 1.2rem; color: var(--muted); max-width: 65ch; }

/* ---------- Contato ---------- */
.contact { text-align: center; }
.terminal {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.8);
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem .9rem;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.terminal__title { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.terminal__body {
  padding: 1.3rem 1.4rem;
  font-family: var(--font-mono);
  font-size: .88rem;
  line-height: 2;
  min-height: 10.5em;
  color: var(--cream);
}
.terminal__body .t-prompt { color: var(--olive); }
.terminal__body .t-ok { color: var(--lime); }
.terminal__body .t-dim { color: var(--muted); }
.terminal__body .t-caret {
  display: inline-block;
  width: .6ch; height: 1em;
  background: var(--lime);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2.2rem;
}

/* ---------- Statusbar (footer) ---------- */
.statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.8rem;
  padding: .7rem clamp(1.2rem, 4vw, 3rem);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--muted);
}
.statusbar__item { display: inline-flex; align-items: center; gap: .5rem; }
a.statusbar__item { transition: color .2s; }
a.statusbar__item:hover { color: var(--lime); }
.statusbar__item--right { margin-left: auto; }
.statusbar__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(219,242,39,.5); }
  50%      { box-shadow: 0 0 0 6px rgba(219,242,39,0); }
}

/* ---------- WhatsApp flutuante ---------- */
.whats-fab {
  position: fixed;
  right: 1.4rem;
  bottom: 2.6rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.6);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.whats-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 32px -8px rgba(219,242,39,.45); }
.whats-fab:focus-visible { outline: 3px solid var(--tan); outline-offset: 3px; }

/* ---------- Animações de entrada ---------- */
.load-in { opacity: 0; transform: translateY(18px); animation: load-in .8s var(--ease) forwards; }
.hero__copy .load-in:nth-child(1), .hero__copy > .load-in:nth-child(1) { animation-delay: .05s; }
.hero__copy > .load-in:nth-child(2) { animation-delay: .15s; }
.hero__copy > .load-in:nth-child(3) { animation-delay: .25s; }
.hero__copy > .load-in:nth-child(4) { animation-delay: .35s; }
.hero__copy > .load-in:nth-child(5) { animation-delay: .45s; }
.hero__stage.load-in { animation-delay: .3s; }
@keyframes load-in { to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stage { max-width: 620px; margin: 0 auto; width: 100%; }
  .chip--2 { left: -.6rem; }
  .chip--3 { right: -.5rem; }
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .grid-works { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  .grid-works { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 340px; }
  .statusbar__item--right { margin-left: 0; }
}

@media (max-width: 420px) {
  .hero__title br { display: none; }
}

@media (max-width: 560px) {
  .grid-services { grid-template-columns: 1fr; }
  .chip--1 { left: -.4rem; }
  .btn--lg { width: 100%; }
  .contact__actions .btn--ghost { width: 100%; }
}

/* modo de teste: ?noanim na URL desliga todas as animações */
.no-anim .reveal, .no-anim .load-in { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
.no-anim .ticker__track, .no-anim .chip, .no-anim .caret,
.no-anim .browser__caret, .no-anim .statusbar__dot { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track, .chip, .caret, .browser__caret, .statusbar__dot { animation: none; }
  .load-in { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .browser { transform: none; }
}
