:root {
  --bg: #f8fafc;
  --bg-gradient: none;
  --card: #ffffff;
  --muted: #64748b;
  --text: #1e293b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --panel: rgba(255, 255, 255, 0.98);
}

body.theme-slate {
  --bg: #0f172a;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.1) 0px, transparent 50%);
  --card: #1e293b;
  --muted: #94a3b8;
  --text: #f1f5f9;
  --line: rgba(255, 255, 255, 0.08);
  --soft: rgba(255, 255, 255, 0.04);
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --panel: rgba(15, 23, 42, 0.97);
}

body.theme-nordic {
  --bg: #f8fafc;
  --bg-gradient: none;
  --card: #ffffff;
  --muted: #64748b;
  --text: #1e293b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --panel: rgba(255, 255, 255, 0.98);
}

body.theme-emerald {
  --bg: #022c22;
  --bg-gradient: radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%);
  --card: #064e3b;
  --muted: #a7f3d0;
  --text: #ecfdf5;
  --line: rgba(16, 185, 129, 0.12);
  --soft: rgba(16, 185, 129, 0.06);
  --accent: #10b981;
  --accent-hover: #34d399;
  --panel: rgba(2, 44, 34, 0.96);
}

body.theme-titanium {
  --bg: #09090b;
  --bg-gradient: none;
  --card: #18181b;
  --muted: #a1a1aa;
  --text: #f4f4f5;
  --line: #27272a;
  --soft: #1e1e21;
  --accent: #f4f4f5;
  --accent-hover: #ffffff;
  --panel: rgba(9, 9, 11, 0.98);
}

body.theme-neon {
  --bg: #020617;
  --bg-gradient: radial-gradient(circle at top right, rgba(236, 72, 153, 0.1), transparent),
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.1), transparent);
  --card: #0f172a;
  --muted: #94a3b8;
  --text: #f8fafc;
  --line: rgba(255, 255, 255, 0.06);
  --soft: rgba(255, 255, 255, 0.03);
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --panel: rgba(2, 6, 23, 0.95);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  transition: background-color 0.35s ease, color 0.35s ease;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

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

p {
  text-indent: 1.5em;
  text-align: justify;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted {
  color: var(--muted);
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Header ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

/* ─── Brand / Logo ─── */
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

.brand__logo {
  width: 34px;
  height: 34px;
  max-width: 34px;
  max-height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  transition: transform 0.3s;
}

.brand:hover .brand__logo {
  transform: rotate(10deg) scale(1.08);
}

.brand__logo--sm {
  width: 26px;
  height: 26px;
  max-width: 26px;
  max-height: 26px;
}

.brand__name {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.5px;
}

/* ─── Nav ─── */
.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav a:hover {
  color: var(--text);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

body.theme-titanium .btn--primary {
  color: #000;
}

body.theme-nordic .btn--primary {
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px var(--accent);
}

.btn--ghost {
  background: transparent;
}

.btn--ghost:hover {
  background: var(--soft);
}

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

.btn--primary:active,
.btn:active {
  transform: translateY(0);
}

/* ─── Sections ─── */
.section {
  padding: 64px 0;
}

.section__head {
  margin-bottom: 32px;
  max-width: 600px;
}

.section__head h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 14px;
  line-height: 1.05;
}

.section__head h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

/* ─── Hero ─── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 80px 0;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.05;
  letter-spacing: -1px;
}

.hero__ctas {
  display: flex;
  gap: 12px;
  margin: 28px 0;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── Pills ─── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill--active {
  border-color: var(--accent);
  color: var(--text);
}

/* ─── Glass Card ─── */
.glassCard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.3);
}

/* ─── Grid & Cards ─── */
.grid {
  display: grid;
  gap: 20px;
}

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

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

.card,
.infoCard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.card--mini {
  cursor: pointer;
}

.card--mini:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.35);
}

.card__emoji {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.card__emoji--big {
  font-size: 2.5rem;
}

.card__title {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.card__meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.card__actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

/* ─── Tags ─── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.tag {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── Filters ─── */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

/* ─── Forms ─── */
.form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.875rem;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--accent);
  background: var(--bg);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  margin-top: 80px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
}

.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer__bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

/* ─── Modal ─── */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
  padding: 16px;
}

.modal--open {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.modal__topbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.modal__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal__frameWrap {
  flex: 1;
  overflow: hidden;
}

#modalFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .section__head {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__badges {
    justify-content: center;
  }

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

/* ─── Hamburger Menu ─── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  flex-direction: column;
  z-index: 100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--panel);
    border-left: 1px solid var(--line);
    flex-direction: column;
    padding: 80px 24px 24px;
    align-items: flex-start;
    transition: right 0.3s ease;
    z-index: 90;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav--open {
    right: 0;
  }

  .hero h1,
  .section__head h1 {
    font-size: 2rem;
  }

  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .footer__inner,
  .footer__cols {
    grid-template-columns: 1fr;
  }

  .footer {
    margin-top: 40px;
    padding: 40px 0 24px;
  }
}

/* ─── CTA "Falar com a Forge Web" (2 linhas) ─── */
.btn--forge-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.3;
  gap: 2px;
  min-width: 200px;
  padding-inline: 32px;
}

.btn--forge-cta__line2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.btn--forge-cta__line2 img {
  display: inline-block;
  border-radius: 4px;
  vertical-align: middle;
}

/* ─── Marca d'água (Logo) nos containers de texto ─── */
.section,
.infoCard,
.glassCard,
.card,
.case-card,
.casedetail-block,
.cases-cta-box {
  position: relative;
}

.section::before,
.infoCard::before,
.glassCard::before,
.card::before,
.case-card::before,
.cases-cta-box::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: url('/img/logo.jpeg') center / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease;
}

.section:hover::before,
.infoCard:hover::before,
.glassCard:hover::before,
.card:hover::before,
.case-card:hover::before,
.cases-cta-box:hover::before {
  opacity: 0;
}

/* ─── Hover scale nos cards do portfólio e casos ─── */
.card,
.case-card {
  transition: all 0.3s ease;
}

.card:hover,
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

/* ─── CTA inline (logo + Forge Web na mesma linha) ─── */
.btn--forge-cta--inline {
  flex-direction: row;
  gap: 6px;
  white-space: nowrap;
}

/* ─── CTA Box Global (caixa azul clara) ─── */
.cases-cta-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 20px;
  padding: 28px 32px;
  margin-top: 16px;
}

.cases-cta-box__icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.cases-cta-box strong {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 4px;
}

.cases-cta-box p {
  margin: 0;
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .cases-cta-box {
    flex-direction: column;
    text-align: center;
  }
}