/* ==========================================================================
   Analu Harrell: site
   Três tintas (velvet, olivency, verde) e um papel. Tudo chapado:
   sem degradê, sem sombra, sem canto arredondado.
   ========================================================================== */

/* --- Fontes ---------------------------------------------------------------
   A fonte da marca é a Milligram (Zetafonts), que é licenciada.
   1. Compre a licença web de Milligram Macro Bold e Milligram Text (Regular e Medium).
   2. Coloque os arquivos .woff2 em assets/fonts/.
   3. Em cada bloco abaixo, troque a linha "src" pela versão com url() que está comentada.
   Enquanto isso, o navegador usa a Milligram se ela estiver instalada na máquina e,
   se não estiver, as substitutas abertas Wix Madefor Display e Wix Madefor Text. */
@font-face {
  font-family: "Milligram Macro";
  src: local("Milligram Macro Bold"), local("MilligramMacro-Bold");
  /* src: url("../fonts/MilligramMacro-Bold.woff2") format("woff2"); */
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Milligram Text";
  src: local("Milligram Text Regular"), local("MilligramText-Regular");
  /* src: url("../fonts/MilligramText-Regular.woff2") format("woff2"); */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Milligram Text";
  src: local("Milligram Text Medium"), local("MilligramText-Medium");
  /* src: url("../fonts/MilligramText-Medium.woff2") format("woff2"); */
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

/* --- Fundamentos ---------------------------------------------------------- */
:root {
  --velvet: #3b0626; /* Velvet Fóssil */
  --olive: #9f9f55; /* Olivency */
  --green: #143221; /* verde escuro */
  --paper: #e9e8d6; /* papel: Olivency clareada */
  --mauve: #c9aab7; /* velvet clareado, para a voz burocrática sobre o velvet */

  --font-display: "Milligram Macro", "Wix Madefor Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Milligram Text", "Wix Madefor Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-official: "Times New Roman", Times, "Liberation Serif", "Nimbus Roman", serif;

  --size-small: 0.9375rem;
  --size-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --size-lead: clamp(1.1875rem, 1.02rem + 0.7vw, 1.5rem);
  --size-name: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  --size-plain: clamp(1.75rem, 1.05rem + 2.3vw, 3rem);
  --size-title: clamp(2.5rem, 1.5rem + 3.7vw, 4.5rem);

  --margin: clamp(1.25rem, 4.2vw, 3.75rem);
  --gutter: clamp(1rem, 2.2vw, 2rem);
  --band-pad: clamp(4rem, 9.5vw, 8.5rem);
  --rule: 2px;
  --tight: -0.058em; /* a Milligram Macro pede letras encostando */
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--olive) var(--velvet);
}

::selection {
  background: var(--olive);
  color: var(--velvet);
}

body {
  margin: 0;
  background: var(--velvet);
  color: var(--paper);
  font-family: var(--font-text);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: 0;
  min-inline-size: 0;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tight);
  line-height: 0.94;
  color: var(--voice);
}

:focus-visible {
  outline: 3px solid var(--voice, currentColor);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  top: 0;
  left: var(--margin);
  z-index: 10;
  padding: 0.6em 1em;
  background: var(--olive);
  color: var(--velvet);
  font-weight: 600;
  transform: translateY(-130%);
}

.skip:focus {
  transform: translateY(0.5rem);
}

/* --- Faixas de cor ---------------------------------------------------------
   Cada faixa define o fundo (--bg), o texto (--ink), a voz da Analu (--voice),
   a voz burocrática (--ghost), a caneta que risca (--pen) e as cores do botão. */
.band {
  background: var(--bg);
  color: var(--ink);
}

.band--velvet {
  --bg: var(--velvet);
  --ink: var(--paper);
  --voice: var(--olive);
  --ghost: var(--mauve);
  --pen: var(--olive);
  --action-bg: var(--olive);
  --action-ink: var(--velvet);
}

.band--olive ::selection {
  background: var(--velvet);
  color: var(--olive);
}

.band--olive {
  --bg: var(--olive);
  --ink: var(--velvet);
  --voice: var(--velvet);
  --ghost: var(--velvet);
  --pen: var(--velvet);
  --action-bg: var(--green);
  --action-ink: var(--paper);
}

.band--paper {
  --bg: var(--paper);
  --ink: var(--velvet);
  --voice: var(--velvet);
  --ghost: var(--velvet);
  --pen: var(--velvet);
  --action-bg: var(--green);
  --action-ink: var(--paper);
}

.band--green {
  --bg: var(--green);
  --ink: var(--paper);
  --voice: var(--olive);
  --ghost: var(--paper);
  --pen: var(--olive);
  --action-bg: var(--olive);
  --action-ink: var(--green);
}

.wrap {
  max-width: 104rem;
  margin-inline: auto;
  padding-inline: var(--margin);
}

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

/* --- Peças comuns ---------------------------------------------------------- */
.section-title {
  font-size: var(--size-title);
  text-wrap: balance;
}

.lead {
  max-width: 36ch;
  font-size: var(--size-lead);
  line-height: 1.34;
}

.section-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--voice);
  text-decoration-thickness: var(--rule);
  text-underline-offset: 0.24em;
}

.text-link:hover {
  text-decoration-thickness: 4px;
}

.button {
  display: inline-block;
  padding: 1.05em 1.5em 1.1em;
  border: var(--rule) solid var(--action-bg);
  border-radius: 0;
  background: var(--action-bg);
  color: var(--action-ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s ease-out, color 0.12s ease-out;
}

.button:hover {
  background: transparent;
  color: var(--action-bg);
}

/* A voz burocrática: Times, riscada. */
.jargon {
  font-family: var(--font-official);
  line-height: 1.3;
  color: var(--ghost);
}

.jargon s {
  text-decoration: none;
  background-image: linear-gradient(var(--pen), var(--pen));
  background-repeat: no-repeat;
  background-position: 0 60%;
  background-size: 100% max(2px, 0.075em);
}

/* --- Cabeçalho ------------------------------------------------------------- */
.masthead {
  padding-block: clamp(1rem, 2vw, 1.6rem);
}

.masthead-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand lang"
    "nav nav";
  align-items: baseline;
  gap: 0.9rem 1.5rem;
}

.brand {
  grid-area: brand;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.85rem;
}

/* A logo fornecida pelo estúdio, na cor do papel, para os fundos Velvet. */
.logo {
  display: block;
  flex: none;
}

.logo-image {
  display: block;
  width: clamp(9.75rem, 7.5rem + 6.4vw, 13rem);
  height: auto;
}

/* Nome em texto, usado só quando não há arquivo de logo em src/site.json. */
.wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
  color: var(--voice);
  text-decoration: none;
  white-space: nowrap;
}

.descriptor {
  font-size: var(--size-small);
  color: var(--ghost);
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem clamp(1rem, 3.5vw, 1.75rem);
  font-size: 1rem;
  font-weight: 500;
}

.nav a,
.footer-nav a {
  padding-block: 0.25rem;
  text-decoration: none;
}

.nav a:hover,
.footer-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--voice);
  text-decoration-thickness: var(--rule);
  text-underline-offset: 0.3em;
}

.lang-link {
  grid-area: lang;
  display: inline-block;
  padding: 0.3em 0.7em 0.36em;
  border: var(--rule) solid var(--voice);
  color: var(--voice);
  font-size: var(--size-small);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s ease-out, color 0.12s ease-out;
}

.lang-link:hover {
  background: var(--voice);
  color: var(--bg);
}

/* --- Hero ------------------------------------------------------------------ */
.hero {
  padding-block: clamp(1.75rem, 4vh, 3.5rem) clamp(3rem, 5vw, 4.5rem);
  overflow-x: clip;
}

.hero-jargon {
  max-width: 58ch;
  font-size: calc(var(--size-lead) * 1.1);
}

.bridge {
  margin-top: 1em;
  font-size: var(--size-lead);
  font-weight: 500;
  color: var(--voice);
}

.hero-fit {
  container-type: inline-size;
  margin-top: clamp(0.5rem, 1.4vw, 1.1rem);
}

/* O título desce em degraus, como notas de discurso batidas frase a frase.
   O tamanho da letra e o degrau exatos são calculados em assets/js/site.js,
   dentro dos limites --step-min e --step-max (em "em"), para o título
   atravessar a página de margem a margem. */
.hero-title {
  --step-min: 0.5;
  --step-max: 2.6;
  --step: 0.5em;
  font-size: var(--hero-size, 11cqi);
  letter-spacing: -0.062em;
  line-height: 0.87;
}

.hero-title .line {
  display: block;
  width: max-content;
  margin-left: calc(var(--i) * var(--step));
  white-space: nowrap;
}

.hero-foot {
  display: grid;
  gap: 1.75rem;
  margin-top: clamp(2rem, 3.4vw, 3rem);
}

.hero-intro {
  max-width: 50ch;
  font-size: var(--size-lead);
  line-height: 1.34;
}

/* --- Serviços --------------------------------------------------------------- */
.service-list {
  border-bottom: var(--rule) solid var(--ink);
}

.service {
  display: grid;
  gap: 1.1rem;
  padding-block: clamp(1.75rem, 3.2vw, 3rem);
  border-top: var(--rule) solid var(--ink);
}

.service-name {
  font-size: var(--size-name);
  letter-spacing: -0.05em;
  line-height: 1;
  text-wrap: balance;
}

.deliverables {
  margin-top: 1rem;
  font-weight: 500;
}

.deliverables li {
  position: relative;
  margin-top: 0.35em;
  padding-left: 1.15em;
}

.deliverables li::before {
  content: "";
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 0.42em;
  height: 0.42em;
  background: currentColor;
}

.rewrite .jargon {
  max-width: 42ch;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
}

.plain {
  max-width: 12.5em;
  margin-top: 0.5em;
  font-family: var(--font-display);
  font-size: var(--size-plain);
  font-weight: 800;
  letter-spacing: var(--tight);
  line-height: 0.96;
  color: var(--voice);
  text-wrap: balance;
}

/* --- Trabalhos -------------------------------------------------------------- */
.work-grid {
  display: grid;
  gap: 3rem;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.testimonial blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.1rem + 2.7vw, 3.4rem);
  font-weight: 800;
  letter-spacing: var(--tight);
  line-height: 0.98;
  text-indent: -0.4em;
  padding-left: 0.4em;
}

.testimonial figcaption {
  margin-top: 1.4rem;
  padding-left: calc(0.4 * clamp(1.9rem, 1.1rem + 2.7vw, 3.4rem));
}

.cases {
  border-bottom: var(--rule) solid var(--ink);
}

.case {
  display: grid;
  gap: 0.4rem;
  padding-block: 1.35rem 1.6rem;
  border-top: var(--rule) solid var(--ink);
}

.case-kind {
  font-size: var(--size-small);
  font-weight: 600;
}

.case-title {
  font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem);
  letter-spacing: -0.048em;
  line-height: 1.02;
}

/* --- Newsletter ------------------------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 1.5rem;
}

.issues {
  border-bottom: var(--rule) solid var(--voice);
}

.issue {
  display: grid;
  gap: 0.6rem;
  padding-block: clamp(1.4rem, 2.6vw, 2.25rem);
  border-top: var(--rule) solid var(--voice);
}

.issue time {
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--voice);
}

.issue-title {
  font-size: clamp(1.6rem, 1.05rem + 2vw, 2.75rem);
  line-height: 0.98;
  text-wrap: balance;
}

.issue-title a {
  text-decoration: none;
}

.issue-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.12em;
}

.feed-status {
  max-width: 44ch;
  padding-top: 1.5rem;
  border-top: var(--rule) solid var(--voice);
  font-size: var(--size-lead);
}

/* --- Contato ---------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: 3rem;
}

.contact-intro .lead {
  margin-top: 1.5rem;
}

.direct {
  margin-top: 2.25rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.75rem;
}

.social a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--voice);
  text-decoration-thickness: var(--rule);
  text-underline-offset: 0.24em;
}

.social a:hover {
  text-decoration-thickness: 4px;
}

.form {
  display: grid;
  gap: 1.5rem;
}

.form-row label,
.ballot legend {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--ghost);
}

.form-row input,
.form-row textarea {
  display: block;
  width: 100%;
  padding: 0.8em 0.9em;
  border: 0;
  border-bottom: 6px solid var(--paper);
  border-radius: 0;
  background: var(--paper);
  color: var(--velvet);
}

.form-row textarea {
  min-height: 9.5em;
  resize: vertical;
}

.form-row [aria-invalid="true"] {
  border-bottom-color: var(--olive);
}

.form-error {
  margin-top: 0.5rem;
  color: var(--voice);
  font-weight: 600;
}

/* Opções em forma de cédula: um quadrado que se marca com X. */
.ballot-options {
  display: grid;
  gap: 0.6rem;
}

.ballot-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.ballot-option input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ballot-box {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  border: var(--rule) solid var(--ink);
}

.ballot-option input:checked + .ballot-box {
  border-color: var(--voice);
  background: var(--voice);
}

.ballot-option input:checked + .ballot-box::before,
.ballot-option input:checked + .ballot-box::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 115%;
  height: 3px;
  background: var(--bg);
}

.ballot-option input:checked + .ballot-box::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ballot-option input:checked + .ballot-box::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ballot-option input:focus-visible + .ballot-box {
  outline: 3px solid var(--voice);
  outline-offset: 3px;
}

.form-submit {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.form-status:empty {
  display: none;
}

.form-status {
  max-width: 40ch;
  font-weight: 600;
  color: var(--voice);
}

/* --- Página 404 -------------------------------------------------------------- */
.not-found .actions {
  margin-top: 1.75rem;
}

.not-found-other {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: var(--rule) solid var(--voice);
}

.not-found-other .section-title {
  font-size: var(--size-plain);
}

.not-found .lead {
  margin-top: 1.25rem;
}

/* --- Rodapé ----------------------------------------------------------------- */
.site-footer {
  padding-bottom: 2.5rem;
}

.footer-row {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.75rem;
  border-top: var(--rule) solid var(--voice);
  font-size: var(--size-small);
}

.footer-brand {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}

.footer-brand .logo-image {
  width: 9.75rem;
}

.footer-line {
  max-width: 38ch;
  color: var(--ghost);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  font-weight: 500;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

/* --- A partir de tablets em pé ---------------------------------------------- */
@media (min-width: 40rem) {
  .hero-title {
    --step-min: 1.1;
    --step: 1.1em;
  }
}

/* --- Grade de 12 colunas ----------------------------------------------------- */
@media (min-width: 56rem) {
  .masthead-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "brand nav lang";
    column-gap: clamp(1.5rem, 3vw, 3rem);
  }

  .nav {
    column-gap: clamp(1.1rem, 2.2vw, 2.25rem);
  }

  .section-head,
  .hero-foot,
  .service,
  .work-grid,
  .issue,
  .contact-grid,
  .footer-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .section-head {
    align-items: end;
  }

  .section-head .section-title {
    grid-column: 1 / span 7;
  }

  .section-head .lead,
  .section-head .section-aside {
    grid-column: 8 / -1;
  }

  .hero-foot {
    align-items: end;
  }

  .hero-intro {
    grid-column: 1 / span 8;
  }

  .hero-cta {
    grid-column: 9 / -1;
    justify-self: end;
  }

  .service-name {
    grid-column: 1 / span 3;
  }

  .service-body {
    grid-column: 4 / span 4;
  }

  .rewrite {
    grid-column: 8 / -1;
  }

  .testimonial {
    grid-column: 1 / span 6;
  }

  .cases {
    grid-column: 8 / -1;
  }

  .issue {
    align-items: baseline;
  }

  .issue time {
    grid-column: 1 / span 2;
  }

  .issue-title {
    grid-column: 3 / span 6;
  }

  .issue-excerpt {
    grid-column: 9 / -1;
  }

  .contact-intro {
    grid-column: 1 / span 5;
  }

  .form {
    grid-column: 7 / -1;
  }

  .footer-row {
    align-items: baseline;
  }

  .footer-brand {
    grid-column: 1 / span 4;
  }

  .footer-nav {
    grid-column: 6 / span 4;
  }

  .footer-meta {
    grid-column: 10 / -1;
    justify-content: flex-end;
  }
}

/* --- O único movimento da página ---------------------------------------------
   No carregamento, a caneta risca o burocratês e o título entra frase a frase.
   Quem pede menos movimento vê tudo pronto de imediato. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero-jargon s {
    background-size: 0% max(2px, 0.075em);
    animation: strike 1s cubic-bezier(0.65, 0, 0.25, 1) 0.5s forwards;
  }

  .bridge {
    opacity: 0;
    animation: appear 0.35s ease-out 1.45s forwards;
  }

  .hero-title .line {
    opacity: 0;
    transform: translateY(0.16em);
    animation: say 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) calc(1.7s + var(--i) * 0.2s) forwards;
  }
}

@keyframes strike {
  to {
    background-size: 100% max(2px, 0.075em);
  }
}

@keyframes appear {
  to {
    opacity: 1;
  }
}

@keyframes say {
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Impressão --------------------------------------------------------------
   No papel não há animação: o título e o risco aparecem prontos. */
@media print {
  .hero-jargon s {
    background-size: 100% max(2px, 0.075em);
    animation: none;
  }

  .bridge,
  .hero-title .line {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
