:root {
  --bg: #0b0b0f;
  --bg-soft: #15151b;
  --card: #1b1b23;
  --text: #f7f2eb;
  --muted: #b9b1a8;
  --line: rgba(255, 255, 255, 0.13);
  --accent: #ff5779;
  --accent-strong: #f26d5b;
  --radius: 26px;
  --max-width: 1160px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 87, 121, 0.13), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(242, 109, 91, 0.1), transparent 30rem),
    linear-gradient(180deg, #0b0b0f 0%, #111119 48%, #0b0b0f 100%);
  color: var(--text);
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

/* ============================= */
/* NAVBAR */
/* ============================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0.85rem 0.75rem 1.1rem;
  background: rgba(18, 18, 24, 0.72);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.logo {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.main-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.main-nav a:hover {
  color: var(--bg);
  background: var(--text);
  transform: translateY(-1px);
}

/* ============================= */
/* HERO */
/* ============================= */

.hero {
  width: min(var(--max-width), calc(100% - 2rem));
  min-height: calc(100vh - 92px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(4.2rem, 12vw, 9rem);
  line-height: 0.82;
  letter-spacing: -0.1em;
}

.hero__about {
  max-width: 660px;
  margin-top: 1.8rem;
  display: grid;
  gap: 1rem;
}

.hero__about p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero__media {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================= */
/* TEXTOS E BOTÕES */
/* ============================= */

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #180d07;
  font-weight: 800;
}

.button--secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

/* ============================= */
/* SEÇÕES */
/* ============================= */

.section {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section__header {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section__header h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.section__header p {
  color: var(--muted);
  line-height: 1.6;
}

/* ============================= */
/* FILTROS */
/* ============================= */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.filter-button {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-1px);
}

/* ============================= */
/* GRID DE PORTFÓLIO */
/* ============================= */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  text-align: left;
  color: inherit;
  padding: 0;
  margin: 0;
  font: inherit;
  appearance: none;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.075);
}

.project-card__image {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  padding: 0;
  background: var(--bg-soft);
  overflow: hidden;
  border-radius: 0;
  line-height: 0;
}

.project-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  transition: transform 300ms ease;
}

.project-card:hover .project-card__image img {
  transform: scale(1.04);
}

.project-card__body {
  padding: 1rem;
}

.project-card__category {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.project-card h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.project-card__meta {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

/* ============================= */
/* CARROSSÉIS */
/* ============================= */

.hero-carousel,
.wide-carousel,
.project-carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.hero-carousel {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}

.wide-carousel {
  border-radius: var(--radius);
  aspect-ratio: 16 / 7;
  box-shadow: var(--shadow);
}

.project-carousel {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  background: #000;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition:
    opacity 600ms ease,
    visibility 600ms ease,
    transform 600ms ease;
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.carousel-slide img,
.carousel-slide iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.carousel-slide img {
  object-fit: cover;
}

.carousel-slide iframe {
  background: #000;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.04);
}

.carousel-button--prev {
  left: 1rem;
}

.carousel-button--next {
  right: 1rem;
}

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 6;
  display: flex;
  gap: 0.45rem;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition:
    width 180ms ease,
    background 180ms ease;
}

.carousel-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--accent);
}

/* ============================= */
/* MODAL */
/* ============================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.modal__content {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.04);
}

.modal__media {
  width: 100%;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.modal__empty-media {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 87, 121, 0.12), rgba(255, 255, 255, 0.04)),
    var(--bg-soft);
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.modal__empty-media p {
  margin: 0;
}

.modal__body {
  padding: clamp(1.2rem, 4vw, 2rem);
}

.modal__body h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.modal__meta,
.modal__body p {
  color: var(--muted);
  line-height: 1.65;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0;
}

.tag {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* ============================= */
/* FOOTER / CONTATO */
/* ============================= */

.site-footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 87, 121, 0.1), rgba(242, 109, 91, 0.06)),
    rgba(255, 255, 255, 0.045);
}

.footer__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
}

.footer__content h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.footer__content p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.6;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
}

.contact__links a,
.contact__links button,
.modal__links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.contact__links a:hover,
.contact__links button:hover,
.modal__links a:hover {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

.contact-copy {
  appearance: none;
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer__bottom p {
  margin: 0;
}

/* ============================= */
/* TOAST */
/* ============================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 200;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 20, 26, 0.88);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ============================= */
/* RESPONSIVO */
/* ============================= */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-carousel,
  .hero__media {
    aspect-ratio: 16 / 10;
  }

  .wide-carousel {
    aspect-ratio: 16 / 10;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__content {
    grid-template-columns: 1fr;
  }

  .contact__links {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-header {
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
  }

  .logo {
    text-align: center;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
  }

  .main-nav a {
    flex: 1;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 21vw, 5.2rem);
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .wide-carousel {
    aspect-ratio: 4 / 5;
  }

  .project-carousel {
    aspect-ratio: 16 / 9;
  }

  .hero__actions,
  .contact__links {
    flex-direction: column;
  }

  .button,
  .contact__links a,
  .contact__links button {
    width: 100%;
  }

  .carousel-button {
    width: 38px;
    height: 38px;
  }

  .carousel-button--prev {
    left: 0.6rem;
  }

  .carousel-button--next {
    right: 0.6rem;
  }

  .carousel-dots {
    bottom: 0.7rem;
  }

  .modal {
    padding: 0.6rem;
  }

  .modal__content {
    border-radius: 20px;
    max-height: calc(100vh - 1.2rem);
  }

  .modal__close {
    width: 40px;
    height: 40px;
    top: 0.6rem;
    right: 0.6rem;
  }
}