/* Hallmark · genre: atmospheric over editorial · macrostructure: Marquee Hero, then Portfolio Grid · design-system: design.md · designed-as-app
 * Hallmark · pre-emit critique: P5 H5 E4 S5 R4 V5 · contrast: pass (40-41, crema on the night 17.9:1, lead 14.6:1) · nav: N11 over a dark first screen · footer: Ft5 statement over Ft4 colophon
 *   · gate 6 (centred hero) and gate 29 (glow): overridden on purpose by the owner's instruction of 2026-11-21 (design.md, v5)
 *   · enrichment: a hand-written WebGL2 colour field (campo.js), no library; real captures only; no drawn UI
 * Capi Studio homepage (v5): the dark moving first screen, Capifone, "Experimente agora", the work strip, the services
 * index, how we work and the questions; the footer with the closing call to action is in shell.css.
 * Requires tokens.css and shell.css. */

/* The homepage's first screen is designed around its entrance, so it keeps Archivo with a swap (the statement shows in
   the fallback for an instant on a slow first visit, then in Archivo; the hero card holds its height, so nothing below
   moves). Same files as the shared face in tokens.css, so the font is downloaded once. */
@font-face {
  font-family: 'Archivo Swap';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/site/fontes/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Swap';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/site/fontes/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
.home { --font-sans: 'Archivo Swap', 'Archivo', 'Archivo Fallback', 'Helvetica Neue', Arial, sans-serif; }

/* ---------- 1 · The first screen: a dark espresso field with a glow rising from below ---------- */
.hero { position: relative; }
/* The pin: the card holds still at the top while the visitor scrolls 45 % of a screen, shrinking into a rounded card
   (movimento.js), then scrolls away. The spacer gives the sticky card that room inside its section. */
.hero-pin { height: var(--pin, 0px); }
html.motion-ok .hero { --pin: 45vh; }
.hero-card {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--color-night);
  color: var(--color-on-night);
  transform-origin: 50% 50%;
  contain: paint;
}
html.motion-ok .hero-card { position: sticky; top: 0; }
@media (max-height: 33.99rem) {
  html.motion-ok .hero { --pin: 0px; }
  html.motion-ok .hero-card { position: relative; }
}
.hero :focus-visible { outline-color: var(--color-on-night); }
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: calc(var(--header-h) + clamp(var(--space-xl), 9vh, var(--space-3xl))) clamp(var(--space-3xl), 14vh, 180px);
  text-align: center;
}
.hero-title {
  width: 100%;
  font-size: var(--text-display-xl);
  color: var(--color-on-night);
  text-wrap: balance;
}
.hero-title .stop { color: var(--color-accent-on-night); }
.hero-lead {
  margin-top: clamp(var(--space-md), 2.6vh, var(--space-xl));
  max-width: 56ch;
  color: var(--color-on-night-2);
  font-size: var(--text-lead);
  line-height: 1.45;
  text-wrap: balance;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: 100%;
  margin-top: clamp(var(--space-lg), 4.4vh, var(--space-2xl));
}
.hero-actions .btn { width: 100%; }
@media (min-width: 40rem) {
  .hero-actions { flex-direction: row; justify-content: center; gap: var(--space-sm); width: auto; }
  .hero-actions .btn { width: auto; }
}
.hero-actions .ico--next { transform: rotate(-90deg); }
@media (min-width: 64rem) and (min-aspect-ratio: 4/3) {
  .hero-title { width: auto; font-size: clamp(5rem, 8.5vw, 10.5rem); }
}
/* The Capifone spot in the first screen: the helper (capifone.js) stands here. Computers held landscape: beside the
   pills, with its caption. Phones and tablets held upright: under the pills, rising from the light. Where neither fits
   (short screens) it is docked from the start. */
.hero-spot { display: none; }
@media (min-width: 64rem) and (min-aspect-ratio: 4/3) {
  .js .hero-spot {
    position: absolute;
    z-index: 2;
    right: max(var(--gutter), 3vw);
    bottom: clamp(16px, 4.4vh, 52px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xs);
    width: clamp(200px, 19vw, 420px);
  }
  .hero-spot-box { width: clamp(120px, min(17.5vw, 35vh), 420px); aspect-ratio: 1; }
}
@media (max-width: 63.99rem) and (min-height: 40rem) and (max-aspect-ratio: 4/3), (min-width: 64rem) and (max-aspect-ratio: 4/3) {
  /* (Not under .js: the room is there from the first frame, so nothing moves when the scripts arrive; sem-js.css gives it
     back without them) */
  .hero-card { --capi-hero: clamp(140px, min(54vw, 100svh - 500px), 300px); }
  .hero-inner { padding-block: calc(var(--header-h) + clamp(var(--space-lg), 5vh, var(--space-3xl))) calc(var(--capi-hero) + clamp(14px, 3vh, 48px)); }
  .js .hero-spot {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 2px;
    width: var(--capi-hero);
    margin-inline: auto;
    display: block;
  }
  .hero-spot-box { display: block; width: 100%; aspect-ratio: 1; }
  .js .hero-caption { display: none; }
}
.hero-caption {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--color-rule-on-night);
  border-radius: var(--radius-input);
  background: var(--color-glass-night);
  color: var(--color-on-night);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: var(--wght-ui);
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color var(--dur-color) var(--ease-out), border-color var(--dur-color) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .hero-caption:hover { border-color: var(--color-on-night); }
}

/* The first-screen entrance: fade, rise and unblur on the house curve, staggered (statement, lead, pills) */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise var(--t, var(--dur-rise)) var(--ease-out) var(--d, 0ms) both; }
  /* The statement waits unpainted, so the browser counts it as the first screen's main content the moment it starts to
     show: text first painted at opacity 0 is never counted, and on a computer nothing else there is (the living Capifone is
     a canvas), so Google's test found no main content and gave no score. */
  .hero-title.rise { --t: var(--dur-rise-title); --d: 150ms; --y: 36px; --b: 16px; animation: rise var(--t) var(--ease-out) var(--d) both, arrive 1ms linear var(--d) backwards; }
  .hero-lead.rise { --d: 800ms; }
  .hero-actions.rise { --d: 1000ms; }
  .hero-spot.rise { --d: 1250ms; --y: 16px; --b: 4px; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 39.99rem) {
  .rise { --b: 4px; }
}
/* Phones: the statement is there from the first frame. It is the largest thing on the screen, and behind its 1.7 s
   entrance a slow phone showed it at 4.4 s instead of 1.8 s (Google's phone test counts the same); the lead and the pills
   follow at once. */
@media (prefers-reduced-motion: no-preference) and (max-width: 63.99rem) {
  .hero-title.rise { animation: none; }
  .hero-lead.rise { --t: 700ms; --d: 40ms; }
  .hero-actions.rise { --t: 700ms; --d: 120ms; }
  .hero-spot.rise { --t: 700ms; --d: 200ms; }
}
@keyframes rise { from { opacity: 0; transform: translate3d(0, var(--y, 22px), 0); filter: blur(var(--b, 8px)); } }
@keyframes arrive { from { visibility: hidden; } }

/* ---------- 2 · Capifone: sell it and let the visitor try it at once ---------- */
.capi-sec { padding-block: var(--section-pad) calc(var(--section-pad) / 2); }
.capi-head { grid-column: 1 / -1; }
.capi-title { max-width: 22ch; }
.capi-copy { grid-column: 1 / -1; min-width: 0; }
.capi-lead { max-width: 45ch; color: var(--color-ink-2); font-size: var(--text-lead); line-height: 1.5; }
.capi-demo { margin-top: clamp(var(--space-lg), 3vw, var(--space-xl)); max-width: 40rem; }
.capi-demo label { display: block; margin-bottom: var(--space-2xs); font-weight: var(--wght-ui); line-height: 1.35; }
.capi-demo-row { display: flex; flex-direction: column; gap: var(--space-xs); }
.capi-demo input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 60px;
  padding: 0 var(--space-md);
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius-input);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 1.125rem;
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: border-color var(--dur-color) var(--ease-out), background-color var(--dur-color) var(--ease-out);
}
.capi-demo input::placeholder { color: var(--color-muted); opacity: 1; }
.capi-demo input:focus-visible { outline-color: var(--color-focus); border-color: var(--color-ink-2); }
.capi-demo input[aria-invalid="true"] { border-color: var(--color-accent); }
.capi-demo .btn { min-height: 60px; }
.capi-demo[aria-busy="true"] .btn { cursor: progress; opacity: 0.75; }
@media (min-width: 40rem) {
  .capi-demo-row { flex-direction: row; }
}
@media (hover: hover) and (pointer: fine) {
  .capi-demo input:hover:not(:focus) { background: var(--color-paper-2); }
}
.capi-status { min-height: 1.45em; margin-top: var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); line-height: 1.45; }
.capi-status[data-error="true"] { color: var(--color-accent); }
.capi-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-lg); margin-top: var(--space-md); }
.capi-media { grid-column: 1 / -1; margin-top: var(--space-xl); min-width: 0; }
@media (min-width: 64rem) {
  .capi-copy { grid-column: 1 / span 6; align-self: start; padding-right: var(--space-lg); }
  .capi-media { grid-column: 7 / -1; margin-top: 0; align-self: start; }
}
@media (min-width: 100rem) {
  .capi-copy { grid-column: 1 / span 5; }
  .capi-media { grid-column: 6 / -1; }
}

/* ---------- 4 · The work strip, full bleed, moved only by the visitor ---------- */
.work { container-type: inline-size; padding-block: calc(var(--section-pad) / 2); }
.work-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.work-title { flex: 1 1 18ch; }
.work-note { margin-top: var(--space-xs); max-width: 60ch; color: var(--color-ink-2); }
.work-controls { display: none; gap: var(--space-2xs); flex: none; }
@media (min-width: 40rem) { .js .work-controls { display: flex; } }
.work-strip {
  --strip-start: max(var(--gutter), calc((100% - var(--shell-max)) / 2));
  --item-w: 85cqi;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--item-w);
  gap: var(--col-gap);
  margin: 0;
  padding: var(--space-2xs) var(--strip-start) var(--space-sm);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--strip-start);
  scrollbar-width: thin;
  scrollbar-color: var(--color-rule-strong) transparent;
}
@media (min-width: 40rem) { .work-strip { --item-w: 62cqi; } }
@media (min-width: 64rem) {
  .work-strip {
    --shell-w: min(100cqi - 2 * var(--gutter), var(--shell-max));
    --item-w: calc((var(--shell-w) - 11 * var(--col-gap)) * 5 / 12 + 4 * var(--col-gap));
  }
}
.work-item { scroll-snap-align: start; min-width: 0; }
.work-open { display: block; border-radius: var(--radius-media); text-decoration: none; }
.work-figure {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-media);
  background: var(--color-paper-2);
  transition: transform var(--dur-hover) var(--ease-out);
}
.work-figure img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform var(--dur-hover) var(--ease-out); }
.work-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-sm);
  margin-top: var(--space-3xs);
}
.work-caption .work-kind { line-height: 1.4; }
.work-name { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.0625rem; font-weight: var(--wght-ui); line-height: 1.3; text-decoration: none; }
.work-kind { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); }
@media (hover: hover) and (pointer: fine) {
  .work-open:hover .work-figure { transform: translateY(-4px); }
  .work-open:hover .work-figure img { transform: scale(1.03); }
  .work-open:hover .work-name { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.22em; }
}

/* Three editorial columns, with the full catalogue one link away. */
.offers { display: grid; list-style: none; margin: 0; padding: 0; gap: var(--space-lg); }
.offers h3 { font-size: clamp(1.5rem, 2.4vw, 2.5rem); letter-spacing: -.025em; }
.offers h3 .link { font: inherit; }
.offers p { margin-top: var(--space-2xs); max-width: 32ch; color: var(--color-ink-2); }
.offers-all { margin-top: var(--space-lg); }
@media (min-width: 40rem) {
  .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); }
  .offers li + li { border-inline-start: 1px solid var(--color-rule); padding-inline-start: var(--space-md); }
}
/* ---------- 7 · Questions: the accordion is shared (shell.css); here, its place beside the title ---------- */
.faq { padding-bottom: var(--section-pad); }
.faq-grid { padding-top: var(--space-md); border-top: 2px solid var(--color-ink); }
.faq-title { grid-column: 1 / -1; }
.faq-list { grid-column: 1 / -1; margin-top: var(--space-lg); border-bottom: 1px solid var(--color-rule); }
@media (min-width: 64rem) {
  .faq-title { grid-column: 1 / span 4; }
  .faq-list { grid-column: 5 / -1; margin-top: 0; }
}
/* Reduced motion: no entrance, no travel; colours and opacity only */
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
}
