/* ─── Reset & tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-black:   #1B1B12;
  --c-dark:    #494C3A;
  --c-forest:  #393D1A;
  --c-khaki:   #959360;
  --c-terra:   #CE5744;
  --c-tan:     #C9B595;
  --c-cream:   #F1E9DB;
  --c-bg:      #F9F6EF;
  --f-title:   'Space Grotesk', sans-serif;
  --f-body:    'Montserrat', sans-serif;
  --sidebar-w: 260px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--c-bg);
  color: var(--c-black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--c-black);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: block;
  padding: 2.25rem 2rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-brand img {
  width: 130px;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* ─── Navigation ─────────────────────────────────────────────── */
.nav { padding: 1.75rem 0 3rem; flex: 1; }
.nav ul { list-style: none; }
.nav > ul > li { margin-bottom: 0; }

.nav-link {
  display: block;
  padding: 0.5rem 2rem;
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.18s;
}

.nav-link:hover { color: rgba(255,255,255,0.85); }

.nav-link.active {
  color: var(--c-khaki);
  font-weight: 500;
}

.nav-group-label {
  display: block;
  padding: 1.5rem 2rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

.nav-sub-link {
  padding-left: 2.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.nav-sub-link:hover  { color: rgba(255,255,255,0.75); }
.nav-sub-link.active { color: var(--c-khaki); font-weight: 500; }

/* ─── Main ───────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

/* ─── Section covers ─────────────────────────────────────────── */
.cover {
  width: 100%;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  padding: 3.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.cover--dark   { background: var(--c-dark); }
.cover--accent { background: var(--c-terra); align-items: center; padding: 4rem 5rem; min-height: 48vh; }
.cover--khaki  { background: var(--c-khaki); }
.cover--cream  { background: var(--c-cream); }
.cover--black  { background: var(--c-black); }

.cover-eyebrow {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 300;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.cover-logo {
  width: 240px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.cover-tag {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 300;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}

.cover-tag--muted-white { color: rgba(255,255,255,0.3); }
.cover-tag--muted-dark  { color: rgba(57,61,26,0.35); }

.cover-intro {
  display: flex;
  align-items: center;
  gap: 6rem;
  width: 100%;
}

.cover-intro-label {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 300;
  font-size: 1.6rem;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

.cover-intro-text {
  max-width: 480px;
  color: rgba(255,255,255,0.82);
  font-size: 0.98rem;
  line-height: 1.85;
  font-weight: 300;
}

.cover-intro-text p + p { margin-top: 1rem; }

/* ─── Content wrapper ────────────────────────────────────────── */
.content {
  padding: 5rem;
  max-width: 860px;
}

.block { margin-bottom: 5rem; }
.block:last-child { margin-bottom: 0; }

.block-title {
  font-family: var(--f-title);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 0.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(73,76,58,0.12);
}

.block-desc {
  color: rgba(73,76,58,0.65);
  font-size: 0.88rem;
  line-height: 1.85;
  margin-top: 0.85rem;
  margin-bottom: 2rem;
  max-width: 560px;
  font-weight: 300;
}

/* ─── Logo showcase ──────────────────────────────────────────── */
.logo-frame {
  position: relative;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
}

.logo-frame--light  { background: #fff; box-shadow: 0 0 0 1px rgba(73,76,58,0.1); }
.logo-frame--dark   { background: var(--c-dark); }
.logo-frame--khaki  { background: var(--c-khaki); }
.logo-frame--safety {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(73,76,58,0.1), inset 18px 0 0 #f0ece3, inset -18px 0 0 #f0ece3, inset 0 18px 0 #f0ece3, inset 0 -18px 0 #f0ece3;
}

.logo-frame img { max-width: 320px; width: 55%; display: block; }
.logo-frame--dark img  { filter: brightness(0) invert(1); opacity: 0.92; }
.logo-frame--khaki img { filter: brightness(0) invert(1); opacity: 0.88; }

.frame-label {
  position: absolute;
  bottom: 1.1rem; right: 1.4rem;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 0.72rem;
  color: rgba(149,147,96,0.7);
}

.frame-hint {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--c-tan);
  font-family: var(--f-body);
  font-style: italic;
}

/* ─── Color versions ─────────────────────────────────────────── */
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  overflow: hidden;
  gap: 2px;
  background: rgba(73,76,58,0.1);
}

.cv-panel {
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}

.cv-panel--dark  { background: var(--c-dark); }
.cv-panel--light { background: var(--c-cream); }

.cv-logos { display: flex; flex-direction: column; gap: 0.7rem; }

.cv-logo { max-width: 160px; display: block; }

.cv-panel--dark  .cv-logo:nth-child(1) { filter: brightness(0) invert(1); opacity: 1; }
.cv-panel--dark  .cv-logo:nth-child(2) { filter: brightness(0) invert(1); opacity: 0.65; }
.cv-panel--dark  .cv-logo:nth-child(3) { filter: brightness(0) invert(1); opacity: 0.42; }
.cv-panel--dark  .cv-logo:nth-child(4) { filter: brightness(0) invert(1); opacity: 0.25; }

.cv-panel--light .cv-logo:nth-child(1) { filter: brightness(0); opacity: 1; }
.cv-panel--light .cv-logo:nth-child(2) { filter: brightness(0) sepia(1) saturate(0.5); opacity: 0.65; }
.cv-panel--light .cv-logo:nth-child(3) { filter: brightness(0) sepia(1) saturate(0.3); opacity: 0.45; }
.cv-panel--light .cv-logo:nth-child(4) { filter: brightness(0); opacity: 0.28; }

.cv-min {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.cv-panel--light .cv-min { border-top-color: rgba(57,61,26,0.1); }

.cv-min img { max-width: 90px; }
.cv-panel--dark  .cv-min img { filter: brightness(0) invert(1); opacity: 0.85; }
.cv-panel--light .cv-min img { filter: brightness(0); opacity: 0.8; }

.cv-min-label {
  font-size: 0.68rem;
  line-height: 1.5;
  font-family: var(--f-body);
}

.cv-panel--dark  .cv-min-label { color: rgba(255,255,255,0.35); }
.cv-panel--light .cv-min-label { color: rgba(57,61,26,0.4); }

.block-caption {
  text-align: right;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 0.72rem;
  color: rgba(149,147,96,0.6);
  margin-top: 0.6rem;
}

/* ─── Uso indevido ───────────────────────────────────────────── */
.misuse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.misuse-card {
  padding: 2rem 1.5rem 1.25rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(73,76,58,0.08);
  position: relative;
}

.misuse-card::after {
  content: '×';
  position: absolute;
  top: 0.6rem; right: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-terra);
  opacity: 0.7;
}

.misuse-card img { max-width: 140px; }

.misuse-card span {
  font-size: 0.72rem;
  color: rgba(73,76,58,0.5);
  font-family: var(--f-body);
  text-align: center;
}

.misuse-distort { transform: scaleY(1.25); }
.misuse-rotate  { transform: rotate(-14deg); }
.misuse-color   { filter: hue-rotate(195deg) saturate(4); }
.misuse-outline { opacity: 0.22; }

.misuse-card--contrast {
  background: #484800;
  box-shadow: none;
}

.misuse-card--contrast img   { opacity: 0.35; }
.misuse-card--contrast span  { color: rgba(255,255,255,0.4); }
.misuse-card--contrast::after { color: #ff9; }

/* ─── Color palette (círculos) ───────────────────────────────── */
.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}

.swatch-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.swatch-circle--bordered { box-shadow: 0 0 0 1px rgba(73,76,58,0.15), 0 2px 12px rgba(0,0,0,0.04); }

.swatch-info { display: flex; flex-direction: column; gap: 0.2rem; }

.swatch-hex {
  font-family: var(--f-title);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-dark);
  letter-spacing: 0.02em;
}

.swatch-meta {
  font-size: 0.66rem;
  color: rgba(73,76,58,0.45);
  line-height: 1.7;
  font-family: var(--f-body);
}

/* ─── Tipografia ─────────────────────────────────────────────── */
.tipo-card {
  background: var(--c-dark);
  border-radius: 14px;
  padding: 4rem;
  overflow: hidden;
}

.tipo-inner {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.tipo-aa {
  font-family: var(--f-title);
  font-weight: 700;
  font-size: clamp(100px, 13vw, 200px);
  color: var(--c-khaki);
  line-height: 0.85;
  flex-shrink: 0;
  opacity: 0.85;
}

.tipo-families { flex: 1; min-width: 0; }

.tipo-block + .tipo-block {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(149,147,96,0.2);
}

.tipo-role {
  display: block;
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 300;
  font-size: 0.8rem;
  color: rgba(201,181,149,0.65);
  margin-bottom: 0.4rem;
}

.tipo-name {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.tipo-name--sg { font-family: var(--f-title); font-weight: 600; color: #fff; }
.tipo-name--mt { font-family: var(--f-body);  font-weight: 600; color: var(--c-tan); }

.tipo-chars {
  font-size: 0.78rem;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
}

.tipo-chars--sg { font-family: var(--f-title); }
.tipo-chars--mt { font-family: var(--f-body); }

.tipo-footer {
  margin-top: 2rem;
  text-align: right;
  font-family: var(--f-body);
  font-style: italic;
  font-size: 0.72rem;
  color: rgba(201,181,149,0.4);
}

/* ─── Elementos de apoio ─────────────────────────────────────── */
.elem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.elem-card {
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(73,76,58,0.08);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.elem-card--full { grid-column: 1 / -1; }
.elem-card--cream { background: var(--c-cream); box-shadow: none; }

.elem-label {
  font-size: 0.7rem;
  color: rgba(73,76,58,0.4);
  font-family: var(--f-body);
  letter-spacing: 0.04em;
}

.icon-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.circles-row { display: flex; align-items: flex-end; }

/* ─── Fotografia ─────────────────────────────────────────────── */
.photo-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.photo-tile {
  border-radius: 12px;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-tile--a { background: linear-gradient(135deg, #2a2a1e 0%, #3c3c28 100%); }
.photo-tile--b { background: linear-gradient(135deg, #354040 0%, #2a3530 100%); }

.photo-tile-mark {
  width: 56px;
  filter: brightness(0) invert(1);
  opacity: 0.75;
}

.photo-tile-caption {
  position: absolute;
  bottom: 1rem; left: 1.25rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  font-family: var(--f-body);
}

.directive {
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(73,76,58,0.1);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
}

.directive svg { flex-shrink: 0; margin-top: 2px; }

.directive-title {
  display: block;
  font-family: var(--f-title);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--c-dark);
  margin-bottom: 0.3rem;
}

.directive-text {
  font-size: 0.82rem;
  color: rgba(73,76,58,0.6);
  line-height: 1.7;
  font-weight: 300;
}

/* ─── Downloads ──────────────────────────────────────────────── */
.dl-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.dl-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(73,76,58,0.1);
  text-decoration: none;
  background: #fff;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.dl-card:hover {
  border-color: var(--c-khaki);
  box-shadow: 0 4px 20px rgba(149,147,96,0.12);
  transform: translateY(-1px);
}

.dl-icon {
  width: 44px; height: 44px;
  background: var(--c-cream);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.dl-title {
  display: block;
  font-family: var(--f-title);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 0.2rem;
}

.dl-sub {
  font-size: 0.75rem;
  color: rgba(73,76,58,0.45);
  font-weight: 300;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --sidebar-w: 220px; }
  .content { padding: 3.5rem; }
  .cover   { padding: 3rem; }
  .palette { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .sidebar { display: none; }
  .main    { margin-left: 0; }
  .content { padding: 2rem; }
  .cover   { padding: 2rem; min-height: 40vh; }
  .cv-grid, .misuse-grid, .elem-grid, .photo-duo { grid-template-columns: 1fr; }
  .tipo-inner { flex-direction: column; }
  .tipo-aa { font-size: 80px; }
}
