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

:root {
  --clara-primary: #14B881;
  --clara-primary-mid: #0D9E6E;
  --clara-primary-light: #5DC9A0;
  --clara-primary-deep: #0B6546;
  --clara-d-primary: #0B6546;
  --clara-d-mid: #0A5A3D;
  --clara-d-light: #1A9068;
  --clara-d-deep: #07402E;

  --page-bg: #0a0a0a;
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.45);
  --border: rgba(255,255,255,0.08);
  --section-bg: #111111;
  --card-bg: #1a1a1a;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;

  --green: #0B6546;
  --green-label: #14B881;
}

html { scroll-behavior: smooth; }

body {
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

section { padding: 100px 0; }
section + section { border-top: 1px solid var(--border); }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-brand span { color: var(--green-label); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

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

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  white-space: nowrap;
}

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

/* ── Mode toggle ── */
.mode-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mode-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.mode-btn.active {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

/* ── Section labels ── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-label);
  margin-bottom: 12px;
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
}

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  background: radial-gradient(ellipse 80% 55% at 50% 60%, rgba(11,101,70,0.08) 0%, transparent 70%);
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-logo-wrap {
  width: 100%;
  max-width: 760px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
  transition: background 0.4s;
}

.hero-logo-wrap.bg-dark  { background: #000000; padding: 48px 56px; }
.hero-logo-wrap.bg-light { background: #ffffff; padding: 48px 56px; }

.hero-logo-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.hero-toggle-label {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.7;
}

/* ── BG grid (fondos) ── */
.bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 48px;
}

.bg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 28px;
  gap: 18px;
}

.bg-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.bg-card-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.45;
}

.bg-card-label.dark-label  { color: #fff; }
.bg-card-label.light-label { color: #000; }

/* ── Componentes ── */
#componentes { background: var(--section-bg); }

.componentes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 48px;
  border-radius: 16px;
  overflow: hidden;
}

.comp-card {
  background: #000;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.comp-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.comp-card-light {
  background: #ffffff;
}

.comp-card-full {
  grid-column: 1 / -1;
}

.comp-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-label);
  margin-bottom: 4px;
}

.comp-card-light .comp-name {
  color: var(--green);
}

.comp-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.comp-card-light .comp-desc {
  color: rgba(0,0,0,0.45);
}

/* ── Colores institucionales ── */
.colores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.color-chip {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.color-chip-swatch {
  height: 120px;
}

.color-chip-info {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.color-chip-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.color-chip-hex {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.color-chip-uso {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Uso correcto / incorrecto ── */
.uso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}

.uso-col-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.uso-col-title.correcto   { color: #4ade80; }
.uso-col-title.incorrecto { color: #f87171; }

.uso-items { display: flex; flex-direction: column; gap: 14px; }

.uso-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.uso-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  min-height: 110px;
}

.uso-preview svg {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.uso-caption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.uso-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.uso-icon.ok { background: rgba(74,222,128,0.15); color: #4ade80; }
.uso-icon.no { background: rgba(248,113,113,0.15); color: #f87171; }

/* ── Descarga ── */
#descarga { background: var(--section-bg); }

.descarga-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.descarga-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.descarga-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  min-height: 140px;
}

.descarga-preview svg {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
}

.descarga-preview.bg-dark  { background: #000; }
.descarga-preview.bg-light { background: #f4f4f4; }
.descarga-preview.bg-mixed { background: linear-gradient(to right, #000 50%, #f4f4f4 50%); }

.descarga-info {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.descarga-meta { flex: 1; }

.descarga-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.descarga-filename {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-download:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
}

.dl-btn-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-download-png {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-download-png:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
}

/* ── Tipografía ── */
.font-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 48px;
}

.font-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 36px;
  border: 1px solid var(--border);
}

.font-sample {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  line-height: 1;
}

.font-meta { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.font-meta strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }

.font-weights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.font-weight-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.font-weight-sample { font-size: 18px; }
.font-weight-label  { font-size: 12px; color: var(--text-muted); font-family: monospace; }

/* ── Slots ── */
.isotipo-slot, .wordmark-slot, .full-slot,
.isotipo-font-slot { width: 100%; }

.uso-slot-full,
.uso-slot-distorsionado,
.uso-slot-pequeno {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 36px 0; }

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand { font-size: 12px; color: var(--text-muted); }

.footer-version {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 3px 10px;
  border-radius: 6px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .bg-grid { grid-template-columns: 1fr 1fr; }
  .componentes-grid { grid-template-columns: 1fr; }
  .uso-grid { grid-template-columns: 1fr; }
  .font-display { grid-template-columns: 1fr; }
  .colores-grid { grid-template-columns: 1fr; }
  .descarga-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .bg-grid { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .section-title { font-size: 24px; }
  .nav-hamburger { display: flex; }
  nav .container { flex-wrap: wrap; height: auto; min-height: 56px; }
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 0; padding: 8px 0 16px; }
  .nav-links.open { display: flex; }
  .nav-links.open li { border-top: 1px solid var(--border); }
  .nav-links.open a { display: block; padding: 13px 0; font-size: 14px; }
}