/* ==========================================================================
   Ceci — app.ceci.pro "em breve"
   Página estática servida pelo Caddy (deploy/Caddyfile, bloco app.ceci.pro)
   enquanto o app não roda na porta 4000.

   Sem JS e sem estilo inline: a CSP do bloco só permite style-src 'self'.
   Tokens: design/ceci.md §10 e §10.1 — mesmos nomes e valores de src/app.css.
   Nenhum literal de cor, tamanho de fonte ou espaçamento fora deste bloco.
   ========================================================================== */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/inter-latin-800-normal.woff2') format('woff2');
}

:root {
  /* marca */
  --paper: #f4eee6;
  --paper-card: #fffdf9;
  --ink: #202020;
  --ink-soft: #33312e;
  --muted: #655f59;
  --coral: #d98e69;
  --coral-dark: #c87d58;
  --coral-text: #98462a; /* coral legível como TEXTO em fundo claro */
  --on-coral: var(--ink);

  /* tipografia */
  --text-display: clamp(2.5rem, 1.5rem + 4.4vw, 4rem);
  --text-h3: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-caption: 0.875rem;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --weight-body: 400;
  --weight-emphasis: 600;
  --weight-display: 800;
  --tracking-eyebrow: 0.08em;

  /* espaçamento 4pt */
  --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; /* só sarjeta de landing em desktop — design/ceci.md §3.1 */

  /* raio, elevação, movimento */
  --radius-pill: 999px;
  --shadow-2: 0 12px 24px rgb(31 37 42 / 0.14);
  --duration-fast: 160ms;
  --duration-slow: 900ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* foco e toque */
  --focus-ring: var(--ink);
  --focus-width: 2px;
  --focus-offset: 3px;
  --tap-min: 44px;

  /* derivados — design/ceci.md §10.1 */
  --border-control: rgb(32 32 32 / 0.5); /* 3.1:1 no papel — WCAG 1.4.11 */
  --rule: rgb(101 95 89 / 0.16);
  --tint-coral: rgb(217 142 105 / 0.1);
  --ribbon-shade: #aebdd0;
  --header-h: 4.5rem;
  --gutter: var(--space-5);
  --section-y: var(--space-7);
}

@media (min-width: 541px) {
  :root {
    --gutter: var(--space-6);
  }
}

@media (min-width: 901px) {
  :root {
    --gutter: var(--space-8);
    --section-y: var(--space-8);
  }
}

@media (min-width: 1200px) {
  :root {
    --gutter: var(--space-9);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
}

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

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* ==========================================================================
   Componentes — os mesmos de src/app.css (§6.2)
   ========================================================================== */
.button {
  display: inline-flex;
  min-height: var(--space-7);
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 var(--space-6);
  font-family: inherit;
  font-size: var(--text-caption);
  font-weight: var(--weight-emphasis);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease),
    background-color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.button:active {
  transform: translateY(0) scale(0.985);
}

.button-coral {
  color: var(--on-coral); /* nunca branco sobre coral — §1.2 */
  background: var(--coral);
}

.button-secondary {
  color: var(--ink);
  border: 1px solid var(--border-control);
  background: transparent;
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--coral-text);
  font-size: var(--text-caption);
  font-weight: var(--weight-emphasis);
  letter-spacing: var(--tracking-eyebrow);
  line-height: var(--leading-snug);
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) var(--gutter) var(--space-7);
  color: var(--muted);
  font-size: var(--text-caption);
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.site-footer a {
  display: inline-flex;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast) var(--ease);
}

@media (hover: hover) {
  .button:hover {
    transform: translateY(-1px);
  }

  .button-coral:hover {
    background: var(--coral-dark);
  }

  .button-secondary:hover {
    border-color: var(--coral-dark);
    background: var(--tint-coral);
  }

  .site-footer a:hover,
  .marca:hover {
    color: var(--coral-text);
  }
}

/* ==========================================================================
   Página
   ========================================================================== */
.pagina {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
}

.topo {
  display: flex;
  height: var(--header-h);
  align-items: center;
  padding: 0 var(--gutter);
}

.marca {
  display: inline-flex;
  min-height: var(--tap-min);
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-h3);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
  transition: color var(--duration-fast) var(--ease);
}

.marca-simbolo {
  display: block;
  width: 22px;
  height: 22px;
}

/* Cores da marca por token — o favicon.svg repete os mesmos valores em
   literal porque um arquivo isolado não enxerga o :root. */
.simbolo-fundo {
  fill: var(--paper-card);
}

.simbolo-balao {
  fill: var(--coral-dark);
}

.simbolo-barras {
  fill: var(--paper-card);
}

.em-breve {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5) var(--gutter) var(--section-y);
  text-align: center;
}

/* ---- Palco: o ícone do app flutuando sobre a voz da Ceci ---- */
.palco {
  position: relative;
  display: grid;
  width: calc(100% + 2 * var(--gutter));
  height: calc(var(--space-9) + var(--space-6));
  margin: 0 calc(-1 * var(--gutter)) var(--space-6);
  place-items: center;
}

.ondas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.onda {
  fill: none;
  stroke-dasharray: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

.onda-a {
  stroke: var(--coral);
}

.onda-b {
  stroke: var(--ribbon-shade);
}

.simbolo {
  position: relative;
  width: calc(var(--space-8) + var(--space-4));
  height: calc(var(--space-8) + var(--space-4));
  filter: drop-shadow(var(--shadow-2));
}

.barra {
  transform-box: fill-box;
  transform-origin: center;
}

/* ---- Texto ---- */
h1 {
  margin: 0 0 var(--space-5);
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-tight);
}

h1 .linha {
  display: block;
}

/* Âncora do traço só na última palavra: se a linha quebrar no celular, o traço
   continua embaixo de "pronto." em vez de sobrar à direita. */
.acento {
  position: relative;
  display: inline-block;
}

/* o mesmo traço coral inclinado do hero da landing */
.sublinhado {
  position: absolute;
  right: 0.1em;
  bottom: -0.08em;
  width: 90%;
  height: 0.08em;
  border-radius: var(--radius-pill);
  background: var(--coral);
  transform: rotate(-3deg);
  transform-origin: right center;
}

.lead {
  width: min(100%, 640px);
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-body-lg);
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
}

.micro {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: var(--text-caption);
}

/* ---- O que vem no app ---- */
.funcoes {
  width: min(100%, 1040px);
  margin-top: var(--section-y);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}

.funcoes ul {
  display: grid;
  gap: var(--space-6);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.funcao {
  display: grid;
  grid-template-columns: var(--space-6) 1fr;
  gap: var(--space-4);
  align-items: start;
}

.funcao svg {
  width: var(--space-6);
  height: var(--space-6);
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.funcao h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h3);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
}

.funcao p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 541px) {
  .simbolo {
    width: calc(var(--space-8) + var(--space-6));
    height: calc(var(--space-8) + var(--space-6));
  }
}

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

@media (max-width: 900px) {
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .site-footer nav {
    gap: var(--space-3);
  }
}

/* ==========================================================================
   Movimento — só entrada de ilustração (§4) e nada com reduced-motion.
   As barras "falam" três vezes e param: tudo termina antes de 5 s, então
   não precisa de controle de pausa (WCAG 2.2.2).
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .onda {
    animation: desenha var(--duration-slow) var(--ease) both;
  }

  .onda-a {
    animation-delay: var(--duration-fast);
  }

  .simbolo {
    animation: surge var(--duration-slow) var(--ease) both;
  }

  .barra {
    animation: fala 1s var(--ease) 3 both;
    animation-delay: calc(var(--duration-slow) + var(--atraso, 0ms));
  }

  .barra:nth-child(even) {
    animation-name: fala-alt;
  }

  .barra:nth-child(2) { --atraso: 40ms; }
  .barra:nth-child(3) { --atraso: 80ms; }
  .barra:nth-child(4) { --atraso: 120ms; }
  .barra:nth-child(5) { --atraso: 160ms; }
  .barra:nth-child(6) { --atraso: 200ms; }
  .barra:nth-child(7) { --atraso: 240ms; }
  .barra:nth-child(8) { --atraso: 280ms; }
  .barra:nth-child(9) { --atraso: 320ms; }
  .barra:nth-child(10) { --atraso: 360ms; }

  .sublinhado {
    animation: risca var(--duration-slow) var(--ease) var(--duration-fast) both;
  }
}

@keyframes desenha {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes surge {
  from {
    opacity: 0;
    transform: translateY(var(--space-4)) scale(0.92);
  }
}

@keyframes fala {
  25% {
    transform: scaleY(0.4);
  }

  60% {
    transform: scaleY(1.15);
  }
}

@keyframes fala-alt {
  30% {
    transform: scaleY(1.2);
  }

  70% {
    transform: scaleY(0.5);
  }
}

@keyframes risca {
  from {
    transform: rotate(-3deg) scaleX(0);
  }
}
