:root {
  --bg: #05080f;
  --surface: #0c1322;
  --surface-2: #10192d;
  --accent: #58f5c5;
  --accent-2: #7ec3ff;
  --text: #e7edf7;
  --muted: #9fb1c6;
  --border: #1f2b3f;
  --radius: 18px;
  --max-width: 1180px;
  --shadow: 0 25px 80px -30px rgba(88, 245, 197, 0.45), 0 20px 40px -30px rgba(0, 0, 0, 0.65);
  --transition: all 0.25s ease;
}

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

body {
  margin: 0;
  font-family: 'DM Sans', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(120% 120% at 20% 20%, #0e1d33 0%, transparent 40%),
              radial-gradient(90% 90% at 80% 0%, #0b1931 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0 0 12px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.25;
  margin: 8px 0 6px;
}

h3 {
  margin: 8px 0 6px;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  backdrop-filter: blur(12px);
  background: rgba(5, 8, 15, 0.8);
  border-bottom: 1px solid var(--border);
}

.topbar,
main,
.footer {
  padding: 18px clamp(18px, 4vw, 32px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--muted);
}

.brand-text strong {
  color: var(--text);
  font-size: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav a {
  padding: 8px 12px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 12px;
  transition: var(--transition);
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav a.pill {
  border: 1px solid var(--accent);
  color: var(--text);
  background: linear-gradient(120deg, rgba(88, 245, 197, 0.12), rgba(126, 195, 255, 0.1));
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  padding: clamp(12px, 3vw, 24px);
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.hero-text p {
  color: var(--muted);
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chips span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.hero-media {
  position: relative;
  display: grid;
  gap: 12px;
}

.hero-media:empty {
  display: none;
}

.hero.single {
  max-width: var(--max-width);
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.hero.single .hero-text {
  max-width: 820px;
}

.hero.hero-no-media {
  grid-template-columns: 1fr;
}

.hero.hero-no-media .hero-text {
  max-width: 900px;
}

.hero-card {
  background: linear-gradient(145deg, rgba(88, 245, 197, 0.12), rgba(16, 25, 45, 0.9));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
}

.hero-card h3 {
  margin: 14px 0 6px;
}

.hero-card p {
  color: var(--muted);
  margin: 0;
}

.floating-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 15px 40px -30px rgba(0, 0, 0, 0.6);
}

.floating-card img {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.mini-title {
  font-weight: 600;
  margin: 4px 0;
}

.mini-text {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.section {
  padding: clamp(24px, 5vw, 48px) clamp(12px, 3vw, 24px);
  background: rgba(255, 255, 255, 0.01);
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.section-header.compact {
  justify-content: flex-start;
}

.section h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

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

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
}

.link-pill {
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  transition: var(--transition);
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px -40px rgba(0, 0, 0, 0.7);
}

.card img,
.card video {
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: 14px;
}

.card-body {
  padding: 16px;
  display: grid;
  gap: 10px;
  flex: 1;
}

.card-tag {
  align-self: flex-start;
  background: rgba(88, 245, 197, 0.12);
  color: var(--accent);
  padding: 8px 12px;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  font-weight: 600;
}

.card p {
  color: var(--muted);
  margin: 0;
}

.card-actions {
  display: flex;
  justify-content: flex-start;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tile {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 35px -30px rgba(0, 0, 0, 0.6);
}

.tile-icon {
  font-size: 1.3rem;
}

.tile h3 {
  margin: 8px 0 6px;
}

.tile p {
  color: var(--muted);
  margin: 0;
}

.about-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(16px, 4vw, 32px);
  align-items: center;
}

.about-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-circle {
  width: min(420px, 70vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(88, 245, 197, 0.25), transparent 55%), radial-gradient(circle at 70% 70%, rgba(126, 195, 255, 0.2), transparent 60%), #0f172a;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.portrait-sobre {
  background-image: url('imagens/sobre.png');
  background-color: #0f172a;
}

.about-text h1 {
  margin: 8px 0 12px;
}

.lead {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.alt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 4vw, 28px);
  align-items: center;
}

.alt-grid.reverse {
  grid-template-columns: 1fr 1fr;
}

.alt-text h2 {
  margin: 6px 0 12px;
}

.alt-text .lead:last-child {
  margin-bottom: 0;
}

.alt-media {
  width: 100%;
  min-height: 260px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(88, 245, 197, 0.12), rgba(16, 25, 45, 0.9));
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.media-valores {
  background-image: url('imagens/valores.webp');
}

.media-missao {
  background-image: url('imagens/missao.webp');
}

.media-visao {
  background-image: url('imagens/visao.webp');
}

.about {
  display: grid;
}

.about-card {
  border: 1px solid var(--border);
  background: linear-gradient(125deg, rgba(16, 25, 45, 0.9), rgba(126, 195, 255, 0.06));
  padding: clamp(18px, 4vw, 32px);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.about-card h2 {
  margin: 8px 0;
}

.about-card p {
  color: var(--muted);
  margin: 0 0 12px;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-row span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  font-weight: 500;
}

.newsletter-card,
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

#newsletter-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

#email {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  font-size: 1rem;
}

#email:focus {
  outline: 1px solid var(--accent);
}

.status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.status.success {
  color: var(--accent);
}

.status.error {
  color: #ffb4b4;
}

.contact-card .muted {
  margin-bottom: 10px;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.contact-note {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05121f;
  box-shadow: 0 15px 40px -20px rgba(88, 245, 197, 0.7);
}

.btn.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.btn.small {
  padding: 10px 14px;
}

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

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.footer-links {
  display: flex;
  gap: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    width: 100%;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    width: fit-content;
  }

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

  .hero-media {
    order: -1;
  }

  .about-hero,
  .alt-grid,
  .alt-grid.reverse {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    order: -1;
  }

  /* mobile: imagem em cima, texto embaixo nas seções alternadas */
  .alt-grid .alt-media,
  .alt-grid.reverse .alt-media {
    order: 1;
  }

  .alt-grid .alt-text,
  .alt-grid.reverse .alt-text {
    order: 2;
  }

  .newsletter-card,
  .contact-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar,
  main,
  .footer {
    padding: 16px;
  }

  .hero,
  .section {
    padding: 16px;
  }

  .section-header {
    flex-direction: column;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
