:root {
  --ink: #0a0a0f;
  --paper: #f5f3ee;
  --purple: #7b2d8b;
  --purple-dark: #561f61;
  --purple-mid: #9b4daa;
  --purple-light: #f3e8f6;
  --muted: #6b6b72;
  --border: #dddbd5;
  --card: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-left {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 60px);
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .hero-left::after {
    content: '';
    position: absolute;
    right: -58px; top: 0; bottom: 0; width: 120px;
    background: var(--ink);
    clip-path: polygon(0 0, 50% 0, 100% 50%, 50% 100%, 0 100%);
    z-index: 2;
  }
}

.logo-wrap { margin-bottom: clamp(28px, 4vw, 48px); }
.logo-wrap img { height: clamp(36px, 5vw, 52px); filter: brightness(0) invert(1); max-width: 100%; }

.hero-tag {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--purple-mid); margin-bottom: 16px;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  font-weight: 800; line-height: 1.05;
  color: #fff; margin-bottom: 24px;
}
.hero-title em { font-style: normal; color: var(--purple-mid); }

.hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: #aaa; max-width: 380px;
  margin-bottom: 40px; font-weight: 300; line-height: 1.8;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--purple); color: #fff;
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 15px 26px;
  text-decoration: none; border-radius: 2px;
  transition: background 0.2s; width: fit-content;
}
.hero-cta:hover { background: var(--purple-dark); }

.hero-right {
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 60px) clamp(40px, 6vw, 80px) clamp(48px, 8vw, 100px);
}

.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; width: 100%; max-width: 440px;
}

.stat-card {
  background: var(--card); padding: clamp(24px, 3vw, 36px) clamp(20px, 2.5vw, 28px);
  border: 1px solid var(--border); position: relative;
  animation: fadeUp 0.6s ease both;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; width: 3px; height: 40px;
  background: var(--purple);
}

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800; color: var(--ink); line-height: 1; margin-bottom: 8px;
}
.stat-num span { color: var(--purple); font-size: 65%; }
.stat-label { font-size: 0.72rem; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.4; }

/* ── NAV ── */
.portfolio-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0; padding: 0 24px;
  overflow-x: auto;
}
.portfolio-nav a {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #777; text-decoration: none;
  padding: 16px 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.portfolio-nav a:hover { color: #fff; border-color: var(--purple-mid); }
.portfolio-nav a.active { color: #fff; border-color: var(--purple-mid); }

/* ── LAYOUT ── */
.portfolio-page section { padding: clamp(60px, 8vw, 100px) 0; }
.portfolio-page .container { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--purple-mid); margin-bottom: 14px;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 16px;
}
.section-sub {
  font-size: clamp(0.88rem, 1.3vw, 1rem);
  color: var(--muted); max-width: 560px;
  font-weight: 300; line-height: 1.8;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.divider { width: 48px; height: 3px; background: var(--purple); margin-bottom: 36px; }

/* ── SOBRE ── */
#sobre { background: var(--ink); color: #fff; }
#sobre .section-title { color: #fff; }
#sobre .section-sub { color: #999; max-width: 680px; margin-bottom: 0; }

.sobre-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px); align-items: start;
}
.sobre-values {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 40px;
}
.value-item { border-left: 2px solid var(--purple-mid); padding-left: 14px; }
.value-item strong {
  display: block; font-family: 'Syne', sans-serif;
  font-size: 0.83rem; font-weight: 700; color: #fff; margin-bottom: 4px;
}
.value-item p { font-size: 0.8rem; color: #888; font-weight: 300; line-height: 1.5; }

.sobre-right { display: flex; flex-direction: column; gap: 2px; }
.info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 22px; gap: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.info-row:hover { background: rgba(255,255,255,0.07); }
.info-label { font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.info-value { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem; color: #fff; }
.info-value.purple { color: var(--purple-mid); }

/* ── SERVIÇOS ── */
#servicos { background: var(--paper); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
}
.service-card {
  background: var(--card); border: 1px solid var(--border);
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3vw, 36px);
  position: relative; overflow: hidden; transition: transform 0.25s;
}
.service-card:hover { transform: translateY(-4px); }
.service-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--purple);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 48px; height: 48px; background: var(--purple-light);
  border-radius: 4px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 20px; font-size: 20px;
}
.service-title { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.service-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }
.service-count {
  display: inline-block; margin-top: 16px;
  font-family: 'Syne', sans-serif; font-size: 0.73rem; font-weight: 700;
  color: var(--purple); letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── CASES ── */
#cases { background: #f0eeea; }
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}
.case-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(123,45,139,0.12);
}
.case-card.featured { grid-column: span 2; }

.case-img-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #eee;
}
.case-card.featured .case-img-wrap { aspect-ratio: 21/9; }

.case-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top left;
  display: block;
  transition: transform 0.4s ease;
}
.case-card:hover .case-img { transform: scale(1.03); }

.case-body { padding: clamp(20px, 2.5vw, 28px) clamp(20px, 2.5vw, 32px); flex: 1; }
.case-tag {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple); background: var(--purple-light);
  padding: 4px 10px; border-radius: 2px; margin-bottom: 10px;
}
.case-title { font-family: 'Syne', sans-serif; font-size: clamp(0.9rem, 1.5vw, 1.05rem); font-weight: 700; margin-bottom: 8px; }
.case-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.7; }
.case-meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px;
  border-top: 1px solid var(--border); padding-top: 14px;
}
.case-meta-item { font-size: 0.76rem; color: var(--muted); }
.case-meta-item strong { color: var(--ink); font-weight: 600; }

/* ── NÚMEROS ── */
#numeros { background: var(--ink); }
#numeros .section-title { color: #fff; margin-bottom: clamp(36px, 5vw, 60px); }
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
}
.number-block {
  padding: clamp(32px, 4vw, 48px) clamp(24px, 3vw, 36px);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.number-block::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--purple);
}
.number-big {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800; color: #fff; line-height: 1; margin-bottom: 10px;
}
.number-big .accent { color: var(--purple-mid); }
.number-label { font-size: 0.78rem; color: #666; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; line-height: 1.4; }

/* ── SEGMENTOS ── */
#segmentos { background: var(--paper); }
.segments-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-tag {
  font-size: clamp(0.78rem, 1.2vw, 0.85rem); font-weight: 500;
  padding: 9px 18px; border: 1.5px solid var(--border);
  background: var(--card); border-radius: 2px; color: var(--ink);
  transition: all 0.2s; cursor: default;
}
.seg-tag:hover { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ── CONTATO ── */
#contato { background: var(--purple); }
#contato .section-label { color: rgba(255,255,255,0.6); }
#contato .section-title { color: #fff; }
.contato-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.contato-desc { font-size: clamp(0.88rem, 1.3vw, 1rem); color: rgba(255,255,255,0.8); max-width: 420px; font-weight: 300; line-height: 1.8; }
.contato-info { display: flex; flex-direction: column; gap: 2px; }
.contato-row {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  text-decoration: none; color: #fff; transition: background 0.2s;
}
.contato-row:hover { background: rgba(255,255,255,0.2); }
.contato-icon { font-size: 1.1rem; flex-shrink: 0; }
.contato-text strong {
  display: block; font-family: 'Syne', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.6; margin-bottom: 2px;
}
.contato-text span { font-size: 0.9rem; font-weight: 400; }

/* ── FOOTER ── */
.portfolio-footer {
  background: var(--ink); padding: clamp(24px, 3vw, 36px) clamp(20px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-logo img { height: 28px; filter: brightness(0) invert(1); opacity: 0.45; }
.footer-copy { font-size: 0.75rem; color: #444; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { font-size: 0.75rem; color: #555; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--purple-mid); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-left { min-height: 60vh; }
  .hero-right { padding: 48px 24px; }
  .stats-grid { max-width: 100%; }

  .sobre-grid { grid-template-columns: 1fr; }
  .sobre-values { grid-template-columns: 1fr 1fr; }

  .cases-grid { grid-template-columns: 1fr; }
  .case-card.featured { grid-column: span 1; }
  .case-card.featured .case-img-wrap { aspect-ratio: 16/9; }

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

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .sobre-values { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-nav { justify-content: flex-start; }
  .portfolio-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}
