/* Dynatek – landing page
   Paleta: branco predominante, azul claro, toques de preto e cinza. */

:root {
  --paper: #ffffff;
  --mist: #f3f7fb;
  --ice: #dcebf7;
  --sky: #8cc4ee;
  --blue: #1b6db2;
  --blue-deep: #14548d;
  --ink: #14181d;
  --slate: #4f5b67;
  --line: #d3dce5;
  --grid: rgba(27, 109, 178, 0.07);
  --grid-strong: rgba(27, 109, 178, 0.13);
  --wa: #25d366;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --gutter: 24px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--ink); }

h1 {
  font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.1rem);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.75rem);
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
h3 { font-size: 1.25rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.005em; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; }



/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 4px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2b333c; }
.btn-sky { background: var(--sky); color: var(--ink); }
.btn-sky:hover { background: #a6d3f3; }
.btn-sm { padding: 10px 16px; font-size: .95rem; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }

.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-name {
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-stretch: 125%;
  font-size: 1.55rem; letter-spacing: -0.01em; color: var(--blue);
}
.brand-sub { font-size: .72rem; color: var(--slate); margin-top: 4px; letter-spacing: .02em; }
.brand img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .98rem; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { border-color: var(--blue); }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--ink); border-radius: 4px; padding: 8px 12px; font: 600 .95rem var(--font-body); cursor: pointer; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 72px); background: var(--paper); }
.hero > .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.lede { margin-top: 24px; max-width: 34em; font-size: 1.2rem; color: var(--slate); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 20px; font-size: .95rem; color: var(--slate); max-width: 34em; }

/* Linhas de cota: o volume de impressão desenhado como num projeto */
.hero-figure { position: relative; margin: 0; padding: 40px 0 0; }
.hero-figure .frame { background: var(--ink); border-radius: 2px; overflow: hidden; }
.hero-figure img { width: 100%; height: auto; }
.hero-figure figcaption { margin-top: 12px; font-size: .88rem; color: var(--slate); }

.dim { position: absolute; color: var(--blue); font-size: .8rem; font-weight: 600; }
.dim::before, .dim::after { content: ""; position: absolute; background: currentColor; }
.dim span { position: absolute; background: var(--paper); padding: 0 8px; white-space: nowrap; line-height: 1; }
.dim-top { top: 8px; left: 0; right: 0; height: 18px; }
.dim-top i { position: absolute; left: 0; right: 0; top: 8px; height: 1.5px; background: currentColor; transform-origin: left; }
.dim-top::before { left: 0; top: 0; width: 1.5px; height: 18px; }
.dim-top::after { right: 0; top: 0; width: 1.5px; height: 18px; }
.dim-top span { left: 50%; top: 3px; transform: translateX(-50%); }


/* Única animação de entrada da página: as cotas se desenham */
@media (prefers-reduced-motion: no-preference) {
  .dim-top i { animation: draw-x .9s .25s cubic-bezier(.2,.7,.2,1) both; }
  .dim span, .dim::before, .dim::after { animation: fade .5s .9s both; }
  .hero-figure .frame { animation: fade .7s both; }
}
@keyframes draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Linhas tecnológicas: só nas laterais, fora da área de conteúdo */
.edge { position: absolute; top: 0; bottom: 0; width: max(0px, calc((100vw - var(--wrap)) / 2 - 12px)); pointer-events: none; overflow: hidden; --node: #fff; }
.edge-l { left: 0; }
.edge-r { right: 0; transform: scale(-1, -1); }
.edge svg { display: block; width: 100%; height: 100%; }
.edge .s path, .edge .n circle { stroke: var(--sky); }
.edge .b path { stroke: var(--blue); opacity: .4; }
.edge .n circle { fill: var(--node); stroke-width: 1.5; }
.final .edge { --node: var(--ink); }
.final .edge .b path { stroke: var(--sky); opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
  .edge path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 1.6s .3s cubic-bezier(.3,.6,.2,1) forwards; }
  .edge .n circle { animation: fade .5s 1.6s both; }
}
@keyframes trace { to { stroke-dashoffset: 0; } }

/* ---------- Seções ---------- */
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 40em; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { margin-top: 16px; color: var(--slate); font-size: 1.1rem; max-width: 36em; }

/* Serviços */
.svc-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.svc-intro { position: sticky; top: 104px; }
.svc-intro p { margin-top: 18px; color: var(--slate); }
.svc-list { border-top: 1.5px solid var(--ink); }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.svc h3 { grid-column: 1; }
.svc p { grid-column: 1; color: var(--slate); max-width: 38em; }
.svc .more { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }

.link { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { color: var(--blue-deep); text-decoration-thickness: 2.5px; }

/* Materiais */
.mat { width: 100%; border-collapse: collapse; background: var(--paper); border: 1.5px solid var(--ink); }
.mat th, .mat td { text-align: left; vertical-align: top; padding: 18px 22px; }
.mat thead th { font-size: .88rem; font-weight: 600; color: var(--slate); background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.mat tbody tr + tr > * { border-top: 1px solid var(--line); }
.mat tbody th { font-family: var(--font-display); font-weight: 700; font-stretch: 106%; font-size: 1.15rem; width: 18%; }
.mat td:nth-child(2) { width: 42%; }
.mat-note { margin-top: 20px; color: var(--slate); }

/* Portfólio: carrossel de fotos */
.carousel { position: relative; }
.track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .track { scroll-behavior: smooth; } }
.slide { flex: 0 0 calc((100% - 32px) / 3); margin: 0; scroll-snap-align: start; aspect-ratio: 4 / 5; background: var(--ink); border-radius: 2px; overflow: hidden; }
.slide img { width: 100%; height: 100%; object-fit: cover; user-select: none; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; transition: background-color .15s, color .15s, opacity .15s; }
.car-btn:hover:not(:disabled) { background: var(--ink); color: #fff; }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.car-prev { left: 12px; }
.car-next { right: 12px; }

.portfolio-cta { margin-top: 32px; padding: 28px; background: var(--mist); border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.portfolio-cta p { font-family: var(--font-display); font-weight: 650; font-size: 1.2rem; max-width: 28em; line-height: 1.3; }

/* Como funciona (sequência real: numeração faz sentido aqui) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1.5px solid var(--ink); }
.steps li { padding: 28px 28px 8px 0; position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 3rem; line-height: 1; color: var(--sky); margin-bottom: 18px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--slate); font-size: 1rem; }
.callout { margin-top: 40px; padding: 20px 24px; border-left: 4px solid var(--blue); background: var(--mist); max-width: 46em; }
.callout strong { font-weight: 650; }

/* Segmentos */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 88px); margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); }
.seg li { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; align-items: baseline; }
.seg strong { font-family: var(--font-display); font-weight: 700; font-stretch: 104%; font-size: 1.12rem; }
.seg span { color: var(--slate); }

/* Sobre */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-copy p { margin-top: 18px; color: var(--slate); }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.facts li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.facts strong { display: block; font-family: var(--font-display); font-weight: 700; font-stretch: 104%; font-size: 1.15rem; margin-bottom: 4px; }
.facts span { color: var(--slate); }

/* CTA final + rodapé (toque de preto) */
.final { background: var(--ink); color: #fff; padding: clamp(64px, 8vw, 112px) 0; position: relative; overflow: hidden; }
.final .wrap { position: relative; }
.final h2 { color: #fff; max-width: 15em; }
.final p.sub { margin-top: 20px; color: #c4ced8; max-width: 34em; font-size: 1.15rem; }
.final .actions { margin-top: 36px; }
.contact { margin: 56px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px 40px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 28px; }
.contact dt { color: #9fb0bf; font-size: .88rem; }
.contact dd { margin: 4px 0 0; font-weight: 500; }
.contact a { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.contact a:hover { border-color: var(--sky); color: var(--sky); }
.contact dl { margin: 0; }

.site-footer { background: #0e1115; color: #9fb0bf; padding: 28px 0; font-size: .9rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; align-items: center; }

/* Botão flutuante do WhatsApp */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; background: var(--wa); color: #08210f; text-decoration: none; font-weight: 700; padding: 14px; border-radius: 100px; box-shadow: 0 6px 20px rgba(8, 33, 15, .28); }
.wa-float svg { width: 28px; height: 28px; fill: currentColor; flex: none; }
.wa-float span { display: none; padding-right: 8px; }
.wa-float:hover { filter: brightness(1.05); }

/* ---------- Responsivo ---------- */
@media (min-width: 900px) { .wa-float span { display: inline; } .wa-float { padding: 14px 18px 14px 16px; } }

@media (max-width: 1020px) {
  .slide { flex-basis: calc((100% - 16px) / 2); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 20px; }
}

@media (max-width: 860px) {
  :root { --gutter: 18px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 620px; }
  .svc-wrap, .about { grid-template-columns: 1fr; }
  .svc-intro { position: static; }
  .seg { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; }

  .svc { grid-template-columns: 1fr; }
  .svc .more { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }

  .mat thead { position: absolute; left: -9999px; }
  .mat, .mat tbody, .mat tr, .mat th, .mat td { display: block; width: 100% !important; }
  .mat th, .mat td { padding: 0; border: 0 !important; }
  .mat tr { padding: 18px 20px; }
  .mat tbody tr + tr { border-top: 1px solid var(--line); }
  .mat td { margin-top: 6px; }
  .mat td::before { content: attr(data-label); display: block; font-size: .82rem; color: var(--slate); margin-bottom: 1px; }

}

@media (max-width: 560px) {
  .slide { flex-basis: 82%; }
  .car-btn { width: 44px; height: 44px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--line); margin-top: 20px; }
  .seg li { grid-template-columns: 1fr; gap: 2px; }
  .actions .btn { width: 100%; }
}
