/* ============================================================
   components.css · header, nav, cards, buttons, dropdowns
   ============================================================ */

/* ---------- Site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--surface);
  border-bottom: 1px solid var(--outline);
  backdrop-filter: saturate(180%) blur(10px);
}

[data-theme="linear"] .site-header {
  background-color: rgba(8, 9, 10, 0.85);
}

[data-theme="anthropic"] .site-header {
  background-color: rgba(250, 247, 240, 0.92);
}

[data-theme="vercel"] .site-header {
  background-color: rgba(255, 255, 255, 0.85);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.875rem;
  flex-wrap: wrap;
}

/* Brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--on-surface);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--primary);
}

.brand__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand__name {
  font-weight: 800;
}

.brand__sub {
  color: var(--on-surface-variant);
  font-weight: 500;
  font-size: 0.875rem;
}

/* Nav */

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.site-nav__link {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
  font-weight: 500;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--on-surface);
  border-bottom-color: var(--primary);
}

/* ---------- Theme switcher ---------- */

.theme-switcher {
  position: relative;
}

.theme-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface-elevated);
  color: var(--on-surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 0.5rem 2.25rem 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='currentColor' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 10px 6px;
}

.theme-switcher select:hover {
  border-color: var(--primary);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(64px, 10vw, 128px);
}

.hero__label {
  display: inline-block;
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw + 0.5rem, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 18ch;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.875rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--on-surface-variant);
  margin-top: 1rem;
  max-width: 28ch;
}

.hero__tagline {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin-top: 1.5rem;
  max-width: 56ch;
}

/* ---------- Cards (visualizações) ---------- */

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-elevated);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--on-surface);
  height: 100%;
  transition:
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms ease,
    border-color 220ms ease,
    background-color 200ms ease,
    color 200ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  color: var(--on-surface);
}

.card__thumb {
  aspect-ratio: 16 / 10;
  background-color: var(--neutral);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-neutral);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0, 0, 0, 0.04));
  pointer-events: none;
}

.card__thumb-placeholder {
  opacity: 0.55;
  font-size: 0.75rem;
}

.card__thumb--img {
  background-color: var(--neutral);
  padding: 0;
}

.card__thumb--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.card:hover .card__thumb--img img {
  transform: scale(1.04);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem 1.375rem 1.5rem;
  flex: 1;
}

.card__eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--on-surface);
}

.card__subtitle {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  font-style: italic;
}

.card__desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--on-surface-variant);
  flex: 1;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: auto;
  color: var(--primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding-top: 0.5rem;
}

.card:hover .card__cta {
  gap: 0.625rem;
}

.card__cta-arrow {
  transition: transform 180ms ease;
}

.card:hover .card__cta-arrow {
  transform: translateX(3px);
}

/* ---------- Card variants (cores diferenciadas por mapa, opcional) ---------- */

.card--giordano .card__thumb { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); }
.card--age      .card__thumb { background: linear-gradient(135deg, #6B5740, #2D1F0E); color: #FAF7F0; }
.card--nautica  .card__thumb { background: linear-gradient(135deg, #1E4D6B, #0C2540); color: #F0F5F8; }
.card--fabrica  .card__thumb { background: linear-gradient(135deg, #B8651A, #5C2E0A); color: #FFF4E6; }
.card--leitura  .card__thumb { background: linear-gradient(135deg, var(--secondary), #4A4346); color: var(--on-secondary); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--on-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--on-surface);
  border-color: var(--outline);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Sections (genéricas) ---------- */

.section__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 24ch;
}

.section__lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--on-surface-variant);
  max-width: 60ch;
  margin-top: 1rem;
}

.section--muted {
  background-color: var(--neutral);
  color: var(--on-neutral);
}

[data-theme="linear"] .section--muted {
  background-color: var(--surface-elevated);
  color: var(--on-surface);
}

/* ---------- People mini-cards ---------- */

.person-card {
  background-color: var(--surface-elevated);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1.375rem;
  box-shadow: var(--shadow-card);
}

.person-card__role {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.person-card__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}

.person-card__desc {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--on-surface-variant);
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--secondary);
  color: var(--on-secondary);
  padding-block: 3rem;
  margin-top: 4rem;
}

[data-theme="anthropic"] .site-footer {
  background-color: var(--secondary);
  color: var(--on-secondary);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--on-secondary);
}

.site-footer__meta {
  font-size: 0.875rem;
  line-height: 1.6;
  opacity: 0.75;
}

.site-footer__meta a {
  color: var(--on-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
}

.site-footer__meta a:hover {
  opacity: 1;
}

/* ---------- Masthead separator (motif CIn-UFPE) ---------- */

.masthead {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.masthead::after {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  background-color: var(--primary);
}

/* ---------- Mobile nav ---------- */

@media (max-width: 720px) {
  .site-header__inner {
    gap: 0.75rem;
  }
  .site-nav {
    gap: 0.875rem;
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
  .site-nav__link {
    font-size: 0.875rem;
    white-space: nowrap;
  }
}
