/* ==========================================================================
   Marcos Eduardo Web Design — folha de estilo única
   Sem framework, sem build. Editar aqui e commitar.
   ========================================================================== */

/* ---------- fontes locais (sem Google Fonts, sem requisição externa) ---------- */

@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  /* Superfícies */
  --bg: #07070b;
  --surface: #0e0f16;
  --surface-2: #141621;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Texto */
  --ink: #f7f7fb;
  --body: #a8b0c4;
  --muted: #7e879d;

  /* Azul da marca */
  --brand: #0b3fea;        /* o azul do logo — fundo de botão */
  --brand-bright: #2f6bff; /* gradiente e bordas */
  --brand-text: #5b8bff;   /* azul legível sobre fundo escuro */
  --brand-soft: rgba(47, 107, 255, 0.12);

  /* Tipografia */
  --display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --text: "DM Sans", "Segoe UI", system-ui, sans-serif;

  /* Ritmo */
  --container: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(80px, 12vw, 140px);
  --radius: 18px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; }

p { text-wrap: pretty; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ---------- estruturas ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brand-text);
  border-radius: 2px;
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(48px, 7vw, 72px);
}

.section-head h2 { margin-block: 20px 18px; }

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    background-color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-bright) 100%);
  color: #fff;
  box-shadow: 0 12px 34px -14px rgba(47, 107, 255, 0.85);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -14px rgba(47, 107, 255, 1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--brand-text);
  background: var(--brand-soft);
}

/* ---------- navegação ---------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(7, 7, 11, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.nav-logo img { height: 30px; width: auto; }

.nav-links {
  display: none;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  color: var(--body);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover { color: var(--ink); }

.nav-cta { display: none; }

.nav-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.nav-toggle span i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span i:nth-child(1) { top: 0; }
.nav-toggle span i:nth-child(2) { top: 5px; }
.nav-toggle span i:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 76px 0 0;
  z-index: 55;
  background: var(--bg);
  padding: 32px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.menu[hidden] { display: none; }

.menu a {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu .btn { margin-top: 28px; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .menu { display: none !important; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(130px, 20vw, 190px) clamp(70px, 10vw, 110px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-glow::before,
.hero-glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.hero-glow::before {
  width: min(780px, 90vw);
  height: 460px;
  top: -14%;
  left: 50%;
  translate: -50% 0;
  background: rgba(11, 63, 234, 0.28);
}

.hero-glow::after {
  width: 420px;
  height: 420px;
  right: -12%;
  bottom: -30%;
  background: rgba(47, 107, 255, 0.14);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 75%);
}

.hero h1 { margin-block: 26px 26px; }

.hero .lede { margin-bottom: 40px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero-facts li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.hero-facts b {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* palavra a palavra */
.word {
  display: inline-block;
  animation: word-in 0.8s var(--ease) both;
  animation-delay: calc(var(--i) * 60ms);
}

.word.accent { color: var(--brand-text); }

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.4em) rotate(1.5deg); }
  to { opacity: 1; transform: none; }
}

/* ---------- cards ---------- */

.grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(47, 107, 255, 0.45);
  box-shadow: 0 26px 50px -30px rgba(47, 107, 255, 0.7);
}

.card h3 { margin-bottom: 12px; }

.card p { font-size: 15.5px; }

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid rgba(47, 107, 255, 0.25);
  color: var(--brand-text);
  margin-bottom: 26px;
}

.card-icon svg { width: 24px; height: 24px; }

/* ---------- projetos ---------- */

.projects { display: grid; gap: 26px; }

.project {
  position: relative;
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.45s var(--ease), transform 0.45s var(--ease);
}

.project:hover { border-color: rgba(47, 107, 255, 0.4); }

@media (min-width: 860px) {
  .project { grid-template-columns: 1.15fr 1fr; align-items: center; }
  .project.is-reversed .project-shot { order: 2; }
}

.project-shot {
  position: relative;
  overflow: hidden;
  background: #0a0b11;
  aspect-ratio: 16 / 10;
}

.project-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.7s var(--ease);
}

.project:hover .project-shot img { transform: scale(1.03); }

/* parallax nativo, sem JavaScript */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .project-shot img {
      animation: shot-drift linear both;
      animation-timeline: view();
      animation-range: entry 15% exit 85%;
    }
    @keyframes shot-drift {
      from { transform: translateY(-3%) scale(1.06); }
      to { transform: translateY(3%) scale(1.06); }
    }
    .project:hover .project-shot img { animation-play-state: paused; }
  }
}

.project-shot .shot-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13px;
}

.project-body { padding: clamp(28px, 4vw, 44px); }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.tag-client {
  border-color: rgba(47, 107, 255, 0.5);
  background: var(--brand-soft);
  color: var(--brand-text);
}

.tag-concept {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--muted);
}

.project-body p { margin-block: 14px 26px; font-size: 15.5px; }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  align-items: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-text);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover svg { transform: translateX(4px); }

.link-muted { color: var(--muted); }
.link-muted:hover { color: var(--ink); }

/* ---------- processo ---------- */

.steps {
  list-style: none;
  display: grid;
  gap: 30px;
  position: relative;
}

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

.step { position: relative; padding-left: 58px; }

@media (min-width: 860px) {
  .step { padding-left: 0; padding-top: 56px; }
}

.step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(47, 107, 255, 0.4);
  background: var(--bg);
  color: var(--brand-text);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
}

.step::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 46px;
  bottom: -30px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(47, 107, 255, 0.45), transparent);
}

.step:last-child::after { display: none; }

@media (min-width: 860px) {
  .step::after {
    left: 46px;
    top: 20px;
    bottom: auto;
    width: auto;
    right: -24px;
    height: 1px;
    background: linear-gradient(to right, rgba(47, 107, 255, 0.45), transparent);
  }
}

.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: 15px; }

/* ---------- faixa de performance ---------- */

.perf {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(11, 63, 234, 0.16), transparent 70%);
}

.perf-inner {
  display: grid;
  gap: 44px;
  align-items: center;
}

@media (min-width: 900px) {
  .perf-inner { grid-template-columns: 1fr 0.85fr; gap: 70px; }
}

.perf-number {
  font-family: var(--display);
  font-size: clamp(4.5rem, 15vw, 9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
}

.perf-number span { font-size: 0.35em; letter-spacing: -0.02em; }

.bars { display: grid; gap: 18px; }

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--muted);
}

.bar-label b {
  font-family: var(--display);
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  width: 0;
  transition: width 1.1s var(--ease);
}

.bar-fill.is-brand {
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
}

/* ---------- contato ---------- */

.contact {
  text-align: center;
  background:
    radial-gradient(ellipse 70% 90% at 50% 100%, rgba(11, 63, 234, 0.2), transparent 70%);
}

.contact h2 { margin-block: 22px 20px; }
.contact .lede { margin-inline: auto; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 38px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin-top: 42px;
  list-style: none;
  font-size: 15px;
  color: var(--muted);
}

.contact-list a:hover { color: var(--ink); }

/* ---------- rodapé ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 54px 40px;
}

.footer-inner {
  display: grid;
  gap: 36px;
}

@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
}

.footer img { height: 30px; width: auto; margin-bottom: 20px; }

.footer p { font-size: 15px; max-width: 34ch; }

.footer h4 {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.footer ul { list-style: none; display: grid; gap: 10px; font-size: 15px; }
.footer ul a:hover { color: var(--ink); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- página de projeto ---------- */

.case-hero { padding-block: clamp(120px, 18vw, 170px) clamp(40px, 6vw, 60px); }

.case-meta {
  display: grid;
  gap: 22px;
  margin-block: 44px;
  padding-block: 28px;
  border-block: 1px solid var(--line);
}

@media (min-width: 700px) {
  .case-meta { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.case-meta dt {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.case-meta dd {
  font-family: var(--display);
  font-size: 17px;
  color: var(--ink);
}

.case-shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.case-body { max-width: 68ch; display: grid; gap: 22px; }
.case-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 22px; }
.case-body ul { padding-left: 20px; display: grid; gap: 10px; }

.notice {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 15px;
}

.notice b { color: var(--ink); font-family: var(--display); }

/* ---------- revelação no scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sem JavaScript, nada fica escondido */
.no-js .reveal,
.no-js .word {
  opacity: 1;
  transform: none;
  animation: none;
}

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

/* ---------- transição entre páginas ---------- */

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: vt-out 0.28s var(--ease) both;
  }
  ::view-transition-new(root) {
    animation: vt-in 0.38s var(--ease) both;
  }
  @keyframes vt-out {
    to { opacity: 0; transform: translateY(-8px); }
  }
  @keyframes vt-in {
    from { opacity: 0; transform: translateY(12px); }
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 20px;
  top: 20px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
}

/* ---------- lockup da marca (símbolo + nome em texto) ---------- */

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 30px;
  width: auto;
}

.nav-name {
  display: grid;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.nav-name small {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin-top: 4px;
}

.footer .nav-logo img { height: 34px; }
.footer .nav-name { font-size: 16px; }
