/* ============================================================
   TORRENTIA — styles.css
   Premium dark/gold design system, shared across every page.
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

/* ---- CUSTOM PROPERTIES ------------------------------------- */
:root {
  --c-bg:          #0c0d0e;
  --c-bg-2:        #111315;
  --c-bg-3:        #161a1d;
  --c-surface:     rgba(255,255,255,0.04);
  --c-border:      rgba(255,255,255,0.08);
  --c-border-hi:   rgba(255,255,255,0.15);

  --c-text:        #f0ede8;
  --c-text-2:      #a09b93;
  --c-text-3:      #6b6560;

  --c-accent:      #c8a96e;
  --c-accent-2:    #9e7f4a;
  --c-accent-glow: rgba(200,169,110,0.18);

  --c-whatsapp:    #25d366;
  --c-whatsapp-glow: rgba(37,211,102,0.25);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  --max-w: 1200px;
  --nav-h: 72px;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-mid: 350ms;
  --t-slow: 650ms;
}

/* ---- RESET / BASE -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; }

#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.container, .page {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

main { position: relative; z-index: 1; }

/* ---- TYPE PRIMITIVES ------------------------------------------ */
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--c-text);
  margin-bottom: 1.75rem;
  text-align: center;
}
.section-title em { font-style: italic; font-weight: 300; color: var(--c-accent); }
.body-text {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--c-text-2);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  max-width: 58ch;
}

/* ---- BUTTONS -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), background var(--t-fast) var(--ease);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 0.9rem 2rem;
  font-size: 0.95rem;
  border: none;
}
.btn::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.btn:hover::after { opacity: 0.07; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary, .btn--primary {
  background: var(--c-accent);
  color: var(--c-bg);
  font-weight: 600;
  box-shadow: 0 0 0 0 var(--c-accent-glow);
}
.btn-primary:hover, .btn--primary:hover { background: #d4b67e; box-shadow: 0 8px 30px var(--c-accent-glow); text-decoration: none; }

.btn--whatsapp {
  background: var(--c-whatsapp);
  color: #0a2e1a;
  font-weight: 600;
}
.btn--whatsapp:hover { background: #2de070; box-shadow: 0 8px 30px var(--c-whatsapp-glow); }

.btn--ghost { background: transparent; color: var(--c-text); border: 1px solid var(--c-border-hi); }
.btn--ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }

.btn--sm { padding: 0.5rem 1.1rem; font-size: 0.8rem; }

/* ---- NAV -------------------------------------------------------- */
.site-header.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), backdrop-filter var(--t-mid) var(--ease);
}
.nav-wrapper.scrolled {
  background: rgba(12,13,14,0.72);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 1px 0 var(--c-border);
}
.nav-inner {
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.6rem; }
.nav-logo img { height: 28px; width: auto; }
.nav-logo__text { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: 0.04em; color: var(--c-text); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-link { font-size: 0.82rem; font-weight: 400; letter-spacing: 0.06em; color: var(--c-text-2); padding: 0.5rem 0.75rem; border-radius: 3px; transition: color var(--t-fast) var(--ease); }
.nav-link:hover { color: var(--c-text); text-decoration: none; }
.nav-link.is-active { color: var(--c-accent); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--c-text); border-radius: 2px; transition: transform var(--t-mid) var(--ease), opacity var(--t-fast) var(--ease); }
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-hamburger { display: flex; z-index: 10; }
  .nav-links {
    position: fixed; top: 0; right: 0;
    width: min(300px, 80vw); height: 100svh;
    background: rgba(12,13,14,0.97);
    backdrop-filter: blur(24px);
    flex-direction: column; align-items: stretch; justify-content: center; gap: 0;
    padding: var(--nav-h) 2rem 2rem;
    transform: translateX(110%);
    transition: transform var(--t-mid) var(--ease-out);
    border-left: 1px solid var(--c-border);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { padding: 1rem 0; font-size: 1rem; border-bottom: 1px solid var(--c-border); letter-spacing: 0.1em; }
}

/* ---- HERO (photo-carousel homepage hero) ------------------------ */
.hero-wrap { position: relative; z-index: 1; }
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: var(--h, 78vh);
  padding-top: var(--nav-h);
}
@media (min-width: 1024px) { .hero { max-height: 780px; } }
.hero .track { position: relative; height: 100%; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--fade, 700ms) ease; }
.hero .slide.active { opacity: 1; }
.hero .slide .bg { position: absolute; inset: 0; background: center / cover no-repeat var(--img); filter: blur(18px) brightness(0.6); transform: scale(1.06); z-index: 0; }
.hero .slide .fg { position: absolute; inset: 0; background: center / contain no-repeat var(--img); z-index: 1; }
.hero .overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(160deg, rgba(12,13,14,0.88) 0%, rgba(12,13,14,0.55) 45%, rgba(12,13,14,0.92) 100%);
}
.hero .content { position: relative; z-index: 3; height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 2rem clamp(1.25rem, 5vw, 3rem); display: grid; place-items: center; text-align: center; }
.hero .eyebrow { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 1.25rem; }
.hero .title { font-family: var(--font-display); font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; line-height: 0.98; color: var(--c-text); }
.hero .title em { font-style: italic; font-weight: 300; color: var(--c-accent); }
.hero .subtitle { margin-top: 1rem; font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-style: italic; color: var(--c-text-2); max-width: 46ch; }

.hero .dots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 3; }
.hero .dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.5); cursor: pointer; padding: 0; }
.hero .dot.active { background: var(--c-accent); border-color: var(--c-accent); }
.hero .dot:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.hero .arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,0.06); border: 1px solid var(--c-border); color: var(--c-text); transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.hero .arrow:hover { background: rgba(255,255,255,0.12); border-color: var(--c-accent); }
.hero .arrow:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.hero .arrow--prev { left: 16px; }
.hero .arrow--next { right: 16px; }

@media (prefers-reduced-motion: reduce) { .hero .slide { transition: none; } }

/* ---- SECTION DIVIDER --------------------------------------- */
.section-divider { display: flex; justify-content: center; }
.divider-line {
  display: block; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--c-border-hi) 35%, var(--c-accent) 50%, var(--c-border-hi) 65%, transparent 100%);
  opacity: 0.4; transform: scaleX(0); transition: transform 1.2s var(--ease-out);
}
.divider-line.visible { transform: scaleX(1); }

/* ---- GENERIC CONTENT SECTIONS ------------------------------- */
.intro { padding-block: var(--space-lg); text-align: center; position: relative; z-index: 1; }
.intro h1, .intro h2 { font-family: var(--font-display); }
.intro h3 { font-family: var(--font-display); font-weight: 300; font-style: italic; color: var(--c-text-2); margin-top: 0.4rem; }
.intro p { max-width: 62ch; margin-inline: auto; color: var(--c-text-2); }
.content-section { padding-block: var(--space-lg); position: relative; z-index: 1; }

/* ---- PAST-EVENT CARD GRID ------------------------------------ */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5px;
  margin-top: var(--space-md);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
}
.card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--c-surface);
  text-decoration: none;
  color: var(--c-text);
  transition: background var(--t-mid) var(--ease);
}
.card:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.card img { width: 100%; height: 200px; object-fit: cover; filter: saturate(0.85) brightness(0.85); transition: filter var(--t-mid) var(--ease); }
.card:hover img { filter: saturate(1) brightness(1); }
.card .pad { padding: 1.25rem 1.5rem; }
.card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.3rem; }
.card .meta { color: var(--c-text-3); font-size: 0.85rem; letter-spacing: 0.04em; }

/* ---- EVENT DETAIL PAGE ------------------------------------- */
.event-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 4px; border: 1px solid var(--c-border); filter: saturate(0.9); }
.event-title { text-align: center; margin: 1.5rem 0 0.5rem; font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; color: var(--c-text); }
.event-meta { text-align: center; margin: 0; font-size: 1rem; color: var(--c-text-2); letter-spacing: 0.04em; }
.event-venue { text-align: center; margin-top: 0.35rem; font-size: 0.85rem; color: var(--c-text-3); }

.speaker-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1rem; margin-top: 1.5rem; }
.speaker-chip { border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-2); font-size: 0.85rem; padding: 0.4rem 0.9rem; border-radius: 999px; letter-spacing: 0.03em; }
.speaker-chip::before { content: '\2726'; color: var(--c-accent); margin-right: 0.4rem; font-size: 0.7rem; }

/* ---- GALLERY GRID + LIGHTBOX --------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid .thumb { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; border: 1px solid var(--c-border); cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease; filter: saturate(0.9) brightness(0.92); }
.gallery-grid .thumb:hover { transform: scale(1.03); filter: saturate(1) brightness(1); }

dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: none; }
dialog#lightbox::backdrop { background: rgba(0,0,0,0.9); }
#lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: 4px; display: block; }
#lb-close { position: fixed; top: 14px; right: 18px; width: 36px; height: 36px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--c-border); color: var(--c-text); font-size: 22px; line-height: 34px; cursor: pointer; }

/* ---- VIDEO LIST ----------------------------------------------- */
.video-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.video-item .video-frame { position: relative; padding-top: 56.25%; border-radius: 4px; overflow: hidden; background: #000; border: 1px solid var(--c-border); }
.video-item iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-item .video-title { margin-top: 0.6rem; font-size: 0.9rem; color: var(--c-text-2); }

/* ---- FOOTER ----------------------------------------------------- */
.site-footer.footer { border-top: 1px solid var(--c-border); padding-top: var(--space-lg); padding-bottom: var(--space-md); position: relative; z-index: 1; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 2rem; padding-bottom: var(--space-md); border-bottom: 1px solid var(--c-border); max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }
.footer__brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__brand-tagline { font-family: var(--font-display); font-size: 0.85rem; font-style: italic; color: var(--c-text-3); }
.footer__links { display: flex; flex-direction: column; gap: 0.6rem; text-align: center; }
.footer__link { font-size: 0.8rem; color: var(--c-text-3); letter-spacing: 0.06em; transition: color var(--t-fast) var(--ease); }
.footer__link:hover { color: var(--c-accent); text-decoration: none; }
.footer__social { display: flex; gap: 1rem; justify-content: flex-end; align-items: center; }
.footer__social-link { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--c-border); display: flex; align-items: center; justify-content: center; color: var(--c-text-3); font-size: 1rem; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-mid) var(--ease-out); }
.footer__social-link:hover { color: var(--c-accent); border-color: var(--c-accent); transform: translateY(-2px); }
.footer__bottom { padding-top: var(--space-md); font-size: 0.75rem; color: var(--c-text-3); text-align: center; letter-spacing: 0.04em; max-width: var(--max-w); margin-inline: auto; }

@media (max-width: 640px) {
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__brand { align-items: center; }
  .footer__links { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .footer__social { justify-content: center; }
}

/* ---- JOIN PAGE FORM -------------------------------------------- */
.form-embed { border-radius: 6px; overflow: hidden; border: 1px solid var(--c-border); background: var(--c-surface); }
.form-embed iframe { width: 100%; height: 900px; border: 0; display: block; }

/* ---- SCROLL REVEAL ---------------------------------------------- */
.fade-up { opacity: 0; transform: translateY(32px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
[data-delay="0"] { transition-delay: 0ms; }
[data-delay="1"] { transition-delay: 120ms; }
[data-delay="2"] { transition-delay: 240ms; }
[data-delay="3"] { transition-delay: 360ms; }
[data-delay="4"] { transition-delay: 480ms; }
[data-delay="5"] { transition-delay: 620ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .fade-up, .reveal { opacity: 1; transform: none; }
}

/* ---- ABOUT PAGE STATS ------------------------------------------- */
.stats-row { display: flex; gap: 2rem; justify-content: center; padding-top: 1.75rem; border-top: 1px solid var(--c-border); margin-top: 2rem; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; gap: 0.2rem; align-items: center; }
.stat-num { font-family: var(--font-display); font-size: 2.8rem; font-weight: 600; color: var(--c-accent); line-height: 1; }
.stat-desc { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-text-3); }

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