/* ============================================================
   Frederico — Atleta de Taekwondo
   Estilos: HTML5 + CSS puro (variáveis CSS)
   Para trocar a cor do clube: edita --accent (e --accent-deep).
   ============================================================ */

/* ---------- Tokens / variáveis ---------- */
:root {
  /* Cores (fáceis de trocar) */
  --bg: #0B0B0D;            /* fundo quase preto */
  --bg-elev: #141417;       /* painéis elevados */
  --text: #FFFFFF;
  --muted: #A1A1AA;
  --accent: #E11D2A;        /* vermelho — TODO: trocar pela cor real do Triângulo Taekwondo */
  --accent-deep: #9E0E18;   /* variante escura para gradientes */
  --line: rgba(255, 255, 255, 0.08);

  /* Tipografia */
  --font-display: "Anton", Impact, sans-serif;
  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 72px;
  --radius: 4px;
}

/* ---------- Reset base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

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

.skip-link {
  position: absolute;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Utilidades ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4rem, 10vw, 8rem);
  position: relative;
}
.section[tabindex="-1"] { outline: none; }
.section + .section { border-top: 1px solid var(--line); }

/* Eyebrow com tique diagonal vermelho (motivo-assinatura) */
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
  transform: skewX(-24deg);
}
.eyebrow--light { color: rgba(255, 255, 255, 0.85); }
.eyebrow--center { justify-content: center; }

.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.lead { font-size: 1.125rem; color: #ececee; }
.about-body p + p { margin-top: 1rem; }
.about-body p { color: var(--muted); }
.about-body .lead { color: #ececee; }

/* ---------- Botões ---------- */
.btn {
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, color 0.18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--accent);
}
.btn--accent:hover { background: #f0303c; }

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn--ig {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--line);
}
.btn--ig:hover { background: rgba(255, 255, 255, 0.12); }

.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

.ico { flex: none; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease,
              backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.logo-dot { color: var(--accent); }
.logo-mark {
  width: 20px;
  height: 20px;
  flex: none;
  background: var(--accent);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; align-items: center; gap: 1.75rem; }
.nav-list a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  padding-block: 0.25rem;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.22s ease;
}
.nav-list a:hover { color: #fff; }
.nav-list a:hover::after { width: 100%; }

/* Botão hambúrguer (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  /* o fundo preto do hero funde com o fundo preto da foto */
  background: #000;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* foto retrato com fundo preto: mantém o rosto à direita e acima do centro */
  object-position: 70% 22%;
  background: #000;
  z-index: -2;
}
/* Em ecrãs largos, a foto fica em tamanho natural ancorada à direita
   (o fundo preto da foto funde com o do hero) */
@media (min-width: 900px) {
  .hero-img {
    left: auto;
    width: auto;
    max-width: 62%;
    object-fit: contain;
    object-position: right bottom;
  }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0.15) 35%, rgba(11,11,13,0.95) 100%),
    linear-gradient(75deg, rgba(11,11,13,0.85) 0%, rgba(11,11,13,0.2) 55%, rgba(11,11,13,0) 80%);
}
/* Marca de água 태권도 (assinatura) */
.hero-watermark {
  position: absolute;
  right: -0.08em;
  top: 46%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 20rem);
  line-height: 0.8;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: -0.02em;
  z-index: -1;
  pointer-events: none;
  white-space: nowrap;
}

.hero-content {
  padding-bottom: clamp(4.5rem, 12vh, 8rem);
  padding-top: calc(var(--header-h) + 2rem);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.01em;
  font-size: clamp(4rem, 17vw, 12rem);
  margin-block: 0.5rem 0.25rem;
}
.hero-subtitle {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #fff;
  position: relative;
  padding-left: 1.1rem;
}
.hero-subtitle::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) skewX(-24deg);
  width: 5px; height: 1.2em;
  background: var(--accent);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}
.hero-scroll-arrow {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--accent), transparent);
  position: relative;
  animation: scrollpulse 1.8s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   SOBRE
   ============================================================ */
.about-grid {
  display: grid;
  gap: clamp(2rem, 6vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
.about-media {
  position: relative;
}
.about-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.about-media::before {
  content: "";
  position: absolute;
  left: -12px; bottom: -12px;
  width: 60%; height: 6px;
  background: var(--accent);
  transform: skewX(-24deg);
}

/* Mini-ficha */
.ficha {
  margin-top: 2.25rem;
  border-top: 1px solid var(--line);
}
.ficha-row {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.ficha dt {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--muted);
  align-self: center;
}
.ficha dd {
  font-weight: 500;
  font-size: 1.05rem;
}

/* ============================================================
   PALMARÈS (timeline)
   ============================================================ */
.timeline {
  border-top: 1px solid var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr;
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: baseline;
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background-color 0.25s ease;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}
.timeline-item:hover { background: rgba(255,255,255,0.02); }
.timeline-item:hover::before { transform: scaleY(1); }
.timeline-year {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1;
  color: var(--accent);
}
.timeline-comp {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}
.timeline-result { color: var(--muted); font-size: 1rem; margin-top: 0.15rem; }

/* ============================================================
   GALERIA
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.5rem, 2vw, 1rem);
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.4s ease;
  filter: grayscale(0.15);
}
.gallery-item:hover img { transform: scale(1.06); filter: grayscale(0); }

/* ============================================================
   CTA / INSTAGRAM
   ============================================================ */
.cta {
  background:
    radial-gradient(120% 120% at 50% -10%, rgba(225,29,42,0.16), transparent 55%),
    var(--bg-elev);
  text-align: center;
}
.cta-inner { max-width: 720px; margin-inline: auto; }
.cta-handle {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: none;
  font-size: clamp(2.5rem, 9vw, 5rem);
  line-height: 1;
  margin-block: 0.5rem 1rem;
  transition: color 0.2s ease;
}
.cta-handle:hover { color: var(--accent); }
.cta-text { color: var(--muted); margin-bottom: 2rem; }
.cta-email { margin-top: 1.75rem; color: var(--muted); font-size: 0.95rem; }
.cta-email a { color: #fff; border-bottom: 1px solid var(--accent); }
.cta-email a:hover { color: var(--accent); }

/* ============================================================
   RODAPÉ
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-social a {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); }
.footer-legal { color: var(--muted); font-size: 0.85rem; line-height: 1.7; text-align: right; }
.footer-legal a { color: #fff; }
.footer-legal a:hover { color: var(--accent); }

/* ============================================================
   REVEAL (IntersectionObserver)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 0.9fr 1.1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
  .about-grid { grid-template-columns: 1fr 1.15fr; gap: 4.5rem; }
}

/* Menu mobile */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: calc(var(--header-h) + 1.5rem) 1.75rem 2rem;
    background: var(--bg-elev);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 0 60px -20px rgba(0,0,0,0.7);
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
  }
  .nav-list a::after { display: none; }
  .nav-ig { margin-top: 1.5rem; }

  /* Ícone hambúrguer -> X */
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Backdrop */
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
  }
}

@media (max-width: 520px) {
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-legal { text-align: left; }
  .hero-scroll { display: none; }
}

/* ============================================================
   Movimento reduzido (acessibilidade)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Aviso de cookies (decorativo) ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.cookie-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cookie-actions .btn { padding: 0.55rem 1.1rem; }

@media (min-width: 700px) {
  .cookie-banner {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    max-width: 380px;
  }
}
