/* Arquivo de entrada do CSS. O build junta tudo em assets/css/site.css
   na ordem abaixo: tokens, base, componentes e seções. */
/* tokens.css */
/* Tokens de design: cores da marca, tipografia, espaços e movimento.
   Componentes usam os tokens semânticos (--surface-*, --text-*), nunca o hex direto. */
:root {
  /* Cores da marca */
  --blue-900: #0F2742; /* Azul profundo */
  --blue-800: #16345A;
  --blue-700: #21466F;
  --gold-500: #C8A96B; /* Champagne / dourado suave */
  --gold-700: #8A6A33; /* Dourado escuro: texto dourado sobre fundo claro (4,5:1) */
  --graphite: #1E1E1E; /* Grafite escuro */
  --warm-white: #F5F3EE; /* Branco quente */
  --stone-100: #ECE8DF;
  --stone-600: #55585E;
  --mist-300: #B4BCC8;
  --red-700: #9E2A2B;

  /* Semânticos */
  --surface: var(--warm-white);
  --surface-alt: var(--stone-100);
  --surface-dark: var(--blue-900);
  --surface-dark-alt: var(--blue-800);
  --surface-ink: var(--graphite);
  --text: var(--graphite);
  --text-muted: var(--stone-600);
  --text-on-dark: var(--warm-white);
  --text-on-dark-muted: var(--mist-300);
  --accent: var(--gold-500);
  --accent-text: var(--gold-700);
  --line: rgb(30 30 30 / 0.16);
  --line-on-dark: rgb(200 169 107 / 0.4);
  --danger: var(--red-700);
  --focus: var(--gold-500);
  --focus-on-light: var(--blue-700);

  /* Tipografia */
  --font-display: 'Marcellus', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-logo: 'Montserrat', var(--font-body);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  --step-3: clamp(2rem, 1.55rem + 1.8vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.8rem + 3vw, 4.75rem);

  --leading-tight: 1.08;
  --leading-snug: 1.3;
  --leading-body: 1.6;
  --measure: 64ch;

  /* Espaços (base 4px) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
  --container: 82rem;
  --header-h: 4.5rem;

  /* Formas */
  --radius-s: 2px;
  --radius-m: 4px;

  /* Movimento */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --dur-fast: 160ms;
  --dur-base: 260ms;
  --dur-slow: 900ms;

  /* Camadas */
  --z-header: 100;
  --z-float: 90;
  --z-skip: 1000;
}

/* base.css */
/* Base: reset leve, tipografia padrão, foco e utilitários de acessibilidade. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html.menu-open {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-variation-settings: 'wdth' 100;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 400;
  line-height: var(--leading-tight);
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* Foco visível em todos os elementos interativos */
:focus-visible {
  outline: 2px solid var(--focus-on-light);
  outline-offset: 3px;
}

.on-dark :focus-visible,
.site-header :focus-visible,
.hero :focus-visible,
.page-intro :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--focus);
}

main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-4);
  background: var(--warm-white);
  color: var(--blue-900);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

/* layout.css */
/* Layout: container, ritmo das seções e cabeçalhos de seção. */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section--tight {
  padding-block: calc(var(--section) * 0.6);
}

/* Faixa com fundo próprio (.section--band). Seções seguidas no mesmo fundo
   dividem o espaço entre elas, em vez de somá-lo. */
.section--band {
  background: var(--surface-alt);
}

.section:not(.section--band) + .section:not(.section--band),
.section--band + .section--band {
  padding-top: 0;
}

.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
  max-width: 48rem;
}

.section-head--split {
  max-width: none;
  align-items: end;
}

@media (min-width: 48em) {
  .section-head--split {
    grid-template-columns: 1fr auto;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  letter-spacing: -0.01em;
}

.section-lead {
  max-width: 40rem;
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}


/* components/button.css */
/* Botões, links de texto e etiquetas. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.button--large {
  min-height: 3.25rem;
  padding-inline: var(--space-6);
  font-size: var(--step-0);
}

.button--gold {
  background: var(--gold-500);
  color: var(--blue-900);
}

.button--gold:hover {
  background: #D6BC86;
}

.button--blue {
  background: var(--blue-900);
  color: var(--warm-white);
}

.button--blue:hover {
  background: var(--blue-700);
}

.button--outline-light {
  border-color: var(--line-on-dark);
  color: var(--text-on-dark);
}

.button--outline-light:hover {
  border-color: var(--gold-500);
  color: var(--gold-500);
}

.button--outline {
  border-color: var(--blue-900);
  color: var(--blue-900);
}

.button--outline:hover {
  background: var(--blue-900);
  color: var(--warm-white);
}

.button:active {
  transform: translateY(1px);
}

/* Link de texto com sublinhado em dourado que cresce no hover */
.text-link {
  justify-self: start;
  padding-block: var(--space-2);
  color: var(--blue-900);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
  transition: text-underline-offset var(--dur-fast) var(--ease-out);
}

.text-link:hover {
  text-underline-offset: 0.5em;
}

.tag {
  display: inline-block;
  justify-self: start;
  align-self: center;
  padding: 0.2em 0.65em;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--accent-text);
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.checklist {
  display: grid;
  gap: var(--space-2);
}

.checklist li {
  position: relative;
  padding-left: var(--space-5);
}

.checklist li::before {
  content: '';
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 0.75rem;
  height: 1px;
  background: var(--gold-500);
}

/* components/brand.css */
/* Marca: símbolo + nome na fonte do logo. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  text-decoration: none;
}

.brand__mark {
  width: 2.1rem;
  height: auto;
}

.brand__name {
  font-family: var(--font-logo);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__name b {
  font-weight: 700;
}

.brand--light {
  color: var(--text-on-dark);
}

.brand--dark {
  color: var(--blue-900);
}

/* components/dimension.css */
/* Cota: linha de medida com traços nas pontas e o texto no centro.
   Com .dimension--draw, as linhas "se desenham" do centro para fora ao carregar. */
.dimension {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--gold-500);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
}

.dimension::before,
.dimension::after {
  content: '';
  flex: 1;
  height: 0.75rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) var(--tick, left) center / 1px 100% no-repeat;
}

.dimension::after {
  --tick: right;
}

.dimension__label {
  flex: none;
  color: var(--text-on-dark);
}

@media (prefers-reduced-motion: no-preference) {
  .dimension--draw::before,
  .dimension--draw::after {
    animation: dimension-draw var(--dur-slow) var(--ease-out) 200ms both;
  }

  .dimension--draw::before {
    transform-origin: right center;
  }

  .dimension--draw::after {
    transform-origin: left center;
  }

  .dimension--draw .dimension__label {
    animation: dimension-label 500ms var(--ease-out) 700ms both;
  }
}

@keyframes dimension-draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes dimension-label {
  from {
    opacity: 0;
  }
}

/* components/photo.css */
/* Fotos com proporção fixa. */
.photo {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 3);
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--blue-800);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* components/drawing.css */
/* Desenhos técnicos dos serviços: traço claro sobre o azul da marca. */
.drawing {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--radius-s);
  background: var(--surface-dark);
}

.drawing svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawing__frame { stroke: var(--line-on-dark); stroke-width: 1; }
.drawing__line { stroke: var(--warm-white); stroke-width: 2; }
.drawing__thin { stroke: var(--mist-300); stroke-width: 1; }
.drawing__gold { stroke: var(--gold-500); stroke-width: 2.5; }
.drawing__dashed { stroke: var(--mist-300); stroke-width: 2; stroke-dasharray: 8 7; }
.drawing__panel { fill: var(--blue-800); stroke: var(--warm-white); stroke-width: 2; }
.drawing__solid { fill: var(--blue-800); stroke: var(--warm-white); stroke-width: 1; }
.drawing__cut { fill: var(--surface-dark); }
.drawing__leader { stroke: var(--mist-300); stroke-width: 1; }
.drawing__dot { fill: var(--gold-500); }
.drawing__screw { fill: var(--mist-300); }

/* O texto escala junto com o desenho: maior na tela estreita, para seguir legível. */
.drawing__label,
.drawing__note {
  stroke: none;
  font-family: var(--font-body);
}

.drawing__label { fill: var(--warm-white); font-size: 20px; }
.drawing__note { fill: var(--mist-300); font-size: 18px; }

@media (max-width: 55.99em) {
  .drawing { max-width: 34rem; }
}

@media (min-width: 72em) {
  .drawing__label { font-size: 16px; }
  .drawing__note { font-size: 14px; }
}

/* components/drawing-views.css */
/* Desenho com várias vistas: a parede gira de frente para o lado e a base é ampliada.
   As regras base descrevem a volta para a frente; as de data-current, a ida para um corte.
   Em cada sentido, os rótulos da vista atual somem primeiro e os da próxima entram por último. */
.wall-cut__zoom * {
  vector-effect: non-scaling-stroke;
}

.wall-front {
  transform-origin: 220px 230px;
  transition: transform 700ms ease-in-out 1100ms, opacity 200ms linear 1100ms;
}

.wall-front__labels {
  transition: opacity 300ms linear 1800ms;
}

.wall-cut {
  opacity: 0;
  transition: opacity 200ms linear 1100ms;
}

.wall-cut__zoom {
  transform-origin: 220px 400px;
  transition: transform 900ms ease-in-out 200ms;
}

.wall-cut__floor,
.wall-cut__labels {
  opacity: 0;
  transition: opacity 200ms linear;
}

.drawing-views svg > .drawing__note {
  transition: opacity 200ms linear;
}

[data-current='external'] svg > .drawing__note {
  opacity: 0;
}

.drawing-views:not([data-current='front']) .wall-front {
  opacity: 0;
  transform: scaleX(0.03);
  transition: transform 700ms ease-in-out 200ms, opacity 200ms linear 750ms;
}

.drawing-views:not([data-current='front']) .wall-front__labels {
  opacity: 0;
  transition: opacity 200ms linear;
}

/* O corte escolhido entra. */
[data-current='side'] .wall-cut--side,
[data-current='external'] .wall-cut--external {
  opacity: 1;
  transition: opacity 200ms linear 750ms;
}

[data-current='side'] .wall-cut--side .wall-cut__zoom,
[data-current='external'] .wall-cut--external .wall-cut__zoom {
  transform: scale(14);
  transition: transform 900ms ease-in-out 1000ms;
}

[data-current='side'] .wall-cut--side .wall-cut__floor,
[data-current='external'] .wall-cut--external .wall-cut__floor {
  opacity: 1;
  transition: opacity 300ms linear 1500ms;
}

[data-current='side'] .wall-cut__labels--side,
[data-current='external'] .wall-cut__labels--external {
  opacity: 1;
  transition: opacity 300ms linear 1900ms;
}

/* Ao trocar de um corte para o outro, o anterior só apaga, sem voltar o zoom à vista. */
[data-current='side'] .wall-cut--external,
[data-current='external'] .wall-cut--side {
  transition: opacity 200ms linear;
}

[data-current='side'] .wall-cut--external .wall-cut__zoom,
[data-current='external'] .wall-cut--side .wall-cut__zoom {
  transition: transform 0s linear 300ms;
}

.drawing-views__controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.drawing-views__controls[hidden] {
  display: none;
}

.drawing-views__button {
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.drawing-views__button[aria-pressed='true'] {
  border-color: var(--surface-dark);
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

@media (prefers-reduced-motion: reduce) {
  .drawing-views *,
  .drawing-views__button,
  .drawing-views svg > .drawing__note {
    transition: none;
  }
}

@media (max-width: 55.99em) {
  .drawing-views {
    max-width: 34rem;
  }
}

/* components/header.css */
/* Cabeçalho fixo. Transparente sobre a abertura azul; sólido depois de rolar. */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  color: var(--text-on-dark);
  transition: background-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.site-header.is-scrolled,
.site-header.is-open {
  background: var(--blue-900);
  box-shadow: 0 1px 0 var(--line-on-dark);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: var(--header-h);
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: calc(var(--space-2) * -1);
  border: 0;
  background: none;
}

.menu-toggle .icon {
  width: 1.6rem;
  height: 1.6rem;
}

.menu-toggle__close,
.is-open .menu-toggle__open {
  display: none;
}

.is-open .menu-toggle__close {
  display: block;
}

.nav__link,
.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.nav__link[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--gold-500);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.5em;
}

.lang-switch {
  padding-inline: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.nav__link:hover,
.lang-switch:hover {
  color: var(--gold-500);
}

/* Celular e tablet: menu em tela cheia */
@media (max-width: 63.99em) {
  .site-menu {
    position: fixed;
    inset: var(--header-h) 0 0;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-6) var(--gutter) var(--space-7);
    background: var(--blue-900);
    overflow-y: auto;
  }

  .is-open .site-menu {
    display: flex;
  }

  .nav {
    display: grid;
  }

  .nav__link {
    width: 100%;
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--line-on-dark);
    font-family: var(--font-display);
    font-size: var(--step-3);
  }

  .site-menu__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-6);
  }
}

/* Desktop: menu em linha */
@media (min-width: 64em) {
  .menu-toggle {
    display: none;
  }

  .site-menu,
  .nav,
  .site-menu__actions {
    display: flex;
    align-items: center;
  }

  .site-menu {
    gap: var(--space-6);
  }

  .nav {
    gap: var(--space-5);
  }

  .site-menu__actions {
    gap: var(--space-4);
  }
}

/* components/footer.css */
/* Rodapé em grafite, com contato e páginas. */
.site-footer {
  padding-block: var(--space-8) var(--space-6);
  background: var(--surface-ink);
  color: var(--text-on-dark);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-7) var(--space-6);
}

@media (min-width: 48em) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1.2fr 0.8fr 1fr;
  }
}

.site-footer__tagline {
  max-width: 30ch;
  margin-top: var(--space-4);
  color: var(--text-on-dark-muted);
}

.site-footer__title {
  margin-bottom: var(--space-4);
  color: var(--gold-500);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
}

.footer-list,
.footer-pages {
  display: grid;
  gap: var(--space-1);
}

.footer-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  overflow-wrap: anywhere;
}

.footer-list__item .icon {
  color: var(--gold-500);
}

.footer-list a,
.footer-pages a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.footer-list a:hover,
.footer-pages a:hover {
  color: var(--gold-500);
}

/* Pessoa para contato: nome em destaque, celular abaixo, tudo um link do WhatsApp */
.contact-person__link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-block: var(--space-2);
  text-decoration: none;
}

.contact-person__link .icon {
  margin-top: 0.15em;
  color: var(--gold-500);
}

.contact-person__text {
  display: grid;
  line-height: 1.35;
}

.contact-person__name {
  font-weight: 600;
}

.contact-person__role,
.contact-person__number {
  color: var(--text-on-dark-muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

.contact-person__link:hover .contact-person__name {
  color: var(--gold-500);
}

.footer-list--dark .contact-person__link .icon {
  color: var(--accent-text);
}

.footer-list--dark .contact-person__role,
.footer-list--dark .contact-person__number {
  color: var(--text-muted);
}

.footer-list--dark .contact-person__link:hover .contact-person__name {
  color: var(--blue-700);
}

.footer-list__muted {
  color: var(--text-on-dark-muted);
}

/* Variante sobre fundo claro (página de orçamento) */
.footer-list--dark a:hover {
  color: var(--blue-700);
}

.footer-list--dark .icon {
  color: var(--accent-text);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  /* Linha só na largura do conteúdo (sem invadir a margem lateral) */
  background: linear-gradient(rgb(245 243 238 / 0.12), rgb(245 243 238 / 0.12)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  color: var(--text-on-dark-muted);
  font-size: var(--step--1);
}

/* components/whatsapp.css */
/* Botão flutuante do WhatsApp. */
.whatsapp-float {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  z-index: var(--z-float);
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--blue-900);
  color: var(--gold-500);
  box-shadow: 0 0 0 1px var(--line-on-dark), 0 8px 24px rgb(15 39 66 / 0.28);
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.whatsapp-float .icon {
  width: 1.6rem;
  height: 1.6rem;
}

.whatsapp-float:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
}

.menu-open .whatsapp-float {
  display: none;
}

/* components/form.css */
/* Campos de formulário, opções em "chips" e mensagens de erro. */
.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field__label {
  padding: 0;
  font-weight: 600;
}

.field__label span {
  color: var(--danger);
}

.field__hint {
  margin-top: calc(var(--space-1) * -1);
  color: var(--text-muted);
  font-size: var(--step--1);
}

.field__input {
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgb(30 30 30 / 0.35);
  border-radius: var(--radius-m);
  background: #FFFFFF;
  font-size: max(16px, var(--step-0));
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field__input:hover {
  border-color: var(--blue-900);
}

.field__input:focus-visible {
  outline-offset: 0;
  border-color: var(--blue-900);
}

.field__input--area {
  resize: vertical;
  min-height: 8rem;
}

.field__input--select {
  appearance: none;
  padding-right: var(--space-7);
  background-image: linear-gradient(45deg, transparent 50%, var(--graphite) 50%),
    linear-gradient(-45deg, transparent 50%, var(--graphite) 50%);
  background-position: right 1.25rem center, right 0.9rem center;
  background-size: 0.375rem 0.375rem;
  background-repeat: no-repeat;
}

.has-error .field__input {
  border-color: var(--danger);
  border-width: 2px;
}

.field__error {
  color: var(--danger);
  font-size: var(--step--1);
  font-weight: 600;
}

.field-row {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 40em) {
  .field-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Opções em chips: o input real fica invisível, mas acessível por teclado */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgb(30 30 30 / 0.35);
  border-radius: 999px;
  background: #FFFFFF;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.choice:hover span {
  border-color: var(--blue-900);
}

.choice input:checked + span {
  border-color: var(--blue-900);
  background: var(--blue-900);
  color: var(--warm-white);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--focus-on-light);
  outline-offset: 2px;
}

.has-error .choice span {
  border-color: var(--danger);
}

.error-summary {
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--danger);
  background: #FFFFFF;
}

.error-summary:focus {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.error-summary__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--danger);
  font-weight: 600;
}

.error-summary ul {
  margin-top: var(--space-2);
  padding-left: var(--space-6);
}

.error-summary a {
  color: var(--danger);
}


/* sections/hero.css */
/* Abertura da home: o filme em destaque, medido por uma cota, depois título e
   ações. O nome AMEGI fecha a faixa, com as letras assentadas na borda inferior. */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + var(--space-5));
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

/* Largura limitada pela altura da tela, para o filme inteiro caber na primeira
   tela. A cota está dentro do mesmo bloco, então sempre mede o filme. */
.hero__stage {
  max-width: max(34rem, calc((100svh - var(--header-h) - 7rem) * 16 / 9));
  margin-inline: auto;
}

.hero__dimension {
  margin-bottom: var(--space-3);
}

.hero-film {
  position: relative;
}

.hero-film__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-s);
  background: var(--blue-800);
}

.hero-film__toggle {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
  background: rgb(15 39 66 / 0.85);
  color: var(--gold-500);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.hero-film__toggle:hover {
  background: var(--blue-900);
}

.hero .hero-film__toggle:focus-visible {
  outline-color: var(--blue-900);
}

.hero-film__toggle .icon {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
}

.hero-film__toggle[data-state='pause'] .hero-film__icon-pause,
.hero-film__toggle[data-state='play'] .hero-film__icon-play,
.hero-film__toggle[data-state='replay'] .hero-film__icon-replay {
  display: block;
}

.hero__grid {
  display: grid;
  gap: var(--space-5);
  padding-top: var(--space-7);
}

.hero__title {
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: var(--step-4);
  letter-spacing: -0.015em;
}

.hero__side {
  display: grid;
  align-content: end;
  gap: var(--space-5);
}

.hero__lead {
  max-width: 38rem;
  color: var(--text-on-dark-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (min-width: 56em) {
  .hero__grid {
    grid-template-columns: 7fr 5fr;
    column-gap: var(--space-8);
  }
}

.hero__mark {
  container-type: inline-size;
  margin-top: var(--section);
}

/* 32cqi = "AMEGI" em Marcellus ocupando toda a largura do container.
   A altura de linha corta o espaço sob as letras, que pousam na borda da faixa. */
.hero__wordmark {
  color: var(--warm-white);
  font-family: var(--font-display);
  font-size: 32cqi;
  line-height: 0.71;
  letter-spacing: -0.005em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

/* sections/page-intro.css */
/* Abertura das páginas internas. */
.page-intro {
  padding-block: calc(var(--header-h) + var(--space-8)) var(--space-8);
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.page-intro__inner {
  display: grid;
  gap: var(--space-5);
}

.page-intro__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 1.5rem + 7vw, 8rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.page-intro__lead {
  max-width: 40rem;
  color: var(--text-on-dark-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

.page-intro__measure {
  margin-top: var(--space-5);
}

/* sections/intro.css */
/* Apresentação + três fatos. Cada fato tem uma cota sob o número. */
.intro__grid {
  display: grid;
  gap: var(--space-6);
}

.intro__text {
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: var(--leading-body);
}

@media (min-width: 64em) {
  .intro__grid {
    grid-template-columns: 5fr 6fr;
    column-gap: var(--space-9);
  }

  .facts {
    grid-column: 1 / -1;
  }
}

.facts {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

@media (min-width: 48em) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* No HTML o rótulo vem antes do número (leitura correta); na tela, o número vem primeiro. */
.fact {
  display: grid;
  gap: var(--space-3);
}

.fact__value {
  order: -2;
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
}

.fact::before {
  content: '';
  order: -1;
  height: 0.75rem;
  background:
    linear-gradient(var(--gold-500), var(--gold-500)) center / 100% 1px no-repeat,
    linear-gradient(var(--gold-500), var(--gold-500)) left center / 1px 100% no-repeat,
    linear-gradient(var(--gold-500), var(--gold-500)) right center / 1px 100% no-repeat;
}

.fact__label {
  max-width: 24ch;
  color: var(--text-muted);
}

/* sections/services-index.css */
/* Lista de serviços da home: linhas largas, nome em serifa grande. */
.service-rows {
  border-top: 1px solid var(--line);
}

.service-row {
  position: relative;
  display: grid;
  gap: var(--space-1) var(--space-5);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.service-row::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out);
}

.service-row:hover::after,
.service-row:focus-visible::after {
  transform: scaleX(1);
}

.service-row__name {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.15;
}

.service-row__summary {
  color: var(--text-muted);
}

@media (min-width: 48em) {
  .service-row {
    grid-template-columns: 5fr 5fr 2fr;
    align-items: center;
  }

  .service-row .tag {
    justify-self: end;
  }
}

/* sections/marquee.css */
/* Faixa de palavras grandes em movimento contínuo. */
.marquee {
  position: relative;
  border-block: 1px solid var(--line);
}

.marquee__viewport {
  overflow: hidden;
  padding-block: var(--space-6);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  width: max-content;
  will-change: transform;
}

.marquee__word {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: clamp(3rem, 1.5rem + 6vw, 7.5rem);
  line-height: 1;
  white-space: nowrap;
}

.marquee__mark {
  flex: none;
  width: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
  color: var(--gold-500);
}

/* Botão de pausa apoiado sobre a linha inferior da faixa */
.marquee__toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue-900);
  transform: translateY(50%);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.marquee__toggle:hover {
  border-color: var(--gold-500);
  color: var(--accent-text);
}

.marquee__toggle .icon {
  width: 1rem;
  height: 1rem;
}

.marquee__icon-play,
.marquee__toggle[aria-pressed='true'] .marquee__icon-pause {
  display: none;
}

.marquee__toggle[aria-pressed='true'] .marquee__icon-play {
  display: block;
}

/* Sem movimento, o botão não tem função */
@media (prefers-reduced-motion: reduce) {
  .marquee__toggle {
    display: none;
  }
}

/* sections/work.css */
/* Obras: destaque na home (grade assimétrica) e cartão de obra. */
.work__grid {
  display: grid;
  gap: var(--space-6) var(--space-5);
}

@media (min-width: 48em) {
  .work__grid {
    grid-template-columns: 7fr 5fr;
    grid-template-rows: auto auto;
  }

  .work__grid > :first-child {
    grid-row: span 2;
  }

  .work__grid:has(> :only-child) {
    grid-template-columns: 1fr;
  }
}

.project {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}

.project__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 var(--space-4);
}

.project__title {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.15;
}

.project__place {
  grid-column: 1;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.project__category {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  color: var(--accent-text);
  font-size: var(--step--1);
  font-weight: 500;
}

.project .photo img {
  transition: transform var(--dur-slow) var(--ease-out);
}

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

/* sections/compare.css */
/* Comparador antes e depois. A foto "antes" é recortada até a posição --pos. */
.compare-section__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 64em) {
  .compare-section__grid {
    grid-template-columns: 4fr 8fr;
    align-items: center;
  }

  .compare-section__grid .section-head {
    margin-bottom: 0;
  }
}

.compare-list {
  display: grid;
  gap: var(--space-8) var(--space-5);
}

@media (min-width: 64em) {
  .compare-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.compare-figure {
  display: grid;
  gap: var(--space-3);
}

.compare-figure__caption {
  color: var(--text-muted);
  font-size: var(--step--1);
}

.compare {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-s);
}

.compare__before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--gold-500);
  pointer-events: none;
}

/* Alça circular no meio da linha */
.compare__line::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  background: var(--blue-900)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8A96B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E")
    center / 1.25rem no-repeat;
  transform: translate(-50%, -50%);
}

.compare__tag {
  position: absolute;
  top: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-s);
  background: rgb(15 39 66 / 0.85);
  color: var(--warm-white);
  font-size: var(--step--1);
  font-weight: 600;
  pointer-events: none;
}

.compare__tag--before {
  left: var(--space-3);
}

.compare__tag--after {
  right: var(--space-3);
}

/* O range cobre toda a imagem; o polegar invisível ocupa a altura inteira. */
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.compare__range::-webkit-slider-thumb {
  width: 3rem;
  height: 100vh;
  -webkit-appearance: none;
}

.compare__range::-moz-range-thumb {
  width: 3rem;
  height: 100vh;
}

.compare:has(.compare__range:focus-visible) .compare__line::after {
  outline: 2px solid var(--warm-white);
  outline-offset: 3px;
}

/* sections/process.css */
/* Etapas da obra ligadas por uma cota contínua no desktop. */
.process__steps {
  display: grid;
  gap: var(--space-6);
}

.process__step {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding-left: var(--space-6);
  border-left: 1px solid var(--gold-500);
}

.process__number {
  color: var(--accent-text);
  font-size: var(--step-1);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.process__title {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-1);
}

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

@media (min-width: 64em) {
  .process__steps {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-5);
    padding-top: var(--space-6);
    background: linear-gradient(var(--gold-500), var(--gold-500)) top / 100% 1px no-repeat;
  }

  /* Cada etapa vira um traço vertical saindo da cota */
  .process__step {
    padding-left: 0;
    padding-top: var(--space-4);
    border-left: 0;
  }

  .process__step::before {
    content: '';
    position: absolute;
    top: calc(var(--space-6) * -1 - 6px);
    left: 0;
    width: 1px;
    height: calc(var(--space-6) + 12px);
    background: var(--gold-500);
  }

  .process__step:last-child::after {
    content: '';
    position: absolute;
    top: calc(var(--space-6) * -1 - 6px);
    right: 0;
    width: 1px;
    height: 12px;
    background: var(--gold-500);
  }
}

/* sections/cta.css */
/* Chamada final para orçamento. */
.cta {
  padding-block: var(--section);
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.cta__inner {
  display: grid;
  gap: var(--space-6);
}

.cta__title {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: var(--step-4);
  letter-spacing: -0.015em;
}

.cta__side {
  display: grid;
  align-content: end;
  justify-items: start;
  gap: var(--space-5);
}

.cta__text {
  max-width: 34ch;
  color: var(--text-on-dark-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

@media (min-width: 64em) {
  .cta__inner {
    grid-template-columns: 8fr 4fr;
    align-items: end;
  }
}

/* sections/services.css */
/* Página de serviços: blocos de foto + texto alternados, e "para quem". */
.service-details .container {
  display: grid;
  gap: var(--section);
}

.service {
  display: grid;
  gap: var(--space-6);
  scroll-margin-top: calc(var(--header-h) + var(--space-5));
}

.service__body {
  display: grid;
  align-content: center;
  gap: var(--space-4);
}

.service__title {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-3);
}

.service__text {
  max-width: 36rem;
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

.service__subtitle {
  padding-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
}

@media (min-width: 56em) {
  .service {
    grid-template-columns: 6fr 5fr;
    column-gap: var(--space-8);
    align-items: center;
  }

  .service__photo--end {
    order: 2;
  }

  .service:has(.service__photo--end) {
    grid-template-columns: 5fr 6fr;
  }
}

.audience__list {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-7);
}

@media (min-width: 48em) {
  .audience__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.audience__item {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gold-500);
  color: var(--text-muted);
}

.audience__name {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-2);
}

/* sections/gallery.css */
/* Portfólio: barra de filtros e grade de obras. */
.gallery__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter {
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-5);
  border: 1px solid rgb(30 30 30 / 0.35);
  border-radius: 999px;
  background: transparent;
  touch-action: manipulation;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.filter:hover {
  border-color: var(--blue-900);
}

.filter[aria-pressed='true'] {
  border-color: var(--blue-900);
  background: var(--blue-900);
  color: var(--warm-white);
}

.gallery__count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.gallery__grid {
  display: grid;
  gap: var(--space-7) var(--space-5);
}

@media (min-width: 40em) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Ritmo de revista: a coluna do meio desce um pouco */
  .gallery__grid > :nth-child(3n + 2) {
    margin-top: var(--space-8);
  }
}

.gallery__empty {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  max-width: 36rem;
  color: var(--text-muted);
}

/* sections/about.css */
/* Página Sobre: história, compromissos e região. */
.story__grid {
  display: grid;
  gap: var(--space-7);
}

.story__body {
  display: grid;
  align-content: start;
  gap: var(--space-5);
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: var(--leading-body);
}

.story__body p {
  color: var(--text-muted);
}

@media (min-width: 56em) {
  .story__grid:has(.story__photo) {
    grid-template-columns: 7fr 5fr;
    column-gap: var(--space-8);
    align-items: start;
  }

  /* Sem foto: título à esquerda e texto à direita, como em "Onde atendemos". */
  .story__body--wide {
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-8);
    max-width: none;
  }

  .story__body--wide > p {
    grid-column: 2;
    max-width: var(--measure);
  }
}

.values__list {
  display: grid;
  gap: var(--space-6) var(--space-7);
  margin-top: var(--space-7);
}

@media (min-width: 48em) {
  .values__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.values__item {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gold-500);
  color: var(--text-muted);
}

.values__title {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-2);
}

.region__grid {
  display: grid;
  gap: var(--space-4);
}

.region__text {
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

@media (min-width: 56em) {
  .region__grid {
    grid-template-columns: 5fr 7fr;
    align-items: baseline;
  }
}

/* sections/quote.css */
/* Página de orçamento: formulário e coluna lateral. */
.quote__grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 64em) {
  .quote__grid {
    grid-template-columns: 7fr 4fr;
    column-gap: var(--space-9);
    align-items: start;
  }

  .quote__aside {
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }
}

.quote-form {
  display: grid;
  gap: var(--space-7);
}

.quote-form__required {
  color: var(--text-muted);
  font-size: var(--step--1);
}

.quote-form__group {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.quote-form__legend {
  width: 100%;
  margin-bottom: var(--space-5);
  padding: 0 0 var(--space-3);
  border-bottom: 1px solid var(--gold-500);
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-2);
}

.quote-form__submit {
  justify-self: start;
}

.quote-form__status:not(:empty) {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--gold-500);
  background: #FFFFFF;
}

.quote__aside {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--surface-alt);
}

.quote__aside-title {
  color: var(--blue-900);
  font-family: var(--font-display);
  font-size: var(--step-2);
}

.quote__aside-title + * {
  margin-top: calc(var(--space-2) * -1);
}

.next-steps {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
  color: var(--text-muted);
}

.next-steps li::marker {
  color: var(--accent-text);
  font-family: var(--font-display);
}

/* sections/story.css */
/* Obra conduzida pelo scroll. Sem JavaScript é uma lista; com .is-live a cena
   fica presa na tela e os textos se sobrepõem. */
.story {
  position: relative;
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.story__scene,
.story__scrim,
.story__skip,
.story__progress {
  display: none;
}

.story__steps {
  display: grid;
  gap: var(--space-7);
  padding: var(--section) var(--gutter);
  list-style: none;
}

.story__count {
  color: var(--accent);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.story__title {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: var(--leading-tight);
}

.story__text {
  max-width: 30rem;
  margin-top: var(--space-3);
  color: var(--text-on-dark-muted);
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

.story__hint {
  margin-top: var(--space-5);
  color: var(--accent);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
}

.story__hint::after {
  content: ' \2193';
}

/* Cena viva */
.story.is-live {
  height: 1000vh;
  height: 1000svh;
}

.is-live .story__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.is-live .story__scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.is-live .story__steps {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  pointer-events: none;
}

.is-live .story__step {
  position: absolute;
  inset-inline: var(--gutter);
  top: calc(var(--header-h) + var(--space-5));
  opacity: 0;
}

.is-live .story__scrim {
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(180deg, rgb(15 39 66 / 0.95) 22%, rgb(15 39 66 / 0) 40%);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}

.is-near .story__scrim {
  opacity: 0;
}

.is-live .story__skip {
  position: absolute;
  left: var(--gutter);
  bottom: var(--space-4);
  display: block;
  padding: var(--space-2) 0;
  color: var(--text-on-dark-muted);
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Perto da porta o texto fica sobre a fachada: ganha um fundo próprio. */
.story__step[data-step='enter'] .story__title {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-s);
  background: var(--blue-900);
}

.is-near .story__skip {
  display: none;
}

.is-live .story__progress {
  position: absolute;
  inset: auto 0 0;
  display: block;
  height: 3px;
  background: rgb(200 169 107 / 0.18);
}

.story__progress span {
  display: block;
  height: 100%;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
}

/* Tela larga: texto à esquerda, cena à direita */
@media (min-aspect-ratio: 11/10) {
  .is-live .story__step {
    inset-inline: var(--gutter) auto;
    top: 50%;
    width: 36vw;
    max-width: 30rem;
    margin-top: -6rem;
  }

  .is-live .story__scrim {
    background: linear-gradient(90deg, rgb(15 39 66 / 0.95) 25%, rgb(15 39 66 / 0) 42%);
  }
}

/* sections/story-final.css */
/* A pergunta final, escrita na parede da sala. */
.story__final {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  padding: 0 var(--gutter) var(--section);
}

.story__final-title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
}

.story__final-lead {
  max-width: 26rem;
  font-size: var(--step-1);
  line-height: var(--leading-snug);
}

.story__final-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}

.button--blue {
  background: var(--blue-900);
  color: var(--warm-white);
}

.button--blue:hover {
  background: var(--blue-700);
}

.button--blue .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.story__final-link {
  font-size: var(--step-0);
  font-weight: 600;
  text-underline-offset: 0.25em;
}

.story__note {
  display: none;
}

.is-live .story__final {
  position: absolute;
  /* Entre a janela e a marcenaria: o vão acompanha a escala do interior. */
  inset: calc(var(--header-h) + 4.5rem) 0 auto;
  width: min(max(42vw, 66vh), 100vw - var(--gutter) * 2);
  margin-inline: auto;
  justify-items: center;
  gap: var(--space-3);
  padding: 0;
  color: var(--blue-900);
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.is-live .story__final.is-active {
  pointer-events: auto;
}

.is-live .story__final-actions {
  justify-content: center;
}

.is-inside .story__note {
  position: absolute;
  bottom: var(--space-4);
  left: var(--gutter);
  display: block;
  color: var(--blue-900);
  font-size: 0.8125rem;
}

/* sections/story-scene.css */
/* Cores e traços do desenho da obra. */
.story__scene {
  --st-soil: #0B1E34;
  --st-concrete: #3B5A7C;
  --st-plaster: #DAD5C9;
  --st-wood: #9C7744;
  --st-wood-dark: #6E5129;
  --st-wood-room: #B88A57;
  --st-leaf: #2F5C4A;
  --st-leaf-light: #47806A;
  --st-clay: #B9673F;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-part[data-kind='draw'] path {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--t, 1));
}

/* Planta e terreno */
.st-grid { stroke: var(--mist-300); stroke-width: 1; opacity: 0.09; }
.st-sky { fill: url(#g-sky); }
.st-stars { stroke: var(--warm-white); stroke-width: 2.5; opacity: 0.55; }
.st-soil { fill: var(--st-soil); }
.st-soil-marks { stroke: var(--mist-300); stroke-width: 1; opacity: 0.16; }
.st-ground-line { stroke: var(--warm-white); stroke-width: 2.5; }
.st-line { stroke: var(--warm-white); stroke-width: 2.5; }
.st-thin { stroke: var(--mist-300); stroke-width: 1.25; }
.st-gold { stroke: var(--gold-500); stroke-width: 3; }
.st-dashed { stroke: var(--mist-300); stroke-width: 1.25; stroke-dasharray: 1; }

/* Obra */
.st-cut { fill: var(--blue-800); }
.st-concrete { fill: var(--st-concrete); stroke: var(--warm-white); stroke-width: 2; }
.st-rebar { stroke: var(--gold-500); stroke-width: 2; }
.st-masonry { fill: var(--blue-800); }
.st-bricks { stroke: var(--mist-300); stroke-width: 1; opacity: 0.5; }
.st-roof { fill: var(--blue-700); stroke: var(--warm-white); stroke-width: 2; }
.st-roof-lines { stroke: var(--mist-300); stroke-width: 1; opacity: 0.45; }
.st-eave { stroke: var(--gold-500); stroke-width: 4; }
.st-panel { fill: var(--blue-800); stroke: var(--gold-500); stroke-width: 2.5; }
.st-outlet { fill: var(--gold-500); }

/* Fachada */
.st-plaster { fill: var(--st-plaster); }
.st-band { fill: var(--blue-900); }
.st-plinth { fill: var(--blue-700); }
.st-glass { fill: url(#g-glass); }
.st-lit { fill: url(#g-lit); }
.st-frame { stroke: var(--blue-900); stroke-width: 5; }
.st-rail-glass { fill: var(--warm-white); fill-opacity: 0.16; }
.st-rail { stroke: var(--blue-900); stroke-width: 3; }
.st-wood { fill: var(--st-wood); }
.st-wood-lines { stroke: var(--st-wood-dark); stroke-width: 2; }
.st-halo { fill: url(#g-halo); }
.st-sconce { fill: var(--warm-white); }
.st-doorway { fill: var(--graphite); }
.st-door-frame { stroke: var(--blue-900); stroke-width: 8; }
.st-step { fill: var(--stone-100); }
.st-spill { fill: url(#g-spill); }

/* Folha da porta */
.st-leaf { fill: var(--st-wood-dark); }
.st-leaf-panel { fill: var(--st-wood); }
.st-leaf-handle { fill: var(--warm-white); }
.st-leaf-shade { fill: var(--graphite); opacity: 0; }

/* Jardim */
.st-lawn { fill: url(#g-lawn); }
.st-path { fill: #8D8B83; }
.st-path-lines { stroke: var(--blue-900); stroke-width: 3; opacity: 0.5; }
.st-hedge { fill: var(--st-leaf); }
.st-trunk { fill: var(--st-wood-dark); }
.st-leaf-back { fill: #1F4538; }
.st-leaf-front { fill: var(--st-leaf); }

/* sections/story-room.css */
/* Interior: a única cena em cores reais. */
.st-room-wall { fill: var(--warm-white); }
.st-room-ceiling { fill: #FBFAF6; }
.st-room-soffit { fill: #FFFFFF; }
.st-room-led { fill: url(#g-led); }
.st-room-ledline { stroke: #FFE3A8; stroke-width: 3; }
.st-cone { fill: url(#g-cone); }
.st-spot { fill: var(--graphite); }
.st-room-frame { stroke: var(--graphite); stroke-width: 7; }
.st-room-curtain { fill: #E4DCC9; }
.st-room-curtain-lines { stroke: #C9BFA8; stroke-width: 2; }

.st-room-wood { fill: var(--st-wood-room); }
.st-room-niche { fill: #6F4F2B; }
.st-room-door { fill: #A97B4B; stroke: #8F6638; stroke-width: 2; }
.st-room-pull { stroke: var(--gold-500); stroke-width: 4; }
.st-room-book { fill: var(--blue-700); }
.st-room-book-b { fill: var(--gold-500); }
.st-room-vase { fill: var(--stone-100); }

.st-room-panel { fill: #A97B4B; }
.st-room-slats { stroke: #7F5B30; stroke-width: 4; }
.st-room-floor { fill: url(#g-floor); }
.st-room-planks { stroke: #8F6638; stroke-width: 1.5; opacity: 0.55; }
.st-room-base { fill: #FFFFFF; }
.st-room-rug { fill: #D9CFBB; }
.st-room-shadow { fill: #3A2410; opacity: 0.28; }

.st-sofa { fill: var(--blue-800); }
.st-sofa-back { fill: var(--blue-900); }
.st-sofa-seat { fill: var(--blue-700); }
.st-room-leg { stroke: #4A3218; stroke-width: 8; }
.st-pillow-gold { fill: var(--gold-500); }
.st-pillow-clay { fill: var(--st-clay); }

.st-table-leg { stroke: #4A3218; stroke-width: 6; }
.st-table-top { fill: #6F4F2B; }
.st-table-edge { fill: #8F6638; }

.st-leaf-a { fill: var(--st-leaf); }
.st-leaf-b { fill: var(--st-leaf-light); }
.st-pot { fill: var(--st-clay); }

.st-lamp-glow { fill: #FFE3A8; opacity: 0.22; }
.st-lamp-rod { stroke: var(--graphite); stroke-width: 5; }
.st-lamp-shade { fill: #F7E6BF; stroke: #D9B67A; stroke-width: 2; }

