/* ==========================================================================
   TRIMEMBRA — base
   ========================================================================== */

@font-face {
  font-family: "Coal Hand Luke";
  src: url("../assets/fonts/Coal-Hand-Luke.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a09;
  --bg-soft: #111110;
  --fg: #f3efe7;
  --fg-muted: rgba(243, 239, 231, 0.62);
  --fg-faint: rgba(243, 239, 231, 0.34);
  --accent: #b6905c;
  --line: rgba(243, 239, 231, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* Custom cursor (desktop only) */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
    background 0.25s var(--ease), opacity 0.25s var(--ease);
  mix-blend-mode: difference;
}

.cursor.hover {
  width: 46px;
  height: 46px;
  background: var(--fg);
}

@media (hover: none), (pointer: coarse) {
  .cursor {
    display: none;
  }
}

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.4rem 6vw;
  mix-blend-mode: difference;
  transition: opacity 0.4s var(--ease);
}

.site-nav.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.site-nav .logo {
  font-family: "Fraunces", serif;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  font-weight: 500;
  color: var(--fg);
}

.site-nav .links {
  display: flex;
  gap: 2.6rem;
}

.site-nav .links a {
  position: relative;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  padding-bottom: 0.3rem;
}

.site-nav .links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--fg);
  transition: width 0.4s var(--ease);
}

.site-nav .links a:hover::after,
.site-nav .links a.active::after {
  width: 100%;
}

/* ==========================================================================
   Background video — a single persistent layer, always playing underneath
   every step. It is never paused, reset or swapped as steps change.
   ========================================================================== */

.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05) brightness(0.85);
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 9, 0.5) 0%,
    rgba(10, 10, 9, 0.62) 45%,
    rgba(10, 10, 9, 0.82) 100%
  );
}

/* ==========================================================================
   Steps — fixed, static full-screen frames stacked over the shared video.
   Nothing ever scrolls or slides: each step's text sits still, and moving to
   the next/previous step is a pure crossfade in place, driven by scroll
   wheel/touch/keyboard ticks.
   ========================================================================== */

.step {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 6vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}

.step.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0s;
}

.step--hero {
  align-items: flex-end;
  padding-bottom: 6.5rem;
}

.step--intro {
  justify-content: center;
  text-align: center;
}

.step--intro .step-content {
  max-width: none;
}

.intro-word {
  font-family: "Coal Hand Luke", cursive;
  font-size: clamp(2rem, 6vw, 4.2rem);
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--fg);
}

.step-content {
  width: 100%;
  max-width: 900px;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.step-heading {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.3;
  max-width: 22ch;
  margin-bottom: 0;
}

/* Hero step */

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1s var(--ease) 0.2s forwards;
}

.hero-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.4;
  max-width: 42ch;
  color: var(--fg);
  opacity: 0;
  transform: translateY(24px);
  animation: rise 1.1s var(--ease) 0.4s forwards;
}

.hero-attribution {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-top: 1.2rem;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1s var(--ease) 0.6s forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-cue {
  position: absolute;
  right: 6vw;
  bottom: 2.6rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 1;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.scroll-cue.is-faded {
  opacity: 0;
}

.scroll-cue .bar {
  width: 1px;
  height: 34px;
  background: var(--fg-muted);
  overflow: hidden;
  position: relative;
}

.scroll-cue .bar::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fg);
  animation: scrollBar 1.8s ease-in-out infinite;
}

@keyframes scrollBar {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

/* Contato step */

.contact-step {
  max-width: 1080px;
}

.contact-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem 4rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-profile {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  max-width: 320px;
}

.contact-photo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.contact-name {
  font-family: "Fraunces", serif;
  font-size: 1rem;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.contact-bio {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--fg-muted);
}

.contact-email {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 4.5vw, 2.8rem);
  line-height: 1.2;
  display: inline-block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
  word-break: break-word;
}

.contact-email:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-details {
  margin-top: 3rem;
  display: flex;
  gap: 5rem;
  flex-wrap: wrap;
}

.contact-details div h3 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 0.8rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

.contact-details div p,
.contact-details div a {
  font-size: 1rem;
  color: var(--fg-muted);
}

.contact-details div a:hover {
  color: var(--fg);
}

/* ==========================================================================
   Footer — a thin fixed bar, always on screen above the video
   ========================================================================== */

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 1.6rem 6vw;
  mix-blend-mode: difference;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer,
.site-footer a {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .site-nav {
    padding: 1.6rem 6vw;
  }
  .step {
    padding: 0 6vw;
  }
}
