/* ==========================================================================
   Jaakko Tammela, jaakko.co
   Charcoal + off-white + red. Editorial executive.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=Style+Script&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Surface */
  --ink:            #0E0E0E;   /* charcoal ground */
  --ink-raised:     #151515;
  --paper:          #F2F0EC;   /* off-white, 15.4:1 on ink */
  --paper-muted:    #A8A39B;   /* 7.7:1 on ink */
  --paper-faint:    #8A857E;   /* 5.3:1 on ink, 5.0:1 on raised */

  /* Brand red, two tones, each verified for contrast */
  --red:            #E5261F;   /* fills / blocks. White text on it = 4.54:1 */
  --red-text:       #F5352B;   /* red type on charcoal = 4.99:1 */
  --red-deep:       #B81C16;

  /* Lines */
  --rule:           rgba(242, 240, 236, 0.14);
  --rule-soft:      rgba(242, 240, 236, 0.07);

  /* Type */
  --display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --script:  'Style Script', 'Snell Roundhand', cursive;

  /* Space, 4/8 rhythm */
  --s-1: 0.5rem;  --s-2: 1rem;   --s-3: 1.5rem;  --s-4: 2rem;
  --s-5: 3rem;    --s-6: 4rem;   --s-7: 6rem;    --s-8: 8rem;

  --wrap: 1320px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);

  --header-h: 96px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.03em; line-height: 1.02; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--red-text);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--red); color: #fff; }

/* ---------- Bilingual switching ---------- */
html[data-lang="en"] .pt { display: none !important; }
html[data-lang="pt"] .en { display: none !important; }

/* ---------- Utilities ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--s-2); top: -100px; z-index: 999;
  background: var(--red); color: #fff; padding: 0.75rem 1.25rem;
  font-family: var(--display); font-weight: 600; font-size: 0.875rem;
  transition: top 160ms var(--ease);
}
.skip:focus { top: var(--s-2); }

.label {
  font-family: var(--display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-text);
  margin: 0 0 var(--s-3);
  display: block;
}
.label--muted { color: var(--paper-faint); }

/* four-petal marker, mirrors the reference's ✥ */
.mark { width: 0.6em; height: 0.6em; flex: none; fill: var(--red-text); opacity: 0.85; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4);
  pointer-events: none;
}
.header > * { pointer-events: auto; }

/* scrim keeps the menu legible where it passes over photography */
.header::before {
  content: "";
  position: fixed; inset: 0 0 auto 0;
  height: calc(var(--header-h) + 3.5rem);
  background: linear-gradient(to bottom,
    rgba(14, 14, 14, 0.96) 0%,
    rgba(14, 14, 14, 0.88) 40%,
    rgba(14, 14, 14, 0) 100%);
  pointer-events: none;
  z-index: -1;
}

.brand {
  background: var(--red);
  padding: clamp(0.9rem, 1.6vw, 1.4rem) clamp(1.1rem, 2.4vw, 2.2rem);
  display: flex; align-items: center;
  transition: background 200ms var(--ease);
}
.brand:hover, .brand:focus-visible { background: var(--red-deep); }
.brand img { width: clamp(96px, 11vw, 168px); }

.header-right {
  display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.5rem);
  /* a reserva a direita existia para o indice, que hoje fica a esquerda */
  padding: clamp(1.35rem, 2.4vw, 2rem) var(--gutter) 0 0;
}

/* Seal + vertical INDEX, persistent nav trigger */
.index-nav {
  position: fixed; top: clamp(1rem, 2vw, 1.75rem); right: clamp(1rem, 2vw, 1.75rem);
  z-index: 110;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 0.25rem;
  min-width: 48px;
}
.index-nav .seal {
  width: clamp(38px, 3.4vw, 50px); height: auto; display: block;
  transition: transform 320ms var(--ease);
}
.index-nav:hover .seal, .index-nav:focus-visible .seal { transform: scale(1.1); }
.index-nav .index-word {
  font-family: var(--display); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--paper);
  writing-mode: vertical-rl;
  transition: color 200ms var(--ease);
}
.index-nav:hover .index-word { color: var(--red-text); }
/* label states, the mark itself never distorts */
.index-nav .w-close { display: none; }
.index-nav[aria-expanded="true"] .w-open { display: none; }
.index-nav[aria-expanded="true"] .w-close { display: block; }
.index-nav[aria-expanded="true"] .index-word { color: var(--red-text); }
@media (prefers-reduced-motion: reduce) {
  .index-nav .seal, .index-nav:hover .seal { transition: none; transform: none; }
}

.nav-cols { display: none; gap: clamp(1.75rem, 3.5vw, 4rem); }
.nav-col { text-align: right; }
.nav-col h2 {
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--paper-muted);
  margin-bottom: 0.6rem; line-height: 1;
}
.nav-col a {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
  line-height: 1.55;
  color: var(--paper);
  transition: color 180ms var(--ease);
  padding-block: 2px;
}
.nav-col a:hover, .nav-col a:focus-visible { color: var(--red-text); }
.nav-col a:hover .mark { opacity: 1; }

/* Language toggle */
.lang {
  display: flex; align-items: center; gap: 0.35rem;
  font-family: var(--display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em;
}
.lang button {
  color: var(--paper-faint);
  padding: 0.55rem 0.35rem;
  min-height: 44px;
  transition: color 180ms var(--ease);
}
.lang button:hover { color: var(--paper); }
.lang button[aria-pressed="true"] { color: var(--red-text); }
.lang span { color: var(--rule); }

/* Mobile menu button */
.menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; align-items: flex-end;
}
.menu-btn i { display: block; width: 26px; height: 2px; background: var(--paper); transition: transform 220ms var(--ease), opacity 220ms var(--ease); }
.menu-btn[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink);
  padding: calc(var(--header-h) + var(--s-4)) var(--gutter) var(--s-6);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s-5);
  opacity: 0; visibility: hidden;
  transition: opacity 240ms var(--ease), visibility 240ms;
}
.drawer[data-open="true"] { opacity: 1; visibility: visible; }
.drawer-inner { display: flex; flex-direction: column; gap: var(--s-5); width: 100%; }
.drawer .nav-col { text-align: left; }
.drawer .nav-col a { justify-content: flex-start; font-size: clamp(1.375rem, 2.6vw, 2rem); min-height: 48px; }
.drawer .nav-col h2 { margin-bottom: var(--s-2); font-size: 0.6875rem; }
@media (min-width: 900px) {
  .drawer { justify-content: center; }
  .drawer-inner { flex-direction: row; gap: clamp(3rem, 8vw, 8rem); align-items: flex-start; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding-block: calc(var(--header-h) + var(--s-3)) var(--s-5);
  position: relative;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 40%, transparent 40%, rgba(14,14,14,0.85) 100%);
}
.hero > * { position: relative; z-index: 1; }

.hero-name {
  font-family: var(--display); font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--paper-muted);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
.hero h1 {
  font-size: clamp(2.375rem, 6.4vw, 6.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 17ch;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--red-text); }

.hero-roles {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.4rem 0.75rem;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(0.6875rem, 0.95vw, 0.8125rem);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--paper-muted);
}
.hero-roles b { color: var(--paper); font-weight: 600; }

.hero-roles .dot { color: var(--red-text); }

.scroll-cue {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--display); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-faint);
  min-height: 44px;
}
.scroll-cue svg { width: 14px; height: 22px; stroke: var(--red-text); fill: none; stroke-width: 1.5; }
.scroll-cue svg line { animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1 } 50% { transform: translateY(5px); opacity: .3 } }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg line { animation: none; } }

@media (max-width: 639px) {
  .hero-roles { flex-direction: column; gap: 0.45rem; }
  .hero-roles .dot { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 11vw, 9.5rem); border-top: 1px solid var(--rule-soft); }
.section--flush { border-top: 0; }

.section-head { max-width: 100%; }
.section h2 { font-size: clamp(1.875rem, 4.4vw, 3.75rem); letter-spacing: -0.035em; text-wrap: balance; max-width: 15ch; }

/* Thesis */
.thesis-grid {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
.thesis-body { display: grid; gap: var(--s-3); max-width: 62ch; color: var(--paper-muted); }
.thesis-body p:first-child { color: var(--paper); font-size: 1.15em; }
.thesis-body strong, .hl { color: var(--paper); font-weight: 600; font-family: var(--display); letter-spacing: -0.01em; }
.thesis h2 { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 20ch; }

.portrait { position: relative; }
.portrait img { width: 100%; filter: grayscale(1) contrast(1.06); }
.portrait figcaption {
  margin-top: var(--s-2);
  font-family: var(--display); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-faint);
}

/* Territories */
.territories { display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); margin-top: clamp(2.5rem, 5vw, 4rem); }
.territory { background: var(--ink); padding: clamp(1.75rem, 3.5vw, 3rem) 0; }
.territory-i {
  font-family: var(--display); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.2em; color: var(--red-text); display: block; margin-bottom: var(--s-2);
}
.territory h3 { font-size: clamp(1.25rem, 2.1vw, 1.75rem); margin-bottom: var(--s-2); letter-spacing: -0.02em; }
.territory p { color: var(--paper-muted); font-size: 0.9375rem; max-width: 44ch; }

/* Impact list */
.impact { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--rule); }
.impact-row {
  display: grid; grid-template-columns: 1fr; gap: 0.35rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
}
.impact-org { font-family: var(--display); font-weight: 700; font-size: clamp(1.375rem, 2.8vw, 2.25rem); letter-spacing: -0.03em; }
.impact-when { font-family: var(--display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red-text); }
.impact-what { color: var(--paper-muted); max-width: 52ch; font-size: 0.9375rem; }

/* placeholder slots the user still has to fill */
.slot {
  color: var(--paper-faint);
  border-bottom: 1px dashed var(--paper-faint);
  font-style: italic;
}

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: clamp(2.5rem, 5vw, 4rem); }
.number { background: var(--ink); padding: clamp(1.5rem, 3.5vw, 2.75rem); }
.number b {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(2.25rem, 5.5vw, 4.25rem); line-height: 1; letter-spacing: -0.045em;
  color: var(--red-text);
  font-variant-numeric: tabular-nums;
}
.number > span { display: block; margin-top: var(--s-2); font-size: 0.875rem; color: var(--paper-muted); }
.number b span { font-size: 0.55em; vertical-align: super; letter-spacing: 0; }

/* Roles today */
.roles { display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); margin-top: clamp(2.5rem, 5vw, 4rem); }
.role { background: var(--ink); padding: clamp(1.5rem, 3vw, 2.25rem) 0; display: grid; gap: 0.4rem; }
.role h3 { font-size: clamp(1.125rem, 1.8vw, 1.5rem); letter-spacing: -0.02em; }
.role p { color: var(--paper-muted); font-size: 0.9375rem; }

/* Ideas */
.ideas { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--rule); }
.idea {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.25rem;
  padding-block: clamp(1.25rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
  transition: padding-inline 220ms var(--ease);
}
a.idea:hover, a.idea:focus-visible { padding-inline: 0.75rem; background: var(--ink-raised); }
.idea-kind { font-family: var(--display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-text); min-width: 6.5rem; }
.idea-title { font-family: var(--display); font-weight: 600; font-size: clamp(1.0625rem, 1.8vw, 1.375rem); letter-spacing: -0.02em; flex: 1 1 16ch; }
.idea-meta { color: var(--paper-faint); font-size: 0.8125rem; font-family: var(--display); letter-spacing: 0.05em; }

/* FromHumans */
.fh {
  border: 1px solid var(--rule);
  padding: clamp(2rem, 6vw, 5rem);
  display: grid; gap: var(--s-4);
  background:
    linear-gradient(180deg, rgba(229,38,31,0.07), transparent 60%),
    var(--ink-raised);
}
.fh h2 { font-size: clamp(2rem, 6vw, 4.5rem); letter-spacing: -0.045em; }
.fh-sub { font-family: var(--display); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.75rem; color: var(--red-text); }
.fh p { color: var(--paper-muted); max-width: 54ch; }

.cta {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  padding: 0.9rem 1.6rem; min-height: 48px;
  background: var(--red); color: #fff;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
  justify-self: start;
}
.cta:hover, .cta:focus-visible { background: var(--red-deep); }
.cta svg { width: 18px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.75; transition: transform 200ms var(--ease); }
.cta:hover svg { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .cta:hover svg { transform: none; } }

/* Contact */
.contact h2 { font-size: clamp(3rem, 12vw, 9rem); letter-spacing: -0.05em; margin-bottom: var(--s-3); }
.contact-lead { color: var(--paper-muted); max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.contact-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.contact-links a {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 48px;
  border-bottom: 1px solid var(--rule);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.contact-links a:hover, .contact-links a:focus-visible { color: var(--red-text); border-color: var(--red-text); }

/* Footer */
.footer {
  border-top: 1px solid var(--rule-soft);
  padding-block: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: space-between;
  font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--paper-faint);
}

/* ---------- Photography ---------- */
.band { border-top: 1px solid var(--rule-soft); }
.band img {
  width: 100%; display: block; filter: grayscale(1) contrast(1.05);
  /* --focus is the face's position inside the source file, set per image.
     object-position anchors that exact point, so the face holds the same
     spot in the frame at every viewport width. */
  object-position: var(--focus, 50% 50%);
}

/* closing full-bleed band */
.band--full img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
@media (min-width: 700px)  { .band--full img { aspect-ratio: 16 / 9; } }
@media (min-width: 1200px) { .band--full img { aspect-ratio: 21 / 9; } }

/* split band: photograph + pull quote */
.band--split { display: grid; grid-template-columns: 1fr; }
.band--split .band-media img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (min-width: 900px) { .band--split .band-media img { aspect-ratio: 1 / 1; } }
.band-quote {
  background: var(--ink-raised);
  padding: clamp(2rem, 6vw, 4.25rem) var(--gutter);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-3);
}
.band-quote blockquote {
  margin: 0;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.375rem, 2.6vw, 2.125rem);
  line-height: 1.14; letter-spacing: -0.03em;
  text-wrap: balance;
}
.band-quote cite {
  font-style: normal; font-family: var(--display);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--red-text);
}

/* full-bleed 2-up photo pairs */
.photo-grid {
  display: grid; grid-template-columns: 1fr;
  column-gap: clamp(1px, 0.4vw, 6px); row-gap: clamp(2rem, 4vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  object-position: var(--focus, 50% 50%);
  filter: grayscale(1) contrast(1.05);
  transition: filter 450ms var(--ease);
}
.photo-grid figure:hover img { filter: grayscale(0.1) contrast(1.05); }
.photo-grid figcaption {
  padding-top: var(--s-2);
  font-family: var(--display); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-faint);
}
@media (prefers-reduced-motion: reduce) { .photo-grid img { transition: none; } }
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .band--split { grid-template-columns: 0.9fr 1.1fr; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .impact-row { grid-template-columns: 8.5rem 1fr; align-items: baseline; }
  .impact-when { grid-row: span 2; }
  .impact-org { grid-column: 2; }
  .impact-what { grid-column: 2; }
  .numbers { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .territories { grid-template-columns: repeat(2, 1fr); }
  .territory { padding-inline: clamp(1.5rem, 3vw, 2.5rem); }
  .territory:nth-child(odd) { padding-left: 0; }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .role { padding-inline: clamp(1.5rem, 3vw, 2.5rem); }
  .role:nth-child(odd) { padding-left: 0; }
}

@media (min-width: 1024px) {
  :root { --header-h: 116px; }
  .thesis-grid { grid-template-columns: 1.2fr 0.8fr; }
  .fh { grid-template-columns: 1fr 1fr; align-items: center; }
  .fh h2 { grid-column: 1; }
  .roles { grid-template-columns: repeat(4, 1fr); }
  .role:nth-child(odd) { padding-left: clamp(1.5rem, 3vw, 2.5rem); }
  .role:first-child { padding-left: 0; }
}

@media (min-width: 1440px) {
  .territories { grid-template-columns: repeat(4, 1fr); }
  .territory:nth-child(odd) { padding-left: clamp(1.5rem, 3vw, 2.5rem); }
  .territory:first-child { padding-left: 0; }
}

/* ---------- Screen-reader only ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* =========================================================================
   ÍNDICE, selo quadrado, painel vermelho, newsletter
   (este bloco vem depois e sobrescreve as regras equivalentes acima)
   ========================================================================= */

/* --- selo quadrado, só aparece na rolagem --- */
.index-nav .seal { border-radius: 0; }
.index-nav {
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease), visibility 260ms;
}
html[data-scrolled="true"] .index-nav,
.index-nav[aria-expanded="true"] { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .index-nav { transition: none; } }

/* --- container: vira folha ancorada embaixo, com backdrop clicável --- */
.drawer {
  display: block; padding: 0; overflow: hidden;
  background: transparent;
}
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8,8,8,0.66); }

.drawer-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92svh; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--ink);
  transform: translateY(3%);
  transition: transform 320ms var(--ease);
}
.drawer[data-open="true"] .drawer-sheet { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .drawer-sheet, .drawer[data-open="true"] .drawer-sheet { transition: none; transform: none; }
}

/* --- barra branca --- */
.drawer-bar {
  background: #fff; color: #000;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
}
.drawer-home {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  font-family: var(--display); font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: #000;
}
.drawer-home:hover, .drawer-home:focus-visible { color: var(--red-deep); }
.drawer-news-btn {
  background: #000; color: #fff; min-height: 44px; padding: 0.8rem 1.4rem;
  font-family: var(--display); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 200ms var(--ease);
}
.drawer-news-btn:hover, .drawer-news-btn:focus-visible { background: var(--red-deep); }
.drawer-news-btn[hidden] { display: none; }

/* --- formulário de newsletter --- */
.news {
  background: #fff; color: #000;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 1.4rem;
  display: grid; gap: 0.7rem;
}
.news[hidden] { display: none; }
.news-label {
  font-family: var(--display); font-weight: 600; font-size: 0.6875rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: #000;
}
.news-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.news input[type="email"] {
  flex: 1 1 18rem; min-height: 48px; padding: 0.75rem 1rem;
  border: 1px solid #000; background: #fff; color: #000; font: inherit;
}
.news input[type="email"]:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.news button[type="submit"] {
  background: #000; color: #fff; min-height: 48px; padding: 0.75rem 1.6rem;
  font-family: var(--display); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.news button[type="submit"]:hover { background: var(--red-deep); }
.news button[type="submit"][disabled] { opacity: 0.5; cursor: default; }
.news-consent { font-size: 0.75rem; line-height: 1.5; color: #444; max-width: 62ch; }
.news-status { font-size: 0.8125rem; font-weight: 500; min-height: 1.3em; color: #000; }
.news-status[data-kind="erro"] { color: #B81C16; }

/* --- zona escura: as três colunas, alinhadas à esquerda --- */
.drawer-dark { padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 3vw, 2.5rem); }
.drawer-cols { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 760px) { .drawer-cols { grid-template-columns: repeat(3, 1fr); } }
.drawer-cols .nav-col { text-align: left; }
.drawer-cols .nav-col h2 { color: var(--paper-muted); margin-bottom: 0.9rem; }
.drawer-cols .nav-col a {
  justify-content: flex-start; gap: 0.75rem; min-height: 44px;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
}
.drawer-cols .nav-col a::before {
  content: ""; width: 9px; height: 9px; flex: none;
  background: var(--red-text);
  transition: transform 180ms var(--ease);
}
.drawer-cols .nav-col a:hover::before,
.drawer-cols .nav-col a:focus-visible::before { transform: scale(1.4); }
@media (prefers-reduced-motion: reduce) { .drawer-cols .nav-col a::before { transition: none; } }

/* --- painel vermelho: 01–07 + coluna lateral --- */
.drawer-red {
  background: var(--red); color: #000;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 3vw, 2.5rem);
  display: grid; gap: clamp(2rem, 4vw, 3rem); grid-template-columns: 1fr;
}
@media (min-width: 900px) { .drawer-red { grid-template-columns: 1fr auto; } }

.index-list { display: grid; grid-template-columns: 1fr; gap: clamp(0.5rem, 1.4vw, 0.9rem); }
@media (min-width: 620px) {
  .index-list { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4rem); }
}
.index-list a {
  display: flex; align-items: baseline; gap: 0.55rem; min-height: 48px; color: #000;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.375rem); letter-spacing: -0.03em; line-height: 1.15;
  transition: color 180ms var(--ease);
}
.index-list a:hover, .index-list a:focus-visible { color: #fff; }
.index-list .n {
  font-size: 0.38em; font-weight: 600; letter-spacing: 0.08em;
  align-self: flex-start; padding-top: 0.5em; flex: none;
}

.index-more { border-top: 1px solid rgba(0,0,0,0.35); padding-top: 1.25rem; }
@media (min-width: 900px) {
  .index-more {
    border-top: 0; border-left: 1px solid rgba(0,0,0,0.35);
    padding: 0 0 0 clamp(1.5rem, 3vw, 2.5rem); min-width: 15rem;
  }
}
.index-more h2 {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: #000; margin-bottom: 0.9rem;
}
.index-more a {
  display: flex; align-items: center; gap: 0.6rem; min-height: 44px; color: #000;
  font-family: var(--display); font-weight: 500; font-size: 1rem;
  transition: color 180ms var(--ease);
}
.index-more a:hover, .index-more a:focus-visible { color: #fff; }

/* leitura em coluna: 01–04 à esquerda, 05–07 à direita */
@media (min-width: 620px) {
  .index-list {
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
  }
}

/* Com o painel aberto o rótulo cruza a barra branca: vira chip sólido
   (branco sobre vermelho = 4,54:1) em vez de texto vermelho sobre branco (3,87:1). */
.index-nav[aria-expanded="true"] .index-word {
  background: var(--red);
  color: #fff;
  padding: 0.5rem 0.3rem;
}

/* =========================================================================
   Books, talks & writing  +  Roles today (dois níveis)
   ========================================================================= */

.subsection { margin-top: clamp(2.5rem, 5vw, 4rem); }
.subsection + .subsection { margin-top: clamp(3rem, 6vw, 5rem); }

.sub-label {
  font-family: var(--display);
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red-text);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.sub-body {
  color: var(--paper-muted);
  max-width: 62ch;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
}

/* lista de livros */
.books { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.books li { background: var(--ink); padding: clamp(1.25rem, 2.6vw, 1.75rem) 0; }
.books h4 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
  letter-spacing: -0.02em; margin-bottom: 0.4rem;
  text-wrap: balance;
}
.books p { color: var(--paper-muted); font-size: 0.9375rem; max-width: 52ch; }
@media (min-width: 768px) {
  .books { grid-template-columns: repeat(2, 1fr); }
  .books li { padding-inline: clamp(1.5rem, 3vw, 2.5rem); }
  .books li:nth-child(odd) { padding-left: 0; }
}

/* a grade de palco perde as legendas, então respira um pouco mais */
.subsection .photo-grid { margin-top: clamp(2rem, 4vw, 3rem); }

/* cargo dentro de Roles today */
.role-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  letter-spacing: -0.01em;
  color: var(--paper);
}
.role p:not(.role-title) { color: var(--paper-muted); font-size: 0.9375rem; }


/* =========================================================================
   Cabecalho: no topo o wordmark; ao rolar, o selo quadrado + a palavra
   INDEX / INDICE na horizontal, ocupando o mesmo canto superior esquerdo.
   ========================================================================= */
.brand { transition: opacity 240ms var(--ease), visibility 240ms, background 200ms var(--ease); }
html[data-scrolled="true"] .brand,
html[data-panel="open"] .brand { opacity: 0; visibility: hidden; pointer-events: none; }

.index-nav {
  top: 0; left: 0; right: auto;
  flex-direction: row; align-items: center;
  gap: clamp(0.7rem, 1.4vw, 1.05rem);
  padding: 0 clamp(1rem, 2vw, 1.5rem) 0 0;
  min-width: 0; min-height: 48px;
}
.index-nav .seal { width: clamp(52px, 5.3vw, 76px); }
.index-nav .index-word {
  writing-mode: horizontal-tb;
  letter-spacing: 0.24em;
}
/* o rotulo nao cruza mais superficie clara, entao dispensa o chip */
.index-nav[aria-expanded="true"] .index-word {
  background: none; color: var(--red-text); padding: 0;
}
html[data-panel="open"] .index-nav { opacity: 1; visibility: visible; transform: none; }

/* Links dentro de Roles today e da lista de livros: herdam o estilo do
   titulo e so ganham a cor da marca no hover. */
.role h3 a, .books h4 a { color: inherit; transition: color 180ms var(--ease); }
.role h3 a:hover, .role h3 a:focus-visible,
.books h4 a:hover, .books h4 a:focus-visible { color: var(--red-text); }
.role-orgs a {
  color: inherit; border-bottom: 1px solid var(--rule);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.role-orgs a:hover, .role-orgs a:focus-visible { color: var(--red-text); border-color: var(--red-text); }

/* =========================================================================
   Barra branca do painel: cadastro de novidades inline.
   Substitui o antigo "voltar à página inicial".
   ========================================================================= */
.drawer-bar { display: block; padding: clamp(1rem, 2.2vw, 1.35rem) clamp(1rem, 3vw, 2.5rem); }

.drawer-bar .news {
  background: none; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.55rem clamp(1rem, 2.4vw, 1.75rem);
}
.drawer-bar .news-label {
  flex: 0 1 auto; margin: 0;
  font-family: var(--body); font-size: 0.9375rem; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: #000;
}
.drawer-bar .news-row { flex: 1 1 20rem; max-width: 32rem; gap: 0.5rem; }
.drawer-bar .news input[type="email"] { flex: 1 1 12rem; }
.drawer-bar .news-consent,
.drawer-bar .news-status { flex: 1 1 100%; margin: 0; }
.drawer-bar .news-status:empty { display: none; }

/* sem a coluna "more", a lista ocupa o painel inteiro */
@media (min-width: 900px) { .drawer-red { grid-template-columns: 1fr; } }

/* =========================================================================
   Selo 20% menor, botao de fechar no painel, marcadores quadrados
   ========================================================================= */

/* 52/5.3vw/76 reduzidos em 20% */
.index-nav .seal { width: clamp(42px, 4.24vw, 61px); }

/* fechar: alvo de 48px, ancorado no topo direito da barra branca */
.drawer-bar { position: relative; padding-right: calc(clamp(1rem, 3vw, 2.5rem) + 3.25rem); }
.drawer-close {
  position: absolute; top: 0.5rem; right: clamp(0.5rem, 1.6vw, 1rem);
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: #000;
  transition: color 180ms var(--ease);
}
.drawer-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.drawer-close:hover, .drawer-close:focus-visible { color: var(--red); }

/* marcadores quadrados, iguais aos do resto da pagina */
.sq {
  width: 9px; height: 9px; flex: none;
  background: var(--red-text);
  transition: transform 180ms var(--ease);
}
.contact-links a:hover .sq, .contact-links a:focus-visible .sq { transform: scale(1.4); }
@media (prefers-reduced-motion: reduce) { .sq { transition: none; } }

/* o atributo hidden precisa vencer o display:flex da barra */
.drawer-bar .news[hidden] { display: none; }
