/* =========================================================
   devluisleda.com.br
   Base azul-noite, acento cobalto, um toque de âmbar.
   Motivo visual: azulejos Truchet que se combinam por rotação.
   ========================================================= */

:root {
  --bg: #070B18;
  --surface: #0E1428;
  --surface-2: #131B36;
  --line: #1C2542;
  --line-2: #2A3560;
  --text: #E9EDF6;
  --muted: #8E98B3;
  --cobalt: #3D6BFF;
  --cobalt-2: #7FA3FF;
  --cobalt-ink: #0A1440;
  --amber: #F2B544;
  --ok: #46D39A;
  --err: #FF7A85;

  --tile-bg: var(--surface);
  --tile-a: var(--cobalt);
  --tile-line: rgba(233, 237, 246, .16);
  --tile-dot: var(--text);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code { font-family: var(--font-mono); font-size: .9em; }

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

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

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--cobalt); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
  transition: top .2s;
}
.skip:focus { top: 12px; }

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

.muted { color: var(--muted); }

/* ---------- Tipografia ---------- */

.display {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 82, "opsz" 96;
  font-weight: 700;
  font-size: clamp(2.75rem, 6.4vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.display-md { font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: 1.02; }

.h2 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 88, "opsz" 72;
  font-weight: 650;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.h3, .panel h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 92;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: #BCC4DA;
  max-width: 60ch;
  line-height: 1.55;
}

.link {
  color: var(--cobalt-2);
  text-decoration: underline;
  text-decoration-color: rgba(127, 163, 255, .35);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: .9375rem; line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: #5680FF; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--cobalt-2); background: rgba(61, 107, 255, .08); }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--cobalt-2); text-decoration: underline; text-underline-offset: 4px;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .25s, border-color .25s;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(7, 11, 24, .82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .logo { border-radius: 7px; }
.brand-name {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 85;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em;
}
.brand-name span { color: var(--muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; display: flex; gap: 4px; }
.nav ul a {
  display: block; padding: 8px 12px; border-radius: 999px;
  font-size: .9375rem; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav ul a:hover { color: var(--text); }
.nav ul a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-2);
  border-radius: 999px; background: transparent; cursor: pointer; position: relative;
}
.menu-toggle .bars,
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  position: absolute; left: 50%; width: 18px; height: 1.5px; background: var(--text);
  transform: translateX(-50%); transition: transform .25s var(--ease), opacity .2s;
}
.menu-toggle .bars { top: 50%; }
.menu-toggle .bars::before { content: ""; top: -6px; }
.menu-toggle .bars::after { content: ""; top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translate(-50%, 6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translate(-50%, -6px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px var(--gutter) 28px;
    background: rgba(7, 11, 24, .97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .25s var(--ease), opacity .2s, visibility .2s;
  }
  .site-header.is-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { padding: 14px 4px; font-size: 1.125rem; border-radius: 0; border-bottom: 1px solid var(--line); background: none !important; }
  .nav ul a[aria-current="page"] { color: var(--cobalt-2); }
  .nav-cta { min-height: 52px; }
}

/* ---------- Azulejos ---------- */

.mosaic {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 3px;
}
.tile { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 3px; transform: rotate(var(--r)); transition: transform .55s var(--ease); }
.tile svg { width: 100%; height: 100%; }
.tile.is-hl { --tile-a: var(--amber); --tile-dot: var(--bg); }

.mosaic-hero { gap: 4px; }
.mosaic-hero .tile { border-radius: 4px; cursor: pointer; }
.mosaic-hero .tile { animation: tile-in .7s var(--ease) both; animation-delay: var(--d); }
.mosaic-hero .tile:hover svg { filter: brightness(1.18); }
.mosaic-hero.is-ready .tile { animation: none; opacity: 1; }

@keyframes tile-in {
  from { opacity: 0; transform: rotate(calc(var(--r) - 90deg)) scale(.55); }
  to   { opacity: 1; transform: rotate(var(--r)) scale(1); }
}

.mosaic-cover { gap: 2px; }
.mosaic-cover .tile { border-radius: 2px; }
.mosaic-head { width: 100%; opacity: .9; }
.mosaic-err { width: 180px; margin-bottom: 32px; }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(61, 107, 255, .16), transparent 70%),
    linear-gradient(rgba(28, 37, 66, .55) 1px, transparent 1px) 0 0 / 100% 96px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  opacity: .9;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-copy { display: grid; gap: 28px; }
.hero-copy .display { max-width: 13ch; }

.status { display: inline-flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(70, 211, 154, .15); }

.hero-facts {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 40px;
  margin: 8px 0 0; padding-top: 24px; border-top: 1px solid var(--line);
}
.hero-facts dt { font-size: .8125rem; color: var(--muted); }
.hero-facts dd { margin: 2px 0 0; font-weight: 500; }

.hero-art { position: relative; }
.hero-art-hint { margin-top: 14px; font-size: .8125rem; color: var(--muted); text-align: right; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; }
  .hero-art-hint { display: none; }
}
@media (max-width: 560px) {
  .hero-facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- Faixa de tecnologias ---------- */

.stack-strip { border-block: 1px solid var(--line); padding: 22px 0; }
.stack-strip .wrap { display: flex; align-items: center; gap: 12px 32px; flex-wrap: wrap; }
.stack-label { font-size: .875rem; color: var(--muted); flex-shrink: 0; }
.stack-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.stack-list li { font-family: var(--font-display); font-variation-settings: "wdth" 88; font-size: 1.125rem; font-weight: 500; color: #C9D0E3; }

/* ---------- Seções ---------- */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: linear-gradient(180deg, var(--surface) 0%, rgba(14, 20, 40, .4) 100%); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 12px; max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-link { margin-top: 36px; }

/* ---------- Serviços em linhas ---------- */

.service-rows { border-top: 1px solid var(--line); }
.service-row { border-bottom: 1px solid var(--line); }
.service-row summary,
.faq-item summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 32px; gap: 24px; align-items: center;
  padding: 28px 0;
}
.service-row summary::-webkit-details-marker,
.faq-item summary::-webkit-details-marker { display: none; }
.service-title {
  font-family: var(--font-display); font-variation-settings: "wdth" 88;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 600; letter-spacing: -.02em;
  transition: color .2s;
}
.service-row summary:hover .service-title { color: var(--cobalt-2); }
.service-short { color: var(--muted); }

.plus { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); justify-self: end; }
.plus::before, .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--text);
  transform: translate(-50%, -50%); transition: transform .3s var(--ease);
}
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] > summary .plus::after { transform: translate(-50%, -50%) rotate(0); }
details[open] > summary .plus { border-color: var(--cobalt); }

.service-body {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 32px; gap: 24px;
  padding: 0 0 32px;
}
.service-body > p { color: #BCC4DA; max-width: 52ch; }

.checks { list-style: none; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 10px;
  background: var(--cobalt); transform: rotate(45deg); border-radius: 2px;
}

@media (max-width: 720px) {
  .service-row summary { grid-template-columns: 1fr 32px; gap: 8px 16px; }
  .service-short { grid-column: 1; grid-row: 2; font-size: .9375rem; }
  .service-row .plus { grid-row: 1 / span 2; grid-column: 2; }
  .service-body { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Projetos ---------- */

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.work-grid-all { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.work-card {
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg);
  overflow: hidden; transition: border-color .25s;
}
.work-card:hover { border-color: var(--line-2); }
.work-link { display: flex; flex-direction: column; height: 100%; }
.work-cover { position: relative; padding: 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.work-cover .mosaic { transition: transform .6s var(--ease); }
.work-card:hover .work-cover .mosaic { transform: scale(1.015); }
.work-result {
  position: absolute; left: 24px; bottom: 24px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(7, 11, 24, .88); border: 1px solid var(--line-2);
  font-size: .8125rem; font-weight: 500;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.work-meta { padding: 24px; display: grid; gap: 10px; align-content: start; }
.work-kicker { font-size: .875rem; color: var(--cobalt-2); }
.work-meta h3 { font-family: var(--font-display); font-variation-settings: "wdth" 90; font-size: 1.5rem; letter-spacing: -.015em; }

.work-card.is-big { grid-column: 1 / -1; }
.work-card.is-big .work-link { display: grid; grid-template-columns: 1.3fr 1fr; }
.work-card.is-big .work-cover { border-bottom: 0; border-right: 1px solid var(--line); display: flex; align-items: center; }
.work-card.is-big .work-cover .mosaic { width: 100%; }
.work-card.is-big .work-meta { padding: clamp(24px, 4vw, 48px); align-content: center; }
.work-card.is-big h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); }

@media (max-width: 820px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card.is-big .work-link { grid-template-columns: 1fr; }
  .work-card.is-big .work-cover { border-right: 0; border-bottom: 1px solid var(--line); }
}

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags li, .tags a {
  font-size: .8125rem; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: #C9D0E3;
}
.tags a:hover { border-color: var(--cobalt-2); }

/* ---------- Processo ---------- */

.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; counter-reset: s; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 1px;
  background: linear-gradient(90deg, var(--cobalt), var(--line-2));
}
.step { position: relative; display: grid; gap: 10px; align-content: start; }
.step-n {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--cobalt); color: var(--cobalt-2);
  font-family: var(--font-display); font-weight: 600; position: relative; margin-bottom: 10px;
}
.section-alt .step-n { background: var(--surface); }
.step h3 { font-family: var(--font-display); font-variation-settings: "wdth" 90; font-size: 1.25rem; }
.step p { color: var(--muted); font-size: .9375rem; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { left: 22px; right: auto; top: 22px; bottom: 22px; width: 1px; height: auto; background: linear-gradient(180deg, var(--cobalt), var(--line-2)); }
  .step { grid-template-columns: 44px 1fr; column-gap: 20px; }
  .step-n { grid-row: 1 / span 2; margin: 0; }
}

/* ---------- Blog ---------- */

.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-list-full { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.post-item a {
  display: grid; gap: 10px; height: 100%; padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg);
  transition: border-color .25s;
}
.post-item a:hover { border-color: var(--line-2); }
.post-item a:hover h3 { color: var(--cobalt-2); }
.post-item time, .post-read { font-size: .875rem; color: var(--muted); }
.post-item h3 { font-family: var(--font-display); font-variation-settings: "wdth" 90; font-size: 1.5rem; letter-spacing: -.015em; transition: color .2s; }

.post-list-full .post-item a {
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none;
  grid-template-columns: 180px 1fr; column-gap: 32px; padding: 32px 0;
}
.post-list-full .post-item time { grid-row: 1 / span 3; padding-top: 6px; }
@media (max-width: 720px) {
  .post-list { grid-template-columns: 1fr; }
  .post-list-full .post-item a { grid-template-columns: 1fr; }
  .post-list-full .post-item time { grid-row: auto; padding: 0; }
}

.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tag-filter a {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .9375rem; color: var(--muted); transition: color .2s, border-color .2s;
}
.tag-filter a:hover { color: var(--text); }
.tag-filter a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Página interna ---------- */

.page-head { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: end; }
.page-head-grid > div:first-child { display: grid; gap: 20px; }
.page-head .display { max-width: 18ch; }
.crumb a { font-size: .9375rem; color: var(--muted); }
.crumb a:hover { color: var(--text); }
.crumb a::before { content: "‹ "; }
@media (max-width: 720px) {
  .page-head-grid { grid-template-columns: 1fr; }
  .mosaic-head { display: none; }
}

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; align-content: start;
}

/* Sobre */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-side { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 24px); }
.principles { list-style: none; display: grid; gap: 14px; }
.principles li { color: var(--muted); padding-left: 18px; border-left: 2px solid var(--line-2); }
.principles strong { color: var(--text); font-weight: 600; display: block; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; }
}

.timeline { list-style: none; display: grid; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.tl-year { font-family: var(--font-display); font-variation-settings: "wdth" 90; font-size: 1.125rem; color: var(--cobalt-2); }
.timeline h3 { font-size: 1.25rem; margin-bottom: 6px; }
.timeline p { color: var(--muted); }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; gap: 6px; } }

/* Serviços (página) */
.service-detail-list { border-top: 1px solid var(--line); }
.service-detail {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 5vw, 72px);
  padding: clamp(32px, 5vw, 56px) 0; border-bottom: 1px solid var(--line);
}
.service-detail > div { display: grid; gap: 16px; align-content: start; }
.service-detail .h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.service-detail > div:last-child > p { color: #BCC4DA; }
@media (max-width: 760px) { .service-detail { grid-template-columns: 1fr; } }

.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { grid-template-columns: 1fr 32px; font-size: 1.125rem; font-weight: 500; padding: 22px 0; }
.faq-item p { color: var(--muted); padding: 0 48px 24px 0; max-width: 68ch; }

/* Case */
.case-head .wrap { display: grid; gap: 20px; }
.case-facts { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 12px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.case-facts dt { font-size: .8125rem; color: var(--muted); }
.case-facts dd { margin: 2px 0 0; font-weight: 500; }
.case-cover { margin-top: 40px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.case-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.case-side { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-side { position: static; }
}

.next-case { border-top: 1px solid var(--line); }
.next-case a { display: grid; gap: 8px; padding: clamp(40px, 6vw, 72px) 0; }
.next-case a:hover .h2 { color: var(--cobalt-2); }
.next-case .h2 { transition: color .2s; }

/* ---------- Prosa (Markdown) ---------- */

.prose { color: #C9D0E3; max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display); font-variation-settings: "wdth" 90;
  color: var(--text); letter-spacing: -.015em; margin-top: 1.8em;
}
.prose > h2:first-child { margin-top: 0; }
.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.375rem; }
.prose a { color: var(--cobalt-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45em; }
.prose li::marker { color: var(--cobalt); }
.prose blockquote {
  margin-left: 0; margin-right: 0; padding: 16px 20px;
  border-left: 3px solid var(--amber); background: var(--surface); border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.prose blockquote p { color: var(--text); }
.prose code { background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 5px; }
.prose pre {
  background: #050814; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; overflow-x: auto; font-size: .9rem; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.article-head { padding: clamp(48px, 8vw, 96px) 0 40px; }
.article-head .wrap { display: grid; gap: 20px; }
.article-meta { display: flex; gap: 20px; color: var(--muted); font-size: .9375rem; }
.prose-article { font-size: 1.125rem; line-height: 1.75; padding-bottom: 24px; }
.article-tags { margin: 24px 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 24px 0 72px; border-top: 1px solid var(--line); }
.share a { color: var(--cobalt-2); }

/* ---------- Contato ---------- */

.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.contact-side { display: grid; gap: 20px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form { gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: .9375rem; font-weight: 500; padding: 0; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none; -webkit-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) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field input::placeholder, .field textarea::placeholder { color: #5D6787; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(61, 107, 255, .25);
}
.field [aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: .875rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .9375rem; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.chip span:hover { border-color: var(--cobalt-2); }
.chip input:checked + span { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--cobalt-2); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .875rem; text-align: center; }
.form-status:empty { display: none; }

.alert { padding: 14px 16px; border-radius: var(--radius-s); font-size: .9375rem; border: 1px solid; }
.alert-ok { background: rgba(70, 211, 154, .08); border-color: rgba(70, 211, 154, .4); color: #9BF0CB; }
.alert-err { background: rgba(255, 122, 133, .08); border-color: rgba(255, 122, 133, .4); color: #FFB3BA; }

.mini-steps { padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); }
.mini-steps li::marker { color: var(--cobalt-2); }

/* ---------- Vazio e erro ---------- */

.empty { display: grid; gap: 18px; justify-items: start; padding: 40px; border: 1px dashed var(--line-2); border-radius: var(--radius-l); color: var(--muted); }
.error-page { padding: clamp(80px, 14vw, 160px) 0; }
.error-page .wrap { display: grid; gap: 20px; justify-items: start; }

/* ---------- Rodapé ---------- */

.site-footer { border-top: 1px solid var(--line); padding-top: clamp(56px, 8vw, 104px); }
.footer-cta {
  display: grid; gap: 18px; padding-bottom: clamp(48px, 7vw, 88px);
  border-bottom: 1px solid var(--line);
}
.footer-cta h2 {
  font-family: var(--font-display); font-variation-settings: "wdth" 80, "opsz" 96;
  font-weight: 700; font-size: clamp(2.5rem, 7vw, 6rem); line-height: .95; letter-spacing: -.04em; max-width: 14ch;
}
.footer-cta p { color: var(--muted); max-width: 52ch; font-size: 1.125rem; }
.footer-cta .actions { margin-top: 8px; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 48px 0; }
.footer-grid > div:first-child { display: grid; gap: 16px; align-content: start; max-width: 360px; }
.footer-grid h3 { font-size: .875rem; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid ul a { color: #C9D0E3; transition: color .2s; overflow-wrap: anywhere; }
.footer-grid ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

.wa-float {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Imagens ---------- */

.work-cover.has-img { padding: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.work-cover.has-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .6s var(--ease); }
.work-card:hover .work-cover.has-img img { transform: scale(1.03); }
.work-card.is-big .work-cover.has-img { aspect-ratio: auto; min-height: 100%; }
@media (max-width: 820px) { .work-card.is-big .work-cover.has-img { aspect-ratio: 16 / 10; } }

.case-cover.has-img { padding: 0; overflow: hidden; }
.case-cover.has-img img { width: 100%; height: auto; }

.post-item a.has-img { padding-top: 0; overflow: hidden; }
.post-thumb { width: calc(100% + 56px); height: auto; max-width: none; margin: 0 -28px 8px; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.post-list-full .post-item a.has-img { grid-template-columns: 180px 1fr 240px; padding-top: 32px; }
.post-list-full .post-thumb { grid-column: 3; grid-row: 1 / span 3; width: 100%; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); align-self: start; }
@media (max-width: 720px) {
  .post-list-full .post-item a.has-img { grid-template-columns: 1fr; }
  .post-list-full .post-thumb { grid-column: 1; grid-row: auto; order: -1; margin-bottom: 8px; }
}

.article-cover { margin-bottom: clamp(32px, 5vw, 56px); }
.article-cover img { width: 100%; height: auto; border-radius: var(--radius-l); border: 1px solid var(--line); }

.head-photo { margin: 0; width: 240px; aspect-ratio: 1; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line-2); }
.head-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) { .head-photo { width: 160px; order: -1; } }

.prose img { width: 100%; height: auto; }
