:root {
  --bg: #0f1115;
  --bg-soft: #151922;
  --bg-card: rgba(255, 255, 255, 0.075);
  --bg-card-strong: rgba(255, 255, 255, 0.12);
  --text: #f7f2ea;
  --muted: rgba(247, 242, 234, 0.72);
  --subtle: rgba(247, 242, 234, 0.52);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #d6b57a;
  --accent-2: #f0d7a1;
  --rose: #d8a6a2;
  --green: #8faf91;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
  --radius: 28px;
  --radius-sm: 18px;
  --container: 1180px;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 15%, rgba(214, 181, 122, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 10%, rgba(216, 166, 162, 0.14), transparent 30rem),
    linear-gradient(135deg, #0f1115 0%, #151922 48%, #0d0f13 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, video, iframe { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.22;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.18'/%3E%3C/svg%3E");
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.section-pad { padding: 72px 0; position: relative; }
.section-pad.compact { padding-top: 60px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), 1240px);
  margin: 16px auto 0;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.76);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: fit-content;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  color: #17120a;
  font-weight: 800;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 10px 34px rgba(214,181,122,.24);
  overflow: hidden;
}

.brand-photo {
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent), #8b5cf6);
}

.brand-photo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  border: 2px solid rgba(15, 17, 21, 0.9);
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 0.98rem; letter-spacing: -0.03em; }
.brand-copy small { color: var(--subtle); font-size: 0.74rem; margin-top: 4px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: 0.22s ease;
}
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,.08); }
.main-nav .nav-cta {
  color: #16120a;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 99px;
  transition: .2s ease;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.hero { min-height: auto; display: grid; align-items: center; overflow: hidden; padding-top: 76px; padding-bottom: 56px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 44px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: .75;
}
.hero h1, .section-head h2, .cta-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}
.hero h1 { font-size: clamp(2.45rem, 5.2vw, 4.95rem); max-width: 760px; }
.hero-text {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.22vw, 1.08rem);
  line-height: 1.62;
}
.hero-actions, .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: .22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #16120a;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 16px 40px rgba(214,181,122,.22);
}
.btn-ghost {
  border-color: var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
}
.btn.full { width: 100%; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 620px;
}
.hero-metrics div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.055);
}
.hero-metrics strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.05em;
}
.hero-metrics span { color: var(--subtle); font-size: .86rem; }

.hero-showcase {
  position: relative;
  min-height: 500px;
  isolation: isolate;
}
.floating-card {
  position: absolute;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  overflow: hidden;
}
.floating-card span { color: var(--accent-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.floating-card strong { display: block; margin-top: 6px; font-size: 1.08rem; letter-spacing: -.03em; }
.card-main {
  inset: 12px 28px auto 54px;
  padding: 12px;
  animation: floaty 6s ease-in-out infinite;
}
.card-main img { border-radius: 24px; width: 100%; }
.card-main div { padding: 16px 4px 4px; }
.card-video {
  right: 0;
  bottom: 104px;
  width: 215px;
  padding: 22px;
  z-index: 3;
  animation: floaty 7s ease-in-out infinite reverse;
}
.play-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  border-radius: 50%;
  color: #17120a;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.card-site {
  left: 0;
  bottom: 8px;
  width: 280px;
  padding: 12px;
  z-index: 2;
  animation: floaty 8s ease-in-out infinite;
}
.card-site img { border-radius: 22px; }
.card-site div { padding: 14px 6px 6px; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .75;
  z-index: -1;
}
.orb-a { width: 320px; height: 320px; right: 18%; top: 18%; background: rgba(214,181,122,.28); }
.orb-b { width: 220px; height: 220px; left: 6%; bottom: 8%; background: rgba(216,166,162,.26); }
.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .45;
}
.shape-one { width: 420px; height: 420px; left: -150px; bottom: 10%; background: rgba(143,175,145,.24); }
.shape-two { width: 420px; height: 420px; right: -120px; top: 12%; background: rgba(214,181,122,.2); }

.logo-strip {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.045);
}
.strip-track {
  display: flex;
  width: max-content;
  gap: 34px;
  padding: 18px 0;
  animation: marquee 32s linear infinite;
}
.strip-track span {
  color: rgba(247,242,234,.72);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .82rem;
}

.section-head { max-width: 690px; }
.section-head.centered { margin-inline: auto; text-align: center; }
.section-head.centered .eyebrow { justify-content: center; }
.section-head h2, .cta-card h2 { font-size: clamp(1.8rem, 3.15vw, 3.35rem); line-height: 1.05; }
.section-head p, .cta-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: .98rem;
}
.section-head code {
  color: var(--accent-2);
  background: rgba(255,255,255,.08);
  padding: 3px 7px;
  border-radius: 8px;
}

.portfolio-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 26px 0 22px;
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  color: var(--muted);
  padding: 10px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: .2s ease;
  font-weight: 700;
}
.filter-btn:hover, .filter-btn.active {
  color: #17120a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.search-box {
  min-width: min(100%, 280px);
  display: grid;
  gap: 7px;
  color: var(--subtle);
  font-size: .82rem;
  font-weight: 700;
}
.search-box input, .contact-card input, .contact-card select, .contact-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  background: rgba(255,255,255,.07);
  color: var(--text);
  padding: 13px 14px;
}
.search-box input:focus, .contact-card input:focus, .contact-card select:focus, .contact-card textarea:focus {
  border-color: rgba(214,181,122,.72);
  box-shadow: 0 0 0 4px rgba(214,181,122,.12);
}
.contact-card select option { color: #111; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  box-shadow: 0 18px 60px rgba(0,0,0,.16);
  transition: transform .28s ease, border-color .28s ease, background .28s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(214,181,122,.42);
  background: rgba(255,255,255,.08);
}
.project-media {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: #1b202b;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .45s ease;
}
.project-sites .project-media img { object-position: top center; }
.project-card:hover .project-media img { transform: scale(1.055); }
.media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #17120a;
  background: rgba(240,215,161,.92);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.project-body { padding: 18px; }
.project-body h3 { margin: 8px 0 0; font-size: 1.12rem; letter-spacing: -.035em; line-height: 1.18; }
.project-body p { color: var(--muted); line-height: 1.48; font-size: .88rem; margin: 9px 0 0; }
.project-category { color: var(--accent-2); font-weight: 900; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; }
.project-tags, .modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.project-tags span, .modal-tags span {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding: 7px 9px;
  border-radius: 999px;
  font-size: .78rem;
}
.empty-state {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
}

.services-section { background: rgba(255,255,255,.028); border-block: 1px solid rgba(255,255,255,.07); }
.services-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 34px;
  align-items: start;
}
.sticky-head { position: sticky; top: 120px; }
.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.service-card, .timeline-item, .contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.042));
  box-shadow: 0 18px 60px rgba(0,0,0,.16);
}
.service-card { padding: 24px; min-height: 215px; }
.service-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #17120a;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-weight: 900;
  font-size: 1.2rem;
}
.service-card h3, .timeline-item h3 { margin: 18px 0 0; font-size: 1.12rem; letter-spacing: -.03em; line-height: 1.2; }
.service-card p, .timeline-item p { color: var(--muted); line-height: 1.55; margin: 10px 0 0; font-size: .92rem; }

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.timeline-item { padding: 22px; position: relative; overflow: hidden; }
.timeline-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.timeline-item span {
  color: var(--accent-2);
  font-weight: 900;
  font-size: .86rem;
  letter-spacing: .13em;
}

.cta-section { padding-top: 54px; }
.cta-card {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 30px;
  align-items: center;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(214,181,122,.28);
  border-radius: 36px;
  background:
    radial-gradient(circle at 85% 20%, rgba(214,181,122,.18), transparent 22rem),
    linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.045));
  box-shadow: var(--shadow);
}
.contact-card { padding: 22px; display: grid; gap: 14px; }
.contact-card label { display: grid; gap: 8px; color: var(--muted); font-size: .86rem; font-weight: 800; }
.contact-card textarea { resize: vertical; min-height: 100px; }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  background: rgba(0,0,0,.18);
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-grid p { color: var(--subtle); max-width: 560px; line-height: 1.6; }
.footer-brand .brand-mark { width: 48px; height: 48px; flex-basis: 48px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.footer-links a { color: var(--muted); padding: 10px; }
.footer-links a:hover { color: var(--accent-2); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(10px);
}
.modal-panel {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 44px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 32px;
  background: #12161d;
  box-shadow: var(--shadow);
  z-index: 1;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(15,17,21,.72);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-media {
  min-height: 450px;
  background: #0d0f13;
}
.modal-media img, .modal-media video, .modal-media iframe {
  width: 100%;
  height: 100%;
  min-height: 450px;
  object-fit: cover;
  border: 0;
}
.modal-content {
  padding: clamp(24px, 4vw, 42px);
  overflow: auto;
}
.modal-content h3 { font-size: clamp(1.65rem, 3vw, 2.6rem); line-height: 1.06; letter-spacing: -.05em; margin: 10px 0 0; }
.modal-content p { color: var(--muted); line-height: 1.72; margin-top: 18px; }
.modal-actions { margin-top: 24px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .75s ease, transform .75s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }
.delay-3 { transition-delay: .24s; }
.delay-4 { transition-delay: .32s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(1deg); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 1020px) {
  .hero-grid, .services-grid, .cta-card, .modal-panel { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-showcase { min-height: 460px; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-head { position: relative; top: auto; }
  .modal-panel { overflow: auto; }
  .modal-media, .modal-media img, .modal-media video, .modal-media iframe { min-height: 420px; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .section-pad { padding: 52px 0; }
  .site-header {
    width: min(calc(100% - 20px), 1240px);
    margin-top: 10px;
    border-radius: 24px;
  }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15,17,21,.96);
    box-shadow: var(--shadow);
    transform-origin: top;
    transform: scaleY(.94);
    opacity: 0;
    pointer-events: none;
    transition: .18s ease;
  }
  .menu-open .main-nav { transform: scaleY(1); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 13px 14px; }
  .hero { padding-top: 48px; padding-bottom: 34px; }
  .hero h1 { font-size: clamp(2.1rem, 10.5vw, 3.05rem); line-height: 1.02; }
  .section-head h2, .cta-card h2 { font-size: clamp(1.7rem, 8vw, 2.35rem); }
  .hero-grid { gap: 26px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-showcase { min-height: 350px; }
  .card-main { left: 0; right: 20px; top: 0; }
  .card-video { right: 0; bottom: 70px; width: 180px; padding: 18px; }
  .card-site { width: 215px; bottom: 0; }
  .portfolio-toolbar { align-items: stretch; flex-direction: column; }
  .portfolio-grid, .service-cards, .timeline { grid-template-columns: 1fr; }
  .project-card { min-height: auto; }
  .project-media { height: 210px; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .modal { padding: 10px; align-items: end; }
  .modal-panel { max-height: calc(100vh - 20px); border-radius: 24px; }
  .modal-media, .modal-media img, .modal-media video, .modal-media iframe { min-height: 310px; }
  .modal-content { padding: 24px 20px; }
}

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

/* Ajuste para prints longos de sites no modal */
.site-screenshot-frame {
  width: 100%;
  height: 100%;
  max-height: min(74vh, 720px);
  overflow: auto;
  background: #0d0f13;
}
.site-screenshot-frame img {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  object-fit: initial !important;
}
.modal-media:has(.site-screenshot-frame) {
  min-height: 450px;
}
.project-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 760px) {
  .site-screenshot-frame { max-height: 52vh; }
}


/* Galerias de posts, carrosséis e banners no modal */
.image-preview-frame,
.gallery-preview-frame {
  width: 100%;
  height: 100%;
  max-height: min(74vh, 760px);
  overflow: auto;
  background: radial-gradient(circle at top, rgba(255,255,255,.08), rgba(8,10,14,.95));
}
.image-preview-frame {
  display: grid;
  place-items: center;
  padding: 18px;
}
.image-preview-frame img {
  display: block;
  width: auto !important;
  max-width: 100%;
  max-height: 70vh;
  height: auto !important;
  min-height: 0 !important;
  object-fit: contain !important;
  border-radius: 18px;
}
.gallery-preview-frame {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}
.gallery-preview-frame figure {
  margin: 0;
  position: relative;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.055);
}
.gallery-preview-frame img {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  object-fit: initial !important;
}
.gallery-preview-frame figcaption {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 7px 9px;
  border-radius: 999px;
  color: #17120a;
  background: rgba(240,215,161,.92);
  font-size: .72rem;
  font-weight: 900;
}
.modal-media:has(.image-preview-frame),
.modal-media:has(.gallery-preview-frame) {
  min-height: 450px;
}
@media (max-width: 760px) {
  .gallery-preview-frame { grid-template-columns: 1fr; max-height: 58vh; padding: 12px; }
  .image-preview-frame { max-height: 58vh; padding: 12px; }
  .image-preview-frame img { max-height: 54vh; }
}


/* Ajustes finais: cards de site iniciando pelo topo do print e modal incorporado acima de tudo */
.project-sites .project-media img,
.card-main img,
.card-site img {
  object-position: top center;
}

.modal {
  z-index: 9999;
  isolation: isolate;
}
.modal-backdrop { z-index: 0; }
.modal-panel { z-index: 1; }

.modal[data-media-type="site"] .modal-panel {
  width: min(1380px, calc(100vw - 32px));
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
}
.modal[data-media-type="site"] .modal-media {
  position: relative;
  min-height: min(74vh, 760px);
  background: #080a0e;
}
.site-live-frame {
  width: 100%;
  height: 100%;
  min-height: min(74vh, 760px);
  background: #fff;
}
.site-live-frame iframe {
  width: 100%;
  height: 100%;
  min-height: min(74vh, 760px);
  border: 0;
  background: #fff;
  object-fit: initial;
}
.site-preview-note {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(8,10,14,.78);
  color: rgba(247,242,234,.8);
  font-size: .78rem;
  line-height: 1.35;
  backdrop-filter: blur(14px);
  pointer-events: none;
}

@media (max-width: 1020px) {
  .modal[data-media-type="site"] .modal-panel { grid-template-columns: 1fr; }
  .modal[data-media-type="site"] .modal-media,
  .site-live-frame,
  .site-live-frame iframe { min-height: 58vh; }
}

@media (max-width: 760px) {
  .modal[data-media-type="site"] .modal-panel { width: 100%; }
  .modal[data-media-type="site"] .modal-media,
  .site-live-frame,
  .site-live-frame iframe { min-height: 62vh; }
  .site-preview-note {
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 16px;
    font-size: .72rem;
  }
}


/* Revisão: previews iniciais em formato quadrado + sites abrindo direto em nova aba */
.hero-showcase {
  min-height: 470px;
}
.card-main {
  top: 18px;
  left: 92px;
  right: auto;
  width: min(330px, 66%);
}
.card-main img,
.card-site img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: top center;
}
.card-site {
  width: 250px;
  bottom: 18px;
}
.card-video {
  bottom: 94px;
}
.project-sites::after {
  content: "Abrir site ↗";
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 999px;
  color: #17120a;
  background: rgba(240,215,161,.92);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(-4px);
  transition: .22s ease;
}
.project-sites:hover::after {
  opacity: 1;
  transform: translateY(0);
}
.project-sites .media-badge {
  left: 14px;
}

@media (max-width: 760px) {
  .hero-showcase { min-height: 340px; }
  .card-main {
    top: 0;
    left: 8px;
    width: min(240px, 70%);
  }
  .card-site {
    width: min(185px, 54%);
    bottom: 0;
    left: 0;
  }
  .card-video {
    width: min(172px, 48%);
    right: 0;
    bottom: 56px;
  }
  .project-sites::after { display: none; }
}

/* Revisão: galerias em formato carrossel, uma arte por vez */
.modal[data-media-type="gallery"] .modal-panel {
  width: min(1120px, calc(100vw - 32px));
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, .82fr);
}

.modal[data-media-type="gallery"] .modal-media {
  min-height: min(78vh, 760px);
}

.carousel-preview-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: min(78vh, 760px);
  display: grid;
  place-items: center;
  padding: clamp(14px, 2vw, 22px) clamp(46px, 5vw, 70px) 54px;
  background:
    radial-gradient(circle at 50% 0%, rgba(240,215,161,.12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.015)),
    #090b10;
  overflow: hidden;
}

.carousel-stage {
  position: relative;
  margin: 0;
  width: min(100%, 540px);
  display: grid;
  place-items: center;
}

.carousel-stage img {
  display: block;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  max-height: min(68vh, 680px);
  min-height: 0 !important;
  object-fit: contain !important;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.04);
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
}

.carousel-stage figcaption {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #17120a;
  background: rgba(240,215,161,.96);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(18,22,29,.72);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.carousel-arrow:hover {
  transform: translateY(-50%) scale(1.06);
  background: rgba(240,215,161,.20);
  border-color: rgba(240,215,161,.42);
}

.carousel-arrow[hidden] { display: none; }
.carousel-arrow-prev { left: 16px; }
.carousel-arrow-next { right: 16px; }

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(18,22,29,.72);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.carousel-dot.active {
  width: 24px;
  background: var(--accent-2);
}

@media (max-width: 1020px) {
  .modal[data-media-type="gallery"] .modal-panel {
    grid-template-columns: 1fr;
  }
  .modal[data-media-type="gallery"] .modal-media,
  .carousel-preview-frame {
    min-height: 62vh;
  }
  .carousel-stage img {
    max-height: 56vh;
  }
}

@media (max-width: 760px) {
  .modal[data-media-type="gallery"] .modal-panel {
    width: 100%;
  }
  .modal[data-media-type="gallery"] .modal-media,
  .carousel-preview-frame {
    min-height: 58vh;
  }
  .carousel-preview-frame {
    padding: 14px 38px 52px;
  }
  .carousel-stage img {
    max-height: 50vh;
    border-radius: 18px;
  }
  .carousel-arrow {
    width: 38px;
    height: 38px;
    font-size: 1.65rem;
  }
  .carousel-arrow-prev { left: 8px; }
  .carousel-arrow-next { right: 8px; }
  .carousel-dots {
    bottom: 16px;
    max-width: calc(100% - 32px);
    overflow-x: auto;
  }
}
