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

:root {
  --navy: #0F1F3D;
  --navy-40: rgba(15,31,61,0.4);
  --navy-10: rgba(15,31,61,0.08);
  --gray: #6b7280;
  --light: #f7f8fa;
  --border: #eaecf0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: var(--navy);
  overflow-x: hidden;
}

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

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.metis-logo { display: block; height: 28px; width: auto; max-width: 160px; }
.footer-logo .metis-logo { height: 26px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--navy); text-decoration: none; opacity: 0.55; transition: opacity .2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }

.nav-btn {
  background: var(--navy);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none !important;
}

/* BUTTONS */
.btn-primary {
  background: var(--navy);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  padding: 12px 24px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  padding: 12px 24px;
  border-radius: 7px;
  text-decoration: none;
}

section { padding: 96px 60px; }
.section-inner { max-width: 1080px; margin: 0 auto; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.45;
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-title .hl { color: var(--navy-40); }

.section-desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray);
  max-width: 540px;
}

/* PAGE HERO */
.page-hero {
  padding: 72px 60px 56px;
  background: linear-gradient(180deg, var(--light) 0%, #fff 100%);
}

.page-hero-inner { max-width: 1080px; margin: 0 auto; }

.page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray);
  max-width: 560px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  opacity: 0.5;
  text-decoration: none;
  margin-bottom: 28px;
  transition: opacity .2s;
}

.back-link:hover { opacity: 1; }

/* PROJETOS LIST */
.projetos-showcase {
  padding: 0 60px 96px;
}

.projetos-mosaic {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(300px, 300px);
  gap: 16px;
}

.proj-showcase-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: block;
  transition: transform .25s ease, box-shadow .25s ease;
}

a.proj-showcase-card,
a.proj-showcase-card:hover,
a.proj-showcase-card:focus,
a.proj-showcase-card:active {
  text-decoration: none;
  color: #fff;
}

a.proj-showcase-card .proj-showcase-local,
a.proj-showcase-card .proj-showcase-title,
a.proj-showcase-card .proj-showcase-desc,
a.proj-showcase-card .proj-showcase-cta {
  color: #fff;
  text-decoration: none;
}

.proj-showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(15,31,61,0.18);
}

/* Bento: [8x2][4][ / [ ][4] / [4][8] */
.proj-showcase-card.bento-main { grid-column: 1 / 9; grid-row: 1 / 3; }
.proj-showcase-card.bento-tr { grid-column: 9 / 13; grid-row: 1; }
.proj-showcase-card.bento-mr { grid-column: 9 / 13; grid-row: 2; }
.proj-showcase-card.bento-bl { grid-column: 1 / 5; grid-row: 3; }
.proj-showcase-card.bento-br { grid-column: 5 / 13; grid-row: 3; }

.proj-showcase-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.proj-showcase-media.single { grid-template-columns: 1fr; }

.proj-showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.proj-showcase-card:hover .proj-showcase-media img { transform: scale(1.04); }

.proj-showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,15,30,0.88) 0%, transparent 42%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  pointer-events: none;
}

.proj-showcase-card:not(.bento-main) .proj-showcase-desc,
.proj-showcase-card:not(.bento-main) .proj-showcase-cta { display: none; }

.proj-showcase-card:not(.bento-main) .proj-showcase-title {
  font-size: 15px;
  margin-bottom: 0;
}

.proj-showcase-local {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 6px;
}

.proj-showcase-title {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.proj-showcase-desc {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.75;
  max-width: 420px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proj-showcase-cta {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
}

/* PROJETO DETAIL */
.projeto-hero-video {
  position: relative;
  width: 100%;
  max-height: 72vh;
  min-height: 420px;
  background: var(--navy);
  overflow: hidden;
}

.projeto-hero-video video,
.projeto-hero-video .projeto-hero-fallback {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

/* Esconde o botão play nativo do navegador (ícone azul) */
.projeto-hero-video video::-webkit-media-controls,
.projeto-hero-video video::-webkit-media-controls-enclosure,
.projeto-hero-video video::-webkit-media-controls-panel,
.projeto-hero-video video::-webkit-media-controls-start-playback-button,
.projeto-hero-video video::-webkit-media-controls-overlay-play-button,
.projeto-hero-video video::-webkit-media-controls-overlay-enclosure,
.video-card-vertical video::-webkit-media-controls,
.video-card-vertical video::-webkit-media-controls-enclosure,
.video-card-vertical video::-webkit-media-controls-panel,
.video-card-vertical video::-webkit-media-controls-start-playback-button,
.video-card-vertical video::-webkit-media-controls-overlay-play-button,
.video-card-vertical video::-webkit-media-controls-overlay-enclosure {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.projeto-hero-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8,15,30,0.2);
  pointer-events: none;
}

.hero-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 1.5px solid rgba(255,255,255,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  color: #fff;
  box-shadow: none;
  outline: none;
}

.hero-play-btn:hover { background: rgba(255,255,255,0.24); }
.hero-play-btn svg { margin-left: 4px; }

.projeto-intro {
  padding: 56px 60px 0;
}

.projeto-intro-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.projeto-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.projeto-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  background: var(--navy-10);
  padding: 6px 12px;
  border-radius: 20px;
}

.projeto-intro h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.projeto-local {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.projeto-lead {
  font-size: 17px;
  line-height: 1.75;
  color: var(--gray);
  max-width: 720px;
}

.projeto-impacto {
  background: var(--light);
}

.impacto-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  margin-top: 32px;
}

.impacto-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.impacto-box p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--gray);
}

.impacto-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.impacto-stat-n {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.impacto-stat-l {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.45;
  margin-top: 4px;
}

.projeto-galeria h2,
.projeto-videos h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}

.galeria-item {
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--navy-10);
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  transition: transform .25s ease, box-shadow .25s ease;
}

.galeria-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(15,31,61,0.12);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.galeria-item.galeria-large {
  grid-column: span 2;
  grid-row: span 2;
}

.video-grid-vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
}

.video-card-vertical {
  position: relative;
  width: 100%;
  max-width: 260px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy);
  cursor: pointer;
  border: 1px solid var(--border);
}

.video-card-vertical video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.video-card-play svg {
  margin-left: 2px;
}

.video-card-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
}

/* MEDIA MODAL */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8,15,30,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 72px;
}

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

.media-modal-panel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
}

.media-modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border-radius: 10px;
  overflow: hidden;
  background: #0a1020;
}

.media-modal-content video,
.media-modal-content img {
  max-width: 100%;
  max-height: min(82vh, 900px);
  width: auto;
  height: auto;
  display: block;
  border-radius: 8px;
}

.media-modal-content video.is-vertical {
  max-height: min(82vh, 820px);
  max-width: min(92vw, 460px);
}

.media-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(15,31,61,0.15);
  padding: 0;
}

.media-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(15,31,61,0.12);
  padding: 0;
}

.media-modal-prev { left: -56px; }
.media-modal-next { right: -56px; }

.media-modal-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

/* FOOTER */
footer {
  padding: 48px 60px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo { display: flex; align-items: center; text-decoration: none; }
.footer-info { font-size: 12px; color: var(--gray); line-height: 1.7; }
.footer-info a { color: var(--navy); text-decoration: none; font-weight: 600; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 12px; color: var(--gray); text-decoration: none; opacity: 0.7; }
.footer-links a:hover { opacity: 1; }
.footer-copy { width: 100%; font-size: 11px; color: var(--gray); opacity: 0.5; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }

@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  section, .page-hero, .projetos-showcase, .projeto-intro { padding-left: 24px; padding-right: 24px; }
  .projetos-mosaic { grid-auto-rows: minmax(180px, 180px); }
  .proj-showcase-card.bento-main,
  .proj-showcase-card.bento-tr,
  .proj-showcase-card.bento-mr,
  .proj-showcase-card.bento-bl,
  .proj-showcase-card.bento-br { grid-column: 1 / -1; grid-row: auto; min-height: 220px; }
  .galeria-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .galeria-item.galeria-large { grid-column: span 2; grid-row: span 1; }
  .media-modal { padding: 16px; }
  .media-modal-prev { left: 8px; }
  .media-modal-next { right: 8px; }
  .media-modal-nav { top: auto; bottom: -56px; transform: none; }
  .media-modal-prev { left: calc(50% - 52px); }
  .media-modal-next { right: calc(50% - 52px); left: auto; }
}
