/* ============================================================
   Mabel Cox — Swiss brutalist system
   Scale: 12/15/18/21/24/27/30/33 · multiples of 3
   ============================================================ */

:root {
  --bg-primary: #0b0b0e;
  --bg-secondary: #0c0d11;
  --bg-surface: #14151b;

  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.22);

  --c-burgundy: #8f173f;
  --c-gold: #D89E28;

  --accent-primary: var(--c-gold);
  /* Dos vinos casi gemelos — luz especial sin chillar */
  --grad-wine: radial-gradient(ellipse 130% 100% at 50% 0%, #2b0f1b 0%, #1c0910 46%, #14060b 100%);

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Geist Mono', 'SF Mono', Consolas, monospace;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.36s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-zoop: cubic-bezier(0.76, 0, 0.24, 1);
}

[data-theme="light"] {
  /* Warm Muted Linen & Japanese Washi Paper — zero glare, comfortable warm reading */
  --bg-primary: #F3EFEA;
  --bg-secondary: #EBE6DF;
  --bg-surface: #F8F5F0;

  --text-primary: #1E1B18;
  --text-secondary: #3D3731;
  --text-muted: #5C544B;

  --border-subtle: rgba(114, 12, 50, 0.14);
  --border-active: rgba(114, 12, 50, 0.32);

  --accent-primary: #620b2b;

  --grad-gray: radial-gradient(ellipse 130% 100% at 50% 0%, #F3EFEA 0%, #EBE6DF 46%, #E3DCD3 100%);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* Global Fixed Architectural Technical Grid (Ecuadesigners inspired sandwich layer)
   - Fixed to viewport: stays stationary while page content scrolls
   - Z-index 108: sits above all section backgrounds (Hero, Work, Services, About, Contact, Footer)
   - Sits strictly BELOW section content text (z:115), buttons (z:120), interactive phone (z:210), header (z:1000)
   - Broader grid spacing: 48px 48px (Base-3 architectural scale)
   - Linear gradient mask: center 1/3 (32% - 68%) smoothly transparent for pristine text readability, outer 2/3 shows technical grid
   - Pointer-events: none: zero interference with clicking or scrolling */
body::before {
  display: none !important;
}

/* Light Mode: Sacred Mountain-to-Torii Dawn Panorama — High-presence 24% fixed viewport background */
[data-theme="light"] body::before {
  content: '';
  display: block !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1; /* Behind all section content, above raw body bg */
  background: url("assets/light-mountain-dawn-scroll.webp") center top / cover no-repeat;
  opacity: 0.24;
  filter: contrast(1.08) saturate(1.15);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 0%, transparent 38%, rgba(0, 0, 0, 0.55) 72%, black 100%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 0%, transparent 38%, rgba(0, 0, 0, 0.55) 72%, black 100%);
  pointer-events: none;
  z-index: 520; /* In front of section backgrounds & footer (z-index: 500) */
}

[data-theme="light"] body::after {
  background-image: 
    linear-gradient(to right, rgba(143, 23, 63, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(143, 23, 63, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 0%, transparent 25%, rgba(0, 0, 0, 0.85) 65%, black 100%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 0%, transparent 25%, rgba(0, 0, 0, 0.85) 65%, black 100%);
  opacity: 1;
}

.hero-full-section,
.work-section,
.services-full-section,
.about-section {
  background-attachment: fixed;
}

.feed-image-wrap {
  position: relative;
}

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

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

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-primary);
  color: #FFFFFF;
}

[data-theme="light"] ::selection {
  background: #720c32;
  color: #FFFFFF;
}

/* Custom cursor: only active on desktop fine pointers */
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor [role="button"],
  body.has-custom-cursor input {
    cursor: none !important;
  }
}

.cursor-swiss {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  border: 1.5px solid var(--c-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s ease,
              border-color 0.2s ease,
              opacity 0.2s ease;
}

[data-theme="light"] .cursor-swiss {
  border-color: #620b2b;
}

.cursor-swiss.hovered {
  width: 48px;
  height: 48px;
  margin-top: -24px;
  margin-left: -24px;
  background: rgba(216, 158, 40, 0.16);
  border-color: var(--c-gold);
}

[data-theme="light"] .cursor-swiss.hovered {
  background: rgba(98, 11, 43, 0.12);
  border-color: #620b2b;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  margin-left: -3px;
  background: var(--c-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

[data-theme="light"] .cursor-dot {
  background: #620b2b;
}

@media (max-width: 768px), (hover: none), (pointer: coarse) {
  .cursor-swiss, .cursor-dot { display: none !important; }
}

/* ============================================================
   Splash intro — Architectural Welcome Sequence
   ============================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #09080c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Architectural grid on splash — same as body::after global layer */
.splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 20%, rgba(0, 0, 0, 0.6) 65%, black 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 20%, rgba(0, 0, 0, 0.6) 65%, black 100%);
  pointer-events: none;
  z-index: 1;
}

[data-theme="light"] .splash::after {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

[data-theme="light"] .splash {
  background-color: #F3EFEA !important;
  color: #14070d;
}

[data-theme="light"] .splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("assets/light-mountain-dawn-scroll.webp") center top / cover no-repeat;
  opacity: 0.24;
  filter: contrast(1.08) saturate(1.15);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .splash-title {
  color: #14070d;
}

.splash.is-exiting {
  opacity: 0;
  pointer-events: none;
}

/* Hide Swiss cursor & dots during splash */
body.splash-locked .cursor-swiss,
body.splash-locked .cursor-dot {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.splash-locked {
  overflow: hidden;
}

.splash-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 23, 63, 0.18) 0%, rgba(43, 15, 27, 0.12) 40%, transparent 70%);
  pointer-events: none;
}

[data-theme="light"] .splash-glow {
  background: radial-gradient(circle, rgba(216, 158, 40, 0.18) 0%, rgba(114, 12, 50, 0.08) 40%, transparent 70%);
}

.splash-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 860px;
  width: 100%;
}

.splash-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

/* ── Hire text — siempre visible (protagonista) ── */
.splash-hire {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.95rem);
  font-weight: 600;
  color: var(--text-primary);
  gap: 0.65rem;
  letter-spacing: -0.01em;
}

.hire-star {
  color: var(--accent-primary);
  font-size: 0.85em;
  vertical-align: 0.12em;
  animation: starBreathe 2.4s ease-in-out infinite;
}

@keyframes starBreathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.92); }
}

.splash-hire-link {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.splash-hire-link:hover {
  border-bottom-color: var(--accent-primary);
}

/* ── Loader — debajo del Available, desaparece al 100% ── */
.splash-loader {
  width: min(360px, 82vw);
  margin: 1.5rem auto 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 1, 1);
}

.splash-loader.bar-done {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.splash-bar {
  position: relative;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  border-radius: 1px;
}

[data-theme="light"] .splash-bar {
  background: rgba(114, 12, 50, 0.15);
}

.splash-bar i {
  position: absolute;
  inset: 0 100% 0 0;
  background: var(--c-gold);
  box-shadow: 0 0 14px var(--c-gold);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .splash-bar i {
  background: var(--accent-primary);
  box-shadow: 0 0 12px rgba(114, 12, 50, 0.4);
}

.splash-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

[data-theme="light"] .splash-meta {
  color: rgba(58, 53, 48, 0.6);
}

.splash-meta b {
  font-weight: 600;
  color: var(--c-gold);
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .splash-meta b {
  color: var(--accent-primary);
}

/* Email — discreto bajo todo */
.splash-email {
  display: inline-block;
  margin-top: 1.75rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--transition-fast);
}

[data-theme="light"] .splash-email {
  color: var(--text-secondary);
}

.splash-email:hover {
  color: var(--text-primary);
}

/* ============================================================
   Zoop links (roll on hover)
   ============================================================ */
.zoop-link {
  display: inline-block;
  position: relative;
  overflow: hidden;
  height: 1.4em;
  vertical-align: middle;
  text-decoration: none;
  color: inherit;
}

.zoop-link .zoop-inner-default {
  display: block;
  line-height: 1.4;
  transition: transform 0.35s var(--ease-zoop);
}

.zoop-link .zoop-inner-hover {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  line-height: 1.4;
  color: var(--c-gold);
  transition: transform 0.35s var(--ease-zoop);
}

.zoop-link:hover .zoop-inner-default {
  transform: translateY(-100%);
}

.zoop-link:hover .zoop-inner-hover {
  transform: translateY(-100%);
}

/* ============================================================
   Header & Modular Layout Components
   ============================================================ */
site-header, site-prefooter, site-footer {
  display: block;
  width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 3rem;
  background: transparent;
  transition: background 0.36s ease, padding 0.36s ease, backdrop-filter 0.36s ease, -webkit-backdrop-filter 0.36s ease;
}

.header-inner {
  max-width: 1248px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.site-header.is-scrolled {
  background: rgba(11, 11, 14, 0.94) !important;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(143, 23, 63, 0.08);
  box-shadow: 0 4px 20px -4px rgba(114, 12, 50, 0.04);
}

.brand-wrap {
  justify-self: start;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.brand-star {
  color: var(--accent-primary);
  font-size: 0.75rem;
  margin-right: 0.4em;
  vertical-align: 0.08em;
}

.header-right-group {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.6875rem;
}

.nav-menu .btn-nav {
  margin-left: 0.5625rem;
}

.nav-link {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.375rem 0.125rem 0.5rem;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active,
.nav-link.on {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 2px;
  background: var(--c-burgundy);
  border-radius: 1px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  pointer-events: none;
}

.nav-link.active::after,
.nav-link.on::after,
.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

[data-theme="light"] .nav-link::after {
  background: var(--c-burgundy);
}

.control-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1;
}

[data-theme="light"] .control-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(114, 12, 50, 0.16);
}

.pill-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

[data-theme="light"] .pill-btn {
  color: rgba(26, 23, 21, 0.65);
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

[data-theme="light"] .pill-btn:hover {
  background: rgba(114, 12, 50, 0.08);
  color: var(--accent-primary);
}

.pill-btn:active {
  transform: scale(0.96);
}

.pill-btn-icon {
  padding: 4px 6px;
  width: 28px;
  height: 24px;
}

.pill-btn-icon svg {
  display: block;
}

.pill-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  user-select: none;
  padding: 0 2px;
}

[data-theme="light"] .pill-divider {
  color: rgba(114, 12, 50, 0.2);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

/* ============================================================
   Buttons — flat, invert on hover
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.9375rem 1.6875rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--c-burgundy);
  color: #ffffff !important;
  border-color: var(--c-burgundy);
}

.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0b0b0e !important;
}

[data-theme="light"] .btn-primary {
  background: var(--c-burgundy);
  color: #ffffff !important;
  border-color: var(--c-burgundy);
}

[data-theme="light"] .btn-primary:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: #ffffff !important;
}

.btn-nav {
  padding: 0.5625rem 1.125rem;
  font-size: 0.9375rem;
  background: var(--c-burgundy);
  color: #ffffff !important;
  border-color: var(--c-burgundy);
}

.btn-nav:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0b0b0e !important;
}

[data-theme="light"] .btn-nav {
  background: var(--accent-primary);
  color: #ffffff !important;
  border-color: var(--accent-primary);
}

[data-theme="light"] .btn-nav:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: #0b0b0e !important;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--border-active);
  background: var(--bg-surface);
}

[data-theme="light"] .btn-secondary:hover {
  border-color: var(--c-gold);
  background: var(--c-gold);
  color: #0b0b0e !important;
}

/* ============================================================
   Hero
   ============================================================ */
.hero-full-section {
  min-height: 96dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6.5rem 3rem 2.5rem;
  overflow: hidden;
  z-index: 10;
  background: linear-gradient(180deg, #210b14 0%, #14070d 32%, var(--bg-primary) 82%);
}

[data-theme="light"] .hero-full-section {
  /* Semi-transparent — torii sanctuary from body::before (fixed) shows through */
  position: relative;
  background: rgba(250, 248, 245, 0.72);
  overflow: hidden;
}






.hero-container {
  max-width: 1248px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 20;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.eyebrow-cursor {
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-left: 0.2em;
  vertical-align: -0.08em;
  background: var(--accent-primary);
  animation: cursorBlink 1.1s steps(1) infinite;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

.hero-title {
  font-size: clamp(2.8125rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-highlight {
  color: var(--accent-primary);
}

.hero-description {
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  color: var(--text-secondary);
  max-width: 840px;
  text-wrap: pretty;
}

.hero-cta-group {
  margin-top: 2.25rem;
  display: flex;
  gap: 1.125rem;
  flex-wrap: wrap;
}

.hero-cta-group .btn {
  width: fit-content;
}

/* Hero entrance stagger */
html.js .hero-container > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js .hero-full-section.hero-in .hero-container > * {
  opacity: 1;
  transform: none;
}

html.js .hero-full-section.hero-in .hero-container > :nth-child(2) {
  transition-delay: 0.12s;
}

html.js .hero-full-section.hero-in .hero-container > :nth-child(3) {
  transition-delay: 0.24s;
}

html.js .hero-full-section.hero-in .hero-container > :nth-child(4) {
  transition-delay: 0.36s;
}

/* ============================================================
   Section rhythm: hero dark → 01 gray → 02 dark → 03 gray
   ============================================================ */
main {
  position: relative;
  width: 100%;
}

.work-section {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 4.5rem 3rem 6.75rem;
  background-color: #08080a;
}

[data-theme="light"] .work-section {
  background-color: var(--bg-primary);
}

.services-full-section {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 6.75rem 3rem;
  background-color: var(--bg-primary);
}

.about-section {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 6.75rem 3rem 0;
  background-color: var(--bg-secondary);
}

.contact-full-section {
  position: relative;
  z-index: 10;
}

.section-header {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin-bottom: 3.5rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.section-header-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  width: 100%;
}

.section-header-action {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-bottom: none !important;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.section-header-action:hover {
  color: var(--c-gold);
  transform: translateX(3px);
}

[data-theme="light"] .section-header-action {
  color: var(--c-burgundy);
  border-bottom: none !important;
}

[data-theme="light"] .section-header-action:hover {
  color: #520d24;
}

@media (max-width: 768px) {
  .section-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.work-more-link {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  white-space: nowrap;
}

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.subtitle-link {
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-block;
  transition: color var(--transition-fast);
}

.subtitle-link:hover {
  color: var(--text-primary);
}

/* ============================================================
   Work: filters + cards
   ============================================================ */
.feed-grid {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.feed-item[hidden] {
  display: none;
}

.feed-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.feed-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.feed-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.1875rem 0.5625rem;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.feed-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px dashed var(--border-subtle);
  padding: 0.1875rem 0.5625rem;
}

.feed-image-wrap {
  position: relative;
  z-index: 14;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-surface);
  padding: 0;
}

.feed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-zoop), opacity var(--transition-smooth);
}

.feed-img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.feed-image-wrap:hover .feed-img-base,
.feed-image-wrap:focus-visible .feed-img-base {
  opacity: 0;
}

.feed-image-wrap:hover .feed-img-hover,
.feed-image-wrap:focus-visible .feed-img-hover {
  opacity: 1;
}

.feed-image-wrap:hover .feed-img-base {
  transform: scale(1.03);
}

.feed-image-badge {
  position: absolute;
  bottom: 0.9375rem;
  right: 0.9375rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0b0b0e;
  background: var(--c-gold);
  padding: 0.375rem 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.feed-image-wrap:hover .feed-image-badge,
.feed-image-wrap:focus-visible .feed-image-badge {
  opacity: 1;
}

.feed-content {
  margin-top: 1.125rem;
}

.feed-title {
  font-family: var(--font-display);
  font-size: 1.6875rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  min-height: 2.25rem;
}

.feed-desc {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  min-height: 4.5rem;
}

.feed-links {
  margin-top: 0.75rem;
}

.feed-link {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.feed-link:active {
  transform: scale(0.96);
}

/* ============================================================
   Services (Editorial Style with Vertical Dividers)
   ============================================================ */
.services-container {
  position: relative;
  z-index: 20;
  max-width: 1248px;
  margin: 0 auto;
}

.services-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.service-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.75rem 2.5rem;
  border-right: 1px solid var(--border-subtle);
  transition: background var(--transition-smooth);
}

.service-row:first-child {
  padding-left: 1.125rem;
}

.service-row:last-child {
  border-right: none;
  padding-right: 1.125rem;
}

.service-row:hover {
  background: linear-gradient(175deg, rgba(38, 28, 8, 0.78) 0%, rgba(26, 18, 5, 0.85) 60%, rgba(18, 12, 4, 0.92) 100%);
  border-color: rgba(216, 158, 40, 0.35);
  box-shadow: 0 16px 36px -12px rgba(216, 158, 40, 0.18), inset 0 0 0 1px rgba(216, 158, 40, 0.22);
}

.service-row:hover .service-icon-wrap {
  color: #FFE699;
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(216, 158, 40, 0.65));
}

.service-row:hover .service-row-title {
  color: #FFFDF5;
}

.service-row:hover .service-row-desc {
  color: rgba(255, 255, 255, 0.88);
}

.service-row:hover .service-row-tags {
  border-top-color: rgba(216, 158, 40, 0.35);
}

.service-row:hover .service-tag-pill {
  color: rgba(255, 245, 220, 0.92);
}

.service-row:hover .service-tag-pill::before {
  color: #FFE699;
}

[data-theme="light"] .service-row:hover {
  background: linear-gradient(175deg, #8F173F 0%, #761234 60%, #5E0D29 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 16px 36px -12px rgba(114, 12, 50, 0.28) !important;
}

[data-theme="light"] .service-row:hover .service-icon-wrap {
  color: #F8D888 !important;
  transform: translateY(-2px);
  filter: none !important;
}

[data-theme="light"] .service-row:hover .service-row-title {
  color: #FFFFFF !important;
}

[data-theme="light"] .service-row:hover .service-row-desc {
  color: rgba(255, 255, 255, 0.88) !important;
}

[data-theme="light"] .service-row:hover .service-row-tags {
  border-top-color: rgba(255, 255, 255, 0.24) !important;
}

[data-theme="light"] .service-row:hover .service-tag-pill {
  color: rgba(255, 255, 255, 0.78) !important;
}

[data-theme="light"] .service-row:hover .service-tag-pill::before {
  color: #F8D888 !important;
}

.service-row-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  width: 100%;
  min-height: 3.75rem;
}

.service-icon-wrap {
  color: var(--c-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 2px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

[data-theme="light"] .service-icon-wrap {
  color: var(--c-burgundy);
}

.service-row-title {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.service-row-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 4.5rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  transition: color var(--transition-fast);
}

.service-row-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  transition: border-color var(--transition-fast);
}

.service-row:hover .service-row-tags {
  border-top-color: var(--border-active);
}

[data-theme="light"] .service-row-tags {
  border-top: 1px solid var(--border-subtle);
}

.service-tag-pill {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.service-tag-pill::before {
  content: '\2014\00a0';
  color: var(--c-gold);
  transition: color var(--transition-fast);
}

[data-theme="light"] .service-tag-pill::before {
  color: var(--c-burgundy);
}

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  max-width: 1248px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.about-content {
  position: relative;
  z-index: 20;
  align-self: center;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.375rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 1.125rem;
  text-wrap: balance;
}

.about-paragraphs {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
}

.about-cta-row {
  margin-top: 1.5rem;
}

.about-cta-row .btn-primary {
  background: var(--c-burgundy);
  border-color: var(--c-burgundy);
  color: #ffffff !important;
}

.about-cta-row .btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0b0b0e !important;
}

[data-theme="light"] .about-cta-row .btn-primary {
  background: var(--c-burgundy);
  border-color: var(--c-burgundy);
  color: #ffffff !important;
}

[data-theme="light"] .about-cta-row .btn-primary:hover {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: #ffffff !important;
}

/* Phone mockup — emerges from the section bottom */
.about-visual {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  position: relative;
  z-index: 210;
  isolation: isolate;
}

.phone-clipped-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 210;
  isolation: isolate;
}

.phone-clipped-frame {
  width: 100%;
  height: 520px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: none;
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  box-shadow: 0 -9px 24px -6px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 20;
  overflow: hidden;
}

[data-theme="light"] .phone-clipped-frame {
  border-color: rgba(26, 23, 21, 0.22);
  box-shadow: 0 -9px 24px -6px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  z-index: 20;
}

/* Glass reflection — very subtle, static */
.phone-clipped-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 30%, transparent 48%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--bg-secondary);
}

.phone-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.36s ease, transform 0.36s ease;
  pointer-events: none;
}

.phone-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.phone-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  background: rgba(11, 11, 14, 0.72);
  padding: 9px 15px;
  border-radius: 999px;
  z-index: 9;
}

.phone-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid transparent;
  background-clip: content-box;
  background-color: rgba(255, 255, 255, 0.9);
  opacity: 0.75;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.phone-dot:hover {
  opacity: 1;
}

.phone-dot.active {
  background-color: var(--c-gold);
  opacity: 1;
  transform: scale(1.15);
}

/* ============================================================
   Marquee band — Golden Brand Ribbon
   ============================================================ */
.marquee-wrap {
  position: relative;
  z-index: 30;
  width: 100%;
  overflow: hidden;
  background: var(--c-gold);
  padding: 1.125rem 0;
  display: flex;
  user-select: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  flex-shrink: 0;
  animation: marqueeScroll 30s linear infinite;
  will-change: transform;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding-right: 2.25rem;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #0b0b0e !important;
  text-transform: uppercase;
}

.marquee-dot {
  color: #0b0b0e !important;
}

[data-theme="light"] .marquee-wrap {
  background: var(--c-gold);
}

[data-theme="light"] .marquee-group {
  color: #0b0b0e !important;
}

[data-theme="light"] .marquee-dot {
  color: #0b0b0e !important;
}

/* ============================================================
   Contact — "Rojo con rayitas" (Technical grid over rich velvet wine in both modes)
   ============================================================ */
.contact-full-section {
  width: 100%;
  padding: 7.5rem 3rem;
  text-align: center;
  background:
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(28, 5, 16, 0.55) 75%, #1c0510 100%),
    radial-gradient(ellipse 110% 85% at 50% 30%, #761435 0%, #520d24 45%, #2a0715 78%, #1c0510 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .contact-full-section {
  background:
    linear-gradient(180deg, #1c0510 0%, rgba(28, 5, 16, 0.85) 40%, #1c0510 100%),
    radial-gradient(ellipse 110% 85% at 50% 30%, #761435 0%, #520d24 45%, #2a0715 78%, #1c0510 100%) !important;
  color: #ffffff;
}

.contact-container {
  position: relative;
  z-index: 20;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.625rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-align: center;
}

.contact-desc {
  font-size: 1.3125rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

[data-theme="light"] .contact-desc {
  color: rgba(255, 255, 255, 0.88);
}

.contact-box {
  margin-top: 1.125rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.contact-email-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  position: relative;
  padding-bottom: 6px;
}

.email-copy-btn {
  font-family: var(--font-display);
  font-size: clamp(1.6875rem, 4vw, 3.375rem);
  font-weight: 700;
  color: var(--c-gold);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: center;
  line-height: 1.1;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.email-copy-btn:hover {
  color: #FFFFFF;
}

[data-theme="light"] .email-copy-btn:hover {
  color: #FFFFFF;
}

.email-copy-btn.is-copied {
  color: #FFFFFF;
}

[data-theme="light"] .email-copy-btn.is-copied {
  color: #FFFFFF;
}

/* Dark mode: pure vivid gold without diffuse glow */
[data-theme="dark"] .email-copy-btn,
[data-theme="dark"] .email-mailto-btn {
  color: var(--c-gold);
}

.email-mailto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-gold);
  text-decoration: none;
  line-height: 1;
  padding: 0 0 0 8px;
  transition: transform var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}

.email-mailto-btn:hover {
  transform: translateY(-2px);
  color: #FFFFFF;
}

[data-theme="light"] .email-mailto-btn:hover {
  color: #FFFFFF;
}

.contact-email-row::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--c-gold);
  border-radius: 2px;
  transition: background-color var(--transition-fast);
}

[data-theme="dark"] .contact-email-row::after {
  background: var(--c-gold);
}

/* ============================================================
   Footer — legal | credits | top
   ============================================================ */
site-footer {
  margin-top: auto;
  display: block;
  width: 100%;
}

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: 1.5rem max(1.5rem, calc((100% - 1248px) / 2));
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  background: #1c0510 !important;
  border-top: none;
  position: relative;
  z-index: 500;
}

.site-footer > * {
  position: relative;
  z-index: 530; /* In front of grid (z-index: 520) */
}

[data-theme="light"] .site-footer {
  background: #1c0510 !important;
  border-top: none;
  position: relative;
  z-index: 500;
}

.footer-center-credits {
  display: flex;
  align-items: center;
  gap: 0.375rem 0.9375rem;
  justify-self: start;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.footer-credit-block {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.footer-credit-link {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color var(--transition-fast);
}

.footer-credit-link:hover {
  color: var(--accent-primary);
}

[data-theme="light"] .footer-credit-link {
  color: var(--c-gold);
}

[data-theme="light"] .footer-credit-link:hover {
  color: #FFFFFF;
}

[data-theme="light"] .footer-center-credits {
  color: rgba(255, 255, 255, 0.75);
}

.footer-sep {
  color: var(--accent-primary);
  opacity: 0.85;
}

[data-theme="light"] .footer-sep {
  color: var(--c-gold);
}

.footer-bottom-row {
  display: contents;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  justify-self: end;
}

.legal-link {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.legal-link:hover {
  color: var(--accent-primary);
}

[data-theme="light"] .legal-link {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .legal-link:hover {
  color: #FFFFFF;
}

.legal-sep {
  color: var(--text-muted);
  opacity: 0.6;
}

[data-theme="light"] .legal-sep {
  color: rgba(255, 255, 255, 0.4);
}

.footer-top-slot {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
}

.back-to-top-clean {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-gold);
  background: transparent;
  border: 1px solid var(--border-active);
  border-radius: 50%;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.back-to-top-clean:hover {
  border-color: var(--c-gold);
  color: #FFFFFF;
  transform: translateY(-2px);
}

[data-theme="light"] .back-to-top-clean {
  border-color: rgba(216, 158, 40, 0.4);
  color: var(--c-gold);
}

[data-theme="light"] .back-to-top-clean:hover {
  border-color: var(--c-gold);
  color: #FFFFFF;
  background: rgba(216, 158, 40, 0.12);
}

/* ============================================================
   Chapter Progress Rail (PAP-WEB-RAIL-01 — Minimalist Vertical HUD)
   ============================================================ */
.rail {
  position: fixed;
  right: clamp(16px, 2.2vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  pointer-events: auto;
}

.rail button {
  width: 32px;
  height: 14px;
  display: grid;
  place-items: center;
  background: transparent !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  outline: none;
  position: relative;
  transition: transform 0.2s ease;
}

.rail button:focus-visible {
  outline: 1px dotted var(--c-gold);
}

.rail i {
  display: block;
  width: 14px;
  height: 1.5px;
  background: rgba(242, 237, 228, 0.26);
  border-radius: 1px;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.35s ease, box-shadow 0.35s ease;
  pointer-events: none;
}

[data-theme="light"] .rail i {
  background: rgba(26, 23, 21, 0.24);
}

.rail button:hover i {
  width: 22px;
  background: rgba(242, 237, 228, 0.75);
}

[data-theme="light"] .rail button:hover i {
  width: 22px;
  background: rgba(105, 18, 48, 0.7);
}

.rail button.on i {
  width: 26px;
  background: #FFFFFF;
}

[data-theme="light"] .rail button.on i {
  width: 26px;
  background: #691230;
}

@media (max-width: 1080px) {
  .rail {
    display: none !important;
  }
}

/* ============================================================
   Mobile pill nav
   ============================================================ */
.mobile-pill-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 11, 14, 0.94);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  justify-content: space-around;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

[data-theme="light"] .mobile-pill-nav {
  background: rgba(244, 239, 230, 0.94);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.mobile-nav-item {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.mobile-nav-item:hover {
  color: var(--accent-primary);
}

/* ============================================================
   Side Drawer & Hamburger (Tablet & Mobile Architecture)
   ============================================================ */
.drawer-toggle-btn {
  display: none;
  background: transparent !important;
  border: none !important;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
  margin-left: 6px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  width: 32px;
  height: 32px;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.drawer-toggle-btn .burger-bar {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 0px;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background-color var(--transition-fast);
}

.drawer-toggle-btn .bar-top {
  width: 22px;
}

.drawer-toggle-btn .bar-bot {
  width: 14px;
}

.drawer-toggle-btn:hover {
  color: var(--c-gold);
}

.drawer-toggle-btn:hover .bar-bot {
  width: 22px;
}

.drawer-toggle-btn:hover .bar-top {
  width: 16px;
}

.drawer-toggle-btn:active {
  transform: scale(0.95);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 85vw);
  background: #090a0f;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
  z-index: 1200;
  visibility: hidden;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

[data-theme="light"] .side-drawer {
  background: #F4EFE6;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

.side-drawer.is-open {
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .drawer-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.drawer-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.drawer-close-btn {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--text-primary);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 36px 0 auto;
}

.drawer-link {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
}

[data-theme="light"] .drawer-link {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.drawer-link:hover,
.drawer-link.active {
  color: var(--c-gold);
  padding-left: 6px;
}

.drawer-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .drawer-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.drawer-cta {
  width: 100%;
  text-align: center;
  padding: 14px 20px;
  font-size: 0.9375rem;
}

@media (max-width: 990px) {
  .drawer-toggle-btn {
    display: flex;
  }
  .nav-menu {
    display: none !important;
  }
  .btn-nav {
    display: none !important;
  }
  .header-inner {
    grid-template-columns: auto auto !important;
    justify-content: space-between;
  }
}

body.drawer-open {
  overflow: hidden;
}

/* ============================================================
   Modal — flat lightbox
   ============================================================ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 6, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.project-modal.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: 2.25rem;
  scrollbar-width: thin;
}

.modal-close {
  position: absolute;
  top: 1.125rem;
  right: 1.125rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.modal-category {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2.0625rem;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0.5625rem;
  padding-right: 2.5rem;
}

.modal-description {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 680px;
}

.modal-gallery {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.modal-image-wrap {
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.modal-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   Scroll reveal (Altermind style: blur-to-sharp progressive reveal)
   ============================================================ */
html.js [data-reveal] {
  opacity: 0.12;
  filter: blur(5px);
  transform: translateY(20px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

html.js [data-reveal].is-revealed {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .site-header { padding: 1.125rem 2.25rem; }
  .work-section { padding: 4.5rem 2.25rem; }
  .about-section { padding: 4.5rem 2.25rem 0; }
  .services-full-section { padding: 4.5rem 2.25rem; }
  .services-index { grid-template-columns: 1fr; }
  .feed-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-content { padding-bottom: 0; }
  .about-visual { justify-content: center; width: 100%; margin-top: 2rem; }
  .about-phone-embed { width: 100%; display: flex; justify-content: center; }
  .modal-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Mobile Performance: Pure Swiss Mode (No heavy 3D GPU load) */
  #gl,
  #bg-scrim,
  #vignette,
  #grain,
  #fg-sky,
  .fg {
    display: none !important;
    visibility: hidden !important;
  }

  [data-theme="dark"] body {
    background: var(--bg-primary);
  }

  body::before {
    display: none !important;
  }

  [data-theme="dark"] .hero-full-section {
    background:
      radial-gradient(ellipse 75% 65% at 28% 48%, rgba(6, 12, 26, 0.42) 0%, rgba(10, 8, 20, 0.28) 55%, transparent 100%),
      linear-gradient(180deg, rgba(4, 7, 15, 0.36) 0%, rgba(20, 8, 18, 0.24) 50%, rgba(5, 7, 10, 0.38) 100%) !important;
  }

  .site-header { padding: 1.125rem 1.5rem; }
  .header-inner { grid-template-columns: auto auto; }
  .nav-menu { display: none; }
  .btn-nav { display: none; }
  .header-right-group { gap: 1.125rem; }
  .work-section { padding: 3.75rem 1.5rem; }
  .about-section { padding: 3.75rem 1.5rem 0; }
  .services-full-section { padding: 3.75rem 1.5rem; }
  .contact-full-section { padding: 3.75rem 1.5rem; }
  .section-header { margin-bottom: 2.75rem; }
  .feed-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .service-row-tags { align-items: flex-start; }
  
  /* Unified Phone visible, centered and anchored directly over marquee */
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-content { padding-bottom: 0; }
  .about-visual {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 0;
  }
  .about-phone-embed {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .about-phone-embed .phone-stage {
    width: min(340px, 94vw);
    height: 480px;
    margin: 0 auto;
  }
  .about-phone-embed .phone {
    width: 100%;
    height: 480px;
    transform: translateY(22px);
  }

  .marquee-wrap { display: block; }
  .marquee-band { padding: 0.75rem 0; font-size: 0.75rem; }
  .cursor-swiss, .cursor-dot { display: none; }
  .mobile-pill-nav { display: flex; }
  /* Responsive Footer — exact order: (1) Créditos, (2) Privacy + Flecha a un lado */
  .site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2.25rem 1.5rem calc(4.5rem + 1rem);
    text-align: center;
  }

  .footer-center-credits {
    order: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    justify-self: center;
  }

  .footer-bottom-row {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
  }

  .footer-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    justify-self: center;
  }

  .footer-top-slot {
    position: static;
    display: flex;
    align-items: center;
    justify-self: auto;
  }

  .back-to-top-clean {
    position: static;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 560px) {
  .hero-full-section { padding: 5.625rem 1.125rem 2.25rem; }
  .hero-cta-group { flex-direction: column; align-items: flex-start; width: 100%; }
  .hero-cta-group .btn { width: 100%; text-align: center; }
  .splash-title { font-size: clamp(2.0625rem, 8.5vw, 2.625rem); }
  .work-section { padding: 3.375rem 1.125rem; }
  .services-full-section { padding: 3.375rem 1.125rem; }
  .about-section { padding: 3.375rem 1.125rem 0; }
  .contact-full-section { padding: 3.375rem 1.125rem; }
  .section-header { margin-bottom: 2.25rem; }
  .about-visual { margin-top: 1.125rem; }
  .email-copy-btn { font-size: clamp(1.3125rem, 6.5vw, 1.6875rem); }
  .email-mailto-btn { font-size: clamp(1.3125rem, 5.5vw, 1.6875rem); }
  .feed-title { font-size: 1.6875rem; }
  .project-modal { padding: 0.75rem; }
  .modal-card { padding: 1.5rem 1.125rem; max-height: 94vh; }
  .modal-title { font-size: 1.5rem; }
  .modal-description { font-size: 0.875rem; }
  .modal-gallery { gap: 0.875rem; margin-top: 1.125rem; }
  .modal-footer { margin-top: 1.125rem; }
  .modal-footer .btn { width: 100%; text-align: center; }
  .about-phone-embed .phone-stage {
    width: min(324px, 93vw);
    height: 462px;
  }
  .about-phone-embed .phone {
    height: 462px;
    transform: translateY(21px);
  }
  .footer-center-credits {
    flex-direction: column;
    gap: 0.1875rem;
  }
  .footer-center-credits .footer-sep {
    display: none;
  }
}

/* ============================================================
   Reduced motion — keep animations alive (site policy),
   only soften navigation behavior
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  html.js .hero-container > * { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Cinematic 3D WebGL Background (Dark Mode Only)
   ============================================================ */

/* WebGL canvas & ambient post-processing layers */
#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}


#grain {
  position: fixed;
  inset: -1px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-repeat: repeat;
  background-size: 180px 180px;
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 95% at 50% 40%, transparent 25%, rgba(1, 2, 4, 0.82) 100%);
}

#fg-sky {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 4;
  pointer-events: none;
}

/* Foreground Sakura Petals Layer (Ambient organic blossom fall across all sections) */
#sakura-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 15;
  pointer-events: none;
  display: block;
}

/* Foreground bush stage and keyframe sway */
.fg {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.fg-el {
  position: absolute;
  display: block;
  opacity: 0;
}

.fg-el > img {
  width: 100%;
  height: auto;
  opacity: 1;
  filter: saturate(0.88) brightness(0.86);
}

[data-fg-in="up"] {
  transform: translate3d(0, 13%, 0);
}

.fg.fg-active, .fg.fg-retiring {
  position: fixed;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  height: min(56svh, 680px);
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.fg.fg-active .fg-el {
  opacity: 1;
  transform: none;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fg.fg-retiring .fg-el {
  opacity: 0;
  transform: translate3d(0, 8vh, 0) scale(0.98);
  filter: blur(18px);
  transition: opacity 0.68s cubic-bezier(0.16, 1, 0.3, 1), transform 0.78s cubic-bezier(0.16, 1, 0.3, 1), filter 0.78s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   Dark Mode: Scrim transparency & glassmorphic depth
   ============================================================ */
#bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: transparent;
  display: block;
}

[data-theme="dark"] #bg-scrim {
  background: radial-gradient(ellipse 90% 80% at 50% 45%, rgba(5, 7, 14, 0.56) 0%, rgba(5, 8, 16, 0.38) 58%, rgba(4, 5, 8, 0.20) 100%);
}


[data-theme="dark"] html,
[data-theme="dark"] body {
  background: #05070a;
}

/* Hero: Atmospheric midnight blue & burgundy shroud with calibrated center opacity (24%–36%) for high-ticket legibility */
[data-theme="dark"] .hero-full-section {
  background:
    radial-gradient(ellipse 75% 65% at 28% 48%, rgba(6, 12, 26, 0.42) 0%, rgba(10, 8, 20, 0.28) 55%, transparent 100%),
    linear-gradient(180deg, rgba(4, 7, 15, 0.36) 0%, rgba(20, 8, 18, 0.24) 50%, rgba(5, 7, 10, 0.38) 100%) !important;
}

[data-theme="dark"] .hero-description {
  position: relative;
  color: rgba(245, 245, 248, 0.92) !important;
  text-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.85),
    0 4px 16px rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .hero-description::before {
  content: '';
  position: absolute;
  inset: -16px -28px;
  background: radial-gradient(ellipse at 35% 50%, rgba(3, 5, 10, 0.72) 0%, rgba(3, 5, 10, 0.35) 60%, transparent 100%);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(5, 7, 10, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(14, 16, 22, 0.95) !important;
  border-color: var(--c-gold) !important;
}

/* Sections: Seamless atmospheric gradient flow with zero horizontal cuts over 3D scene */
[data-theme="dark"] .work-section,
[data-theme="dark"] .services-full-section,
[data-theme="dark"] .about-section {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
}

/* Work (01) — Soft Atmospheric Fade-in from Hero over 160px: zero harsh cuts over 3D temple scene */
[data-theme="dark"] .work-section {
  position: relative;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-theme="dark"] .work-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 22, 0.30) 0%, rgba(7, 12, 26, 0.64) 180px, rgba(7, 12, 26, 0.64) 100%);
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 160px, black 100%);
  mask-image: linear-gradient(180deg, transparent 0%, black 160px, black 100%);
  pointer-events: none;
  z-index: 1;
}

[data-theme="dark"] .work-section > * {
  position: relative;
  z-index: 2;
}

/* Services (02) — Continuous Deep Midnight Graphite Atmosphere (seamless junction with Work) */
[data-theme="dark"] .services-full-section {
  background: rgba(7, 12, 26, 0.64) !important;
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
}

/* About (03) — Smooth transition into warm velvet dusk before Marquee ribbon */
[data-theme="dark"] .about-section {
  background: linear-gradient(180deg, rgba(7, 12, 26, 0.64) 0%, rgba(8, 10, 22, 0.68) 55%, rgba(13, 8, 18, 0.72) 100%) !important;
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
}

/* Ensure inner contents are perfectly centered in clean grids in both modes */
.work-section .section-header,
.work-section .feed-grid {
  max-width: 1248px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.about-section .about-grid {
  max-width: 1248px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Clean sharp text rendering in dark mode without murky black halos */
[data-theme="dark"] .hero-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .about-title,
[data-theme="dark"] .contact-title {
  color: #FFFFFF;
}

[data-theme="dark"] .about-paragraphs p {
  color: #E2E8F0;
}

/* Marquee: Golden Brand Ribbon in Dark Mode */
[data-theme="dark"] .marquee-wrap {
  position: relative;
  z-index: 30;
  background: var(--c-gold);
}

[data-theme="dark"] .marquee-group {
  color: #0b0b0e !important;
}

/* Contact (Prefooter) & Footer Dark — Exact match with light mode: rich wine gradient with zero sharp cut to footer #1c0510 */
[data-theme="dark"] .contact-full-section {
  background:
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(28, 5, 16, 0.55) 75%, #1c0510 100%),
    radial-gradient(ellipse 110% 85% at 50% 30%, #761435 0%, #520d24 45%, #2a0715 78%, #1c0510 100%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-theme="dark"] .site-footer {
  background: #1c0510 !important;
  border-top: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  position: relative;
  z-index: 500;
}

[data-theme="dark"] .footer-center-credits,
[data-theme="dark"] .footer-legal-links,
[data-theme="dark"] .footer-credit-block,
[data-theme="dark"] .legal-link {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .footer-credit-link {
  color: var(--c-gold);
}

[data-theme="dark"] .footer-credit-link:hover,
[data-theme="dark"] .legal-link:hover {
  color: #FFFFFF;
}

[data-theme="dark"] .footer-sep {
  color: var(--c-gold);
}

[data-theme="dark"] .legal-sep {
  color: rgba(255, 255, 255, 0.4);
}


/* ============================================================
   Light Mode: Strict suppression of heavy 3D post-processing elements
   ============================================================ */
[data-theme="light"] #gl,
[data-theme="light"] #bg-scrim,
[data-theme="light"] #vignette,
[data-theme="light"] #grain,
[data-theme="light"] #fg-sky,
[data-theme="light"] .fg {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Light Mode: sections semi-transparent so fixed panorama (body::before) shows clearly across full scroll */
[data-theme="light"] .hero-full-section {
  position: relative;
  background: rgba(243, 239, 234, 0.52) !important;
  overflow: hidden;
}

[data-theme="light"] .work-section {
  background: rgba(243, 239, 234, 0.72) !important;
}

[data-theme="light"] .services-full-section {
  background: rgba(243, 239, 234, 0.72) !important;
}

[data-theme="light"] .about-section {
  background: rgba(243, 239, 234, 0.72) !important;
}

/* ============================================================
   Cyberpunk CRT Vintage TV + Tympanus/PureCSS Glitch Architecture
   (PAP-WEB-GLITCH-CSS-01 — GPU-Accelerated CRT Beam, Scanlines,
    Chromatic Slicing, Sealed 45° Bevels & Optical HUD Brackets)
   ============================================================ */

/* 1. Global Vintage CRT TV Scanlines & GPU-Composited Tracking Beam (Dark Mode) */
html::before {
  content: "";
  position: fixed;
  top: -240px;
  left: 0;
  width: 100vw;
  height: 220px;
  pointer-events: none;
  z-index: 489;
  will-change: transform;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(216, 158, 40, 0.04) 46%,
    rgba(200, 30, 86, 0.065) 50%,
    rgba(90, 210, 185, 0.035) 54%,
    transparent 100%
  );
  animation: crt-tracking-beam-gpu 7.5s linear infinite;
}

html::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 490;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.22) 0px,
      rgba(0, 0, 0, 0.22) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(200, 30, 86, 0.016) 0px,
      rgba(90, 210, 185, 0.012) 1px,
      rgba(216, 158, 40, 0.016) 2px,
      transparent 3px
    ),
    radial-gradient(ellipse 92% 85% at 50% 50%, transparent 58%, rgba(216, 158, 40, 0.07) 100%);
  animation: crt-phosphor-flicker 5s infinite steps(1, end);
}

@keyframes crt-tracking-beam-gpu {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.9; }
  100% { transform: translate3d(0, calc(100vh + 460px), 0); opacity: 0; }
}

@keyframes crt-phosphor-flicker {
  0%, 91%, 95%, 100% { opacity: 0.92; }
  92% { opacity: 0.68; }
  93% { opacity: 1; }
  94% { opacity: 0.75; }
}

html[data-theme="light"]::before,
html[data-theme="light"]::after {
  display: none !important;
}

/* Light Mode: 100% Pure Swiss Typography — complete suppression of glitch slices and CRT tracking */
[data-theme="light"] .glitch-steampunk::before,
[data-theme="light"] .glitch-steampunk::after {
  display: none !important;
  content: none !important;
  animation: none !important;
  opacity: 0 !important;
}

[data-theme="light"] .feed-image-wrap::before,
[data-theme="light"] .feed-image-wrap::after,
[data-theme="light"] .service-row::before,
[data-theme="light"] .service-row::after {
  display: none !important;
}

/* ============================================================
   Diurnal Sakura Breeze (Light Mode Only — 100% CSS Zero-JS)
   Subtle floating petals drift through viewport without GPU lag
   ============================================================ */
.light-sakura-breeze {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 510; /* Above section backgrounds, below text/buttons & grid (520) */
  overflow: hidden;
}

[data-theme="light"] .light-sakura-breeze {
  display: block;
}

.light-sakura-breeze .petal {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 9px;
  background: radial-gradient(circle at 35% 35%, #FFA8BE 0%, #F57D9F 70%, #D84A74 100%);
  border-radius: 12px 2px 12px 2px;
  opacity: 0.38;
  filter: drop-shadow(0 2px 3px rgba(180, 50, 85, 0.12));
  animation: sakura-fall-drift linear infinite;
  will-change: transform, opacity;
}

.light-sakura-breeze .p1 { left: 8%;  width: 13px; height: 8px;  animation-duration: 14s; animation-delay: -2s; }
.light-sakura-breeze .p2 { left: 24%; width: 15px; height: 10px; animation-duration: 18s; animation-delay: -8s; opacity: 0.28; }
.light-sakura-breeze .p3 { left: 45%; width: 12px; height: 8px;  animation-duration: 16s; animation-delay: -4s; }
.light-sakura-breeze .p4 { left: 63%; width: 16px; height: 11px; animation-duration: 21s; animation-delay: -12s; opacity: 0.32; }
.light-sakura-breeze .p5 { left: 78%; width: 11px; height: 7px;  animation-duration: 15s; animation-delay: -6s; }
.light-sakura-breeze .p6 { left: 91%; width: 14px; height: 9px;  animation-duration: 19s; animation-delay: -10s; opacity: 0.35; }

@keyframes sakura-fall-drift {
  0% {
    transform: translate3d(0, -40px, 0) rotate(0deg) scale(0.9);
    opacity: 0;
  }
  8% {
    opacity: 0.42;
  }
  50% {
    transform: translate3d(60px, 50vh, 0) rotate(190deg) scale(1.05);
    opacity: 0.36;
  }
  92% {
    opacity: 0.32;
  }
  100% {
    transform: translate3d(120px, calc(100vh + 40px), 0) rotate(380deg) scale(0.9);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .light-sakura-breeze .petal,
  .light-birds-flock,
  .light-birds-flock .bird {
    animation: none !important;
  }
}

/* Distant Birds Flock (Pure CSS Zero-JS — Tiny silhouettes drifting towards the clouds) */
.light-birds-flock {
  position: absolute;
  top: 14vh;
  left: 68vw;
  width: 90px;
  height: 50px;
  pointer-events: none;
  animation: birds-distant-drift 42s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  will-change: transform, opacity;
}

.light-birds-flock .bird {
  position: absolute;
  display: block;
  color: #761234;
  opacity: 0.38;
  filter: blur(0.25px);
}

.light-birds-flock .bird svg {
  display: block;
  width: 100%;
  height: 100%;
}

.light-birds-flock .b1 {
  width: 14px;
  height: 7px;
  top: 0;
  left: 20px;
  animation: bird-wing-flap 1.4s ease-in-out infinite;
}

.light-birds-flock .b2 {
  width: 11px;
  height: 6px;
  top: 12px;
  left: 0;
  opacity: 0.28;
  animation: bird-wing-flap 1.3s ease-in-out infinite -0.4s;
}

.light-birds-flock .b3 {
  width: 9px;
  height: 5px;
  top: 18px;
  left: 36px;
  opacity: 0.24;
  animation: bird-wing-flap 1.5s ease-in-out infinite -0.7s;
}

@keyframes bird-wing-flap {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.55);
  }
}

@keyframes birds-distant-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0;
  }
  8% {
    opacity: 0.45;
  }
  75% {
    opacity: 0.35;
  }
  100% {
    /* Slowly recedes upward and into the background horizon */
    transform: translate3d(70px, -45px, 0) scale(0.45);
    opacity: 0;
  }
}

/* 2. PureCSS / Tympanus Multi-Slice Text Glitch (RGB Split + Horizontal Slicing — Dark Mode Only) */
.glitch-steampunk {
  position: relative;
  display: inline-block;
}

.glitch-steampunk::before,
.glitch-steampunk::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: inherit;
  box-sizing: border-box;
  pointer-events: none;
  background: transparent;
}

/* Top Slice: Brand Gold + CRT Phosphor Jade Shift */
.glitch-steampunk::before {
  left: 2px;
  color: inherit;
  text-shadow: -2.5px 0 rgba(90, 210, 185, 0.75), 1.5px -1px #D89E28;
  animation: cyberpunk-slice-top 3.6s infinite linear alternate-reverse;
}

/* Bottom Slice: Brand Burgundy (#8f173f) + Brass Gold */
.glitch-steampunk::after {
  left: -2px;
  color: inherit;
  text-shadow: 2.5px 0 #8f173f, -1.5px 1px #D89E28;
  animation: cyberpunk-slice-bottom 3.1s infinite linear alternate-reverse;
}

.glitch-steampunk:hover::before {
  opacity: 1 !important;
  animation: cyberpunk-hover-top 0.96s ease-in-out infinite;
}

.glitch-steampunk:hover::after {
  opacity: 1 !important;
  animation: cyberpunk-hover-bottom 0.88s ease-in-out infinite;
}

@keyframes cyberpunk-slice-top {
  0%, 54%, 100% {
    opacity: 0;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
  56% {
    opacity: 0.9;
    clip-path: inset(8% 0 68% 0);
    transform: translate(-3px, -0.5px) skewX(-2deg);
  }
  59% {
    opacity: 0.9;
    clip-path: inset(52% 0 18% 0);
    transform: translate(3px, 0.5px) skewX(1.5deg);
  }
  62% {
    opacity: 0;
  }
  78% {
    opacity: 0.85;
    clip-path: inset(26% 0 48% 0);
    transform: translate(-2px, 0);
  }
  81% {
    opacity: 0.85;
    clip-path: inset(74% 0 6% 0);
    transform: translate(2px, -0.5px);
  }
  84% {
    opacity: 0;
  }
}

@keyframes cyberpunk-slice-bottom {
  0%, 50%, 100% {
    opacity: 0;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
  52% {
    opacity: 0.9;
    clip-path: inset(64% 0 10% 0);
    transform: translate(3px, 0.5px) skewX(2deg);
  }
  55% {
    opacity: 0.9;
    clip-path: inset(14% 0 62% 0);
    transform: translate(-3px, -0.5px);
  }
  58% {
    opacity: 0;
  }
  74% {
    opacity: 0.85;
    clip-path: inset(40% 0 32% 0);
    transform: translate(2px, 0.5px) skewX(-1.5deg);
  }
  77% {
    opacity: 0;
  }
}

@keyframes cyberpunk-hover-top {
  0%, 100% {
    opacity: 0;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
  15% {
    opacity: 1;
    clip-path: inset(14% 0 60% 0);
    transform: translate(-3px, -0.5px) skewX(-2deg);
  }
  35% {
    opacity: 0.85;
    clip-path: inset(48% 0 22% 0);
    transform: translate(2.5px, 0.5px) skewX(1.5deg);
  }
  55% {
    opacity: 0;
    transform: none;
  }
  75% {
    opacity: 0.75;
    clip-path: inset(28% 0 44% 0);
    transform: translate(-2px, 0);
  }
}

@keyframes cyberpunk-hover-bottom {
  0%, 100% {
    opacity: 0;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
  20% {
    opacity: 1;
    clip-path: inset(62% 0 14% 0);
    transform: translate(3px, 0.5px) skewX(2deg);
  }
  40% {
    opacity: 0.85;
    clip-path: inset(18% 0 58% 0);
    transform: translate(-2.5px, -0.5px) skewX(-1.5deg);
  }
  60% {
    opacity: 0;
    transform: none;
  }
  80% {
    opacity: 0.75;
    clip-path: inset(42% 0 30% 0);
    transform: translate(2px, 0);
  }
}

/* 3. Tympanus / FreeFrontend Cyberpunk Image Glitch & HUD Corners on Portfolio & Service Cards */
.feed-image-wrap::before,
.feed-image-wrap::after,
.service-row::before,
.service-row::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.service-row {
  position: relative;
}

.feed-image-wrap::before,
.service-row::before {
  top: 10px;
  left: 10px;
  border-top: 2px solid var(--c-gold);
  border-left: 2px solid var(--c-gold);
  transform: translate(-4px, -4px);
}

.feed-image-wrap::after {
  bottom: 10px;
  right: 10px;
  border-bottom: 2px solid #C81E56;
  border-right: 2px solid #C81E56;
  transform: translate(4px, 4px);
}

.service-row::after {
  bottom: 10px;
  right: 10px;
  border-bottom: 2px solid var(--c-gold);
  border-right: 2px solid var(--c-gold);
  transform: translate(4px, 4px);
}

[data-theme="light"] .service-row::before,
[data-theme="light"] .service-row::after {
  display: none !important;
}

.feed-image-wrap:hover::before,
.feed-image-wrap:hover::after,
.service-row:hover::before,
.service-row:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.feed-image-wrap:hover .feed-img-hover {
  animation: tympanus-img-glitch 2.4s infinite steps(1, end);
}

@keyframes tympanus-img-glitch {
  0%, 84%, 100% {
    filter: none;
    transform: scale(1);
  }
  86% {
    filter: drop-shadow(-4px 0 0 rgba(200, 30, 86, 0.78)) drop-shadow(4px 0 0 rgba(90, 210, 185, 0.7)) contrast(1.16);
    transform: scale(1.01) translate(-3px, 1px);
  }
  88% {
    filter: drop-shadow(4px 0 0 rgba(216, 158, 40, 0.85)) hue-rotate(-12deg);
    transform: scale(1.01) translate(3px, -1px);
  }
  90% {
    filter: none;
    transform: scale(1);
  }
  92% {
    filter: drop-shadow(-3px 0 0 rgba(90, 210, 185, 0.75));
    transform: translate(-2px, 0);
  }
}

/* 4. Arasaka Cyber-Luxury 45° Beveled Corners with Sealed Diagonal Stroke & Deep Legible Surface */
.tier-column {
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  background-image:
    linear-gradient(225deg, transparent 12px, rgba(255, 255, 255, 0.22) 12.5px, rgba(255, 255, 255, 0.22) 14px, transparent 14.5px),
    linear-gradient(45deg, transparent 12px, rgba(255, 255, 255, 0.22) 12.5px, rgba(255, 255, 255, 0.22) 14px, transparent 14.5px),
    linear-gradient(180deg, rgba(12, 14, 20, 0.82) 0%, rgba(8, 10, 15, 0.88) 100%) !important;
}

.tier-featured {
  background-image:
    linear-gradient(225deg, transparent 12px, rgba(216, 158, 40, 0.75) 12.5px, rgba(216, 158, 40, 0.75) 14px, transparent 14.5px),
    linear-gradient(45deg, transparent 12px, rgba(216, 158, 40, 0.75) 12.5px, rgba(216, 158, 40, 0.75) 14px, transparent 14.5px),
    linear-gradient(180deg, rgba(28, 22, 14, 0.84) 0%, rgba(28, 11, 18, 0.86) 45%, rgba(9, 10, 14, 0.90) 100%) !important;
}

.tier-column-engine {
  background-image:
    linear-gradient(225deg, transparent 12px, rgba(200, 30, 86, 0.65) 12.5px, rgba(200, 30, 86, 0.65) 14px, transparent 14.5px),
    linear-gradient(45deg, transparent 12px, rgba(200, 30, 86, 0.65) 12.5px, rgba(200, 30, 86, 0.65) 14px, transparent 14.5px),
    linear-gradient(180deg, rgba(32, 10, 20, 0.84) 0%, rgba(16, 7, 13, 0.86) 40%, rgba(9, 10, 14, 0.90) 100%) !important;
}

[data-theme="light"] .tier-column,
[data-theme="light"] .tier-featured,
[data-theme="light"] .tier-column-engine {
  background-image: none !important;
  background-color: #FFFFFF !important;
}

.tier-column::after {
  content: "";
  position: absolute;
  bottom: 9px;
  right: 9px;
  width: 10px;
  height: 10px;
  border-bottom: 1.5px solid var(--accent-primary);
  border-right: 1.5px solid var(--accent-primary);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tier-column:hover::after {
  opacity: 1;
  transform: translate(-2px, -2px);
}

/* Apply 45° bevels strictly to solid-fill primary CTAs so outlined secondary buttons keep 100% intact 4-side borders */
.tier-btn:not(.tier-btn-secondary),
.btn-primary,
.btn-nav,
.archive-btn-open {
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

/* ============================================================
   Pricing & Legal Route Shrouds: Atmospheric Center Veil
   ============================================================ */
[data-theme="dark"] .pricing-main {
  position: relative;
}

[data-theme="dark"] .pricing-main::before {
  content: "";
  position: absolute;
  inset: 40px -40px 40px -40px;
  background: radial-gradient(ellipse 80% 65% at 50% 20%, rgba(6, 12, 26, 0.65) 0%, rgba(8, 11, 22, 0.45) 45%, rgba(5, 7, 10, 0.15) 75%, transparent 100%);
  pointer-events: none;
  z-index: -1;
  border-radius: 24px;
}

[data-theme="dark"] .legal-main {
  position: relative;
}

[data-theme="dark"] .legal-main::before {
  content: "";
  position: absolute;
  inset: 40px -50px 40px -50px;
  background: radial-gradient(ellipse 85% 70% at 50% 30%, rgba(6, 12, 26, 0.68) 0%, rgba(8, 12, 22, 0.48) 50%, rgba(5, 7, 10, 0.18) 75%, transparent 100%);
  pointer-events: none;
  z-index: -1;
  border-radius: 24px;
}




