/* =========================================================
   Big Data Brazil Experience · Farewell Site
   "Sempre será sobre pessoas, acima de tudo."
   ========================================================= */

:root {
  --bg-0: #07050b;
  --bg-1: #0b0712;
  --bg-2: #110820;
  --ink: #f4eefb;
  --ink-soft: #cbb9e0;
  --ink-dim: #8a7aa1;
  --line: rgba(244, 238, 251, 0.08);

  --magenta: #ff3aa6;
  --violet: #8a3cff;
  --purple-deep: #3a0c6e;
  --pink-warm: #ff6fb3;

  --grad-1: linear-gradient(135deg, var(--violet) 0%, var(--magenta) 60%, var(--pink-warm) 100%);
  --grad-2: linear-gradient(120deg, #b14bff 0%, #ff4dc1 100%);
  --grad-text: linear-gradient(120deg, #d6b4ff 0%, #ff77c0 55%, #ffb37a 100%);

  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg-0);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; font-family: var(--serif); }

::selection { background: var(--magenta); color: #fff; }

/* ---------- background waves canvas ---------- */
#bg-waves {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(0px);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.4; mix-blend-mode: overlay;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(138, 60, 255, 0.28), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(255, 58, 166, 0.22), transparent 60%),
    var(--bg-0);
}

/* ---------- reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  background: linear-gradient(to bottom, rgba(7,5,11,0.85), rgba(7,5,11,0.4));
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: baseline; gap: 12px;
  color: var(--ink); font-weight: 700; letter-spacing: 0.02em;
  position: relative;
  padding-left: 14px;
}
.brand::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad-2);
  box-shadow: 0 0 14px rgba(255, 58, 166, 0.7);
  transform: translateY(-50%);
}
.brand__hash {
  font-size: 16px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.brand__years {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}
@media (max-width: 520px) {
  .brand__years { display: none; }
}
.site-nav {
  display: flex; gap: clamp(14px, 2.2vw, 28px);
  font-size: 14px; font-weight: 500;
}
.site-nav a {
  position: relative; padding: 4px 2px;
  color: var(--ink-soft);
  transition: color .25s ease;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--grad-2);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 160px var(--gutter) 100px;
  display: flex; flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 30%, rgba(138, 60, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.hero__eyebrow {
  font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 28px;
  font-weight: 500;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 140px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero__line {
  display: block;
  background: linear-gradient(180deg, #fff 0%, #d6c8ee 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero__line em {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-style: italic;
}
.hero__line--accent {
  font-style: italic;
  padding-bottom: 0.14em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero__lede {
  max-width: 640px;
  margin: 36px 0 0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
  color: var(--ink-soft);
}
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__thanks {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--pink-warm);
  letter-spacing: -0.01em;
}

.hero__scroll {
  margin-top: 56px;
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-dim);
}
.hero__scroll span {
  display: inline-block;
  width: 28px; height: 1px;
  background: linear-gradient(to right, var(--magenta), transparent);
  animation: scrollHint 2.2s ease-in-out infinite;
  transform-origin: left;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleX(0.35); opacity: 0.5; }
  50% { transform: scaleX(1); opacity: 1; }
}

.hero__counter {
  position: relative;
  max-width: var(--max);
  margin: 80px auto 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.counter__num {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.counter__label {
  margin-top: 6px;
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-dim);
}
@media (max-width: 720px) {
  .hero__counter { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
}

/* ---------- section heads ---------- */
.section-head {
  max-width: 920px;
  margin: 0 auto clamp(48px, 7vw, 90px);
  text-align: center;
  padding: 0 var(--gutter);
}
.kicker {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08; letter-spacing: -0.015em;
  margin: 0 0 18px;
  color: var(--ink);
}
.section-head h2 em {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.section-head p {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- TIMELINE ---------- */
.journey {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--gutter);
  max-width: 1000px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: max(var(--gutter), 50%);
  transform: translateX(-50%);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--violet) 8%, var(--magenta) 50%, var(--pink-warm) 92%, transparent);
  opacity: 0.5;
}
.t-item {
  position: relative;
  padding: 22px 0 22px 56px;
  margin: 0 0 28px;
}
.t-item::before {
  content: "";
  position: absolute;
  left: max(0px, calc(50% - 6px));
  top: 30px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad-2);
  box-shadow: 0 0 0 4px var(--bg-0), 0 0 20px rgba(255, 58, 166, 0.7);
}
.t-year {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--magenta); font-weight: 700;
  margin-bottom: 8px;
}
.t-item h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500; line-height: 1.2;
  margin: 0 0 10px;
  color: var(--ink);
}
.t-item p {
  margin: 0;
  font-size: 16px; line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
}
.t-item--final h3 {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

@media (min-width: 760px) {
  .timeline { padding: 0; }
  .t-item {
    width: 50%;
    padding: 22px 48px 22px 0;
    text-align: right;
  }
  .t-item:nth-child(even) {
    margin-left: 50%;
    text-align: left;
    padding: 22px 0 22px 48px;
  }
  .t-item:nth-child(even) p { margin-left: 0; }
  .t-item:nth-child(odd) p { margin-left: auto; }
}
@media (max-width: 759px) {
  .timeline::before { left: 6px; }
  .t-item { padding-left: 36px; }
  .t-item::before { left: 0; }
}

/* ---------- MEMORIES / MOSAIC ---------- */
.memories {
  padding: clamp(80px, 12vw, 160px) 0;
}
.mosaic {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  column-count: 4;
  column-gap: 14px;
}
.mosaic figure {
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--bg-2);
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease, box-shadow .35s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.mosaic figure.is-in { opacity: 1; transform: translateY(0); }
.mosaic figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 5, 11, 0.55) 0%, transparent 50%);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.mosaic figure:hover {
  box-shadow: 0 18px 60px rgba(138, 60, 255, 0.25), 0 4px 16px rgba(0,0,0,0.5);
}
.mosaic figure:hover::after { opacity: 1; }
.mosaic img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.2s ease;
}
.mosaic figure:hover img { transform: scale(1.035); }
@media (max-width: 1100px) { .mosaic { column-count: 3; } }
@media (max-width: 720px)  { .mosaic { column-count: 2; } }
@media (max-width: 460px)  { .mosaic { column-count: 1; } }

/* ---------- LETTER ---------- */
.letter {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}
.letter__body {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.75;
  color: var(--ink-soft);
}
.letter__body p { margin: 0 0 1.2em; }
.letter__opening span {
  font-size: 4.5em;
  float: left;
  font-weight: 500;
  line-height: 0.85;
  margin: 0.08em 0.14em 0 -0.04em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.letter__body strong {
  font-weight: 500;
  color: var(--ink);
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.letter__signature {
  margin-top: 2em !important;
  color: var(--ink);
}
.letter__signature em {
  color: var(--magenta);
}

/* ---------- PEOPLE FIRST ---------- */
.people {
  position: relative;
  padding: clamp(120px, 18vw, 220px) var(--gutter);
  text-align: center;
  overflow: hidden;
}
.people__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 50% at 30% 50%, rgba(138, 60, 255, 0.35), transparent 70%),
    radial-gradient(40% 50% at 70% 50%, rgba(255, 58, 166, 0.30), transparent 70%);
  filter: blur(40px);
  z-index: 0;
}
.people__content {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto;
}
.people__quote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px auto 28px;
  color: var(--ink);
}
.people__quote em {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-style: italic;
}
.people__sub {
  max-width: 700px;
  margin: 0 auto;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- FINAL THANKS ---------- */
.thanks {
  padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(60px, 8vw, 120px);
  text-align: center;
  position: relative;
}
.thanks__inner {
  max-width: 1200px; margin: 0 auto;
}
.thanks__title {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  margin: 24px 0 36px;
  display: flex; flex-direction: column;
  gap: clamp(2px, 0.6vw, 8px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.thanks__title span {
  display: block;
  font-size: clamp(36px, 8vw, 120px);
  color: var(--ink-dim);
  opacity: 0.35;
}
.thanks__title span:nth-child(1) { opacity: 0.18; font-size: clamp(28px, 5vw, 60px); }
.thanks__title span:nth-child(2) { opacity: 0.28; font-size: clamp(34px, 6.5vw, 90px); }
.thanks__title span:nth-child(4) { opacity: 0.28; font-size: clamp(34px, 6.5vw, 90px); }
.thanks__title span:nth-child(5) { opacity: 0.18; font-size: clamp(28px, 5vw, 60px); }
.thanks__title--main {
  opacity: 1 !important;
  font-size: clamp(64px, 14vw, 200px) !important;
  padding-bottom: 0.14em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent !important;
}
.thanks__line {
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 720px;
  margin: 0 auto;
}
.thanks__signoff {
  margin-top: 36px;
  font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-dim);
}
.thanks__signoff strong {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 28px var(--gutter) 44px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.site-footer p { margin: 4px 0; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 100;
  background: rgba(7, 5, 11, 0.96);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__figure {
  margin: 0;
  max-width: 90vw; max-height: 86vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__figure img {
  max-width: 100%; max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, transform .25s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,0.14); transform: scale(1.05); }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__nav--next:hover { transform: translateY(-50%) scale(1.05); }

@media (max-width: 600px) {
  .lightbox__close { top: 14px; right: 14px; }
  .lightbox__nav { width: 40px; height: 40px; font-size: 22px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}

/* ---------- reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .mosaic figure { opacity: 1; transform: none; }
}
