/*
  Gami Development — site draft chrome (round 2). Load after gami.css on every page in concept/site/.
  Canonical header / footer markup lives in the round-2 brief; this file only styles it.
*/

/* ---------- Header ---------- */
.s-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: grid; grid-template-columns: minmax(124px, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 24px;
  padding: 0 var(--margin);
  border-bottom: 1px solid var(--edge);
  transition: border-color 420ms var(--ease-out), background-color 420ms var(--ease-out);
}
/* The bar's ground lives on a layer so it can fade: transparent while the page sits at its top, it fades in as soon
   as the visitor scrolls (lib/site.js toggles .is-top). No fade on first paint (.is-ready comes a frame later). */
.s-header::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,13,16,.94), rgba(11,13,16,.76)); transition: opacity 420ms var(--ease-out); }
.s-header:not(.is-ready), .s-header:not(.is-ready)::before { transition: none; }
.s-header.is-top:not(:has(.s-header__menu[aria-expanded="true"])) { border-bottom-color: transparent; }
.s-header.is-top:not(:has(.s-header__menu[aria-expanded="true"]))::before { opacity: 0; }
.s-header.is-top .s-header__nav a, .s-header.is-top .s-header__logo img { text-shadow: 0 1px 14px rgba(0,0,0,.45); }
.s-header.is-top .s-header__logo img { filter: drop-shadow(0 1px 10px rgba(0,0,0,.35)); }
.s-header__logo { justify-self: start; display: block; }
.s-header__logo img { width: 124px; min-width: 124px; height: auto; }
.s-header__nav { display: flex; gap: 34px; justify-self: center; }
.s-header__nav a {
  position: relative;
  font-family: var(--f-label); font-stretch: 140%; font-weight: 500;
  font-size: .6875rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--text-2); padding: 8px 0; white-space: nowrap;
  transition: color var(--d-ui) var(--ease-out);
}
.s-header__nav a:hover, .s-header__nav a[aria-current="page"], .s-header__nav a.is-active { color: var(--text); }
.s-header__nav a[aria-current="page"]::after, .s-header__nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: .28em; bottom: 2px; height: 1px; background: var(--signal);
}
.s-header__end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.s-header__menu {
  display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: var(--text);
  place-items: center;
}
.s-header__menu i, .s-header__menu i::before { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; transition: transform 240ms var(--ease-out); }
.s-header__menu i::before { content: ""; position: absolute; top: 6px; left: 0; }
.s-header__menu[aria-expanded="true"] i { transform: translateY(3px) rotate(45deg); }
.s-header__menu[aria-expanded="true"] i::before { transform: translateY(-6px) rotate(-90deg); }
@media (max-width: 1279px) { .s-header__nav { gap: 24px; } .s-header__nav a { letter-spacing: .22em; } }
@media (max-width: 1099px) {
  .s-header { grid-template-columns: 1fr auto; }
  .s-header__nav { display: none; }
  .s-header__menu { display: grid; }
  .s-header__logo img { width: 108px; min-width: 108px; }
  .s-header .g-btn { min-height: 40px; padding: 0 14px; font-size: .6875rem; letter-spacing: .16em; }
}

@media (max-width: 440px) {
  .s-header { gap: 8px; }
  .s-header .g-btn { padding: 0 11px; letter-spacing: .1em; font-size: .625rem; min-height: 44px; }
  .s-header__end { gap: 2px; }
  .s-header__logo img { width: 96px; min-width: 96px; }
}

/* Mobile menu sheet: a paper-dark panel that drops from the header */
.s-menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 59;
  background: var(--ink-2); border-bottom: 1px solid var(--edge);
  padding: 12px var(--margin) 28px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 420ms var(--ease-fold), visibility 0s linear 420ms;
}
.s-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 420ms var(--ease-fold), visibility 0s; }
.s-menu a { display: flex; justify-content: space-between; align-items: center; min-height: 56px; border-bottom: 1px solid var(--edge); color: var(--text); font-weight: 560; font-size: 1.25rem; letter-spacing: -.01em; }
.s-menu a span { font-family: var(--f-mono); font-stretch: 87.5%; font-size: .75rem; color: var(--text-3); }

/* ---------- Footer ---------- */
.s-footer { border-top: 1px solid var(--edge); padding-block: 56px 96px; }
.s-footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--gutter); align-items: start; }
.s-footer__brand { grid-column: 1 / span 4; }
.s-footer__brand img { width: 132px; }
.s-footer__brand p { margin: 18px 0 0; max-width: 34ch; font-size: .9375rem; }
.s-footer__nav { grid-column: 6 / span 3; display: grid; gap: 10px; }
.s-footer__nav a, .s-footer__meta a, .s-footer__meta button { color: var(--text-2); font-size: .9375rem; transition: color var(--d-ui) var(--ease-out); }
.s-footer__nav a:hover, .s-footer__meta a:hover, .s-footer__meta button:hover { color: var(--text); }
.s-footer__meta { grid-column: 10 / span 3; display: grid; gap: 10px; justify-items: start; }
.s-footer__meta button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.s-footer__legal { grid-column: 1 / -1; margin-top: 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .s-footer__brand, .s-footer__nav, .s-footer__meta { grid-column: 1 / -1; }
}

/* ---------- Section head (shared rhythm: eyebrow column + headline column) ---------- */
.s-head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: var(--gutter); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.s-head__title { grid-column: 1 / span 7; }
.s-head__title .g-eyebrow { margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.s-head__title .g-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--text-3); }
.s-head__aside { grid-column: 9 / span 4; }
.s-head__aside .g-lede { font-size: 1.0625rem; }
@media (max-width: 900px) { .s-head__title, .s-head__aside { grid-column: 1 / -1; } }

/* ---------- Concept-book bar for the site draft ---------- */
.cb-bar .cb-now { color: #fff; }
/* minimise toggle: first item; the bar folds down to a small "Painel" pill in the corner */
.cb-bar .cb-min { position: sticky; left: 0; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 11px; border: 0; border-radius: 999px; background: rgb(44,40,44); color: #C9C5BD; font: inherit; cursor: pointer; }
.cb-bar .cb-min:hover { color: #fff; background: rgb(58,52,57); }
.cb-bar .cb-min:focus-visible, .cb-bar a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cb-bar .cb-min span { padding: 0; border-radius: 0; }
.cb-min__i { flex: none; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 200ms var(--ease-out, ease); }
.cb-min__t { display: none; }
.cb-bar.is-min { left: auto; right: 14px; transform: none; padding: 3px; }
.cb-bar.is-min > :not(.cb-min) { display: none; }
.cb-bar.is-min .cb-min { background: transparent; }
.cb-bar.is-min .cb-min__i { transform: translateY(2px) rotate(-135deg); }
.cb-bar.is-min .cb-min__t { display: inline; }
@media (max-width: 640px) { .cb-bar.is-min { right: 8px; } }
/* background style dropdown */
.cb-bar .cb-sel { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; color: #8e8a85; }
.cb-sel select { appearance: none; -webkit-appearance: none; font: inherit; color: #fff; background: rgba(255,82,119,.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M.5.5 4 4 7.5.5' fill='none' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 10px center; border: 0; border-radius: 999px; padding: 7px 26px 7px 11px; cursor: pointer; color-scheme: dark; }
.cb-sel select:hover { background-color: rgba(255,82,119,.32); }
.cb-sel select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cb-sel option { background: #1d1a1d; color: #fff; }
@media (pointer: coarse) { .cb-bar .cb-min { min-height: 40px; } }

/* ---------- Skip link ---------- */
.s-skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 16px; background: var(--paper); color: var(--paper-ink); font-weight: 560; transition: top 160ms var(--ease-out); }
.s-skip:focus { top: 12px; }
.s-menu a[aria-current="page"] span { color: var(--signal); }
