/* ==========================================================
   Gustavo Gondim — portfólio
   Ideia: interface neutra e quieta; a cor fica nos quadrados
   dos temas, cada um com um "grade" próprio, como num color grading.
   ========================================================== */

:root {
  --bg: #0f1316;
  --surface: #171c20;
  --fg: #e8e6e1;
  --muted: #8b9390;
  --line: rgba(232, 230, 225, .14);
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1320px;
  --gut: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: page-in .5s var(--ease);
}
body.leaving { opacity: 0; transition: opacity .18s ease; }
@keyframes page-in { from { opacity: 0; } }

/* grão de filme, bem discreto */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 120;
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 4px;
  text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

main:focus { outline: none; }

/* ---------- tipografia de destaque ---------- */
.disp {
  font-weight: 720;
  font-stretch: 75%;
  letter-spacing: -.025em;
  line-height: .9;
}

/* ---------- cabeçalho ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.hdr.solid {
  background: rgba(15, 19, 22, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.hdr__in {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut);
}
.brand {
  text-decoration: none; font-weight: 720; font-stretch: 75%;
  font-size: 1.45rem; letter-spacing: -.01em;
}
.nav { display: flex; gap: clamp(16px, 3vw, 36px); }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover, .nav a[aria-current] { color: var(--fg); border-color: var(--fg); }

/* ---------- abertura (cortinas de cinema) ---------- */
.bars { position: fixed; inset: 0; z-index: 130; pointer-events: none; }
.bars i {
  position: absolute; left: 0; right: 0; height: 50.5%; background: #000;
  animation: bars-open 1.15s var(--ease) .2s both;
}
.bars i:first-child { top: 0; transform-origin: top; }
.bars i:last-child { bottom: 0; transform-origin: bottom; }
@keyframes bars-open { to { transform: scaleY(0); } }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; display: flex; align-items: flex-end;
  padding: 88px 0 clamp(24px, 5vh, 52px);
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 60% at 80% 18%, hsl(190 70% 40% / .45), transparent 65%),
    radial-gradient(60% 60% at 12% 100%, hsl(24 85% 52% / .32), transparent 68%),
    var(--bg);
}
.hero__bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s;
}
.hero__bg img.ok { opacity: .38; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 4%, rgba(15, 19, 22, .1) 60%, rgba(15, 19, 22, .55));
}
.hero__grid { display: grid; gap: 40px; align-items: end; }
.hero__name { font-size: clamp(3.8rem, min(15vw, 23svh), 13rem); }
.hero__name span { display: block; }
.hero__role { margin-top: clamp(14px, 2.4vh, 32px); font-size: clamp(1.05rem, 1.7vw, 1.3rem); font-weight: 500; }
.hero__lead { color: var(--muted); max-width: 30ch; }
.hero__links { margin-top: clamp(16px, 3vh, 28px); }
.link { text-underline-offset: .32em; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

.reel {
  display: inline-flex; align-items: center; gap: 18px;
  background: none; border: 0; cursor: pointer; text-align: left; padding: 0;
}
.reel__disc {
  width: 88px; height: 88px; border-radius: 50%; background: var(--fg);
  display: grid; place-items: center; transition: transform .45s var(--ease);
}
.reel__disc::before {
  content: ""; margin-left: 6px;
  border-left: 22px solid var(--bg); border-top: 13px solid transparent; border-bottom: 13px solid transparent;
}
.reel__txt { display: grid; line-height: 1.3; }
.reel__txt strong { font-size: 1.15rem; font-weight: 650; }
.reel__txt span { color: var(--muted); font-size: .9rem; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1fr auto; }
  .hero__side { justify-self: end; padding-bottom: 14px; }
}

/* ---------- seções ---------- */
.section { --secpad: clamp(72px, 11vw, 150px); padding-block: var(--secpad) 0; scroll-margin-top: calc(104px - var(--secpad)); }
.sec__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.sec__title { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.sec__note { color: var(--muted); max-width: 34ch; }

/* ---------- grade de quadrados ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.tile {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden; isolation: isolate;
  border-radius: 6px; text-decoration: none; color: #fff;
  background: hsl(var(--h) 30% 9%);
}
.tile__art {
  position: absolute; inset: 0; transition: transform .9s var(--ease);
  background:
    radial-gradient(90% 80% at 18% 12%, hsl(var(--h) 70% 46% / .8), transparent 62%),
    radial-gradient(80% 70% at 92% 96%, hsl(calc(var(--h) + 165) 78% 52% / .55), transparent 66%),
    hsl(var(--h) 30% 9%);
}
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s, transform .9s var(--ease);
}
.tile img.ok { opacity: .88; }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0) 58%);
}
.tile__body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: clamp(14px, 2vw, 26px); }
.tile__title { font-size: clamp(1.55rem, 3.1vw, 2.9rem); }
.tile__meta { margin-top: 8px; font-size: .88rem; color: rgba(255, 255, 255, .78); }
.tile__more {
  position: absolute; top: clamp(14px, 2vw, 24px); right: clamp(14px, 2vw, 24px); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #0f1316;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.7); transition: opacity .3s, transform .4s var(--ease);
}
.tile__more::before {
  content: ""; margin-left: 3px;
  border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.tile:focus-visible { outline-offset: 4px; }

@media (hover: hover) {
  .tile:hover .tile__art, .tile:hover img { transform: scale(1.07); }
  .tile:hover .tile__more, .tile:focus-visible .tile__more { opacity: 1; transform: none; }
  .reel:hover .reel__disc { transform: scale(1.08); }
}
@media (hover: none) { .tile__more { opacity: 1; transform: none; width: 34px; height: 34px; } }

/* destaque: primeiro tema ocupa duas colunas */
.tile--wide { grid-column: span 2; aspect-ratio: auto; }
.tile--wide .tile__title { font-size: clamp(2rem, 4.6vw, 4.2rem); }
@media (max-width: 900px) { .tile--wide { aspect-ratio: 2 / 1; } }

/* ---------- sobre ---------- */
.about { display: grid; gap: 40px; }
.about__lead { font-size: clamp(1.7rem, 3.4vw, 2.8rem); font-weight: 500; font-stretch: 85%; line-height: 1.15; letter-spacing: -.015em; max-width: 20em; }
.about__text { display: grid; gap: 18px; max-width: 58ch; color: #c9c7c1; }
.services { list-style: none; padding: 0; margin-top: 12px; border-top: 1px solid var(--line); }
.services li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--fg); }
.about__photo { margin: 0 0 clamp(16px, 2.5vw, 28px); border-radius: 6px; overflow: hidden; background: var(--surface); }
.about__photo img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 900px) { .about { grid-template-columns: 1.1fr 1fr; gap: 80px; } }

/* ---------- contato ---------- */
.contact__title { font-size: clamp(2.6rem, 7vw, 5.5rem); }
.mail {
  display: inline-block; margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(1.1rem, 4.8vw, 4rem); font-weight: 650; font-stretch: 80%; letter-spacing: -.02em; line-height: 1.05;
  overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-thickness: .05em; text-underline-offset: .14em;
}
.mail:hover { text-decoration-thickness: .1em; }
.contact__item { margin-top: clamp(20px, 3vw, 36px); }
.contact__item .mail { margin-top: 0; }
.contact__label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .92rem; }
.social { list-style: none; padding: 0; margin-top: clamp(28px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 10px 28px; }
.social a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.social a:hover { color: var(--fg); border-color: var(--fg); }

/* ---------- rodapé ---------- */
.ftr {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(80px, 12vw, 160px); padding-block: 28px 40px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}
.ftr a { text-decoration: none; }
.ftr a:hover { color: var(--fg); }

/* ---------- página de tema ---------- */
.theme { position: relative; isolation: isolate; padding: 128px 0 0; }
.theme::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 560px; z-index: -1;
  background:
    radial-gradient(60% 70% at 85% 0%, hsl(var(--h) 70% 44% / .5), transparent 70%),
    radial-gradient(50% 60% at 0% 20%, hsl(calc(var(--h) + 165) 75% 50% / .2), transparent 72%);
}
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: .95rem; margin-bottom: clamp(24px, 4vw, 44px); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.back:hover { color: var(--fg); border-color: var(--fg); }
.theme__title { font-size: clamp(3.4rem, 12vw, 10rem); overflow-wrap: anywhere; }
@media (max-width: 440px) { .theme__title { font-size: min(3.4rem, calc((100vw - 48px) / 6.9)); } } /* títulos longos ("Comunicação", "Documentário") não alargam a página */
.theme__desc { margin-top: clamp(18px, 2.4vw, 28px); color: #c9c7c1; max-width: 46ch; font-size: 1.15rem; }

.chips { display: flex; gap: 8px; margin: clamp(28px, 4vw, 44px) 0 0; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted); transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--fg); border-color: var(--fg); }
.chip[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 40px 18px; margin-top: clamp(40px, 6vw, 72px); }

.vcard { display: block; width: 100%; align-self: start; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
div.vcard { cursor: default; }
.vcard__thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px;
  background:
    radial-gradient(90% 90% at 15% 10%, hsl(var(--h) 60% 36% / .7), transparent 65%),
    radial-gradient(80% 80% at 95% 100%, hsl(calc(var(--h) + 165) 65% 40% / .4), transparent 70%),
    var(--surface);
}
.vcard__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .8s var(--ease); }
.vcard__thumb img.ok { opacity: 1; }
.vcard__play {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center;
  transition: transform .4s var(--ease);
}
.vcard__play::before { content: ""; margin-left: 4px; border-left: 16px solid #0f1316; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.vcard--empty .vcard__play { display: none; }
.vcard__hint {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center;
  font-size: .9rem; color: rgba(255, 255, 255, .72);
}
.vcard__title { display: block; margin-top: 14px; font-size: 1.15rem; font-weight: 600; letter-spacing: -.005em; }
.vcard__meta { display: block; color: var(--muted); font-size: .92rem; }
.vcard:focus-visible .vcard__thumb { outline: 2px solid var(--fg); outline-offset: 4px; }
@media (hover: hover) {
  button.vcard:hover .vcard__thumb img { transform: scale(1.05); }
  button.vcard:hover .vcard__play { transform: scale(1.1); }
}

.next { display: block; margin-top: clamp(72px, 10vw, 140px); padding: clamp(28px, 4vw, 48px) 0; border-block: 1px solid var(--line); text-decoration: none; }
.next__label { display: block; color: var(--muted); font-size: .95rem; }
.next__title { display: block; margin-top: 8px; font-size: clamp(2.4rem, 8vw, 6.5rem); transition: letter-spacing .5s var(--ease); }
@media (hover: hover) { .next:hover .next__title { letter-spacing: 0; } }

.empty { padding: 160px 0 40px; }
.empty h1 { font-size: clamp(2.4rem, 7vw, 5rem); margin-bottom: 18px; }

/* vídeos verticais e filtros */
.vgrid--v { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.vcard--v .vcard__thumb { aspect-ratio: 9 / 16; }
@media (min-width: 700px) { .vgrid--v .vcard--h { grid-column: span 2; } }
.vcard[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: clamp(36px, 5vw, 56px); }
.filters + .vgrid { margin-top: 28px; }
.filter {
  background: none; border: 0; border-bottom: 1px solid transparent; padding: 6px 0; cursor: pointer;
  color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s, border-color .2s;
}
.filter:hover, .filter[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }

/* tema com horizontais e verticais: horizontais empilhados à esquerda, vertical à direita */
.vgrid.vgrid--mix { display: grid; grid-template-columns: 522fr 380fr; max-width: 920px; gap: 0 18px; align-items: start; }
.vmix__col { display: grid; gap: 40px; min-width: 0; align-content: start; }
@media (max-width: 760px) {
  .vgrid.vgrid--mix { grid-template-columns: 1fr; max-width: none; gap: 40px; }
  .vmix__col--v .vcard { max-width: 280px; }
}

/* ---------- player ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s .25s;
}
.modal.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--ease); }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 8, 10, .93); }
.modal__box { position: relative; width: min(1200px, 100%, calc((100svh - 190px) * 16 / 9)); }
.modal__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; }
.modal__title { font-weight: 600; }
.modal__close { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px; cursor: pointer; transition: border-color .2s; }
.modal__close:hover { border-color: var(--fg); }
.modal__frame { aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.modal--v .modal__box { width: min(440px, 100%, calc((100svh - 190px) * 9 / 16)); }
.modal--v .modal__frame { aspect-ratio: 9 / 16; }
.modal__frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- galeria de fotos ---------- */
.pgrid { columns: 3; column-gap: 14px; margin-top: clamp(40px, 6vw, 72px); }
.pcard {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  break-inside: avoid; background: var(--surface); cursor: zoom-in;
}
.pcard img { width: 100%; height: auto; opacity: 0; transition: opacity .5s, transform .8s var(--ease); }
.pcard img.ok { opacity: 1; }
.pcard:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
button.pcard { position: relative; }
.pcard__over {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  padding: clamp(14px, 3vw, 28px); text-align: center; pointer-events: none;
  background: rgba(255, 255, 255, .74); color: #0f1316;
  font-weight: 720; font-stretch: 75%; font-size: clamp(1.15rem, 2vw, 1.65rem); line-height: 1.15; letter-spacing: -.01em;
  opacity: 0; transition: opacity .35s var(--ease);
}
button.pcard:focus-visible .pcard__over { opacity: 1; }
@media (hover: hover) { button.pcard:hover .pcard__over { opacity: 1; } }
div.pcard { cursor: default; position: relative; aspect-ratio: 4 / 5;
  background:
    radial-gradient(90% 90% at 15% 10%, hsl(var(--h) 60% 36% / .7), transparent 65%),
    radial-gradient(80% 80% at 95% 100%, hsl(calc(var(--h) + 165) 65% 40% / .4), transparent 70%),
    var(--surface);
}
div.pcard:nth-child(3n + 2) { aspect-ratio: 3 / 2; }
div.pcard:nth-child(3n + 3) { aspect-ratio: 1; }
.pcard__hint { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font-size: .9rem; color: rgba(255, 255, 255, .72); }
@media (hover: hover) { button.pcard:hover img { transform: scale(1.03); } }
@media (max-width: 900px) { .pgrid { columns: 2; column-gap: 10px; } .pcard { margin-bottom: 10px; } }

.lb {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; padding: clamp(12px, 3vw, 32px);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s .25s;
}
.lb.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--ease); }
.lb__backdrop { position: absolute; inset: 0; background: rgba(6, 8, 10, .95); }
.lb__top, .lb__stage, .lb__cap, .lb__nav { position: relative; }
.lb__top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; color: var(--muted); font-size: .92rem; }
.lb__stage { flex: 1; min-height: 0; }
.lb__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lb__cap { min-height: 1.65em; margin-top: 12px; text-align: center; color: #c9c7c1; font-size: .95rem; }
.lb__nav { display: flex; justify-content: center; gap: 12px; padding-top: 6px; }
.lb--single .lb__nav { display: none; }
.lb__btn { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 18px; cursor: pointer; transition: border-color .2s; }
.lb__btn:hover { border-color: var(--fg); }

/* ---------- celular ---------- */
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 480px) {
  .hdr__in { height: 60px; }
  .brand { font-size: 1.2rem; }
  .nav { gap: 14px; }
  .nav a { font-size: .85rem; }
  .reel__disc { width: 72px; height: 72px; }
  .tile__title { font-size: 1.45rem; }
  .tile__meta { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- achatamento da fonte de destaque ----------
   Reduz só a altura das letras, sem mexer na largura.
   1 = normal. .8 = 20% mais baixa. Mude o número abaixo para ajustar. */
:root { --achata: .8; }
.disp, .about__lead, .brand, .mail { transform: scaleY(var(--achata)); transform-origin: left bottom; }
.brand { display: inline-block; }

/* telas baixas (notebooks): primeira tela inteira enquadrada */
@media (min-width: 900px) and (max-height: 780px) {
  .reel__disc { width: 72px; height: 72px; }
  .hero__lead { max-width: 40ch; }
}

/* página parada enquanto o player ou a galeria estão abertos */
html.no-scroll { overflow: hidden; }
