/* ========================================
   Formula SAE - Main Stylesheet
   High-Voltage Racing Theme
   ======================================== */

/* 1. SISTEMA DE CORES (Paleta High-Voltage) */
:root {
  /* Primary - Amarelo Alta Voltagem */
  --clr-primary-lt: hsl(48, 100%, 70%);
  --clr-primary-base: hsl(48, 100%, 55%);
  --clr-primary-dk: hsl(40, 90%, 40%);
  --clr-contact-section: hsla(40, 90%, 40%, 0.207);

  /* Background - Preto Asfalto/Carbono */
  --clr-bg-base: hsl(220, 10%, 8%);
  --clr-bg-surface: hsl(220, 8%, 12%);

  /* Text - Branco/Cinza Claro */
  --clr-text-base: hsl(0, 0%, 95%);
  --clr-text-muted: hsl(220, 5%, 70%);

  /* Grays - Cinzas Técnicos */
  --clr-gray-100: hsl(220, 5%, 85%);
  --clr-gray-200: hsl(220, 5%, 75%);
  --clr-gray-300: hsl(220, 5%, 60%);
  --clr-gray-400: hsl(220, 5%, 45%);
  --clr-gray-500: hsl(220, 5%, 30%);
  --clr-gray-600: hsl(220, 5%, 20%);
  --clr-gray-700: hsl(220, 5%, 15%);
}

/* 2. TIPOGRAFIA */
:root {
  --ff-regular: "Inter", "Roboto", system-ui, -apple-system, sans-serif;
  --ff-headings: "Oswald", "Bebas Neue", "Impact", sans-serif;
  --ff-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

  /* Escala Fluida com clamp() */
  --fs-sm: clamp(1.2rem, 0.8rem + 0.5vw, 1.4rem);
  --fs-base: clamp(1.4rem, 1rem + 0.5vw, 1.6rem);
  --fs-h6: clamp(1.6rem, 1.2rem + 0.6vw, 2rem);
  --fs-h5: clamp(1.8rem, 1.3rem + 0.8vw, 2.4rem);
  --fs-h4: clamp(2rem, 1.4rem + 1vw, 3rem);
  --fs-h3: clamp(2.4rem, 1.6rem + 1.4vw, 3.8rem);
  --fs-h2: clamp(3rem, 2rem + 2vw, 5rem);
  --fs-h1: clamp(3.6rem, 2.4rem + 2.5vw, 6.5rem);

  /* Line Heights */
  --lh-regular: 1.5;
  --lh-headings: 1.2;
}

/* 3. ESPAÇAMENTO E LAYOUT */
:root {
  --sp-micro: 0.2rem;
  --sp-smlst: 0.4rem;
  --sp-sm: 0.8rem;
  --sp-base: 1.6rem;
  --sp-lg: 2.4rem;
  --sp-xl: 4rem;
  --sp-2xl: 6.4rem;
  --sp-3xl: 10rem;

  --mw-grid: 120rem;
  --mw-content: 80rem;

  /* Border Radius - Arestas Vivas */
  --br-base: 0.2rem;
  --br-lg: 0.4rem;
  --br-none: 0;

  --pos: 5%;
}

/* 4. CONFIGURAÇÃO BASE (Resets Globais) */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  cursor: none !important;
}

body {
  font-family: var(--ff-regular);
  font-size: var(--fs-base, 1.6rem);
  line-height: var(--lh-regular);
  color: var(--clr-text-base);
  background-color: var(--clr-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Garante que a página tenha, no mínimo, 100% da altura da tela (Viewport Height) */
  margin: 0;
}

main {
  flex-grow: 1; /* Diz ao main: "Cresça e ocupe todo o espaço vazio que sobrar na tela" */
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Links */
a {
  color: var(--clr-primary-base);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

a:hover {
  color: var(--clr-primary-lt);
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ff-headings);
  line-height: var(--lh-headings);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-base);
}

h1 {
  font-size: 16px;
  font-size: var(--fs-h1);
}
h2 {
  font-size: 14px;
  font-size: var(--fs-h2);
}
h3 {
  font-size: 12px;
  font-size: var(--fs-h3);
}
h4 {
  font-size: 10px;
  font-size: var(--fs-h4);
}
h5 {
  font-size: 8px;
  font-size: var(--fs-h5);
}
h6 {
  font-size: 6px;
  font-size: var(--fs-h6);
}

/* Utility Classes */
.container {
  max-width: var(--mw-grid);
  margin: 0 auto;
  padding: 0 var(--sp-base);
}

.content {
  max-width: var(--mw-content);
  margin: 0 auto;
}

/* Botões - Estilo High-Voltage */
.btn {
  display: inline-block;
  padding: var(--sp-sm) var(--sp-lg);
  font-family: var(--ff-headings);
  font-size: var(--fs-base, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 0.2rem solid var(--clr-primary-base);
  background: transparent;
  color: var(--clr-primary-base);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: var(--br-base);
}

.btn:hover {
  background: var(--clr-primary-base);
  color: var(--clr-bg-base);
  text-decoration: none;
}

.btn--filled {
  background: var(--clr-primary-base);
  color: var(--clr-bg-base);
}

.btn--filled:hover {
  background: var(--clr-primary-lt);
  border-color: var(--clr-primary-lt);
}

/* Cards / Superfícies */
.card {
  background: var(--clr-bg-surface);
  border: 0.1rem solid var(--clr-gray-600);
  border-radius: var(--br-base);
  padding: var(--sp-lg);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.card:hover {
  border-color: var(--clr-primary-dk);
  transform: translateY(-0.2rem);
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  height: 8rem;
  width: 100%;
  z-index: 1000;
  background: hsla(220, 10%, 8%, 0.7);
  backdrop-filter: blur(1rem);
  border-bottom: 0.1rem solid var(--clr-gray-700);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-top: var(--sp-base);
  padding-bottom: var(--sp-base);
}

.header__logo {
  display: flex;
  align-items: center;
  height: 115%;
  transition: transform 0.2s ease;
}
.header__logo:hover {
  transform: scale(1.1);
}

.logo__nav {
  max-height: 100%; /* Impede a imagem de crescer mais que o header__logo */
  width: auto; /* Mantém a proporção */
  display: block;
}

.header__nav {
  display: flex;
  gap: var(--sp-lg);
}

.header__nav-link {
  font-family: var(--ff-headings);
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s ease;
}

.header__nav-link:hover {
  color: var(--clr-primary-base);
  text-decoration: none;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--sp-3xl);
  padding-bottom: var(--sp-xl);
  position: relative;
  overflow: hidden;
}

.hero__bg-image {
  position: absolute;
  /* Esticamos um pouco para cobrir as bordas brancas do blur */
  /* top: -5%;
  left: -5%; */
  min-width: 100%;
  min-height: 100%;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Desfoque aplicado apenas nesta DIV */
  /* filter: blur(1px); */
  z-index: -2;
}

/* 2. Camada do Gradiente Diagonal */
.hero__bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* O DEGRADÊ MÁGICO:
     Direção: "to top right" (vai do inferior esquerdo para o superior direito)
     Cor 1: Preto/Cinza bem escuro com 95% de opacidade (Forte)
     Cor 2: A mesma cor, mas com 0% de opacidade (Totalmente transparente) */
  background: linear-gradient(
    to top right,
    rgba(15, 15, 20, 0.95) 10%,
    rgba(15, 15, 20, 0.1) 100%
  );

  z-index: -1;
  pointer-events: none; /* Garante que não bloqueie cliques nos botões */
}

.hero__logo {
  width: 100%;
  max-width: 950px;
  align-self: flex-end;
  margin-right: 5%;
  padding-bottom: 10rem;
}

/* 2. A Imagem da Logo (A Mágica Anti-Distorção) */
/* .hero__logo img {
  width: 100%;
  max-width: 950px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(250, 204, 21, 0.8));
  margin: 4rem 0;
} */

.hero__content {
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
  width: 100%;
  min-height: 60vh;
}

.hero__tagline {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-primary-base);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
  text-shadow: 1px 1px 2px rgba(10, 10, 10, 0.99);
}

.hero__title {
  font-size: 16px;
  font-size: var(--fs-h1);
  line-height: 0.95;
  margin-bottom: var(--sp-xl);
}

.hero__title-accent {
  color: var(--clr-primary-base);
  display: inline-block;
}

.hero__description {
  max-width: 800px;
  font-size: var(--fs-base, 1.6rem);
  color: var(--clr-text-muted);
  line-height: var(--lh-regular);
  margin-bottom: var(--sp-xl);
}

.hero__actions {
  display: flex;
  gap: var(--sp-base);
  flex-wrap: wrap;
  align-self: flex-start;
  margin-left: 5%;
  margin-top: auto;
  margin-bottom: var(--sp-3xl);
}

/* Sobrescreve o estilo dos botões apenas dentro da seção Hero */
.hero__actions .btn {
  background-color: #ffffff;
  color: #000000;

  /* O visual urbano e forte */
  font-family: var(--ff-headings);
  font-weight: 900;
  font-size: 2.6rem;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;

  /* O segredo do "grifado": padding pequeno e bordas retas (sem border-radius) */
  padding: 1.2rem 0;
  border: none;
  border-radius: 0;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

/* Efeito ao passar o mouse */
.hero__actions .btn:hover {
  /* Usa a sua variável de cor primária (amarelo) ou a cor de destaque do tema dark */
  background-color: var(--clr-primary-base);
  transform: scale(1.05);
}

.hero__separator {
  position: absolute;
  bottom: 0; /* Cola o separador na borda inferior da seção Hero */
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  z-index: 1;
}

/* Cria as linhas contínuas antes e depois do texto */
.hero__separator::before,
.hero__separator::after {
  content: "";
  flex: 1; /* Faz a linha esticar para preencher o espaço vazio */
  height: 1px;
  background-color: var(
    --clr-gray-700
  ); /* Usa a sua variável de cinza escuro */
}

/* Estilo da label em si */
.hero__separator-text {
  padding: 0 var(--sp-xl); /* Dá um respiro entre as linhas e o texto */
  font-family: var(--ff-mono); /* Mantém a fonte monoespaçada tech */
  font-size: 1.2rem; /* Tamanho discreto */
  color: var(--clr-gray-400); /* Cor neutra para não ofuscar o título */
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: var(--sp-3xl) 0;
}

.section--alt {
  background: var(--clr-bg-surface);
  border-top: 0.1rem solid var(--clr-gray-700);
  border-bottom: 0.1rem solid var(--clr-gray-700);
}

.section__header {
  text-align: center;
  margin-bottom: var(--sp-2xl);
}

.section__title {
  font-size: 14px;
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-sm);
}

.section__subtitle {
  font-size: var(--fs-base, 1.6rem);
  color: var(--clr-text-muted);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
/* 1. O Container Externo */
.about__carousel {
  width: 100%;

  /* CRUCIAL: É isto que esconde os cards que saem da caixa */
  overflow: hidden;
  position: relative;

  /* Afasta os cards da borda do contêiner para não parecerem "colados" */
  padding: 2rem 1rem;

  /* O Novo Design: Borda amarela e cantos arredondados */
  border-radius: 12px;

  /* Desvanecer nas bordas laterais */
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

/* 2. O Trilho */
.about__track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: scroll-carousel 30s linear infinite;

  /* Aceleração de Hardware Pura */
  will-change: transform;
  backface-visibility: hidden;
}

.about__carousel:hover .about__track {
  animation-play-state: paused;
}

/* 3. O Card - Design Modernizado e Leve */
.about__card {
  width: 320px;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  background: var(--clr-bg-surface);

  /* DESIGN PREMIUM: Em vez de uma borda quadrada pesada, usamos uma borda quase invisível 
     nas laterais e uma linha de destaque ("Racing Stripe") mais grossa no topo. */
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-top: 3px solid var(--clr-primary-dk);
  border-radius: 8px;

  /* Mais respiro interno deixa o design mais elegante */
  padding: 2.5rem 1.5rem;

  /* Sombra base estática para descolar o card do fundo escuro */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);

  /* Transição focada apenas em cor e sombra (extremamente leve para a CPU/GPU) */
  transition:
    border-top-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Efeito Hover Enxuto */
.about__card:hover {
  /* Acende a faixa superior e as laterais */
  border-top-color: var(--clr-primary-base);
  border-color: rgba(255, 255, 255, 0.1);

  /* Aprofunda a sombra em vez de mover o card. Dá sensação de foco na leitura. */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* ----------------------------------------------------
   NOVA CLASSE: Configuração da Cor e Tipografia 
---------------------------------------------------- */

.about__card-title {
  color: var(--clr-text-base);
  font-size: var(--fs-h3);
  line-height: 1.3;
  margin-bottom: var(--sp-md, 1rem);
  padding-bottom: var(--sp-sm, 0.5rem);

  /* ESTILO TECH: Maiúsculas, espaçadas e com uma linha divisória super sutil */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.about__card-text {
  color: var(--clr-text-muted);
  line-height: var(--lh-regular, 1.6);
  font-size: var(--fs-base, 1rem);
}

/* Destaca textos em negrito colocados pelo Redator no Summernote */
.about__card-text b,
.about__card-text strong {
  color: var(--clr-text-base);
  font-weight: 600;
  /* Um leve brilho amarelo no negrito reforça a identidade da equipa */
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.2);
}

.about__card-title {
  color: var(--clr-text-base,); /* Use sua variável de cor de texto aqui */
  line-height: var(--lh-headings, 2);
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-sm);
}

/* 4. A Mágica do Loop Infinito */
@keyframes scroll-carousel {
  0% {
    /* translate3d obriga a GPU a assumir o trabalho, poupando a CPU (Processador) */
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-50% - 1rem), 0, 0);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .about__card {
    width: 280px;
    min-height: 400px;
  }
  .about__carousel {
    padding: 1rem 0.5rem; /* Ajusta o padding da moldura amarela no telemóvel */
  }
}

/* ========================================
   SPECS SECTION
   ======================================== */
/* 1. O Layout da Grelha (Grid) */
.specs__grid {
  display: flex; /* Mudamos de grid para flex */
  flex-wrap: wrap; /* Permite que os cards quebrem para a linha de baixo */
  justify-content: center; /* CENTRALIZA a última linha! */
  gap: 2rem;
  margin-top: 2rem;
}

/* 2. O Cartão de Especificação (Espelhando o design do About) */
.spec-card {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centraliza o texto horizontalmente */
  justify-content: center;
  text-align: center;

  background: var(--clr-bg-surface);

  /* A mesma "Racing Stripe" no topo e borda subtil */
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-top: 3px solid var(--clr-primary-dk);
  border-radius: 8px;

  padding: 2rem 1.5rem;

  /* Sombra base estática */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);

  /* Transição idêntica à da secção "Sobre" */
  transition:
    border-top-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  /* Diz ao cartão: Pode crescer, pode encolher, o tamanho base é 180px */
  flex: 1 1 180px;
  /* Evita que um cartão fique gigante se ficar sozinho na última linha */
  max-width: 250px;
}

/* Efeito Hover do Cartão de Especificação */
.spec-card:hover {
  border-top-color: var(--clr-primary-base);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* 3. Tipografia dos Dados Técnicos */

/* O Número Principal */
.spec-card__value {
  color: var(--clr-text-base);
  font-size: 3.5rem; /* Número bem grande para impacto */
  font-weight: 700;
  line-height: 1;

  /* Leve brilho amarelo para destacar a performance */
  text-shadow: 0 0 15px rgba(250, 204, 21, 0.15);
}

/* A Unidade de Medida (kg, kW, s) */
.spec-card__unit {
  color: var(--clr-primary-base); /* Usa a cor de destaque (Amarelo) */
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* O Rótulo (Massa Total, Potência, etc.) */
.spec-card__label {
  color: var(--clr-text-muted);
  font-size: 0.85rem;
  font-weight: 500;

  /* Estilo Tech idêntico ao título dos cartões anteriores */
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08); /* Linha divisória agora em cima do rótulo */
  padding-top: 0.75rem;
  width: 80%; /* Não deixa a linha encostar nas bordas do cartão */
}

/* ========================================
   TEAM SECTION
   ======================================== */
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  gap: var(--sp-lg);
}

.team__member {
  text-align: center;
}

.team__member-avatar {
  width: 10rem;
  height: 10rem;
  margin: 0 auto var(--sp-base);
  background: var(--clr-gray-600);
  border-radius: 50%;
  border: 0.2rem solid var(--clr-primary-dk);
}

.team__member-name {
  font-size: 8px;
  font-size: var(--fs-h5);
  margin-bottom: var(--sp-smlst);
}

.team__member-role {
  font-family: var(--ff-headings);
  font-size: var(--fs-base, 1.6rem);
  color: var(--clr-primary-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-smlst);
}

.team__member-desc {
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-text-muted);
}

/* ========================================
   TEAM SECTION - HERO NA HOME
   ======================================== */

.team__captain-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-2xl);
}

.team__captain-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 350px;
  padding: var(--sp-xl);
  background: var(--clr-bg-surface);
  border: 0.1rem solid var(--clr-gray-600);
  border-radius: var(--br-base);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.team__captain-card:hover {
  border-color: var(--clr-primary-dk);
  transform: translateY(-0.3rem);
}

.team__captain-avatar,
.team__captain-avatar-placeholder {
  width: 15rem;
  height: 15rem;
  margin-bottom: var(--sp-lg);
  border-radius: 50%;
  border: 0.3rem solid var(--clr-primary-base);
  object-fit: cover;
  background: var(--clr-gray-700);
}

.team__captain-name {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-smlst);
}

.team__captain-role {
  font-family: var(--ff-headings);
  font-size: var(--fs-base, 1.6rem);
  color: var(--clr-primary-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-smlst);
}

.team__captain-area {
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-text-muted);
}

.team__cta {
  display: flex;
  justify-content: center;
}

.team__placeholder {
  text-align: center;
  color: var(--clr-text-muted);
  font-size: var(--fs-base);
}

/* ========================================
   TEAM MEMBERS PAGE
   ======================================== */

.team__members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}

.team__member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-lg);
  cursor: pointer;
}

.team__member-card:hover {
  border-color: var(--clr-primary-base);
  transform: translateY(-0.2rem);
}

.team__member-card-avatar,
.team__member-card-placeholder {
  width: 12rem;
  height: 12rem;
  margin-bottom: var(--sp-base);
  border-radius: 50%;
  border: 0.2rem solid var(--clr-primary-dk);
  object-fit: cover;
  background: var(--clr-gray-600);
}

.team__member-card-name {
  font-size: var(--fs-h5);
  margin-bottom: var(--sp-smlst);
}

.team__member-card-area {
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-primary-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team__no-members {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--clr-text-muted);
  padding: var(--sp-2xl) 0;
}

/* Responsividade */
@media (max-width: 768px) {
  .team__captain-card {
    max-width: 90%;
    padding: var(--sp-lg);
  }

  .team__captain-avatar,
  .team__captain-avatar-placeholder {
    width: 12rem;
    height: 12rem;
  }

  .team__members-grid {
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: var(--sp-base);
  }

  .team__member-card-avatar,
  .team__member-card-placeholder {
    width: 10rem;
    height: 10rem;
  }
}

/* ========================================
   TEAM SECTION - PHOTO HERO
   ======================================== */
.team__photo-wrapper {
  position: relative;
  max-width: calc(var(--mw-grid) - 4rem);
  isolation: isolate;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team__photo-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--clr-gray-700);
}

.team__photo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team__photo-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(15, 15, 20, 0.92) 0%,
    rgba(15, 15, 20, 0.4) 50%,
    rgba(15, 15, 20, 0.6) 100%
  );
}

.team__photo-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-3xl) var(--sp-lg);
  min-height: 400px;
  width: 100%;
}

.team__photo-tagline {
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  color: var(--clr-primary-base);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-base);
}

.team__photo-title {
  font-family: var(--ff-headings);
  font-size: var(--fs-h2);
  color: var(--clr-text-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xl);
  max-width: 600px;
}

.team__photo-content .btn--filled {
  font-size: var(--fs-h6);
  padding: var(--sp-sm) var(--sp-xl);
}

@media (max-width: 768px) {
  .team__photo-wrapper {
    max-width: calc(100% - 2rem);
    min-height: 300px;
    border-radius: 8px;
  }

  .team__photo-content {
    min-height: 300px;
    padding: var(--sp-xl) var(--sp-base);
  }

  .team__photo-title {
    font-size: var(--fs-h3);
  }
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact__section {
  padding: var(--sp-3xl) 0;
  background: hsla(210, 10%, 8%);
  border-top: 0.1rem solid var(--clr-gray-700);
  border-bottom: 0.1rem solid var(--clr-gray-700);
}

.contact__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  gap: var(--sp-lg);
}

.contact__card-title {
  font-size: 10px;
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-sm);
}

.contact__card-text {
  font-size: var(--fs-base, 1.6rem);
  color: var(--clr-text-muted);
  line-height: var(--lh-regular);
  margin-bottom: var(--sp-lg);
}

/* ========================================
   SPONSORSHIP CAROUSEL
   ======================================== */
.sponsorship__carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;

  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.sponsorship__track {
  display: flex;
  gap: 2rem;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}

.sponsorship__track--left {
  animation: scroll-sponsors-left 40s linear infinite;
}

.sponsorship__track--right {
  animation: scroll-sponsors-right 40s linear infinite;
}

.sponsorship__carousel:hover .sponsorship__track {
  animation-play-state: paused;
}

.sponsorship__logo {
  flex-shrink: 0;
  width: 200px;
  height: 110px;
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-primary-base);
  border-radius: var(--br-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.sponsorship__logo:hover {
  transform: scale(1.08);
  border-color: var(--clr-primary-base);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
  z-index: 2;
  position: relative;
}

.sponsorship__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(30%);
  transition: filter 0.3s ease;
}

.sponsorship__logo:hover img {
  filter: grayscale(0%);
}

@keyframes scroll-sponsors-left {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-50% - 1rem), 0, 0);
  }
}

@keyframes scroll-sponsors-right {
  0% {
    transform: translate3d(calc(-50% - 1rem), 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 768px) {
  .sponsorship__logo {
    width: 150px;
    height: 80px;
    padding: 0.8rem;
  }

  .sponsorship__carousel {
    gap: 1.2rem;
    padding: 1rem 0;
  }

  .sponsorship__track {
    gap: 1.2rem;
  }
}

/* ========================================
   SPONSORSHIP GRID
   ======================================== */
.sponsorship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.6rem;
  align-items: center;
}

.sponsorship-grid__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-gray-700);
  border-radius: var(--br-base);
  padding: 1.2rem;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.sponsorship-grid__logo:hover {
  transform: scale(1.08);
  border-color: var(--clr-primary-base);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
  z-index: 2;
  position: relative;
}

.sponsorship-grid__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(30%);
  transition: filter 0.3s ease;
}

.sponsorship-grid__logo:hover img {
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .sponsorship-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }

  .sponsorship-grid__logo {
    height: 80px;
    padding: 0.8rem;
  }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  position: relative;
  padding: var(--sp-xl) 0;
  border-top: 0.1rem solid var(--clr-gray-700);
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60vh;
  background-image:
    linear-gradient(to top, transparent 30%, rgba(0, 0, 0, 0.85) 100%),
    url("../img/grafite_footer.png");
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-base);
}

.footer__logo {
  font-family: var(--ff-headings);
  font-size: var(--fs-h6, 2rem);
  color: var(--clr-text-base);
  letter-spacing: 0.1em;
}

.footer__copy {
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-text-muted);
  margin-top: var(--sp-smlst);
}

.footer__links {
  display: flex;
  gap: var(--sp-lg);
}

.footer__link {
  font-family: var(--ff-headings);
  font-size: var(--fs-sm, 1.4rem);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer__link:hover {
  color: var(--clr-primary-base);
}

/* ========================================
    ANNOUNCEMENTS (Quadro de Avisos - Racing)
    ======================================== */
:root {
  --ann-max-width: 120rem;
}

.announcements {
  width: 100%;
  max-width: var(--ann-max-width);
  margin: 0 auto;
  position: relative;
}

.announcements__header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-base);
}

.announcements__flag {
  width: 3rem;
  height: 2.4rem;
}

.announcements__flag svg {
  width: 100%;
  height: 100%;
}

.announcements__title {
  font-family: var(--ff-headings);
  font-size: var(--fs-h6);
  color: var(--clr-primary-base);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.announcements__deco {
  flex: 1;
  height: 0.1rem;
  background: linear-gradient(
    90deg,
    var(--clr-primary-base) 0%,
    transparent 100%
  );
  margin-left: var(--sp-base);
}

.announcements__track {
  position: relative;
  padding: var(--sp-lg) 0;
}

.announcements__chicane {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.announcements__line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0.15rem;
  background: repeating-linear-gradient(
    90deg,
    var(--clr-gray-600) 0px,
    var(--clr-gray-600) 2rem,
    transparent 2rem,
    transparent 2.5rem
  );
}

.announcements__line--top {
  top: 20%;
}

.announcements__line--bottom {
  bottom: 20%;
}

.announcements__card {
  background: linear-gradient(
    135deg,
    var(--clr-bg-surface) 0%,
    var(--clr-bg-base) 100%
  );
  border: 0.15rem solid var(--clr-gray-600);
  border-radius: var(--br-base);
  padding: var(--sp-lg);
  position: relative;
  overflow: hidden;
  height: 40rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcements__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.3rem;
  background: repeating-linear-gradient(
    90deg,
    var(--clr-primary-base) 0px,
    var(--clr-primary-base) 1rem,
    var(--clr-bg-surface) 1rem,
    var(--clr-bg-surface) 2rem
  );
}

.announcements__card::after {
  content: "E-CACTUS";
  position: absolute;
  bottom: var(--sp-smlst);
  right: var(--sp-base);
  font-family: var(--ff-mono);
  font-size: 1.2rem;
  color: var(--clr-gray-500);
  letter-spacing: 0.2em;
}

.announcements__slides {
  position: relative;
  min-height: 8rem;
  margin-left: 5rem;
  margin-bottom: 2.5rem;
}

.announcements__slide {
  display: none;
  animation: slideIn 0.4s ease;
}

.announcements__slide--active {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-base);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(2rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.announcements__icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-bg-base);
  border: 0.15rem solid var(--clr-primary-dk);
  border-radius: var(--br-lg);
}

.announcements__icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--clr-primary-base);
}

.announcements__info {
  flex: 1;
}

.announcements__message {
  font-size: var(--fs-h6);
  color: var(--clr-text-base);
  line-height: var(--lh-regular);
  margin-bottom: var(--sp-sm);
}

.announcements__date {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-micro);
  font-family: var(--ff-mono);
  font-size: var(--fs-sm);
  color: var(--clr-primary-base);
}

.announcements__date svg {
  flex-shrink: 0;
}

.announcements__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  margin-top: var(--sp-base);
  margin-bottom: var(--sp-base);
}

.announcements__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  background: var(--clr-bg-surface);
  border: 0.15rem solid var(--clr-gray-500);
  border-radius: var(--br-lg);
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.announcements__btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--clr-primary-base),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.announcements__btn:hover {
  border-color: var(--clr-primary-base);
  color: var(--clr-primary-base);
  transform: scale(1.05);
}

.announcements__btn:hover::before {
  left: 100%;
  opacity: 0.3;
}

.announcements__btn svg {
  width: 2rem;
  height: 2rem;
}

.announcements__indicators {
  display: flex;
  gap: var(--sp-sm);
}

.announcements__dot {
  width: 1.6rem;
  height: 1.6rem;
  background: transparent;
  border: 0.15rem solid var(--clr-gray-500);
  border-radius: var(--br-base);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcements__dot-inner {
  width: 0;
  height: 0;
  background: var(--clr-primary-base);
  border-radius: var(--br-none);
  transition: all 0.2s ease;
}

.announcements__dot:hover {
  border-color: var(--clr-primary-dk);
}

.announcements__dot--active {
  border-color: var(--clr-primary-base);
}

.announcements__dot--active .announcements__dot-inner {
  width: 100%;
  height: 100%;
}

.announcements__lap-counter {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  font-family: var(--ff-mono);
  padding: var(--sp-smlst) var(--sp-sm);
  background: var(--clr-bg-surface);
  border: 0.1rem solid var(--clr-gray-600);
  border-radius: var(--br-base);
}

.announcements__lap-label {
  font-size: var(--fs-sm);
  color: var(--clr-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.announcements__lap-current {
  font-size: var(--fs-h6);
  color: var(--clr-primary-base);
  line-height: 1;
}

.announcements__lap-separator {
  color: var(--clr-gray-500);
}

.announcements__lap-total {
  font-size: var(--fs-base);
  color: var(--clr-gray-400);
}

@media (max-width: 768px) {
  .announcements__header {
    justify-content: center;
  }

  .announcements__deco {
    display: none;
  }

  .announcements__card {
    padding: var(--sp-base);
  }

  .announcements__slides {
    margin-left: 0;
    min-height: 6rem;
  }

  .announcements__slide--active {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .announcements__icon {
    width: 3.5rem;
    height: 3.5rem;
  }

  .announcements__icon svg {
    width: 1.6rem;
    height: 1.6rem;
  }

  .announcements__controls {
    gap: var(--sp-base);
  }

  .announcements__btn {
    width: 4rem;
    height: 4rem;
  }

  .announcements__lap-counter {
    position: relative;
    margin-top: var(--sp-base);
  }
}

/* ========================================
    CUSTOM CURSOR
    ======================================== */
html {
  cursor: none;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor__dot,
.cursor__ring {
  pointer-events: none; /* Impede que o próprio cursor bloqueie os cliques/hovers do mouse */
  will-change: transform; /* Avisa a placa de vídeo antecipadamente que este elemento vai se mover */
}

.cursor__dot {
  position: absolute;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--clr-primary-base);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s ease,
    height 0.2s ease,
    background 0.2s ease;
}

.cursor__ring {
  position: absolute;
  width: 4rem;
  height: 4rem;
  border: 0.2rem solid var(--clr-primary-base);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.cursor--hover .cursor__dot {
  width: 1.2rem;
  height: 1.2rem;
  background: var(--clr-primary-lt);
}

.cursor--hover .cursor__ring {
  width: 5rem;
  height: 5rem;
  border-color: var(--clr-primary-lt);
}

.cursor--click .cursor__dot {
  width: 0.5rem;
  height: 0.5rem;
}

.cursor--click .cursor__ring {
  width: 3rem;
  height: 3rem;
}

.cursor--text .cursor__dot {
  width: 0.4rem;
  height: 1.6rem;
  border-radius: var(--br-base);
  background: var(--clr-primary-lt);
}

.cursor--text .cursor__ring {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .cursor {
    display: none;
  }

  html {
    cursor: auto;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .header__inner {
    flex-direction: column;
    gap: var(--sp-base);
  }

  .header__nav {
    gap: var(--sp-base);
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--sp-base);
  }

  .hero__actions {
    flex-direction: column;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* O contêiner pai de tudo DEVE ter position relative */
.announcements__card {
  position: relative;
}

/* O contêiner do carro */
.announcements__car {
  position: absolute;
  bottom: 0px; /* Ajuste esse valor (ex: -20px ou 10px) para alinhar com a sua linha amarela tracejada */
  left: var(--pos, 50%); /* Posição inicial */
  transform: translateX(
    -50%
  ); /* Centraliza o eixo do carro exatamento no ponto do 'left' */
  /* Garante que fique por cima de tudo */
  transition: left 0.5s ease-in-out; /* ISSO cria o efeito de deslizar! */
  width: 80px;
  will-change: left;
}

/* A imagem em si */
.car-icon-png {
  margin-bottom: 18px;
  width: 100%; /* A imagem vai seguir o tamanho da div pai (80px) */
  min-width: 60px;
  height: auto;
  display: block;
  pointer-events: none;
}

/* Countdown */
.countdown {
  margin-top: var(--sp-sm);
  margin-bottom: var(--sp-base);
  padding: var(--sp-2xl) 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.countdown__container {
  text-align: center;
}

.countdown__title {
  color: var(--clr-primary-base); /* A sua cor de destaque (amarelo) */
  margin-bottom: var(--sp-xl);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 400;
}

.countdown__timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-md); /* Espaço entre as caixas */
}

.countdown__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03); /* Fundo levemente translúcido */
  border: 1px solid var(--clr-gray-700);
  border-radius: 8px;
  min-width: 90px;
  padding: var(--sp-lg) var(--sp-md);
  backdrop-filter: blur(4px); /* Efeito de vidro moderno */
}

.countdown__value {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: monospace; /* Fonte monoespaçada fica ótimo em contadores */
  color: #ffffff;
  line-height: 1;
}

.countdown__label {
  font-size: 0.75rem;
  color: var(--clr-gray-400); /* Usa sua variável de cinza */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.countdown__separator {
  font-size: 2rem;
  font-weight: bold;
  color: var(--clr-primary-base);
  margin-bottom: 1.5rem; /* Levanta os dois pontos para alinhar com os números grandes */
}

/* Responsividade: Diminui o tamanho em celulares */
@media (max-width: 600px) {
  .countdown__timer {
    gap: var(--sp-xs);
  }
  .countdown__block {
    min-width: 65px;
    padding: var(--sp-md) var(--sp-sm);
  }
  .countdown__value {
    font-size: 1.75rem;
  }
  .countdown__title {
    font-size: 1rem;
  }
}
