/* Archteca tokens: the one place colour, type, shape, elevation and motion are decided.
   The site and the system page both read from here. A value that is not a token does not go in a component:
   if a new flow needs one, it is added here first, with its role. See system.html. */
:root {
  /* ---------- Colour. The photos carry the colour; the chrome stays neutral. ---------- */
  --bg: #ffffff;
  --ink: #111111;
  --muted: #62625e;
  --faint: #a3a39d;
  --line: rgba(17, 17, 17, 0.08);
  --surface: #f4f4f2;
  --surface-2: #ebebe8;
  /* Mobiliário's lists (2026-11-18, Pedro: "as cores pode ser mais leves/subtle para dar destaque na mobília"): pale
     grounds, so the piece cut out in the corner leads and the colour only sets the mood */
  --tone-sky: #e4eaf1;
  --tone-butter: #f3edda;
  --tone-sage: #e2e9de;
  --tone-blush: #f2e4e0;
  --brand: #f7721f;   /* the mark only, never an interface colour */
  --logo-h: 32px;    /* the logo (the white A in a black square, no ®, since 2026-11-18, Lucas) in the header, sized to the menu beside it rather than to the search field (2026-11-15, Pedro: "vamos usar o fundo preto e a logo em branco. E vamos deixar menor também, proporcionar ali ao menu") */
  --logo-h-sm: 32px; /* the same on a phone */
  --ai-bg: #f2eee6;   /* marks data read by AI, waiting for the studio to confirm */
  --ai-ink: #75664a;
  --glass: rgba(30, 28, 28, 0.78);
  --glass-ink: #f6f5f3;
  --glass-muted: rgba(246, 245, 243, 0.5);
  --glass-line: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --shot: #f3f3f3;    /* the studio white behind catalogue product shots */
  --ink-hover: #2b2b2b;     /* the dark button under the pointer */
  --danger: #b3261e;        /* delete, leave, a field in error */
  --danger-hover: #9a1f18;
  --like: #e0457b;          /* a like, and the dot that says there is news */
  --veil: rgba(12, 12, 12, .32); /* behind a dialog or sheet (the search scrim, darker, is its own) */
  --mark: #f2b4e4;          /* the old A's pink: no longer used by the mark (2026-11-14, Ritmo is ink; orange only on the app icon) */
  --switch-off: #cfcfcb;    /* a switch that is off */

  /* ---------- Type. One family; one size per role. ---------- */
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, Inter, "Helvetica Neue", Arial, sans-serif;
  /* The scale (2026-11-12, Pedro: "uma limpa na quantidade de tamanhos de fonte"): six steps and two fluid sizes for
     the whole platform. A size outside it does not enter a component; a role below points to a step. */
  --fs-sm: 12px;      /* the small one: secondary text, tags, fine print, badges, counts, captions on photos */
  --fs-base: 15px;    /* the text: body, controls, chips, the search field, filter words, panel titles */
  --fs-xl: 22px;      /* modal titles, a name at the top of a profile */
  --fs-2xl: 32px;     /* headings on a project page */
  --fs-3xl: 40px;     /* a page's title, the index's words */
  --fs-4xl: 56px;     /* the headings of a project's story */
  --fs-display: clamp(40px, 6vw, 76px);  /* the one big line on a page, the numbers in the mosaic */
  --fs-giant: clamp(80px, 10vw, 168px);  /* the story's very large numbers */
  /* roles, each on a step (the phone's below) */
  --fs-index: var(--fs-3xl);  /* the index's words, fixed, never fluid (48 → 40 on 2026-11-12) */
  --fs-title: var(--fs-3xl);  /* a page's or a project's name */
  --fs-input: 16px;           /* fields only, the one size off the scale: below 16px iOS zooms into the page */
  --fs-lede: var(--fs-xl);    /* the line under a display title */

  /* ---------- Shape. Photos are square-cornered; everything you press is round. ---------- */
  --r-img: 0px;
  --r-thumb: 8px;    /* small thumbnails in lists */
  --r-feed: 8px;     /* the Feed's photos, a waterfall like Atlas's */
  --r-option: 10px;  /* a row you pick in a menu */
  --r-tile: 12px;    /* thumbnails in cards */
  --r-card: 14px;
  --r-pop: 16px;     /* the furniture pop-up */
  --r-panel: 18px;
  --r-sheet: 20px;   /* the filters modal; a sheet's top corners on phones */
  --r-float: 24px;   /* panels that float over the page: search, suggestions */
  --r-board: 32px;   /* a stage of the design system page (nossos-componentes.html); first the squares of its board, 2026-11-13 */
  --r-pill: 999px;

  /* ---------- Layout ---------- */
  --gutter: 20px;
  --head: 68px;
  --lbw: clamp(300px, 27vw, 420px); /* info column in the feed viewer */
  --h-btn-sm: 34px;  /* a button in a list or a menu: Seguir beside a name */
  --h-btn: 40px;     /* the button: a dialog's footer, an action */
  --h-btn-lg: 48px;  /* the page's own action: Editar perfil, Mostrar 87 projetos, Enviar um projeto */
  --h-ib: 36px;      /* a round icon button: close, the header's icons, save on a photo (40px for back) */
  --w-save-pill: 62px;    /* the save pill on a photo (the mark, a hairline, the arrow to the folders), 36px tall: whatever shares the photo's corner keeps clear of it */
  --w-save-pill-sm: 56px; /* the same at 32px tall, beside the 32px label and arrow on the profile's cards */
  --h-search: 52px;  /* the search field, resting and in use (44 → 52 on 2026-11-13; 56 tried and set back: "vamos voltar com 52") */
  --h-row: 44px;     /* a row in a menu or a list you pick from (52px on a phone's sheet, below) */
  --h-row-2: 60px;   /* the same row with two lines of text */
  --h-field: 48px;   /* a field: as tall as the large button */
  --h-chip: 36px;    /* a filter chip (44px on phones, below, for the finger) */
  --pad-chip: 16px;  /* its side padding (20px on phones) */
  /* Breakpoints. A media query cannot read a variable, so the three are written out, and new work uses only these:
     phone: (max-width: 700px) · middle: (max-width: 1000px) · wide: (min-width: 1200px). */

  /* ---------- Layers. Named, so a new overlay finds its place instead of guessing a number.
     Inside a component, small local values (1 to 4) stack its own parts. ---------- */
  --z-subpage: 19;           /* a page that fills the screen under the header: a profile's feed */
  --z-header: 20;
  --z-safe-area: 25;         /* the band behind the phone's status bar */
  --z-page: 40;              /* a project's page, the feed viewer */
  --z-header-over-page: 41;  /* the header stays above a page */
  --z-scrim: 44;             /* the veil behind the search panel */
  --z-bar: 45;               /* the floating bar */
  --z-panel: 47;             /* the bar's panel when it opens from the header */
  --z-header-searching: 48;  /* the header lifts over the veil while searching */
  --z-toast: 50;
  --z-viewer: 55;            /* a piece flown out of its tile */
  --z-fullpage: 56;          /* a page over the whole site, header included: Configurações */
  --z-sheet-veil: 58;
  --z-sheet: 59;             /* the filters modal */
  --z-top: 60;               /* menus, the full-screen drawing */

  /* ---------- Space. The scale new work uses; a step is 2px below 16, then 4 and 8. ---------- */
  --s-2: 2px; --s-4: 4px; --s-6: 6px; --s-8: 8px; --s-10: 10px; --s-12: 12px; --s-14: 14px; --s-16: 16px;
  --s-20: 20px; --s-24: 24px; --s-28: 28px; --s-32: 32px; --s-40: 40px; --s-48: 48px; --s-56: 56px; --s-64: 64px; --s-96: 96px;
  /* Space roles. Which step serves which distance: new layout names the role, not the step. When in doubt, the larger. */
  --sp-in: var(--s-8);        /* inside a control: the icon to its label */
  --sp-chips: var(--s-8);     /* chips in a row */
  --sp-buttons: var(--s-12);  /* buttons side by side */
  --sp-menu: var(--s-8);      /* a menu's inner margin */
  --sp-surface: var(--s-24);  /* a dialog's or panel's inner margin */
  --sp-row: var(--s-12);      /* the breath above and below a list row */
  --sp-group: var(--s-24);    /* between groups: tabs to the index, a title to its content */
  --sp-top: var(--s-40);      /* the header to a page's first block */
  --sp-block: var(--s-40);    /* between blocks: filters to photos, section to section */
  --sp-open: var(--s-64);     /* a page's opening: the top of a profile or a collection */
  --sp-end: var(--s-96);      /* a page's end, before the footer */

  /* ---------- Elevation. Hairlines instead of borders; three heights above the page, and the glass bar. ---------- */
  --ring: 0 0 0 1px rgba(17, 17, 17, .07);                                                 /* a resting outline */
  --ring-chip: inset 0 0 0 1px rgba(17, 17, 17, .14);        /* a refining chip at rest (Airbnb's outlined pill) */
  --ring-chip-on: inset 0 0 0 1.5px var(--ink);               /* a refining chip with something picked in it */
  --shadow-float: 0 0 0 1px rgba(17, 17, 17, .07), 0 6px 22px rgba(17, 17, 17, .08);       /* bars resting on content */
  --shadow-raised: 0 0 0 1px rgba(17, 17, 17, .06), 0 18px 44px -14px rgba(17, 17, 17, .18); /* panels and menus */
  --shadow-overlay: 0 24px 70px rgba(17, 17, 17, .18);                                     /* modals and drawers */
  --shadow-glass: 0 0 0 1px var(--glass-line) inset, 0 18px 50px rgba(0, 0, 0, .25);
  /* Clear glass, after Figma's Glass effect as Pedro set it (2026-11-14: light -45° at 80%, refraction 80, depth 20,
     dispersion 50, frost 4). What CSS can carry: a light frost with the colours behind lifted, a bright rim where the
     light comes from (top left) fading to a faint one opposite, a soft glow inside for depth, a hint of colour split at
     the sides for dispersion, and a soft shadow under it. Refraction (the background bent at the edge) has no
     cross-browser CSS and is left out. */
  --glass-clear: rgba(240, 240, 237, .8); /* a breath off white (the warm grey of --surface): over a white page the glass still reads as glass, and a white item on it stands out */ /* 2026-11-14, Pedro: "frost no máximo e menos transparente" (.42 and 5px), then "reduzir um pouco mais a opacidade e levar mais para o branco" (.7 → .78, whiter) */
  --glass-dark: rgba(17, 17, 17, .42); /* the glass over the dark full-screen photo: a dark tint under a strong blur, the photo never reads through (2026-11-15, phone QA) */
  --glass-dark-hover: rgba(17, 17, 17, .56);
  --glass-dark-frost: blur(24px) saturate(1.2);
  --glass-frost: blur(28px) saturate(.7) brightness(1.4); /* whiter: what shows through keeps little colour (measured on the iPhone over a dark green photo) */ /* whiter: what shows through is lifted towards white and keeps less of its colour */
  --glass-rim: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 38%, rgba(255, 255, 255, .08) 62%, rgba(255, 255, 255, .55));
  --shadow-glass-clear: inset 0 0 14px rgba(255, 255, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .7), inset 1.5px 0 0 -.5px rgba(255, 96, 150, .12), inset -1.5px 0 0 -.5px rgba(70, 160, 255, .12),
    0 0 0 .5px rgba(17, 17, 17, .08), 0 10px 28px -10px rgba(17, 17, 17, .28);
  /* Glass on a photo and the save list (2026-11-17), after Apple's Liquid Glass guidance (HIG, Materials): the clear
     kind is for the few controls that float over media, with a dim layer under them so white text stays legible; the
     regular kind, more opaque, is for what is mostly text (the list of collections). Only the photo under the pointer
     ever carries it. */
  --photo-dim: linear-gradient(rgba(12, 12, 12, .34), rgba(12, 12, 12, .16) 34%, rgba(12, 12, 12, .16) 66%, rgba(12, 12, 12, .32)); /* the dim layer: a little more where the controls sit */
  --glass-photo: rgba(255, 255, 255, .22);        /* clear glass at rest */
  --glass-photo-hover: rgba(255, 255, 255, .34);  /* under the pointer, or with its list open */
  --glass-photo-frost: blur(14px) saturate(1.5);
  --glass-photo-rim: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .28); /* the edge catching the light */
  --glass-photo-solid: rgba(40, 38, 38, .78);     /* the same control with transparency reduced, or where the browser cannot blur */
  --glass-photo-dark: rgba(20, 20, 20, .36);        /* glass on a photo shown as it is, with no dimming over it: the opened photo's own controls */
  --glass-photo-dark-hover: rgba(20, 20, 20, .52);
  --glass-photo-dark-frost: blur(24px) saturate(1.4);
  --glass-photo-dark-rim: inset 0 0 0 1px rgba(255, 255, 255, .2);
  /* the apps in Compartilhar, each on its own colour */
  --brand-whatsapp: #25d366;
  --brand-instagram: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7);
  --brand-messenger: #0084ff;
  --glass-panel: rgba(251, 251, 249, .9);         /* regular glass: the list of collections */
  --glass-toast: rgba(251, 251, 249, .94);        /* every notice (toasts, snacks, "Salvo em"), light (2026-11-17, Pedro: "isso aqui está no Dark Mode, eu queria trazer para o Light Mode"): nearly solid, with --glass-panel-frost and --shadow-raised */
  --glass-panel-frost: blur(30px) saturate(1.6);
  --glass-panel-hover: rgba(17, 17, 17, .05);     /* a row under the pointer, on that glass */
  --w-save-menu: 320px;   /* the list of collections */
  --h-toast: 56px;        /* the notice that says where a photo was saved */
  --shadow-raised-focus: 0 0 0 1px rgba(17, 17, 17, .16), 0 18px 44px -14px rgba(17, 17, 17, .2); /* a raised field in use */
  --shadow-field-focus: 0 0 0 1px rgba(17, 17, 17, .14), 0 2px 8px rgba(0, 0, 0, .03);         /* the header field in use */
  /* Small lifts: not heights, just enough to separate a part from what it sits on. */
  --shadow-selected: 0 1px 2px rgba(0, 0, 0, .08);         /* the chosen segment */
  --shadow-knob: 0 1px 3px rgba(0, 0, 0, .2);              /* a switch's knob */
  --shadow-on-photo: 0 1px 3px rgba(17, 17, 17, .18);      /* a control sitting on a photo */
  --shadow-mark: 0 0 0 1px rgba(0, 0, 0, .08), 0 1px 4px rgba(0, 0, 0, .28);          /* a dot marking a piece */
  --shadow-mark-open: 0 0 0 5px rgba(255, 255, 255, .38), 0 1px 4px rgba(0, 0, 0, .28); /* the dot whose pop-up is open */
  --shadow-mark-lit: 0 0 0 3px rgba(255, 255, 255, .28), 0 1px 6px rgba(0, 0, 0, .45);  /* the dots in furniture mode, over a darkened photo */
  --shadow-label: 0 1px 6px rgba(0, 0, 0, .18);            /* a label over a photo */

  /* ---------- Motion. Four durations, three curves, one stagger. Everything starts where it was touched.
     press: --dur-instant on the way down, --dur-base --spring on the way back · hover: --dur-quick, colour and ground only
     · arriving (a menu, a dialog): opacity in --dur-quick, position in --dur-base --ease; a sheet in --dur-slow
     · leaving: --dur-quick --ease-in (what closes gets out of the way) · one after another: --stagger
     Two volumes, the same curves (after Nubank's motion system, 2026-11-12): the volume says how loud a move is, never a new curve.
     · recessive: everything that is interface (menus, dialogs, sheets, filters, chips, hover, text that changes). Opacity and at
       most --nudge of travel, --dur-quick / --dur-base on --ease, no overshoot; a press may give --press on --spring, nothing more.
     · expressive: only the photo (a tile opening into the viewer, photo to photo, back into its tile, and between pages when a
       photo carries over). It travels, scales and is masked, on the physical springs (AcervoMotion.SPRINGS) or --dur-arrive.
       The photos bring the colour and the movement; the interface stays out of their way. ---------- */
  --dur-instant: 100ms; /* presses */
  --dur-quick: 180ms;   /* hover, colour, small fades */
  --dur-base: 300ms;    /* panels, fades, crossfades */
  --dur-slow: 500ms;    /* pages, heights, sheets */
  --dur-ambient: 1100ms; /* slow loops: the caret blinking. Photos never zoom on hover. */
  --dur-arrive: 900ms;  /* a photo or a block of a project's story easing into place: slow on purpose */
  --dur-pulse: 4000ms;  /* one beat of the furniture dots: a ring, then a rest */
  --dur-spin: 700ms;    /* one turn of a busy button's spinner */
  --stagger: 50ms;      /* between items arriving one after another */
  --nudge: 8px;         /* recessive: the farthest an interface element travels as it arrives or leaves */
  --press: .96;         /* a button, a chip, a tab under the finger */
  --press-icon: .92;    /* a round icon button: smaller, so it gives a little more */
  --press-card: .98;    /* a card or a tile: large, so it barely moves */
  --ease: cubic-bezier(.2, .7, .2, 1);      /* the default: quick start, long soft landing */
  --ease-in: cubic-bezier(.4, 0, 1, 1);     /* leaving: things that close get out of the way */
  --spring: cubic-bezier(.34, 1.4, .64, 1); /* a small overshoot, for presses and dots */
  /* The viewer's travel uses a physical spring (mass, stiffness, damping), computed in script: see "physical" on the system page. */

  color-scheme: light;
}

@media (max-width: 700px) {
  :root { --fs-index: var(--fs-xl); --fs-title: var(--fs-2xl); --fs-lede: var(--fs-base); --h-chip: 44px; --pad-chip: 20px; --h-row: 52px; --sp-top: var(--s-24); --sp-block: var(--s-24); --sp-open: var(--s-40); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-instant: 0ms; --dur-quick: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --dur-ambient: 0ms; --dur-arrive: 0ms; --stagger: 0ms; }
}
