/* Hallmark · genre: editorial, with the atmospheric first screen of the v5 homepage · macrostructure: Marquee Hero over Portfolio Grid · design-system: design.md · designed-as-app · nav: N11 · footer: Ft5 over Ft4
 * Capi Studio tokens. Every colour, face, size, space, radius, easing and layer the studio pages use is named here.
 * Source of truth: pme-ia/design.md. Archivo is self-hosted (public/site/fontes/archivo-*.woff2, licence archivo-OFL.txt).
 * font-display: optional (2026-11-22): every page uses Archivo when it is there in time (preloaded, and cached after the
 * first page) and otherwise keeps the metric-matched fallback for that page view, so no page ever reflows when the font
 * arrives late (no layout shift); the homepage keeps a swap through its own family name, 'Archivo Swap' (home.css). */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: optional;
  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';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: optional;
  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;
}
/* Metric-matched local fallback faces, for a first visit that misses Archivo (font-display: optional keeps them for that
   page view). Regular text (weights up to 599, any width) uses Arial at Archivo 400's widths. Bold text has its own faces,
   because body has font-synthesis: none and a single regular face turned every heading and label into thin Arial (found
   by the product pages' builder, 2026-11-22): Arial Bold at Archivo 650's widths for labels (width 100) and at Archivo
   800's widths for display (width 112.5), so titles keep their weight and their line lengths. Widths measured in the
   browser on the site's own words; Chrome scales the overrides by size-adjust, so they are divided by it to land on
   Archivo's own 88 % ascent and 21 % descent. */
@font-face {
  font-family: 'Archivo Fallback';
  font-weight: 100 599;
  font-stretch: 62% 125%;
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 98.4%;
  ascent-override: 87%;
  descent-override: 21%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Archivo Fallback';
  font-weight: 600 900;
  font-stretch: 62% 105%;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Helvetica Bold'), local('Helvetica-Bold');
  size-adjust: 97%;
  ascent-override: 90.7%;
  descent-override: 21.6%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Archivo Fallback';
  font-weight: 600 900;
  font-stretch: 105.5% 125%;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Neue Bold'), local('HelveticaNeue-Bold'), local('Helvetica Bold'), local('Helvetica-Bold');
  size-adjust: 116.1%;
  ascent-override: 75.8%;
  descent-override: 18.1%;
  line-gap-override: 0%;
}

:root {
  /* Colour: crema paper, espresso ink, coffee-cherry red (design.md) */
  --color-paper:       oklch(97.8% 0.008 78);
  --color-paper-2:     oklch(95%   0.010 78);
  --color-paper-3:     oklch(91.5% 0.012 75);
  --color-rule:        oklch(84%   0.012 70);
  --color-rule-strong: oklch(60%   0.014 62);   /* control boundaries: 3.7:1 on paper */
  --color-muted:       oklch(48%   0.014 60);   /* meta text: 6.2:1 on paper */
  --color-ink-2:       oklch(34%   0.018 50);
  --color-ink:         oklch(19%   0.020 45);
  --color-accent:      oklch(51%   0.190 27);
  --color-accent-ink:  oklch(97.8% 0.008 78);
  --color-focus:       oklch(51%   0.190 27);
  /* On the one ink band (closing call to action and footer) */
  --color-on-ink:      oklch(97.8% 0.008 78);
  --color-on-ink-2:    oklch(80%   0.012 70);   /* 9.9:1 on ink */
  --color-rule-on-ink: oklch(36%   0.016 50);
  --color-focus-on-ink: oklch(97.8% 0.008 78);  /* the accent is 2.9:1 on ink, too low for a ring */
  --color-scrim:       oklch(19% 0.020 45 / 0.42);
  --color-veil:        oklch(19% 0.020 45 / 0.64);   /* paper text on it stays above 5:1 even over a white capture */
  /* The dark moving hero and the footer (owner's instruction of 2026-11-21): an espresso night with a glow rising
     from below. The glow ramp is read by campo.js (WebGL) and by the CSS fallback, so both draw the same colours. */
  --color-night:        oklch(15.5% 0.016 45);         /* the field, a shade deeper than the ink */
  --color-night-2:      oklch(22% 0.020 42);
  --color-on-night:     oklch(97.8% 0.008 78);         /* crema text: 17.9:1 on the night */
  --color-on-night-2:   oklch(88% 0.016 74);           /* lead text */
  --color-rule-on-night: oklch(97.8% 0.008 78 / 0.22);
  --color-glass-night:  oklch(15.5% 0.016 45 / 0.42);  /* tint under the outlined pill over the moving glow */
  --color-accent-on-night: oklch(68% 0.170 30);        /* the cherry full stop on the night: 6.3:1 */
  --color-glow-wine:    oklch(31% 0.105 18);
  --color-glow-cherry:  oklch(50% 0.190 27);
  --color-glow-ember:   oklch(60% 0.165 42);
  --color-glow-caramel: oklch(73% 0.135 64);
  --color-glow-crema:   oklch(88% 0.075 80);
  /* The Capifone helper's eyes, drawn by the page over the art */
  --color-eye:          oklch(17% 0.018 40);
  --color-eye-shine:    oklch(98% 0.006 80);
  --color-bubble:       oklch(99% 0.004 80);

  /* Type: one family, the width axis gives the display its own voice */
  --font-sans: 'Archivo', 'Archivo Fallback', 'Helvetica Neue', Arial, sans-serif;
  --wdth-display: 112.5%;
  --wdth-text: 100%;
  --wght-display: 800;
  --wght-ui: 650;
  --wght-body: 400;
  --wght-small: 500;
  --track-display: -0.03em;
  --track-title: -0.012em;
  --text-sm: 0.875rem;                                        /* 14 px captions and meta */
  --text-ui: 1rem;                                            /* 16 px navigation and compact controls */
  --text-body: 1.0625rem;                                     /* 17 px on phones, 18 px from 40rem */
  --text-lead: clamp(1.125rem, 1rem + 0.45vw, 1.5rem);
  --text-title: clamp(1.25rem, 1.05rem + 0.55vw, 1.75rem);
  --text-display-l: clamp(2.25rem, 1rem + 3.2vw, 4.75rem);
  --text-display-xl: clamp(2.6rem, 1.2rem + 5.2vw, 8rem);
  --leading-body: 1.55;
  --leading-display: 0.96;
  /* Inner pages (pagina.css): BizStudio-level reading, about 21 px on computers and 18 px on phones, 1.6 leading,
     45ch (about 66 Archivo characters) to a line; titles of the dark band stepped by length */
  --text-read: clamp(1.125rem, 1.02rem + 0.32vw, 1.3125rem);
  --leading-read: 1.6;
  --measure: 45ch;
  --text-lead-read: clamp(1.25rem, 1.06rem + 0.62vw, 1.625rem);
  --text-display-m: clamp(1.875rem, 1.1rem + 2.1vw, 3.375rem);
  --text-band-l: clamp(2.4rem, 1.2rem + 4.2vw, 5.75rem);   /* titles up to 50 characters */
  --text-band-m: clamp(2.15rem, 1.1rem + 3.2vw, 4.5rem);   /* 51 to 80 characters */
  --text-band-s: clamp(1.95rem, 1.05rem + 2.5vw, 3.75rem); /* over 80 characters */

  /* Space: 4 px scale */
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --space-3xl: 112px;
  --space-4xl: 160px;
  --section-pad: clamp(var(--space-2xl), 8vw, var(--space-4xl));

  /* Layout: fluid 12-column grid across the whole viewport */
  --gutter: clamp(16px, 4vw, 80px);
  --col-gap: clamp(16px, 2vw, 32px);
  --shell-max: 2400px;
  --header-h: 64px;
  --band-x: max(12px, 2.5vw);   /* the inner pages' dark band: inset like the homepage card once it has shrunk */

  /* Shape: three radii for parts, and one for the large sheets (the hero card, the page's lower edge and the
     conversation window), added for the v5 homepage */
  --radius-pill: 999px;
  --radius-media: 16px;
  --radius-input: 12px;
  --radius-sheet: 22px;
  --shadow-float: 0 28px 64px -28px oklch(19% 0.020 45 / 0.30), 0 2px 8px oklch(19% 0.020 45 / 0.06);
  --shadow-sheet: 0 36px 72px -30px oklch(12% 0.016 45 / 0.55);   /* the page lifting off the footer */
  /* A filter: under the Capifone helper. A tight contact shadow plus a short soft one, both within the helper's masked
     box (8 px or more around the bust), so on the crema it never shows as a grey square cut at the box's edge. */
  --shadow-helper: drop-shadow(0 3px 3px oklch(19% 0.020 45 / 0.20)) drop-shadow(0 8px 7px oklch(19% 0.020 45 / 0.12));
  --color-veil-night: oklch(12% 0.016 45 / 0.52);  /* behind the conversation window */

  /* Motion: one house curve for everything that arrives or moves into place */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-color: 180ms;
  --dur-short: 260ms;
  --dur-hover: 600ms;
  --dur-viewer: 500ms;
  --dur-enter: 800ms;
  --dur-reveal: 900ms;      /* section entrances */
  --dur-rise: 1300ms;       /* first-screen entrance of the lead and the pills */
  --dur-rise-title: 1700ms; /* first-screen entrance of the statement */

  /* Layers */
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-helper: 300;
  --z-modal: 400;
}

@media (min-width: 40rem) {
  :root { --text-body: 1.125rem; }
}
@media (min-width: 48rem) {
  :root { --radius-sheet: 32px; }
}
@media (min-width: 80rem) {
  :root { --header-h: 76px; }
}
