:root {
  --preto-estudio: #111010;
  --golden-hour: #F2B134;
  --branco-osso: #FAF8F4;
  --cinza-chumbo: #6E6A63;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--preto-estudio);
  color: var(--branco-osso);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
}

a {
  color: inherit;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--golden-hour);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--golden-hour);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(17, 16, 16, 0.85);
  border-bottom: 1px solid rgba(250, 248, 244, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--golden-hour);
}

.wordmark {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--branco-osso);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--golden-hour);
  transition: width 0.3s ease;
}

.wordmark:hover::after {
  width: 100%;
}

/* Buttons */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--golden-hour);
  color: var(--preto-estudio);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(242, 177, 52, 0.28);
}

.btn-outline {
  border: 1px solid var(--golden-hour);
  color: var(--golden-hour);
  background: transparent;
}

.btn-outline:hover {
  background: var(--golden-hour);
  color: var(--preto-estudio);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(242, 177, 52, 0.2);
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* Hero */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-texture {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    var(--golden-hour) 0px,
    var(--golden-hour) 2px,
    transparent 2px,
    transparent 40px
  );
  opacity: 0.06;
  pointer-events: none;
  animation: stripeDrift 40s linear infinite;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px;
  width: 100%;
}

.wordmark-hero {
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--golden-hour);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-shadow: 0 0 60px rgba(242, 177, 52, 0.35);
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--branco-osso);
  opacity: 0.9;
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-inner > .btn {
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 48px;
  background: rgba(250, 248, 244, 0.15);
  overflow: hidden;
  z-index: 1;
}

.scroll-cue span {
  position: absolute;
  top: -20px;
  left: 0;
  width: 1px;
  height: 20px;
  background: var(--golden-hour);
  animation: scrollCue 2.2s ease-in-out infinite;
}

@keyframes stripeDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -400px 400px;
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollCue {
  0% {
    top: -20px;
  }
  60% {
    top: 48px;
  }
  100% {
    top: 48px;
  }
}

/* Blocks */

.block {
  position: relative;
  padding: 100px 0;
}

.block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--golden-hour), transparent);
  opacity: 0.5;
}

/* Reveal on scroll — gated behind .js (added synchronously in <head>) so
   content stays visible by default if JavaScript fails to load. */

.js .reveal,
.js .reveal-fade {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal {
  transform: translateY(24px);
}

.js .reveal-fade {
  transform: scale(0.96);
  transition-delay: 0.12s;
}

.reveal.is-visible,
.reveal-fade.is-visible {
  opacity: 1;
  transform: none;
}

/* .btn also sets `transition` — combine explicitly so elements with both
   classes don't lose either set (CSS doesn't merge same-property declarations
   across separate rules, the later one in source wins outright). */
.btn.reveal {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease, background-color 0.15s ease, color 0.15s ease;
}

/* Differentiators strip */

.diff-strip {
  padding: 56px 0;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.diff-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
}

.diff-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(242, 177, 52, 0.35);
  background: rgba(242, 177, 52, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--golden-hour);
}

.diff-icon svg {
  width: 22px;
  height: 22px;
}

.diff-item h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.diff-item p {
  font-size: 0.875rem;
  color: var(--branco-osso);
  opacity: 0.75;
}

.block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.block-edit .block-grid {
  direction: rtl;
}

.block-edit .block-content {
  direction: ltr;
}

.block-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 20px;
}

.block-content p {
  color: var(--branco-osso);
  opacity: 0.85;
  margin-bottom: 32px;
  max-width: 480px;
}

.block-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(242, 177, 52, 0.12), rgba(110, 106, 99, 0.12));
  border-radius: 16px;
  border: 1px dashed rgba(242, 177, 52, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cinza-chumbo);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

.block-media--image {
  border: none;
  padding: 0;
  background: none;
}

.block-media--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.block:hover .block-media--image img {
  transform: scale(1.05);
}

/* Proof / portfolio block */

.block-proof {
  text-align: center;
}

.block-proof p {
  max-width: 600px;
  margin: 0 auto 40px;
  opacity: 0.85;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 48px auto 40px;
  text-align: left;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  /* combined with .reveal-fade's needs (opacity/transform-in) — see note near .btn.reveal.
     No delay on transform so hover lift stays snappy; the opacity delay alone is
     enough to sequence the reveal-in after the sibling text block. */
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

.portfolio-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Bento-style stagger — desktop only, undone in the responsive block below */
.portfolio-item:nth-child(2),
.portfolio-item:nth-child(4) {
  margin-top: 40px;
}

.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.portfolio-item .video-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.video-placeholder {
  background: linear-gradient(135deg, rgba(242, 177, 52, 0.12), rgba(110, 106, 99, 0.12));
  border: 1px dashed rgba(242, 177, 52, 0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cinza-chumbo);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 20px;
  text-align: center;
}

.video-placeholder code {
  color: var(--golden-hour);
}

.portfolio-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 16, 16, 0.6);
  backdrop-filter: blur(4px);
  color: var(--branco-osso);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.portfolio-play:hover {
  background: var(--golden-hour);
  color: var(--preto-estudio);
}

.portfolio-play.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

.mute-toggle {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(250, 248, 244, 0.25);
  background: rgba(17, 16, 16, 0.55);
  backdrop-filter: blur(4px);
  color: var(--branco-osso);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background-color 0.25s ease;
}

.portfolio-item:hover .mute-toggle {
  opacity: 1;
}

.mute-toggle:hover {
  background: var(--golden-hour);
  color: var(--preto-estudio);
}

.mute-toggle .icon-muted {
  display: none;
}

.mute-toggle.is-muted .icon-unmuted {
  display: none;
}

.mute-toggle.is-muted .icon-muted {
  display: block;
}

/* Segments */

.block-segments {
  text-align: center;
}

.block-segments h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 48px;
}

.segments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.segment-card {
  background: rgba(250, 248, 244, 0.03);
  border: 1px solid rgba(250, 248, 244, 0.08);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: left;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, background-color 0.35s ease;
}

.segment-card:hover {
  transform: translateY(-6px);
  border-color: rgba(242, 177, 52, 0.4);
  background: rgba(250, 248, 244, 0.05);
}

.segments-grid .segment-card:nth-child(2) {
  transition-delay: 0.1s;
}

.segments-grid .segment-card:nth-child(3) {
  transition-delay: 0.2s;
}

.segment-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(242, 177, 52, 0.08);
  border: 1px solid rgba(242, 177, 52, 0.25);
  color: var(--golden-hour);
  margin-bottom: 16px;
}

.segment-icon svg {
  width: 20px;
  height: 20px;
}

.segment-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--golden-hour);
}

.segment-card p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* Closing */

.closing {
  position: relative;
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
  background: #0a0a0a;
}

.closing-inner {
  position: relative;
  z-index: 1;
}

.closing h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 auto 16px;
  max-width: 700px;
}

.closing-lead {
  font-size: 1.05rem;
  color: var(--branco-osso);
  opacity: 0.75;
  margin: 0 auto 40px;
}

.contact-info {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cinza-chumbo);
}

.contact-info a {
  text-decoration: none;
  color: var(--branco-osso);
}

.contact-info a:hover {
  color: var(--golden-hour);
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Footer */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid rgba(250, 248, 244, 0.06);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cinza-chumbo);
}

.wordmark-small {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--branco-osso);
}

/* Responsive */

@media (max-width: 800px) {
  .diff-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .block-grid {
    grid-template-columns: 1fr;
  }

  .block-edit .block-grid {
    direction: ltr;
  }

  .segments-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-item:nth-child(2),
  .portfolio-item:nth-child(4) {
    margin-top: 0;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .reveal-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-texture {
    animation: none;
  }

  .wordmark-hero,
  .tagline,
  .hero-inner > .btn {
    animation: none;
  }

  .scroll-cue {
    display: none;
  }
}
