/* ==========================================================================
   Portfólio Rogerio Lima — folha de estilo única
   Clean + moderno: off-white quente, tipografia serif de display, grade aberta.
   ========================================================================== */

:root {
  --bg: #f7f5f2;
  --bg-soft: #efece6;
  --card: #ffffff;
  --ink: #14120f;
  --ink-soft: #3a352f;
  --muted: #7c756c;
  --line: #e3ded6;
  --accent: #c8452a;
  --radius: 18px;
  --max: 1360px;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, iframe { max-width: 100%; display: block; }

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

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.02em; font-family: 'Silkscreen', cursive; color: var(--ink-soft); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ------------------------------- HEADER --------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
  transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(247, 245, 242, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
  padding-top: 12px; padding-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-size: 13px; letter-spacing: .04em; font-weight: 500;
}
img.brand__mark {
  background: none; border-radius: 0; object-fit: contain; display: block;
  width: auto; height: 38px;
}
.brand__text { font-size: 15px; letter-spacing: .01em; }

.nav { display: flex; gap: 28px; font-size: 14.5px; color: var(--ink-soft); }
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.lang {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--line); border-radius: 999px;
}
.lang button {
  font: inherit; font-size: 11.5px; letter-spacing: .08em; cursor: pointer;
  padding: 5px 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button.is-active { background: var(--ink); color: var(--bg); }

/* -------------------------------- HERO ---------------------------------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(120px, 18vh, 200px) var(--pad) clamp(48px, 8vh, 96px);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 16px;
}

.hero__top-row {
  display: flex; align-items: center; gap: 24px;
  width: 100%;
}

.hero__top-text {
  display: flex; flex-direction: column; gap: 8px;
}

.hero__top-text .eyebrow { margin: 0; }
.hero__top-text .hero__lead { margin: 0; }

.eyebrow {
  margin: 0 0 22px;
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  font-family: 'Silkscreen', cursive, Georgia, serif;
  font-size: clamp(64px, 13vw, 172px);
  line-height: .8; letter-spacing: -.1em;
  white-space: nowrap;
}
.hero__title em { font-style: normal; color: var(--ink-soft); }

.hero__lead {
  max-width: 46ch; margin: 0 0 28px 0;
  font-size: clamp(16px, 1.35vw, 19px); color: var(--ink-soft);
  line-height: 1.4;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--ink);
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.hero__figure {
  margin: 0;
  position: relative;
  z-index: 1;
  width: 200px;
}
.hero__figure img {
  width: 100%; height: auto; border-radius: var(--radius);
  aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 15%;
  background: var(--bg-soft);
}
.hero__figure figcaption {
  display: none;
}

/* ------------------------------ MARQUEE --------------------------------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 16px 0;
  background: var(--bg);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; gap: 48px; width: max-content;
  animation: slide 46s linear infinite;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ------------------------------- SEÇÕES --------------------------------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(64px, 11vh, 140px) var(--pad) 0;
}

.section__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 16px 48px; margin-bottom: 36px;
}
.section__title {
  font-family: 'Silkscreen', cursive, Georgia, serif;
  font-size: clamp(38px, 5.2vw, 72px); line-height: 1;
}
.section__lead { max-width: 48ch; margin: 0; color: var(--muted); font-size: 15.5px; }

/* -------------------------------- FILTROS -------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  font: inherit; font-size: 14px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip__count { font-size: 11.5px; opacity: .55; }

/* --------------------------------- GRADE -------------------------------- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-flow: dense;
}

.card {
  position: relative; text-align: left; padding: 0; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .45s var(--ease), opacity .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
  transition-delay: calc(var(--i) * 120ms);
  opacity: 0; transform: translateY(18px);
}
.card.in { opacity: 1; transform: none; }
.card:hover { transition-delay: 0s; transform: translateY(-4px); box-shadow: 0 18px 40px -28px rgba(20, 18, 15, .5); }
.card.is-hidden { display: none; }

.card__media {
  position: relative; overflow: hidden; background: var(--bg-soft);
  aspect-ratio: 1 / 1; flex: 0 0 auto;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease), filter .5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.035); }

.card__tag {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.card__body {
  padding: 16px 18px 18px; display: grid; gap: 4px; flex: 0 0 auto;
  min-height: 96px; align-content: start;
}
.card__title {
  font-size: 18px; letter-spacing: -.01em; font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta {
  font-size: 13px; color: var(--muted); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* --------------------------------- SOBRE -------------------------------- */
.section--sobre {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.section--sobre p { max-width: 58ch; color: var(--ink-soft); }
.section--sobre .section__title { margin-bottom: 26px; }

.sobre__facts {
  list-style: none; padding: 0; margin: 34px 0 0;
  display: flex; flex-wrap: wrap; gap: 14px 40px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.sobre__facts li { font-size: 14px; color: var(--muted); }
.sobre__facts strong {
  display: block; font-family: 'Silkscreen', cursive, serif; font-size: 40px;
  color: var(--ink); line-height: 1;
}

.xp { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.xp__item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.xp__item h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; font-family: 'Silkscreen', cursive; }
.xp__item p { margin: 0; font-size: 15px; color: var(--ink-soft); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  font-size: 15px; border-bottom: 1px solid var(--ink); padding-bottom: 3px;
}
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ------------------------------ DEPOIMENTOS ------------------------------ */
.section--quotes .quotes {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .section--quotes .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.quote {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px 26px; display: grid; gap: 18px; align-content: start;
  opacity: 0; transform: translateY(18px);
}
.quote.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.quote__mark { font-family: 'Silkscreen', cursive, serif; font-size: 44px; line-height: .6; color: var(--accent); }
.quote__text { margin: 0; font-size: 15.5px; color: var(--ink-soft); }
.quote__author { font-size: 14px; font-weight: 500; }
.quote__role { font-size: 13px; color: var(--muted); }

/* -------------------------------- CONTATO ------------------------------- */
.contact {
  max-width: var(--max); margin: clamp(64px, 12vh, 150px) auto 0;
  padding: clamp(56px, 9vh, 110px) var(--pad) clamp(64px, 10vh, 130px);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact__title {
  font-family: 'Silkscreen', cursive, Georgia, serif;
  font-size: clamp(44px, 9vw, 128px); line-height: .95; letter-spacing: -.03em;
  margin-bottom: 40px;
}
.contact__title em { font-style: italic; color: var(--accent); }
.contact__links { display: grid; gap: 8px; justify-items: center; font-size: 16px; }
.contact__mail {
  font-size: clamp(19px, 2.4vw, 30px);
  border-bottom: 1px solid var(--line); padding-bottom: 4px;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.contact__mail:hover { border-color: var(--ink); }
.contact__mail--alt { color: var(--muted); font-size: clamp(16px, 1.8vw, 22px); }
.contact__links a[href^="https://wa.me"] {
  color: var(--muted); font-size: 15px; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.contact__links a[href^="https://wa.me"]:hover { color: var(--ink); }
.contact__tag {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px 2px;
  line-height: 1.4;
}

.footer {
  max-width: var(--max); margin: 0 auto;
  padding: 26px var(--pad) 40px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--muted);
}
.footer p { margin: 0; }

/* --------------------------------- MODAL -------------------------------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(18, 16, 13, .72); backdrop-filter: blur(6px); }
.modal__panel {
  position: relative; width: min(1080px, 100%); max-height: 92vh; overflow: auto;
  background: var(--bg); border-radius: 24px; border: 1px solid var(--line);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .6);
  animation: pop .35s var(--ease);
  overscroll-behavior: contain;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.99); } }

.modal__close {
  position: sticky; top: 14px; margin-left: auto; margin-right: 14px;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 15px;
  display: grid; place-items: center; z-index: 5; float: right;
}
.modal__close:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.modal__body { padding: clamp(20px, 3.4vw, 44px); display: grid; gap: 26px; clear: both; }
.modal__head { display: grid; gap: 10px; }
.modal__cat { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.modal__title {
  font-family: 'Silkscreen', cursive, Georgia, serif;
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -.02em;
}
.modal__client { font-size: 15px; color: var(--muted); }
.modal__desc { margin: 0; max-width: 72ch; color: var(--ink-soft); }
.modal__facts {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.modal__facts span b { color: var(--ink); font-weight: 500; }

.modal__media {
  display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Direção de arte: uma peça por linha, ocupando a largura inteira do modal */
.modal__media[data-cat="arte"] { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .modal__media { grid-template-columns: 1fr; }
}
.modal__media figure { margin: 0; background: var(--bg-soft); border-radius: 14px; overflow: hidden; }
.modal__media img, .modal__media video, .modal__media iframe {
  width: 100%; height: auto; border: 0; border-radius: 14px; display: block;
}
.modal__media video { background: #000; }
.modal__media .m-wide { grid-column: 1 / -1; }
/* figura ímpar sozinha na linha: centraliza em vez de deixar buraco à direita */
.modal__media figure.m-solo {
  grid-column: 1 / -1; justify-self: center;
  width: calc((100% - 12px) / 2);   /* mesma largura de meia coluna, centralizada */
}
@media (max-width: 640px) {
  .modal__media figure.m-solo { width: 100%; }
}
/* grade de uma coluna (arte): "sozinha na linha" é o normal, não centraliza nem encolhe */
.modal__media[data-cat="arte"] figure.m-solo,
.modal__media--single figure.m-solo { grid-column: auto; width: 100%; }
.modal__media figure.m-tall {
  display: flex; flex-direction: column; align-items: center;
  background: transparent; border-radius: 14px;
}
.modal__media figure.m-tall img { max-height: 62vh; width: auto; max-width: 100%; }
.modal__media figure.m-tall video { max-height: 76vh; width: auto; max-width: 100%; }
.modal__media figure.m-tall figcaption { width: 100%; text-align: center; }
.modal__media iframe { aspect-ratio: 16 / 9; height: auto; }
.modal__media figcaption { font-size: 12.5px; color: var(--muted); padding: 8px 12px 10px; }

/* slideshow: uma mídia que cicla as imagens do caso */
.modal__media .slide { background: transparent; }
.modal__media .slide__stage {
  position: relative;
  background: #0e0d0c;
  border-radius: 14px;
  overflow: hidden;
  height: min(70vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__media .slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(.42) saturate(1.15);
  transform: scale(1.15);
  z-index: 0;
}
.modal__media .slide__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
  position: relative;
  z-index: 1;
  animation: slidein .45s var(--ease) both;
}
@keyframes slidein { from { opacity: 0; transform: scale(.995); } to { opacity: 1; transform: none; } }
@keyframes slidebar { from { width: 0; } to { width: 100%; } }
.slide__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 6px;
  backdrop-filter: blur(6px);
  transition: background .2s;
}
.slide__nav:hover { background: rgba(255, 255, 255, .3); }
.slide__nav--prev { left: 14px; }
.slide__nav--next { right: 14px; }
.slide__count {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 14px;
  margin: 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .85);
  font-variant-numeric: tabular-nums;
}
.slide__bar { position: absolute; z-index: 2; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, .16); }
.slide__bar i { display: block; height: 100%; width: 0; background: var(--accent); animation: slidebar 4.2s linear forwards; }
@media (max-width: 640px) {
  .modal__media .slide__stage { height: min(58vh, 460px); }
  .slide__nav { width: 38px; height: 38px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide__img { animation: none; }
  .slide__bar i { animation: none; width: 100%; }
}

.modal__nav {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 0 clamp(20px, 3.4vw, 44px) clamp(20px, 3.4vw, 40px);
}
.modal__nav button {
  font: inherit; font-size: 14px; cursor: pointer; background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; color: var(--ink-soft);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.modal__nav button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

body.is-locked { overflow: hidden; }

/* ------------------------------- RESPONSIVO ----------------------------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero__figure { max-width: 420px; }
  .section--sobre { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header { display: none; }
  .hero { 
    padding-top: 40px; 
    padding-bottom: 40px; 
  }
  .hero__top-row {
    display: contents;
  }
  .hero__figure {
    order: 1;
    width: 45vw;
    max-width: 180px;
    margin-bottom: 24px;
  }
  .hero__title { 
    order: 2;
    font-size: 18vw; 
    white-space: normal; 
    text-align: left; 
    line-height: .85; 
    letter-spacing: -.05em;
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 16px;
  }
  .hero__title em { 
    display: block; 
  }
  .hero__top-text {
    order: 3;
    margin-bottom: 0;
  }
  .hero__actions {
    order: 4;
    margin-top: 16px;
  }
  .section {
    padding-top: 32px;
  }
  .grid { grid-template-columns: 1fr; }
  .modal__panel { max-height: 94vh; border-radius: 18px; }
  .modal__nav { position: sticky; bottom: 0; background: var(--bg); padding-top: 12px; }
  .contact__links { justify-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .card, .quote { opacity: 1; transform: none; }
  * { transition: none !important; }
}
