/* Layout concept: a broadcast control room, kept quiet. The hero is a small multiviewer wall; the work sits
   on a cyclorama-grey studio (light) or a control-room graphite (dark). Chroma-key blue is the one
   interactive accent; tally red is reserved for the "on air" signal. The work is the loudest thing. */
:root {
  --bg: #ECEDEF;        /* studio cyclorama */
  --surface: #F7F8F9;
  --ink: #0D0F12;
  --muted: #565C66;
  --line: #CBCFD5;
  --accent: #1F3BFF;    /* chroma key blue */
  --accent-ink: #FFFFFF;
  --tally: #E3261C;     /* on-air tally light */
  --screen: #0D0F12;    /* monitor bezel and contact band, same in both themes */
  --screen-ink: #E9EBEE;
  --screen-muted: #A2A9B4;
  --screen-line: #3A404A;
  --screen-accent: #7B8BFF;

  --f-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --f-body: 'Geist', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --s-1: clamp(.82rem, .78rem + .2vw, .875rem);
  --s0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --s1: clamp(1.125rem, 1.05rem + .4vw, 1.3rem);
  --s2: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
  --s3: clamp(2.2rem, 1.5rem + 3.2vw, 4.25rem);
  --s4: clamp(3rem, 1.6rem + 6.6vw, 8.5rem);

  --wrap: 1320px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0E12; --surface: #14171C; --ink: #E9EBEE; --muted: #959CA6; --line: #272C34;
    --accent: #7B8BFF; --accent-ink: #0C0E12; --tally: #FF4A3D; --screen: #050608; --screen-line: #2E333B; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0E12; --surface: #14171C; --ink: #E9EBEE; --muted: #959CA6; --line: #272C34;
  --accent: #7B8BFF; --accent-ink: #0C0E12; --tally: #FF4A3D; --screen: #050608; --screen-line: #2E333B; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: var(--s0); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.mono { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; }

/* type */
.display {
  font-family: var(--f-display); font-weight: 800; font-variation-settings: 'wdth' 72;
  font-size: var(--s4); line-height: .9; letter-spacing: -.02em;
}
.h2 { font-family: var(--f-display); font-weight: 750; font-variation-settings: 'wdth' 78; font-size: var(--s3); line-height: .95; letter-spacing: -.015em; }
.h3 { font-family: var(--f-display); font-weight: 750; font-variation-settings: 'wdth' 80; font-size: var(--s2); line-height: 1; letter-spacing: -.01em; }
.lead { font-size: var(--s1); line-height: 1.5; max-width: 42ch; }
.lead strong { font-weight: 600; }
.sub { color: var(--muted); }
.tally { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tally); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tally) 22%, transparent); animation: tally 2.4s ease-in-out infinite; }
@keyframes tally { 50% { opacity: .35; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 var(--s0)/1 var(--f-body);
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background-color .18s, color .18s, border-color .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--s-1); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.bar-in { display: flex; align-items: center; gap: 28px; min-height: 64px; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-variation-settings: 'wdth' 85; font-size: 1.25rem; }
.bar-in .btn { white-space: nowrap; }
.brand-role { font-size: .75rem; font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); padding-block: 10px; }
.nav a:hover { color: var(--ink); }
/* English visitors: keep the Portuguese source copy invisible until the swap (space is kept, so nothing jumps) */
.i18n-pending [data-i18n] { visibility: hidden; }
/* PT / EN switch: a two-segment control, the active language filled */
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; flex: none; }
.lang button { min-width: 40px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 .78rem/1 var(--f-body); letter-spacing: .04em; cursor: pointer; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; padding-block: 56px 24px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* multiviewer: one programme monitor plays, three previews wait */
.mv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; background: var(--screen); border-radius: var(--r-lg); min-width: 0; }
.tile { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--r-sm); overflow: hidden; background: #1A1D22; border: 0; padding: 0; width: 100%; cursor: pointer; }
.tile.pgm { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.tile.pgm::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--tally); border-radius: inherit; pointer-events: none; }
.tile video, .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.tile:hover video, .tile:hover img { transform: scale(1.04); }
.tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.8));
  color: #fff; font: 500 .72rem/1.2 var(--f-body); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgm .tile-label { display: flex; align-items: center; gap: 10px; padding: 32px 14px 12px; font-size: .9rem; font-weight: 600; }
.on-air { flex: none; font: 600 .68rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 7px; border-radius: 3px; background: var(--tally); color: #fff; }

/* sections */
.section { padding-block: 112px 0; }
.section > .h2, #globo > .h2 { margin-bottom: 40px; }

/* featured broadcast cases: one lead, three supporting */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 28px; }
.feat { position: relative; display: grid; align-content: start; min-width: 0; }
.feat-info { display: grid; align-content: start; gap: 12px; min-width: 0; }
.feat-media { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--screen); margin-bottom: 18px; }
.feat-media video, .feat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.feat:hover .feat-media video, .feat:hover .feat-media img { transform: scale(1.03); }
.feat-meta { font-size: var(--s-1); font-weight: 500; color: var(--muted); }
.feat-title { font-family: var(--f-display); font-weight: 780; font-variation-settings: 'wdth' 74; font-size: var(--s2); line-height: 1; letter-spacing: -.01em; }
.feat-title button { all: unset; cursor: pointer; }
.feat-title button::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.feat-title button:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 6px; }
.feat-sum { color: var(--muted); max-width: 52ch; }
.go { font-weight: 600; color: var(--accent); }
.go::after { content: '→'; display: inline-block; margin-left: .35em; transition: transform .18s var(--ease); }
.feat:hover .go::after, .card:hover .go::after { transform: translateX(4px); }
.feat.lead-case { grid-column: 1 / -1; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; align-items: center; }
.lead-case .feat-media { aspect-ratio: 16 / 10; margin: 0; }
.lead-case .feat-info { gap: 16px; }
.lead-case .feat-title { font-size: var(--s3); line-height: .95; }
.lead-case .feat-sum { font-size: var(--s1); line-height: 1.45; }

/* more work */
.more-head { display: grid; gap: 8px; margin: 112px 0 32px; padding-top: 40px; border-top: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.card { display: grid; align-content: start; gap: 8px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; }
.card[hidden] { display: none; }
.card-media { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--screen); margin-bottom: 6px; }
.card-media video, .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media video, .card:hover .card-media img { transform: scale(1.03); }
.card-title { font-family: var(--f-display); font-weight: 750; font-variation-settings: 'wdth' 78; font-size: var(--s1); line-height: 1.1; }
.card-meta { color: var(--muted); font-size: var(--s-1); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 var(--s-1)/1 var(--f-body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .2s, color .2s, border-color .2s; }
.filter span { color: var(--muted); font-variant-numeric: tabular-nums; }
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter[aria-pressed="true"] span { color: inherit; opacity: .65; }
#globo[hidden] { display: none; }
.case-body .b-h { scroll-margin-top: 88px; }
.case-body .b-h.b-target { padding-left: 16px; border-left: 4px solid var(--accent); }
.more-head.solo { margin-top: 0; padding-top: 0; border-top: 0; }
.more-btn { margin-top: 40px; }
.more-btn[hidden] { display: none; }

/* about + roles */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px 72px; align-items: start; }
.about-copy { display: grid; gap: 18px; }
.about-copy .h2 { margin-bottom: 10px; }
.about-copy p { color: var(--muted); font-size: var(--s1); line-height: 1.5; max-width: 50ch; }
.tools { margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.tools dt { font-size: var(--s-1); font-weight: 600; margin-bottom: 4px; }
.tools dd { margin: 0; color: var(--muted); }
.roles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.roles li { display: grid; align-content: start; gap: 8px; padding: 24px 0 28px; border-top: 1px solid var(--line); min-width: 0; }
.roles h3 { font-family: var(--f-display); font-weight: 750; font-variation-settings: 'wdth' 82; font-size: var(--s1); line-height: 1.1; }
.roles p { color: var(--muted); }
.proof { font-size: var(--s-1); }
.proof button { background: none; border: 0; padding: 12px 0; margin: -12px 0; font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.proof button:hover { text-decoration-thickness: 2px; }

/* contact */
.contact { margin-top: 128px; background: var(--screen); color: var(--screen-ink); padding-block: 96px; }
.contact-in { display: grid; gap: 24px; justify-items: start; }
.status { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; color: var(--screen-muted); }
.contact-title { max-width: 14ch; }
.mail-addr { font-family: var(--f-display); font-weight: 650; font-variation-settings: 'wdth' 85; font-size: var(--s2); overflow-wrap: anywhere; user-select: all; margin-top: 8px; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact .btn-solid { background: var(--screen-accent); color: #0C0E12; }
.contact .btn-solid:hover { background: #95A2FF; }
.contact .btn-line { border-color: var(--screen-line); color: var(--screen-ink); }
.contact .btn-line:hover { background: var(--screen-ink); border-color: var(--screen-ink); color: #0C0E12; }
.copied { color: #9BE3A5; font-size: var(--s-1); font-weight: 500; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: var(--s-1); }

/* case viewer */
.case { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); overscroll-behavior: contain; }
.case::backdrop { background: rgba(5,6,8,.6); }
.case[open] { animation: rise .4s var(--ease); }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.case-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.case-kicker { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.close { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 var(--s-1)/1 var(--f-body); cursor: pointer; flex: none; }
.close:hover { border-color: var(--ink); }
.case-body { max-width: 1120px; margin-inline: auto; padding: 48px max(16px, env(safe-area-inset-right, 0px)) calc(80px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 22px; }
.case-head { display: grid; gap: 18px; margin-bottom: 16px; }
.case-meta { font-weight: 500; color: var(--muted); }
.case-title { font-family: var(--f-display); font-weight: 800; font-variation-settings: 'wdth' 70; font-size: var(--s4); line-height: .9; letter-spacing: -.02em; }
.meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: var(--s-1); }
.meta dt { font-weight: 600; }
.meta dd { margin: 0; color: var(--muted); }
.case-body .b-h { font-family: var(--f-display); font-weight: 750; font-variation-settings: 'wdth' 80; font-size: var(--s2); line-height: 1.05; margin-top: 36px; }
.case-body .b-p { font-size: var(--s1); line-height: 1.55; max-width: 66ch; color: var(--muted); }
.case-body .b-media { border-radius: var(--r); overflow: hidden; background: var(--screen); }
.case-body .b-media video, .case-body .b-media img { width: 100%; height: auto; }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.film { max-width: 100%; max-height: 80vh; margin-inline: auto; border-radius: var(--r); overflow: hidden; background: var(--screen); }
.film video, .film img { display: block; width: 100%; height: 100%; object-fit: contain; }
.film-off { position: relative; }
.film-off span { position: absolute; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: var(--s-1); }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--screen); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-btn { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; width: 100%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, #232831, #0C0E12 70%); color: #E9EBEE; font: 600 var(--s0)/1.3 var(--f-body); text-decoration: none; }
.embed-btn .play { width: 72px; height: 72px; border-radius: 50%; background: var(--tally); display: grid; place-items: center; transition: transform .18s var(--ease); }
.embed-btn:hover .play { transform: scale(1.06); }
.embed-btn .play::after { content: ''; margin-left: 5px; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.embed-btn small { font-size: .78rem; color: #8B93A0; }
.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.case-nav button { text-align: left; background: none; border: 0; cursor: pointer; padding: 0; display: grid; gap: 6px; min-height: 44px; }
.case-nav button:last-child { text-align: right; }
.case-nav span { color: var(--muted); font-size: var(--s-1); font-weight: 500; }
.case-nav b { font-family: var(--f-display); font-weight: 750; font-variation-settings: 'wdth' 76; font-size: var(--s2); line-height: 1; }
.case-nav button:hover b { color: var(--accent); }

/* responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .hero .lead { max-width: 52ch; }
  .feats, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat.lead-case { grid-template-columns: minmax(0, 1fr); }
  .lead-case .feat-media { margin-bottom: 18px; }
  .about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .bar-in { justify-content: space-between; gap: 10px; }
  .lang { margin-left: auto; }
  .lang button { min-width: 36px; padding: 0 8px; }
  .hero { padding-top: 28px; gap: 28px; }
  .hero-copy { gap: 16px; }
  .cta-row .btn { flex: 1 1 auto; }
  .mv { padding: 6px; gap: 6px; }
  .tile-label { font-size: .66rem; padding: 14px 6px 5px; }
  .pgm .tile-label { padding: 24px 10px 8px; font-size: .8rem; }
  .feats { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .grid { gap: 28px 12px; }
  .card-title { font-size: var(--s0); }
  .card-meta { font-size: .8rem; line-height: 1.4; }
  .roles { grid-template-columns: minmax(0, 1fr); }
  .section { padding-top: 80px; }
  .more-head { margin-top: 80px; }
  .contact { margin-top: 96px; padding-block: 72px; }
  .contact-row .btn { flex: 1 1 auto; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .case-body { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
