/* CapivaraOS — design system do site institucional */

:root {
  --color-bg: #fbfbf9;
  --color-bg-alt: #f1f3ee;
  --color-text: #1f2421;
  --color-text-muted: #5b6359;
  --color-green: #2f7a3d;
  --color-green-dark: #1d4f27;
  --color-green-darker: #163d1e;
  --color-green-light: #eaf4ea;
  --color-border: #e1e5dc;
  --color-badge-bg: #fff4d9;
  --color-badge-text: #8a6a00;

  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 30, 22, 0.18);
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a {
  color: var(--color-green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header — faixa verde escura, ao estilo de sites de distros comunitárias */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-green-darker);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.brand .logo-icon {
  height: 64px;
  width: auto;
}

.brand:hover {
  text-decoration: none;
}

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

.main-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: #fff;
}

/* Dropdown "Distribuições" */

.nav-dropdown {
  position: relative;
}

.nav-dropdown > .nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: default;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-dropdown:hover > .nav-dropdown-toggle,
.nav-dropdown:focus-within > .nav-dropdown-toggle {
  color: #fff;
}

.nav-dropdown-toggle::after {
  content: "▾";
  font-size: 0.7rem;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-green-darker);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-dropdown-menu .distro-tag {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.lang-switch {
  display: flex;
  gap: 6px;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 20px;
  font-size: 0.85rem;
}

.lang-switch a {
  padding: 4px 8px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.lang-switch a.active,
.lang-switch a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
}

/* Hero — duas colunas: texto + screenshot, como em sites de distros */

.hero {
  background: linear-gradient(180deg, var(--color-green-darker) 0%, var(--color-green-dark) 100%);
  color: #fff;
  padding: 64px 0 0;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text {
  padding-bottom: 56px;
}

.badge {
  display: inline-block;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero p.lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  margin: 0 0 32px;
}

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

.hero-shot {
  position: relative;
  align-self: end;
}

.hero-shot img {
  border-radius: 10px 10px 0 0;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #38913f;
}

.btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Sections */

section {
  padding: 64px 0;
}

section.alt {
  background: var(--color-bg-alt);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
}

.section-head h2 {
  font-size: 1.8rem;
  margin: 0 0 12px;
}

.section-head p {
  color: var(--color-text-muted);
  margin: 0;
}

/* Screenshot gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(31, 36, 33, 0.1);
  background: #000;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 24px;
}

/* Feature cards */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature-card .icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

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

/* Distro cards (home) */

.distro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.distro-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.distro-card .distro-de {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 2px;
}

.distro-card h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.distro-card .distro-tagline {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.distro-card p.distro-desc {
  flex-grow: 1;
  margin: 0 0 18px;
  color: var(--color-text);
  font-size: 0.95rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  width: fit-content;
}

.status-pill.dev {
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
}

.status-pill.planned {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* Status / callout box */

.callout {
  background: var(--color-green-light);
  border: 1px solid #cfe6cf;
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.callout h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.callout p {
  color: var(--color-text-muted);
  margin: 0 0 24px;
}

/* Content pages (Sobre, Download, Changelog, Contato) */

.page-content {
  padding: 56px 0 80px;
}

.page-content .container {
  max-width: 760px;
}

.page-content h1 {
  font-size: 2.1rem;
  margin-bottom: 8px;
}

.page-content .subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.page-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
}

.page-content p,
.page-content li {
  color: var(--color-text);
}

.page-content ul {
  padding-left: 20px;
}

.info-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
}

.info-box.warning {
  background: var(--color-badge-bg);
  border-color: #f0dca0;
}

.changelog-entry {
  border-left: 3px solid var(--color-green);
  padding-left: 20px;
  margin-bottom: 32px;
}

.changelog-entry .version {
  font-weight: 700;
  font-size: 1.1rem;
}

.changelog-entry .date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* Contact form */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-green);
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.form-status {
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.form-status.success {
  background: var(--color-green-light);
  border: 1px solid #cfe6cf;
}

.form-status.error {
  background: var(--color-badge-bg);
  border: 1px solid #f0dca0;
}

/* Footer — multi-coluna, estilo "sitemap", fundo verde escuro */

.site-footer {
  background: var(--color-green-darker);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand .logo-icon {
  height: 52px;
  width: auto;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-fine {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

/* Responsive */

@media (max-width: 860px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-shot {
    display: none;
  }

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

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

@media (max-width: 640px) {
  .main-nav {
    position: fixed;
    inset: 92px 0 0 0;
    background: var(--color-green-darker);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    height: calc(100vh - 92px);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .lang-switch {
    border-left: none;
    padding-left: 0;
  }

  .nav-dropdown-toggle::after {
    content: "";
  }

  .nav-dropdown-menu {
    display: flex;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 0 0 14px;
    margin: 6px 0 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-text {
    padding-bottom: 40px;
  }

  .feature-grid,
  .gallery,
  .distro-grid {
    grid-template-columns: 1fr;
  }

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