/* ═══════════════════════════════════════════════════════════════
   MUVUCA STUDIO — Shared Styles
   Source of truth for tokens, reset, nav, footer, cursor, and
   all cross-page utilities.
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  scrollbar-color: var(--matcha) var(--noir);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--noir); }
::-webkit-scrollbar-thumb { background: var(--matcha); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #a0d4a1; }

/* ── DESIGN TOKENS ── */
:root {
  --noir:     #181818;
  --areia:    #EDE8D8;
  --iris:     #7270ea;
  --brasa:    #AC2729;
  --muted:    rgba(237,232,216,0.38);
  --offwhite: #F5F1E8;
  --matcha:   #88BF89;
  --rosa:     #C086D7;
  --amarelo:  #DAC99D;
  --peach:    #E8A07C;
  --sky:      #89B4D6;

  /* Premium easing curves */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ── BODY ── */
body {
  background: var(--noir);
  color: var(--areia);
  font-family: 'Instrument Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Body-level grain — fixed, full viewport */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.065;
}

/* ── SECTION-LEVEL GRAIN ── */
.grain { position: relative; }
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.45'/%3E%3C/svg%3E");
  opacity: 0.07;
}
/* Canvas grain overlay (replaces CSS grain on CTA cards and bold section) */
.grain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: overlay;
  opacity: 0.55;
  border-radius: inherit;
}

/* ── SHARED KEYFRAMES ── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ── STARBURST ── */
.starburst { animation: spin 18s linear infinite; transform-origin: center; }

/* ── GRAIN ANIMATIONS ── */
@keyframes grain-shift {
  0%   { opacity: 0.07; }
  25%  { opacity: 0.12; }
  50%  { opacity: 0.08; }
  75%  { opacity: 0.11; }
  100% { opacity: 0.07; }
}
/* Heavy grain for colorful sections (CTA, bold) */
@keyframes grain-cta {
  0%   { opacity: 0.28; }
  20%  { opacity: 0.58; }
  40%  { opacity: 0.32; }
  60%  { opacity: 0.52; }
  80%  { opacity: 0.30; }
  100% { opacity: 0.28; }
}

/* Sweeping gradient keyframe — shared by service chips + card titles */
@keyframes tag-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Ambient orb drift — shared by index, services, contact page orbs */
@keyframes orb-drift-1 {
  from { transform: translate(0, 0)       scale(1);    }
  to   { transform: translate(60px, 40px) scale(1.2);  }
}
@keyframes orb-drift-2 {
  from { transform: translate(0, 0)         scale(1);    }
  to   { transform: translate(-50px, -40px) scale(0.85); }
}
@keyframes orb-drift-3 {
  from { transform: translateX(-50%) translateY(0)     scale(1);    }
  to   { transform: translateX(-50%) translateY(-30px) scale(1.15); }
}

/* Sparkle burst — shared by index (.sparkle-el) and services (.svc-sparkle-el) */
@keyframes sparkle-pop {
  0%   { transform: translate(-50%, -50%) scale(0.5) rotate(0deg);  opacity: 0; }
  30%  { transform: translate(-50%, -50%) scale(1.2) rotate(15deg); opacity: 1; }
  70%  { transform: translate(-50%, -50%) scale(0.9) rotate(-8deg); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(0.3) rotate(20deg); opacity: 0; }
}

/* ── FADE-UP ── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.fade-up.visible { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .fade-up { transform: translateY(14px); }
}

/* ── SKIP LINK (keyboard accessibility) ── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 99999;
  padding: 10px 20px;
  background: var(--iris);
  color: var(--offwhite);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.15s;
}
.skip-link:focus { top: 16px; }

/* ═══════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0);
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 1600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    padding         0.35s var(--ease-out),
    margin-top      0.35s var(--ease-out),
    background      0.35s var(--ease-out),
    backdrop-filter 0.35s var(--ease-out),
    border-radius   0.35s var(--ease-out),
    box-shadow      0.35s var(--ease-out),
    width           0.35s var(--ease-out);
}
nav.scrolled .nav-inner {
  padding: 18px 44px 18px 52px;
  margin-top: 16px;
  background: rgba(20,20,36,0.58);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(255,255,255,0.05),
    0 8px 32px rgba(0,0,0,0.35);
  min-width: min(1120px, calc(100% - 80px));
  width: auto;
}

.nav-logo { text-decoration: none; display: flex; align-items: center; }
.nav-logo-img {
  height: 36px;
  width: auto;
  display: block;
  transition: height 0.35s var(--ease-out);
}
nav.scrolled .nav-logo-img { height: 28px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 56px;
  list-style: none;
  transition: gap 0.35s var(--ease-out);
}
nav.scrolled .nav-links { gap: 40px; }
.nav-links a {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--offwhite);
  text-decoration: none;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.nav-links a:hover { color: var(--iris); }
.nav-links a.active { color: var(--matcha); }
.nav-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--iris);
  flex-shrink: 0;
}

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}
.lang-btn {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  background: none;
  border: none;
  color: rgba(237,232,216,0.32);
  cursor: pointer;
  padding: 8px 10px;
  transition: color 0.18s;
  line-height: 1;
  min-width: 32px;
  text-align: center;
}
.lang-btn.active { color: var(--offwhite); }
@media (hover: hover) and (pointer: fine) {
  .lang-btn:hover { color: rgba(237,232,216,0.75); }
}
.lang-sep {
  color: rgba(237,232,216,0.15);
  font-size: 9px;
  font-family: 'Space Mono', monospace;
  pointer-events: none;
  user-select: none;
}
.mobile-lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--offwhite);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s var(--ease-out);
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--noir);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(96px + env(safe-area-inset-top, 0)) 32px calc(48px + env(safe-area-inset-bottom, 0));
  overflow: hidden;
  overscroll-behavior: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s var(--ease-out);
}
.mobile-nav.open { opacity: 1; visibility: visible; }

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.mobile-nav-links li {
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav-links li:first-child { border-top: 1px solid rgba(255,255,255,0.06); }
.mobile-nav-links a {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(40px, 12vw, 60px);
  color: var(--offwhite);
  text-decoration: none;
  letter-spacing: -1.5px;
  line-height: 1.2;
  display: block;
  padding: 14px 0;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.35s var(--ease-out), color 0.15s;
}
.mobile-nav-links a:hover { color: var(--iris); }
.mobile-nav.open .mobile-nav-links a { transform: translateY(0); opacity: 1; }
.mobile-nav.open .mobile-nav-links li:nth-child(1) a { transition-delay: 0.03s; }
.mobile-nav.open .mobile-nav-links li:nth-child(2) a { transition-delay: 0.06s; }
.mobile-nav.open .mobile-nav-links li:nth-child(3) a { transition-delay: 0.09s; }
.mobile-nav.open .mobile-nav-links li:nth-child(4) a { transition-delay: 0.12s; }

.mobile-nav-bottom { display: flex; align-items: center; gap: 12px; }
.mobile-nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--offwhite);
  text-decoration: none;
  font-size: 18px;
  transition: background 0.2s, border-color 0.2s;
}
.mobile-nav-social:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }

/* ═══════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
}
.label-bar { width: 48px; height: 3px; background: var(--iris); flex-shrink: 0; }
.label-text {
  font-family: 'Instrument Sans', sans-serif;
  font-style: italic;
  font-size: 13px;
  color: var(--iris);
  letter-spacing: 3.6px;
  text-transform: uppercase;
  font-weight: 500;
}
.u-iris { text-decoration: underline; text-decoration-color: var(--iris); text-underline-offset: 3px; }
.u-rosa { text-decoration: underline; text-decoration-color: var(--rosa); text-underline-offset: 3px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--iris);
  color: var(--offwhite);
  padding: 16px 32px;
  border-radius: 100px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.15s var(--ease-out), box-shadow 0.2s var(--ease-out);
  align-self: flex-start;
}
.btn-outline:hover { background: var(--iris); color: var(--noir); }
.btn-outline:active { transform: scale(0.97); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 80px;
  gap: 24px;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(56px, 8.3vw, 120px);
  color: var(--offwhite);
  letter-spacing: clamp(-3px, -0.45vw, -6.4px);
  line-height: 1;
  font-style: normal;
}
.section-title .it { font-style: italic; color: var(--matcha); }
.section-link {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--matcha);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
  cursor: pointer;
  padding-bottom: 24px;
  flex-shrink: 0;
  transition: opacity 0.15s, text-underline-offset 0.2s var(--ease-out);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--noir);
}
.footer-inner {
  padding: 48px max(20px, calc((100% - 1488px) / 2)) 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr auto;
  gap: 56px;
  align-items: center;
  padding-bottom: 40px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand > a { display: block; }
.footer-wm-img { width: 130px; height: auto; display: block; }
.footer-studio {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  color: var(--iris);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}
.footer-brand-tagline {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--areia);
  opacity: 0.45;
  line-height: 1.45;
  max-width: 240px;
  margin-top: 4px;
}
.footer-col-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 22px;
  display: block;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav a {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  color: var(--areia);
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color 0.2s;
  width: fit-content;
  position: relative;
}
.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--iris);
  transition: width 0.25s ease;
}
.footer-nav a:hover { color: var(--iris); }
.footer-nav a:hover::after { width: 100%; }
.footer-contact-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-email-link {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--areia);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(237,232,216,0.25);
  transition: color 0.2s, text-decoration-color 0.2s;
  width: fit-content;
}
.footer-email-link:hover {
  color: var(--matcha);
  text-decoration-color: var(--matcha);
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.footer-social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--areia);
  font-size: 19px;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease-out);
}
.footer-social-icon:active { transform: translateY(-1px); }

/* Bottom bar */
.footer-bottom {
  padding: 18px max(20px, calc((100% - 1488px) / 2)) calc(26px + env(safe-area-inset-bottom, 0));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.footer-legal, .footer-made {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Back to top button */
.footer-btt-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.back-to-top {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--rosa);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out), background 0.2s;
}
.back-to-top:hover {
  background: linear-gradient(135deg, var(--rosa), var(--iris), var(--matcha), var(--amarelo));
  background-size: 300% 300%;
  animation: tag-gradient 2.5s ease infinite;
  transform: translateY(-4px);
}
.btt-star {
  position: absolute;
  font-size: 10px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s;
  pointer-events: none;
  line-height: 1;
}
.btt-star--tl { top: -5px; right: -5px; }
.btt-star--br { bottom: -5px; left: -5px; }
.back-to-top:hover .btt-star { opacity: 0.9; }
.back-to-top:hover .btt-star--tl { transform: translate(2px, -2px) rotate(20deg) scale(1.3); }
.back-to-top:hover .btt-star--br { transform: translate(-2px, 2px) rotate(-20deg) scale(1.3); }
@keyframes btt-launch {
  0%   { transform: translateY(0);     opacity: 1; }
  60%  { transform: translateY(-18px); opacity: 0; }
  61%  { transform: translateY(6px);   opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}
.back-to-top.launching {
  animation: btt-launch 0.55s var(--ease-out) forwards;
}

/* ═══════════════════════════════════════════════════════════════
   CTA BANNER — shared component (injected by assets/cta.js)
   ═══════════════════════════════════════════════════════════════ */
#cta, #work-cta, #svc-cta, #project-cta {
  padding: 80px max(20px, calc((100% - 1488px) / 2)) 100px;
  position: relative;
}
.cta-inner {
  background: var(--iris);
  border-radius: 8px;
  padding: 88px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-titles { display: flex; flex-direction: column; gap: 0; position: relative; }
.cta-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 7.5vw, 112px);
  color: var(--noir);
  letter-spacing: clamp(-3px, -0.45vw, -6.4px);
  line-height: 1;
}
.cta-sub {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(40px, 7.5vw, 112px);
  color: var(--matcha);
  letter-spacing: clamp(-3px, -0.45vw, -6.4px);
  line-height: 1.05;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--noir);
  color: var(--noir);
  padding: 18px 64px;
  border-radius: 100px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.15s var(--ease-out);
  position: relative;
}
.btn-cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn-cta:hover { background: var(--noir); color: var(--iris); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
}

/* ── CTA SCROLL REVEAL ── */
.cta-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.cta-reveal.cta-visible { opacity: 1; transform: none; }

/* ── CTA SPARKLE STARS ── */
.cta-star {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s var(--ease-out);
  will-change: left, top;
  user-select: none;
}
.cta-star.active { opacity: 1; }

.cta-star-1 { color: var(--iris);    animation: star-pulse 1.1s ease-in-out infinite,         star-color-1 3.0s ease-in-out infinite; }
.cta-star-2 { color: var(--rosa);    animation: star-pulse 0.9s ease-in-out infinite 0.3s,    star-color-2 3.4s ease-in-out infinite 0.8s; }
.cta-star-3 { color: var(--matcha);  animation: star-pulse 1.3s ease-in-out infinite 0.6s,    star-color-3 2.8s ease-in-out infinite 1.2s; }
.cta-star-4 { color: var(--amarelo); animation: star-pulse 1.0s ease-in-out infinite 0.9s,    star-color-4 3.2s ease-in-out infinite 0.4s; }

@keyframes star-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1)    rotate(0deg); }
  50%       { transform: translate(-50%, -50%) scale(1.45) rotate(22deg); }
}
@keyframes star-color-1 {
  0%,100% { color: var(--iris);    } 33% { color: var(--rosa);    } 66% { color: var(--matcha);  }
}
@keyframes star-color-2 {
  0%,100% { color: var(--rosa);    } 33% { color: var(--matcha);  } 66% { color: var(--amarelo); }
}
@keyframes star-color-3 {
  0%,100% { color: var(--matcha);  } 33% { color: var(--amarelo); } 66% { color: var(--iris);    }
}
@keyframes star-color-4 {
  0%,100% { color: var(--amarelo); } 33% { color: var(--iris);    } 66% { color: var(--rosa);    }
}

/* ── BOLD CURSOR INSIDE CTA CARD (overrides global cursor: none) ── */
@media (hover: hover) and (pointer: fine) {
  .cta-inner {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' shape-rendering='crispEdges'%3E%3Cpath d='M4 2 L4 20 L9 15 L14 26 L18 24 L13 13 L22 13 Z' fill='%23181818'/%3E%3C/svg%3E") 4 2, auto !important;
  }
  body.in-cta .cursor-dot,
  body.in-cta .cursor-ring {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.15s !important;
  }
}

/* ── CTA RESPONSIVE ── */
@media (max-width: 768px) {
  #cta, #work-cta, #svc-cta, #project-cta { padding: 40px 20px 80px; }
  .cta-inner { padding: 56px 24px; }
  .btn-cta { padding: 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .cta-reveal { transition: opacity 0.3s ease; transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   TEXT SELECTION
   ═══════════════════════════════════════════════════════════════ */
::selection { background: var(--iris); color: var(--offwhite); }
::-moz-selection { background: var(--iris); color: var(--offwhite); }

/* ═══════════════════════════════════════════════════════════════
   CUSTOM CURSOR
   ═══════════════════════════════════════════════════════════════ */
@media (pointer: fine) {
  html, *, *::before, *::after { cursor: none !important; }
}
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 9px; height: 9px;
  background: var(--rosa);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  will-change: left, top;
  display: none;
  transition: opacity 0.15s, width 0.18s, height 0.18s;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(192, 134, 215, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.22s var(--ease-out), height 0.22s var(--ease-out), border-color 0.2s;
  will-change: left, top;
  display: none;
}
body.cursor-on .cursor-dot,
body.cursor-on .cursor-ring { display: block; }
body.cursor-hover .cursor-ring { width: 40px; height: 40px; border-color: rgba(192,134,215,0.65); }
body.cursor-hover .cursor-dot { opacity: 0.45; }
body.cursor-press .cursor-dot { width: 6px; height: 6px; }

/* ═══════════════════════════════════════════════════════════════
   FOCUS-VISIBLE (Accessibility)
   ═══════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible { border-radius: 4px; }

/* ── SCREEN READER ONLY ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── SERVICE CARD NUMBER COLOR MODIFIERS ── */
.svc-num--matcha  { color: var(--matcha);  }
.svc-num--iris    { color: var(--iris);    }
.svc-num--rosa    { color: var(--rosa);    }
.svc-num--amarelo { color: var(--amarelo); }

/* ── TRANSITION DELAY UTILITIES ── */
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.12s; }
.delay-3 { transition-delay: 0.15s; }
.delay-4 { transition-delay: 0.22s; }
.delay-5 { transition-delay: 0.30s; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Shared components
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-inner { padding: 16px 20px; max-width: 100%; }
  .nav-links { display: none; }
  .lang-toggle { display: none; }
  nav.scrolled .nav-inner { width: calc(100% - 40px); }
  .nav-hamburger { display: flex; }

  .footer-inner { padding: 40px 20px 0; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 36px; }
  .footer-btt-col { grid-column: 2; grid-row: 1; align-self: start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0)); gap: 6px; }

  .section-header { flex-direction: column; align-items: flex-start; margin-bottom: 40px; }
  .section-link { padding-bottom: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   HOVER GUARDS — only real pointer devices
   ═══════════════════════════════════════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
  .section-link:hover { opacity: 0.7; text-underline-offset: 7px; }

  .footer-social-icon:hover {
    background: var(--iris);
    border-color: var(--iris);
    color: #fff;
    transform: translateY(-3px);
  }

  .btn-outline:hover { box-shadow: 0 8px 24px rgba(114,112,234,0.25); }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
/* ── STATS HOVER ── */
@media (hover: hover) and (pointer: fine) {
  .stat { cursor: default; }
  .stat:hover { color: var(--iris); letter-spacing: 2.2px; }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    transition: opacity 0.3s ease;
    transform: none !important;
  }
  .starburst, .grain-cta { animation: none; }
  .mobile-nav-links a {
    transition: opacity 0.2s ease, color 0.15s;
    transform: none !important;
  }
  .cursor-dot, .cursor-ring { transition: none; }
  .svc-tag:hover { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   STATS — individual item fade-in
   ═══════════════════════════════════════════════════════════════ */
.stat {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out),
              color 0.2s var(--ease-out), letter-spacing 0.2s var(--ease-out);
}
.stat.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   PROJECT CARDS — shared component (index + work pages)
   ═══════════════════════════════════════════════════════════════ */
#work {
  padding: 0 max(20px, calc((100% - 1488px) / 2)) 120px;
  position: relative;
}
#work-grid {
  padding: 0 max(20px, calc((100% - 1488px) / 2)) 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-feature {
  display: grid;
  grid-template-columns: 3fr 2fr;
  height: 600px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  will-change: transform;
  transform: translateZ(0);
}
.proj-img {
  position: relative;
  overflow: hidden;
}
.proj-img img {
  position: absolute;
  width: 100%;
  height: 200%;
  object-fit: cover;
  top: -60%;
  transition: transform 0.5s var(--ease-out), filter 0.45s var(--ease-out);
  left: 0;
}
.proj-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(14,14,14,1) 0%, rgba(14,14,14,0.53) 24%, rgba(14,14,14,0) 54%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  transition: background 0.25s var(--ease-out);
}
.proj-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(42px, 5.5vw, 74px);
  color: var(--offwhite);
  letter-spacing: -3.4px;
  text-transform: uppercase;
  line-height: 1.25;
}
.proj-tags {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--iris);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 14px;
}
.proj-sidebar {
  background: #262626;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.proj-sidebar-body {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 19px;
  color: var(--offwhite);
  line-height: 1.55;
}
.proj-link {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #969696;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s, text-underline-offset 0.2s var(--ease-out);
}
.proj-link:hover { color: var(--offwhite); text-underline-offset: 7px; }
.proj-link::after {
  content: '';
  position: absolute;
  inset: -1000px;
  z-index: 0;
}

.projects-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  height: 380px;
}
.projects-row--3 {
  grid-template-columns: repeat(3, 1fr);
  height: auto;
  gap: 14px;
}
.projects-row--3 .proj-card {
  height: clamp(300px, 28vw, 420px);
}

.proj-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  cursor: pointer;
  will-change: transform;
  transform: translateZ(0);
}
.proj-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-out), filter 0.45s var(--ease-out);
}

/* Grain texture on card images (always-present, subtle) */
.proj-card::before,
.proj-img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.45'/%3E%3C/svg%3E");
  opacity: 0.10;
  mix-blend-mode: overlay;
  border-radius: inherit;
  transition: opacity 0.45s var(--ease-out);
}

/* Work page featured badge */
.work-feat-badge {
  position: absolute;
  top: 36px; left: 44px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(237,232,216,0.6);
  background: rgba(20,20,20,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 18px;
  border-radius: 100px;
  z-index: 4;
}

/* ── HOVER GUARDS — project cards ── */
@media (hover: hover) and (pointer: fine) {
  .proj-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  }
  /* Worn Film hover: desaturate + contrast punch */
  .proj-card:hover img {
    transform: scale(1.05);
    filter: brightness(0.88) saturate(0.75) contrast(1.12);
  }
  .proj-card:hover::before { opacity: 0.26; }

  .project-feature:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.3);
  }
  .project-feature:hover .proj-img img {
    transform: scale(1.04);
    filter: brightness(0.88) saturate(0.75) contrast(1.12);
  }
  .project-feature:hover .proj-img::before { opacity: 0.26; }
}

/* ── TOUCH PRESS STATES — non-hover devices only ── */
@media (hover: none) {
  .service-card:active {
    transform: scale(0.98);
    transition: transform 160ms ease-out;
    background: #2a2a2a;
  }
  .proj-card:active {
    transform: scale(0.98);
    transition: transform 160ms ease-out;
  }
  .project-feature:active {
    transform: scale(0.98);
    transition: transform 160ms ease-out;
  }
  .btn-cta:active {
    transform: scale(0.97);
    transition: transform 160ms ease-out;
  }
  .btn-outline:active {
    transform: scale(0.97);
    transition: transform 160ms ease-out;
  }
  .contact-social-pill:active {
    transform: scale(0.97);
    transition: transform 160ms ease-out;
  }
}

/* ── PROJECT CARDS RESPONSIVE ── */
@media (max-width: 1024px) {
  .project-feature { grid-template-columns: 1fr; height: auto; }
  .proj-img { height: 380px; }
  .proj-img img { position: relative; top: 0; height: 100%; }
  .projects-row { height: auto; }
  .projects-row--3 { grid-template-columns: repeat(2, 1fr); }
  .proj-card { height: 300px; }
}
@media (max-width: 768px) {
  #work { padding: 0 20px 80px; }
  #work-grid { padding: 0 20px 80px; }
  .projects-row { grid-template-columns: 1fr; height: auto; gap: 16px; }
  .projects-row--3 { grid-template-columns: 1fr; }
  .proj-card { height: 260px; }
  .project-feature { height: auto; }
  .proj-img { height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .proj-card, .project-feature { transition: box-shadow 0.2s ease; }
  .proj-card img, .proj-img img { transition: none; }
  .proj-card:hover, .project-feature:hover { transform: none; }
}

/* ── WORK PAGE HERO ── */
#work-hero {
  padding: clamp(120px, 14vh, 168px) max(20px, calc((100% - 1488px) / 2)) clamp(56px, 7vh, 88px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.work-hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--matcha);
  display: flex;
  align-items: center;
  gap: 14px;
}
.work-hero-eyebrow::before {
  content: '';
  display: block;
  width: 36px; height: 1px;
  background: var(--matcha);
  flex-shrink: 0;
}
.work-hero-heading {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(72px, 10vw, 144px);
  color: var(--offwhite);
  letter-spacing: clamp(-3px, -0.45vw, -6px);
  line-height: 0.9;
}
.work-hero-heading .it { font-style: italic; color: var(--iris); }
.work-hero-sub {
  font-family: 'Instrument Sans', sans-serif;
  font-size: clamp(15px, 1.2vw, 18px);
  color: rgba(237,232,216,0.45);
  max-width: 520px;
  line-height: 1.65;
  margin-top: 12px;
}
@media (max-width: 768px) {
  #work-hero { padding: 120px 24px 56px; }
}
