/* ============================================================
   PORTFOLIO — editorial, tom papel, serifada
   ============================================================ */

:root {
  --paper: #f6f3ec;
  --paper-deep: #efeadf;
  --ink: #17140e;
  --muted: #8b8578;
  --line: rgba(23, 20, 14, 0.16);
  --line-soft: rgba(23, 20, 14, 0.08);
  --accent: #b0451c;
  --ph-bg: #ece6d9;
  --ph-line: rgba(23, 20, 14, 0.10);

  --font-display: "Fraunces", serif;
  --font-body: "Instrument Sans", sans-serif;

  --pad: clamp(20px, 4vw, 56px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

img,
video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

/* grão sutil por cima de tudo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ---------- utilitários de texto ---------- */

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- layout home: coluna esquerda fixa + conteudo rolando ---------- */

.layout {
  display: flex;
  align-items: flex-start;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  width: clamp(250px, 22vw, 320px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vh, 56px) clamp(22px, 2.2vw, 36px);
  border-right: 1px solid var(--line-soft);
}

.side-name {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.side-role {
  margin-top: 16px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-role em {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: none;
  color: var(--accent);
}

.side-video {
  width: 210px;
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: -10px;
}

.side-bio {
  margin-bottom: auto;
  padding: 24px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 36ch;
}

.side-bio p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}

.side-cta a {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.side-cta a:hover {
  border-color: var(--accent);
}

.side-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding-bottom: 22px;
}

.side-contact a {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}

.side-contact a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.side-foot {
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.content {
  flex: 1;
  min-width: 0;
  padding: clamp(20px, 4vh, 44px) clamp(20px, 2.6vw, 48px) clamp(64px, 10vh, 110px);
}

@media (max-width: 900px) {
  .layout {
    display: block;
  }
  .side {
    position: static;
    height: auto;
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }
  .side-bio {
    padding: 24px 0;
  }
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px var(--pad);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.site-header nav a:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(64px, 12vh, 140px) var(--pad) clamp(48px, 8vh, 100px);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(44px, 9vw, 128px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 12ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero .hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: clamp(32px, 6vh, 64px);
}

.hero .tagline {
  max-width: 420px;
  font-size: 15px;
  color: var(--muted);
}

/* linha de reveal do hero */
.reveal-line {
  display: block;
  overflow: hidden;
}

.reveal-line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease-out) forwards;
}

.reveal-line:nth-child(2) > span { animation-delay: 0.12s; }
.reveal-line:nth-child(3) > span { animation-delay: 0.24s; }

@keyframes rise {
  to { transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadein 1s 0.5s var(--ease-out) forwards;
}

@keyframes fadein {
  to { opacity: 1; }
}

/* ---------- grid de projetos ---------- */

.work {
  padding: 0 var(--pad) clamp(64px, 10vh, 120px);
}

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(28px, 4vh, 48px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 1.6vw, 20px);
  row-gap: clamp(20px, 3vh, 36px);
}

.card {
  display: block;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card .thumb {
  position: relative;
  overflow: hidden;
  background: var(--ph-bg);
  border-radius: 20px;
}

.card .thumb .media-fill {
  transition: transform 0.8s var(--ease-out);
}

.card:hover .thumb .media-fill {
  transform: scale(1.035);
}

/* overlay do hover: escurece e revela titulo + subtitulo centralizados */
.thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  background: rgba(12, 10, 7, 0.62);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.card:hover .thumb-overlay {
  opacity: 1;
}

.thumb-overlay .ov-title {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.015em;
  color: #f6f3ec;
  transform: translateY(8px);
  transition: transform 0.35s var(--ease-out);
}

.thumb-overlay .ov-cat {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 243, 236, 0.75);
  transform: translateY(8px);
  transition: transform 0.35s var(--ease-out) 0.04s;
}

.card:hover .thumb-overlay .ov-title,
.card:hover .thumb-overlay .ov-cat {
  transform: translateY(0);
}

/* selo de premio no canto superior direito do thumb */
.thumb-awards {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.thumb-awards img {
  width: 20px;
  height: auto;
  opacity: 0.92;
}

/* touch: sem hover, mostra uma faixa discreta na base do thumb */
@media (hover: none) {
  .thumb-overlay {
    opacity: 1;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    background: linear-gradient(to top, rgba(12, 10, 7, 0.72), transparent 45%);
  }
  .thumb-overlay .ov-title {
    font-size: 18px;
    transform: none;
  }
  .thumb-overlay .ov-cat {
    transform: none;
  }
}

/* animação de surgimento no scroll */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- placeholder ---------- */

.placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--ph-bg);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    var(--ph-line) 10px,
    var(--ph-line) 11px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder .ph-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.placeholder .ph-tag .play {
  width: 0;
  height: 0;
  border-left: 7px solid var(--muted);
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}

/* wrapper com proporção */
.media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--ph-bg);
}

.media-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- sobre / contato ---------- */

.about {
  border-top: 1px solid var(--line);
  padding: clamp(64px, 10vh, 120px) var(--pad);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 3vw, 44px);
}

.about .label { grid-column: 1 / span 3; }

.about .about-text {
  grid-column: 4 / span 7;
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.about .about-text em {
  font-style: italic;
  color: var(--accent);
}

@media (max-width: 860px) {
  .about .label,
  .about .about-text {
    grid-column: 1 / -1;
  }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vh, 96px) var(--pad) 32px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.footer-cta {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(34px, 6vw, 76px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.footer-cta a {
  position: relative;
  font-style: italic;
  color: var(--accent);
}

.footer-cta a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.footer-cta a:hover::after {
  transform: scaleX(1);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.footer-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(48px, 8vh, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   PÁGINA DE PROJETO
   ============================================================ */

.project-hero {
  padding: clamp(36px, 6.5vh, 76px) var(--pad) clamp(24px, 4.5vh, 48px);
}

.project-hero .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(28px, 5vh, 56px);
  transition: color 0.25s;
}

.project-hero .back:hover { color: var(--accent); }

.project-hero h1 {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

/* selos de premio apos o titulo do projeto */
.title-awards {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.title-awards img {
  width: 30px;
  height: auto;
  opacity: 0.9;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 88px);
  margin-top: clamp(28px, 5vh, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.project-meta .meta-item .label { display: block; margin-bottom: 6px; }

.project-meta .meta-item p {
  font-size: 14px;
}

.project-desc {
  max-width: 1100px;
  font-size: 15.5px;
  color: var(--muted);
  margin-top: clamp(24px, 4vh, 40px);
}

/* blocos de midia reproduzindo o layout original */
.project-media {
  padding: 0 var(--pad) clamp(64px, 10vh, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: clamp(24px, 4vh, 48px);
}

.media-band {
  position: relative;
  width: var(--block-span, 100%);
}

.band-cell {
  position: absolute;
  overflow: hidden;
  background: var(--ph-bg);
}

.media-text {
  width: 100%;
  max-width: 620px;
  align-self: center;
  padding: clamp(10px, 2.5vh, 28px) 0;
}

.media-text p {
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.005em;
  color: #6d675a;
}

.media-text p + p { margin-top: 12px; }

.media-text .media-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 2vw, 23px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 4px;
}

/* titulo de secao: maior e alinhado com a coluna de midia */
.media-text.section-title {
  padding-bottom: 0;
}

.media-text.section-title .media-heading {
  font-size: clamp(24px, 2.8vw, 38px);
  margin-bottom: 0;
}

.media-text .media-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 700px) {
  .media-band,
  .media-text {
    width: 100%;
  }
}

/* navegação entre projetos */
.project-nav {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project-nav a {
  padding: clamp(36px, 6vh, 64px) var(--pad);
  transition: background 0.3s;
}

.project-nav a:hover { background: var(--paper-deep); }

.project-nav a .label { display: block; margin-bottom: 10px; }

.project-nav a .nav-title {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(20px, 3vw, 32px);
  letter-spacing: -0.015em;
}

.project-nav a.next { text-align: right; border-left: 1px solid var(--line); }

@media (max-width: 640px) {
  .site-header nav { gap: 16px; }
  .footer-links { text-align: left; }
}
