﻿/* ============================================================
   BASE — Escola de Condução NOBREZA
   Tipografia base · Utilitários · Layout helpers
   ============================================================ */


/* ----------------------------------------------------------
   TIPOGRAFIA GLOBAL
---------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--ink);
  background-color: var(--paper);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  max-width: 65ch;
  color: var(--ink-mid);
}

p + p {
  margin-top: var(--space-4);
}

strong {
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

em {
  font-style: italic;
}

a {
  transition: var(--transition-color);
}

a:hover {
  color: var(--accent);
}

/* Foco visível para acessibilidade */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Eyebrow — label acima de títulos */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background-color: var(--accent);
  flex-shrink: 0;
}

/* Eyebrow claro (para fundos escuros) */
.eyebrow--light {
  color: var(--gold);
}

.eyebrow--light::before {
  background-color: var(--gold);
}


/* ----------------------------------------------------------
   CONTAINER E LAYOUT
---------------------------------------------------------- */

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

.section {
  padding-block: var(--section-py);
}

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

.section--dark {
  background-color: var(--ink);
  color: var(--paper);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--paper);
}

.section--dark p {
  color: var(--ink-light);
}

/* Grids utilitários */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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


/* ----------------------------------------------------------
   UTILITÁRIOS
---------------------------------------------------------- */

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

.text-center { text-align: center; }
.text-right  { text-align: right; }

.text-accent { color: var(--accent); }
.text-gold   { color: var(--gold); }
.text-paper  { color: var(--paper); }
.text-ink    { color: var(--ink); }

.bg-ink   { background-color: var(--ink); }
.bg-paper { background-color: var(--paper); }
.bg-accent { background-color: var(--accent); }

.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }

.font-display { font-family: var(--font-display); }

.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }


/* ----------------------------------------------------------
   ANIMAÇÕES BASE
---------------------------------------------------------- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.animate-fade-up {
  animation: fadeUp 0.9s var(--ease-out) both;
}

.animate-fade-up--delay-1 { animation-delay: 0.15s; }
.animate-fade-up--delay-2 { animation-delay: 0.30s; }
.animate-fade-up--delay-3 { animation-delay: 0.45s; }
.animate-fade-up--delay-4 { animation-delay: 0.60s; }


/* ----------------------------------------------------------
   DIVISORES EDITORIAIS
---------------------------------------------------------- */

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin-block: var(--space-8);
}

.divider--dark {
  border-color: var(--ink-soft);
}


/* ----------------------------------------------------------
   IMAGENS
---------------------------------------------------------- */

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.img-ratio-4-5 {
  aspect-ratio: 4/5;
}

.img-ratio-16-9 {
  aspect-ratio: 16/9;
}

.img-ratio-1-1 {
  aspect-ratio: 1/1;
}
