*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Brand palette — Brand Guidelines
   Legibility: text on void/dark must use --grain (primary), --fog (metadata) or --ash (secondary).
   Never use --dark for text (low contrast). */
:root {
  --void: #0A0A0A;
  --dark: #1A1A1A;
  --ash: #666666;
  --fog: #999999;
  --amber: #C8882A;
  --sepia: #8B6340;
  --grain: #F5F0E8;
  /* Aliases for compatibility */
  --black: var(--void);
  --mid: var(--dark);
  --gray: var(--ash);
  --light: var(--fog);
  --xlight: var(--fog);
  --amber-dim: var(--sepia);
  --white: var(--grain);
  --cream: var(--grain);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-dot-inner { display: none !important; }
}

/* ── GRAIN ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9998;
}

/* ── CURSOR ── */
.cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
}
.cursor-dot-inner {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--amber);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
}
body:hover .cursor { opacity: 1; }

/* ── FLASH ── */
#flash {
  position: fixed; inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  z-index: 9997;
  transition: opacity 0.04s;
}
#flash.fire { opacity: 1; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem;
  opacity: 0;
  animation: fadeDown 1s ease 0.5s forwards;
}
.nav-brand {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--light);
  text-transform: uppercase;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.lang-toggle { display: flex; }
.lang-btn {
  background: none;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gray);
  cursor: none;
  padding: 0.3rem 0.5rem;
  transition: color 0.2s;
  text-transform: uppercase;
}
.lang-btn.active { color: var(--amber); }
.lang-btn:hover { color: var(--xlight); }
.lang-divider { color: var(--ash); font-size: 0.6rem; }

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10rem 3rem 6rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Contador — IBM Plex Mono Bold, Amber, sobre Void (brand-guidelines) */
.hero-counter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeIn 1s ease 0.8s forwards;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(4.5rem, 12vw, 10rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin-bottom: 4rem;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span {
  display: block;
  opacity: 0;
  transform: translateY(110%);
}
.hero-title .line:nth-child(1) span { animation: revealUp 1s cubic-bezier(0.16,1,0.3,1) 1s forwards; }
.hero-title .line:nth-child(2) span { animation: revealUp 1s cubic-bezier(0.16,1,0.3,1) 1.15s forwards; }
.hero-title .amber { color: var(--amber); }

.hero-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  opacity: 0;
  animation: fadeIn 1s ease 1.8s forwards;
}
.hero-manifesto p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.8;
  color: var(--xlight);
  font-weight: 300;
  margin-bottom: 1.2rem;
}
.hero-manifesto p em { font-style: italic; color: var(--light); }
.hero-cta { display: flex; flex-direction: column; justify-content: flex-end; }
.cta-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--light);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.email-row { display: flex; max-width: 420px; }
.email-row input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--mid);
  border-right: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.9rem 1.2rem;
  outline: none;
  cursor: none;
  transition: border-color 0.2s;
}
.email-row input::placeholder { color: var(--gray); }
.email-row input:focus { border-color: var(--amber); }
.email-row button {
  background: var(--amber);
  border: 1px solid var(--amber);
  color: var(--black);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 1.4rem;
  cursor: none;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.email-row button:hover { background: var(--amber-dim); border-color: var(--amber-dim); }
.email-row button.sent { background: transparent; border-color: var(--mid); color: var(--light); }
.cta-note {
  margin-top: 0.8rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.57rem;
  color: var(--gray);
  letter-spacing: 0.05em;
}

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeIn 1s ease 2.5s forwards;
}
.scroll-line {
  width: 40px; height: 1px;
  background: var(--mid);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--amber);
  animation: scanLine 2s ease-in-out 3s infinite;
}
.scroll-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
}

/* ── SECTION: THE PROBLEM ── */
#problem {
  padding: 12rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-tag::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mid);
}
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--mid);
  border: 1px solid var(--mid);
  margin-bottom: 6rem;
}
.problem-card {
  background: var(--black);
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}
.problem-card:hover { background: #0f0f0f; }
.problem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--amber);
  transition: height 0.4s ease;
}
.problem-card:hover::before { height: 100%; }
.card-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.card-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--light);
  font-weight: 300;
}

.problem-conclusion {
  border-left: 3px solid var(--amber);
  padding: 2rem 0 2rem 3rem;
}
.problem-conclusion p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--xlight);
}
.problem-conclusion strong {
  font-weight: 700;
  font-style: normal;
  color: var(--white);
}

/* ── SECTION: HOW IT WORKS ── */
#how {
  padding: 8rem 3rem 12rem;
  max-width: 1100px;
  margin: 0 auto;
}
.how-intro {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 6rem;
  max-width: 700px;
}
.how-intro em { color: var(--amber); font-style: italic; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: var(--dark);
}
.step {
  padding: 0 2rem 0 0;
  position: relative;
}
.step-num {
  width: 3rem; height: 3rem;
  border: 1px solid var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--black);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.step-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.step-body {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--light);
  font-weight: 300;
}

/* ── SECTION: THE VAULT ── */
#vault {
  position: relative;
  background: var(--dark);
  padding: 10rem 3rem;
  overflow: hidden;
}
.vault-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.vault-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
}
.vault-ring {
  position: absolute;
  border: 1px solid;
  border-radius: 50%;
  animation: rotate 20s linear infinite;
}
.vault-ring:nth-child(1) {
  width: 300px; height: 300px;
  border-color: var(--mid);
  animation-duration: 25s;
}
.vault-ring:nth-child(2) {
  width: 220px; height: 220px;
  border-color: var(--sepia);
  animation-duration: 18s;
  animation-direction: reverse;
}
.vault-ring:nth-child(3) {
  width: 140px; height: 140px;
  border-color: var(--mid);
  animation-duration: 12s;
}
.vault-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
/* Contador 22/36 — IBM Plex Mono Bold, Amber (brand-guidelines) */
.vault-counter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 3rem;
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  letter-spacing: 0.05em;
}
.vault-counter-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gray);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.vault-content {}
.vault-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 2rem;
}
.vault-title em { color: var(--amber); font-style: italic; }
.vault-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--light);
  font-weight: 300;
  margin-bottom: 1.5rem;
}
.vault-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.vault-rule-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}
.vault-rule-text {
  font-size: 0.9rem;
  color: var(--xlight);
  font-weight: 300;
}

/* ── SECTION: IDENTITY / PHILOSOPHY ── */
#philosophy {
  padding: 12rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.philosophy-quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 8rem;
}
.philosophy-quote .muted { color: var(--fog); }
.philosophy-quote .amber { color: var(--amber); }

.philosophy-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
  border-top: 1px solid var(--mid);
  padding-top: 4rem;
}
.phil-item {}
.phil-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.phil-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}
.phil-body {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--light);
  font-weight: 300;
}

/* ── SECTION: FILM STRIP ── */
#strip {
  padding: 6rem 0;
  overflow: hidden;
  border-top: 1px solid var(--mid);
  border-bottom: 1px solid var(--mid);
  background: var(--dark);
  contain: layout paint;
}
.strip-track {
  display: flex;
  gap: 0;
  animation: scrollStrip 30s linear infinite;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
/* Pause strip when tab is hidden (prevents stutter on Alt+Tab) */
#strip.tab-hidden .strip-track {
  animation-play-state: paused;
}
.strip-frame {
  width: 140px;
  height: 200px;
  border-right: 1px solid var(--mid);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  padding: 1rem;
  contain: layout style paint;
}
.strip-frame-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.1em;
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}
.strip-frame-hole {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mid);
  margin: 0.3rem 0;
}
.strip-frame-content {
  width: 120px; height: 120px;
  background: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
  overflow: hidden;
}
.strip-frame-content.empty {
  background: var(--void);
}
.strip-frame-content.exposed {
  background: var(--dark);
}
.strip-frame-content.revealed {
  background: var(--dark);
  box-shadow: inset 0 0 0 1px rgba(200,136,42,0.2);
}
.strip-frame-vault-icon {
  width: 36px;
  height: 36px;
  color: var(--amber);
  opacity: 0.6;
}
.strip-frame-content .strip-frame-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.frame-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--xlight);
  letter-spacing: 0.15em;
  margin-top: 0.6rem;
  text-align: center;
  text-transform: uppercase;
}

/* ── SECTION: FINAL CTA ── */
#final {
  padding: 14rem 3rem 10rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.final-pre {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 3rem;
}
.final-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 2rem;
}
.final-sub {
  font-size: 1.05rem;
  color: var(--light);
  font-weight: 300;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 4rem;
  font-style: italic;
}
.final-email {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.final-email input {
  width: 300px;
  background: transparent;
  border: 1px solid var(--mid);
  border-right: none;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  padding: 1rem 1.4rem;
  outline: none;
  cursor: none;
  transition: border-color 0.2s;
  text-align: center;
}
.final-email input:focus { border-color: var(--amber); }
.final-email input::placeholder { color: var(--gray); }
.final-email button {
  background: var(--amber);
  border: 1px solid var(--amber);
  color: var(--black);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 1.6rem;
  cursor: none;
  transition: all 0.2s;
}
.final-email button:hover { background: var(--amber-dim); border-color: var(--amber-dim); }
.final-email button.sent { background: transparent; border-color: var(--mid); color: var(--light); }
.final-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.57rem;
  color: var(--gray);
  letter-spacing: 0.05em;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 5rem;
  padding-top: 5rem;
  border-top: 1px solid var(--mid);
}
.social-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}
.social-links a:hover { color: var(--amber); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--mid);
  padding: 2.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ash);
  text-transform: uppercase;
}
.footer-copy {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  color: var(--gray);
  letter-spacing: 0.1em;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(110%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes scrollStrip {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes scanLine {
  0% { left: -100%; }
  100% { left: 100%; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── HIDDEN LANG ── */
.lang-en, .lang-pt { }
body.lang-en .lang-pt { display: none; }
body.lang-pt .lang-en { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1.5rem; }
  #hero { padding: 8rem 1.5rem 5rem; }
  .hero-cols { grid-template-columns: 1fr; gap: 3rem; }
  #problem { padding: 8rem 1.5rem; }
  .problem-grid { grid-template-columns: 1fr; }
  #how { padding: 6rem 1.5rem 8rem; }
  .steps { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .steps::before { display: none; }
  .vault-inner { grid-template-columns: 1fr; gap: 4rem; }
  .vault-visual { height: 280px; }
  .vault-ring:nth-child(1) { width: 220px; height: 220px; }
  .vault-ring:nth-child(2) { width: 160px; height: 160px; }
  .vault-ring:nth-child(3) { width: 100px; height: 100px; }
  #philosophy { padding: 8rem 1.5rem; }
  .philosophy-cols { grid-template-columns: 1fr; gap: 3rem; }
  #final { padding: 10rem 1.5rem 6rem; }
  .final-email { flex-direction: column; align-items: center; }
  .final-email input { width: 100%; max-width: 340px; border-right: 1px solid var(--mid); border-bottom: none; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
  .strip-frame { width: 110px; height: 160px; }
  .strip-frame-content { width: 90px; height: 90px; }
}
