/* ========================================
   GUSTAVO BILEK — PORTFOLIO
   Styles
   ======================================== */

/* --- Custom Properties --- */
:root {
  --bg-main: #0B0B0C;
  --bg-secondary: #0A192F;
  --accent: #7928CA;
  --accent-light: #9945FF;
  --accent-glow: rgba(121, 40, 202, 0.35);
  --text-primary: #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted: #64748B;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --section-py: clamp(5rem, 10vw, 9rem);
  --container: min(90%, 1200px);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-family: var(--font-body), sans-serif;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--text-primary); line-height: 1.15; }
h1 {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 500;
}
p { text-wrap: pretty; }

/* --- Layout --- */
.container { width: var(--container); margin: 0 auto; }
.section { padding: var(--section-py) 0; }

/* --- CTA Button --- */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 6px;
  transition: box-shadow 0.35s, transform 0.25s;
}
.cta-btn:hover {
  box-shadow: 0 0 28px var(--accent-glow), 0 0 60px rgba(121,40,202,0.15);
  transform: translateY(-2px);
}
.cta-btn:active { transform: translateY(0); }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 0;
  transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(11,11,12,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.8rem 0;
  box-shadow: 0 1px 20px rgba(0,0,0,0.4);
}
.nav-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display), sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--accent-light); }
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text-primary); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  padding: 4px 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(121,40,202,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 820px;
  padding: 0 1.5rem;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .sep { color: var(--accent-light); padding: 0 0.15em; }
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.75;
}
.hero .cta-btn { font-size: 1.05rem; }

/* ========================================
   TIMELINE
   ======================================== */
.timeline-section { background: var(--bg-main); }
.timeline-section h2 { text-align: center; margin-bottom: 3.5rem; }

/* Navigation row */
.tl-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  margin-bottom: 3rem;
}
.tl-nav::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateY(-50%);
}
.tl-node-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 220px;
  padding: 0.5rem;
  z-index: 1;
  transition: opacity 0.3s;
  opacity: 0.5;
}
.tl-node-btn.active { opacity: 1; }
.tl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--accent);
  transition: background 0.3s, box-shadow 0.3s;
}
.tl-node-btn.active .tl-dot {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.tl-year {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-light);
}
.tl-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}
.tl-node-btn.active .tl-label { color: var(--text-primary); }

/* Content panels */
.tl-panels { position: relative; min-height: 180px; }
.tl-panel {
  display: none;
  animation: fadeSlideUp 0.45s ease-out;
}
.tl-panel.active { display: block; }
.tl-panel-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.tl-panel-inner h3 {
  margin-bottom: 1rem;
  color: var(--accent-light);
  font-size: 1.15rem;
}
.tl-panel-inner p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}
.tl-panel-inner p + p { margin-top: 1rem; }

/* ========================================
   GALLERY
   ======================================== */
.gallery-section { background: var(--bg-main); }
.gallery-section h2 { text-align: center; margin-bottom: 2.5rem; }

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 11, 12, 0.95); /* Usa o tom escuro do seu projeto */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.lightbox.active .lightbox-content {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--text-secondary);
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
  padding: 10px;
  line-height: 1;
  z-index: 1001;
}
.lightbox-close:hover {
  color: var(--accent-light);
  transform: scale(1.1);
}

/* Alterar o cursor na galeria para indicar que é clicável */
.gallery-card img {
  cursor: pointer;
}

/* Tabs */
.gallery-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}
.gallery-tab {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  transition: all 0.3s;
}
.gallery-tab:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.15); }
.gallery-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Tab content */
.gallery-content { position: relative; }
.gallery-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}
.gallery-pane.active { display: block; }

.gallery-sub-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}
.gallery-sub-label + .gallery-sub-label { margin-top: 2.5rem; }

/* Grids */
.gallery-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.gallery-grid.reels { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gallery-grid.photos { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery-grid.video { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Placeholder card */
.gallery-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(121,40,202,0.06), rgba(10,25,47,0.5));
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.35s, border-color 0.35s;
}
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(121,40,202,0.25);
}
.gallery-card.ratio-9-16 { aspect-ratio: 9/16; }
.gallery-card.ratio-4-5 { aspect-ratio: 4/5; }
.gallery-card.ratio-16-9 { aspect-ratio: 16/9; }
.gallery-card.ratio-3-2 { aspect-ratio: 3/2; }

.gallery-card-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 0.75rem;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(255,255,255,0.015) 8px,
      rgba(255,255,255,0.015) 9px
    );
}
.gallery-card-icon {
  width: 32px;
  height: 32px;
  opacity: 0.25;
}
.gallery-card-label {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.6;
}

/* ========================================
   METRICS
   ======================================== */
.metrics-section {
  background: var(--bg-secondary);
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.metric-value {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.metric-value .accent-num { color: var(--accent-light); }
.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ========================================
   QUOTE
   ======================================== */
.quote-section {
  background: #000;
  padding: var(--section-py) 0;
  text-align: center;
}
.quote-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 0 2rem;
}
.quote-mark {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(4rem, 8vw, 7rem);
  color: var(--accent);
  line-height: 1;
  opacity: 0.4;
  user-select: none;
  display: block;
}
.quote-mark.open { margin-bottom: -1.5rem; }
.quote-mark.close { margin-top: -1rem; }
.quote-text {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.75;
}
.quote-author {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.04em;
}

/* ========================================
   SERVICES
   ======================================== */
.services-section { background: var(--bg-main); }
.services-section h2 { text-align: center; margin-bottom: 3rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(121,40,202,0.15);
  border-radius: 10px;
  padding: 2.5rem 2rem;
  transition: border-color 0.3s, transform 0.3s;
}
.service-card:hover {
  border-color: rgba(121,40,202,0.4);
  transform: translateY(-4px);
}
.service-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(121,40,202,0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.service-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-main);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: clamp(4rem, 8vw, 7rem) 0 2.5rem;
  text-align: center;
}
.footer h2 {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  font-weight: 300;
  margin-bottom: 2rem;
}
.footer .cta-btn {
  font-size: 1.1rem;
  padding: 1.1rem 2.8rem;
  margin-bottom: 2.5rem;
}
.footer .cta-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.social-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  transition: color 0.3s, border-color 0.3s;
}
.social-links a:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}
.social-links a svg { width: 20px; height: 20px; }
.copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ========================================
   SCROLL REVEAL
   ======================================== */
/* Hidden state only applied when JS+IO confirmed working */
.io-ready .reveal {
  opacity: 0;
  transform: translateY(30px);
}
.io-ready .reveal.revealed {
  opacity: 1;
  transform: none;
  transition: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========================================
   KEYFRAMES
   ======================================== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(11,11,12,0.97);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    gap: 1.2rem;
    text-align: center;
  }
  .nav-toggle { display: flex; }

  .tl-nav { flex-direction: column; gap: 0; align-items: stretch; }
  .tl-nav::before {
    left: 28px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    transform: none;
  }
  .tl-node-btn {
    flex-direction: row;
    max-width: none;
    gap: 1rem;
    padding: 0.8rem 0 0.8rem 0;
    align-items: center;
    text-align: left;
  }
  .tl-dot { flex-shrink: 0; margin-left: 19px; }
  .tl-year { font-size: 0.75rem; }
  .tl-label { text-align: left; }
  .tl-panel-inner { text-align: left; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid.reels { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
  .gallery-tabs { gap: 0.35rem; }
  .gallery-tab { padding: 0.5rem 1rem; font-size: 0.78rem; }
  .gallery-grid.reels { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.photos { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid.video { grid-template-columns: 1fr; }
}
