/* ==========================================================================
   JCB SOLUCIONES - SLATE INDIGO BRAND DESIGN SYSTEM
   Palette: #F7F7F9 (Base Light), #14141C (Base Dark), #3D3D52 (Slate Primary),
            #6366F1 (Indigo Secondary CTA), #22D3B0 (Mint Tertiary)
   Typography: Space Grotesk (Display) + JetBrains Mono (Mono) + Neue Montreal / Söhne (Body Sans)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. System Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Graphite Warm Palette → Slate + Indigo Palette */
  --bg-light: #F7F7F9;
  --bg-dark: #14141C;
  --text-dark: #14141C;
  --text-light: #F7F7F9;

  --accent-primary: #3D3D52;   /* Slate púrpura oscuro - brand / bordes / tags */
  --accent-secondary: #6366F1; /* Índigo - CTAs / botones / energía */
  --accent-tertiary: #22D3B0;  /* Verde menta técnico - micro acentos / status dots */

  --border-light: rgba(20, 20, 28, 0.12);
  --border-dark: rgba(247, 247, 249, 0.14);
  --border-accent: rgba(61, 61, 82, 0.3);

  /* Typography Families */
  --font-display: 'Space Grotesk', 'General Sans', sans-serif;
  --font-body: 'Neue Montreal', 'Söhne', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  /* Layout Variables */
  --header-height: 92px;
  --radius-lg: 1.25rem;
  --radius-md: 0.875rem;
  --radius-pill: 9999px;

  /* Motion Curves */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bg: cubic-bezier(0.25, 1, 0.4, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & Core Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::selection {
  background: rgba(99, 102, 241, 0.28);
  color: inherit;
}

::-moz-selection {
  background: rgba(99, 102, 241, 0.28);
  color: inherit;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 61, 82, 0.35) transparent;
}

body[data-active-bg="dark"] {
  scrollbar-color: rgba(247, 247, 249, 0.25) transparent;
}

/* Custom Sleek WebKit Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(61, 61, 82, 0.35);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

body[data-active-bg="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(247, 247, 249, 0.22);
}

body[data-active-bg="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 1.2s var(--ease-bg), color 1.2s var(--ease-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
}

/* Dynamic Section Background Transition States & Dark Optical Compensation */
body[data-active-bg="dark"] {
  background-color: var(--bg-dark);
  color: var(--text-light);
  letter-spacing: 0.01em;
}

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

ul {
  list-style: none;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Typography Hierarchy, Leading & Balancing */
h1, .hero-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}

h2, .section-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

h3, .service-h3, .portfolio-h3, .process-h3, .form-title, .bio-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}

p, .hero-p, .section-p, .service-desc, .portfolio-p, .bio-text, .process-p {
  text-wrap: pretty;
  max-width: 65ch;
}

/* Tabular Numerals for Metrics, Steps & Technical Badges */
.metric-num,
.value-num,
.process-step-num,
.spec-line .s-val,
.nav-num,
.status-pill,
.mockup-url {
  font-variant-numeric: tabular-nums;
}

/* Single Italic Accent per Section */
.fraunces-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  color: var(--accent-secondary);
  display: inline;
}

/* --------------------------------------------------------------------------
   3. Layout & Container Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 7rem 0;
  position: relative;
  z-index: 1;
}

/* Performance: Render Skipping for Below-The-Fold Sections */
.portafolio,
.sobre-mi,
.proceso,
.faq,
.contacto,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 650px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

body[data-active-bg="dark"] .eyebrow {
  color: var(--accent-tertiary);
}

.section-head {
  max-width: 680px;
  margin-bottom: 4rem;
}

.section-h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 1rem;
}

.section-p {
  font-size: 1.125rem;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   4. Floating WhatsApp Island
   -------------------------------------------------------------------------- */
.whatsapp-island {
  position: fixed;
  bottom: max(2rem, env(safe-area-inset-bottom, 2rem));
  right: max(2rem, env(safe-area-inset-right, 2rem));
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-secondary);
  color: var(--text-light);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
  transition: transform 0.35s var(--ease-editorial), opacity 0.35s ease, box-shadow 0.3s ease;
}

.whatsapp-island.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(20px) scale(0.9) !important;
}

.whatsapp-island:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.5);
}

.whatsapp-island-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.whatsapp-svg {
  width: 20px;
  height: 20px;
}

.whatsapp-badge-pulse {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--accent-secondary);
  opacity: 0.4;
  z-index: -1;
  animation: waPulse 2.5s infinite;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* --------------------------------------------------------------------------
   5. Header & Navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  z-index: 900;
  display: flex;
  align-items: center;
  transition: background-color 0.4s var(--ease-bg), backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.header-scrolled {
  background: rgba(247, 247, 249, 0.85);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border-light);
}

body[data-active-bg="dark"] .header-scrolled {
  background: rgba(20, 20, 28, 0.85);
  border-bottom-color: var(--border-dark);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  height: 62px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s var(--ease-editorial), opacity 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.02);
}

.logo-img-footer {
  height: 66px;
  max-width: 340px;
}

/* Mobile Menu Elements (Hidden on Desktop) */
.mobile-menu-header,
.mobile-menu-backdrop {
  display: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
  color: var(--accent-secondary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-secondary);
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.35;
  border-radius: var(--radius-pill);
  transition: all 0.3s var(--ease-editorial);
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn:active,
.whatsapp-island:active {
  transform: scale(0.98);
}

.btn-full {
  width: 100%;
  padding: 1.15rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  min-height: 56px;
}

.btn-pill-nav {
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  background: var(--accent-primary);
  color: var(--text-light);
}

.btn-pill-nav:hover {
  background: var(--accent-secondary);
}

.btn-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-editorial);
}

.btn:hover .btn-circle {
  transform: translate(2px, -2px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
}

.hamburger-bar {
  width: 24px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.3s ease;
}

/* --------------------------------------------------------------------------
   6. Hero Section & Full-Bleed Video Background + Signature Typographic Specimen
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-height) + 3.5rem);
  padding-bottom: 6rem;
  min-height: 94vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Hero Background Video Wrapper & Cinematic Overlays */
.hero-video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.62) contrast(1.1);
  display: block;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 35%, rgba(20, 20, 28, 0.48) 0%, rgba(20, 20, 28, 0.88) 100%),
              linear-gradient(180deg, rgba(20, 20, 28, 0.4) 0%, rgba(20, 20, 28, 0.96) 100%);
  pointer-events: none;
}

/* Overdrive: Blueprint Grid with Dynamic Ambient Spotlight */
.hero-spotlight-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(rgba(99, 102, 241, 0.18) 1.25px, transparent 1.25px);
  background-size: 32px 32px;
  opacity: 0.85;
  mask-image: radial-gradient(circle 420px at var(--mouse-x, 50%) var(--mouse-y, 45%), black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 420px at var(--mouse-x, 50%) var(--mouse-y, 45%), black 0%, transparent 100%);
  transition: opacity 0.4s ease;
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(61, 61, 82, 0.08);
  border: 1px solid var(--border-accent);
  align-self: flex-start;
  margin-bottom: 1.5rem;
}

body[data-active-bg="dark"] .status-pill {
  background: rgba(247, 247, 249, 0.06);
  border-color: var(--border-dark);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-tertiary);
  box-shadow: 0 0 8px var(--accent-tertiary);
}

.hero-h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-accent-word {
  color: var(--accent-secondary);
  font-weight: 700;
  font-family: var(--font-display);
}

.spec-char {
  display: inline-block;
  font-family: var(--font-display);
  animation: settleDrop 0.85s var(--ease-editorial) both;
  animation-delay: calc(var(--char-index, 0) * 0.07s + 0.15s);
  transform-origin: center bottom;
}

@keyframes settleDrop {
  0% {
    opacity: 0;
    transform: translateY(-32px) scale(1.06);
  }
  65% {
    opacity: 1;
    transform: translateY(3px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Individual Character Styles for CRITERIO Specimen */
.char-1 { font-weight: 900; text-transform: uppercase; }
.char-2 { font-style: italic; font-weight: 700; text-transform: lowercase; color: var(--accent-secondary); }
.char-3 { font-weight: 500; text-transform: uppercase; }
.char-4 { font-weight: 900; text-transform: lowercase; }
.char-5 { font-style: italic; font-weight: 700; text-transform: uppercase; color: var(--accent-primary); }
.char-6 { font-weight: 500; text-transform: lowercase; }
.char-7 { font-weight: 900; text-transform: uppercase; }
.char-8 { font-style: italic; font-weight: 700; text-transform: lowercase; color: var(--accent-tertiary); }

.hero-tail {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.hero-p {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  max-width: 620px;
  margin-bottom: 2.25rem;
  opacity: 0.85;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.btn-kinetic-primary {
  background: var(--accent-secondary);
  color: var(--text-light);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-kinetic-primary:hover {
  background: #4F46E5;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.45);
}

.btn-editorial-outline {
  background: transparent;
  color: inherit;
  border: 1.5px solid var(--accent-primary);
}

body[data-active-bg="dark"] .btn-editorial-outline {
  border-color: rgba(247, 247, 249, 0.4);
}

.btn-editorial-outline:hover {
  background: var(--accent-primary);
  color: var(--text-light);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  font-family: var(--font-mono);
}

body[data-active-bg="dark"] .hero-metrics {
  border-top-color: var(--border-dark);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--accent-secondary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.8;
}

.metric-sep {
  width: 1px;
  height: 30px;
  background: currentColor;
  opacity: 0.2;
}

/* --------------------------------------------------------------------------
   7. Marquee Editorial Strip
   -------------------------------------------------------------------------- */
.marquee-strip {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 1.25rem 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  animation: marqueeScroll 28s linear infinite;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}

.marquee-star {
  color: var(--accent-secondary);
}

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

/* --------------------------------------------------------------------------
   8. Servicios Section
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.editorial-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: transform 0.4s var(--ease-editorial), border-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-active-bg="dark"] .editorial-card {
  background: rgba(30, 30, 42, 0.6);
  border-color: var(--border-dark);
}

.editorial-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.featured-card {
  border: 1.5px solid var(--accent-secondary);
  background: rgba(255, 255, 255, 0.98);
  position: relative;
  box-shadow: 0 14px 36px rgba(99, 102, 241, 0.14);
}

body[data-active-bg="dark"] .featured-card {
  background: rgba(30, 30, 42, 0.98);
  border-color: var(--accent-secondary);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.22);
}

.featured-tag {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--accent-primary);
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(61, 61, 82, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.accent-icon {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-secondary);
}

.service-h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-desc {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.925rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bullet {
  color: var(--accent-primary);
  font-weight: 700;
}

.bullet.accent {
  color: var(--accent-secondary);
}

.btn-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   9. Portafolio Section & Tilt Physics
   -------------------------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
.col-12 { grid-column: span 12; }

@media (max-width: 992px) {
  .col-7, .col-5, .col-12 { grid-column: span 12; }
}

.portfolio-card .portfolio-box {
  background: rgba(30, 30, 42, 0.8);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: rotate(-2deg) translateY(24px);
  opacity: 0.4;
  transition: transform 0.85s var(--ease-editorial), opacity 0.85s var(--ease-editorial), border-color 0.3s ease;
}

.portfolio-card.revealed .portfolio-box {
  transform: rotate(0deg) translateY(0);
  opacity: 1;
}

.portfolio-card:hover .portfolio-box {
  border-color: var(--accent-secondary);
}

.mockup-frame {
  background: #0F0F16;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: transform 0.45s var(--ease-editorial), box-shadow 0.45s var(--ease-editorial);
  will-change: transform;
}

.portfolio-card:hover .mockup-frame {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.775rem;
  opacity: 0.75;
}

.mockup-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.mockup-badge.accent-bg {
  background: var(--accent-secondary);
  color: var(--text-light);
}

.mockup-body {
  padding: 1.75rem;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-img-body {
  padding: 0;
  min-height: unset;
  overflow: hidden;
  background: #0F0F16;
}

.portfolio-mockup-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s var(--ease-editorial);
}

.wide-frame .portfolio-mockup-img {
  height: 280px;
}

.portfolio-card:hover .portfolio-mockup-img {
  transform: scale(1.03);
}

.mockup-preview-graphics {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.mockup-card-mini {
  width: 80%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.75rem;
}

.mini-img {
  height: 40px;
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.mini-line {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin-bottom: 0.35rem;
}

.w-70 { width: 70%; }
.w-40 { width: 40%; }
.w-80 { width: 80%; }
.w-50 { width: 50%; }
.w-90 { width: 90%; }
.w-60 { width: 60%; }

.mockup-overlay-badge {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--accent-tertiary);
  margin-top: 0.5rem;
}

.portfolio-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
}

.portfolio-h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.portfolio-p {
  font-size: 0.975rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.portfolio-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.portfolio-tags span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Editorial Project Testimonial Blockquote */
.project-testimonial {
  position: relative;
  margin: 0.5rem 0 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3.5px solid var(--accent-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: normal;
}

body[data-active-bg="light"] .project-testimonial {
  background: rgba(61, 61, 82, 0.05);
}

.testimonial-text {
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-style: normal;
}

.testimonial-author strong {
  font-weight: 700;
  color: var(--accent-secondary);
}

.testimonial-author span {
  opacity: 0.65;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-top: auto;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.portfolio-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   10. Sobre Mí Section
   -------------------------------------------------------------------------- */
.sobre-mi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .sobre-mi-grid { grid-template-columns: 1fr; }
}

.bio-text {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .values-grid { grid-template-columns: 1fr; }
}

.value-item {
  display: flex;
  flex-direction: column;
}

.value-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--accent-secondary);
  margin-bottom: 0.25rem;
}

.value-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.value-desc {
  font-size: 0.85rem;
  opacity: 0.75;
}

.bio-credential-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-accent);
  padding: 2.5rem;
}

body[data-active-bg="dark"] .bio-credential-card {
  background: rgba(30, 30, 42, 0.8);
  border-color: var(--border-dark);
}

.bio-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.bio-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.bio-name {
  font-size: 1.35rem;
}

.bio-degree {
  font-size: 0.85rem;
  opacity: 0.8;
}

.bio-specs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.spec-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--border-light);
}

body[data-active-bg="dark"] .spec-line {
  border-bottom-color: var(--border-dark);
}

.s-key {
  font-weight: 700;
  opacity: 0.7;
  flex-shrink: 0;
}

.s-val {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.bio-manifesto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--accent-secondary);
}

/* --------------------------------------------------------------------------
   11. Proceso Section
   -------------------------------------------------------------------------- */
.process-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

@media (max-width: 992px) {
  .process-pipeline { grid-template-columns: 1fr; }
}

.process-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.6s var(--ease-editorial), opacity 0.6s var(--ease-editorial), border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.process-card.is-active-step {
  border-color: var(--accent-secondary);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.16);
}

.process-step-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-secondary);
  line-height: 1;
  margin-bottom: 0.75rem;
  transition: color 0.4s var(--ease-editorial), transform 0.4s var(--ease-editorial), text-shadow 0.4s ease;
}

.process-card.is-active-step .process-step-num {
  color: #818CF8;
  transform: scale(1.06);
  text-shadow: 0 0 16px rgba(99, 102, 241, 0.6);
}

.process-step-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.process-h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.process-p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   12. FAQ Section (Preguntas Frecuentes)
   -------------------------------------------------------------------------- */
.faq-accordion {
  max-width: 860px;
  margin: 3rem auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-active-bg="dark"] .faq-item {
  background: rgba(30, 30, 42, 0.6);
  border-color: var(--border-dark);
}

.faq-item:hover,
.faq-item[open] {
  border-color: var(--border-accent);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(20, 20, 28, 0.05);
}

body[data-active-bg="dark"] .faq-item:hover,
body[data-active-bg="dark"] .faq-item[open] {
  background: rgba(30, 30, 42, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-q-text {
  flex: 1;
  color: var(--text-color);
}

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(61, 61, 82, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-editorial), background-color 0.3s ease, color 0.3s ease;
}

body[data-active-bg="dark"] .faq-icon {
  background: rgba(247, 247, 249, 0.08);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  background: var(--accent-secondary);
  color: var(--text-light);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  border-top: 1px dashed transparent;
  animation: faqFadeIn 0.3s ease forwards;
}

.faq-answer p {
  margin: 0;
}

@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   13. Contacto Section
   -------------------------------------------------------------------------- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .contacto-grid { grid-template-columns: 1fr; }
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

body[data-active-bg="dark"] .channel-card {
  background: rgba(30, 30, 42, 0.5);
  border-color: var(--border-dark);
}

.channel-card:hover {
  transform: translateX(4px);
  border-color: var(--accent-secondary);
}

.channel-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.channel-val {
  font-size: 1.1rem;
  font-weight: 700;
}

.channel-email-link {
  color: inherit;
  transition: color 0.2s ease;
  word-break: break-all;
}

.channel-email-link:hover {
  color: var(--accent-secondary);
}

.copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(61, 61, 82, 0.08);
  border: 1px solid var(--border-accent);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s var(--ease-editorial);
  margin-left: auto;
  flex-shrink: 0;
}

body[data-active-bg="dark"] .copy-email-btn {
  background: rgba(247, 247, 249, 0.08);
  border-color: var(--border-dark);
}

.copy-email-btn:hover {
  background: var(--accent-secondary);
  color: var(--text-light);
  border-color: var(--accent-secondary);
  transform: scale(1.04);
}

.copy-email-btn.is-copied {
  background: var(--accent-tertiary) !important;
  color: #0E1615 !important;
  border-color: var(--accent-tertiary) !important;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(34, 211, 176, 0.45);
}

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

.form-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-light);
  padding: 2.5rem;
}

body[data-active-bg="dark"] .form-card {
  background: rgba(30, 30, 42, 0.9);
  border-color: var(--border-dark);
}

.form-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* Floating Labels & Form Field Enhancements */
.field-group {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
  transition: transform 200ms ease, color 200ms ease, opacity 200ms ease;
  transform-origin: top left;
}

.field-group.is-floating .field-label,
.field-group:focus-within .field-label {
  transform: translateY(-2px) scale(0.92);
  color: var(--accent-secondary);
  opacity: 1;
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem; /* 16px floor to eliminate iOS Safari auto-zoom */
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  caret-color: var(--accent-secondary);
  transition: border-color 0.2s ease, outline 0.2s ease, box-shadow 0.2s ease;
  overflow-wrap: break-word;
}

body[data-active-bg="dark"] .field-input,
body[data-active-bg="dark"] .field-select,
body[data-active-bg="dark"] .field-textarea {
  background: rgba(24, 24, 34, 0.7);
  border-color: var(--border-dark);
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: 2px solid var(--accent-secondary);
  border-color: transparent;
}

.field-input.invalid, .field-textarea.invalid {
  border-color: #d93838;
}

.field-error {
  display: none;
  font-size: 0.775rem;
  color: #d93838;
  margin-top: 0.25rem;
}

.field-error.visible {
  display: block;
}

.form-feedback {
  margin-top: 1rem;
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.5;
  transition: opacity 0.3s ease;
}

.form-feedback.success {
  color: var(--accent-tertiary);
}

.form-feedback.error {
  color: #ff6b6b;
}

.form-feedback.warning {
  color: #fbbf24;
}

/* Submit Button Spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding-top: 4.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 3.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 400px;
}

.footer-desc {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.75;
}

.footer-contact {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.footer-sub {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem 0;
  font-size: 0.825rem;
  opacity: 0.6;
  text-align: center;
}

/* --------------------------------------------------------------------------
   14. Extended Animations & Scroll Choreography
   -------------------------------------------------------------------------- */
/* Hero H1 Word Stagger */
.hero-h1 .hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: heroWordFade 0.55s var(--ease-editorial) forwards;
}

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

/* Ken Burns Subtle Scale on Active Slide */
.hero-slide {
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.8s var(--ease-editorial), transform 0.8s var(--ease-editorial);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1.05);
  transition: opacity 0.8s var(--ease-editorial), transform 4.5s ease-out;
}

/* Marquee Pause on Hover */
.marquee-strip:hover .marquee-track {
  animation-play-state: paused;
}

/* Service Bullet Checkmark Scale Reveal */
.editorial-card .bullet {
  display: inline-block;
  transform: scale(0);
  transition: transform 350ms var(--ease-editorial);
}

.editorial-card.revealed .bullet {
  transform: scale(1);
}

.editorial-card.revealed li:nth-child(1) .bullet { transition-delay: 100ms; }
.editorial-card.revealed li:nth-child(2) .bullet { transition-delay: 200ms; }
.editorial-card.revealed li:nth-child(3) .bullet { transition-delay: 300ms; }
.editorial-card.revealed li:nth-child(4) .bullet { transition-delay: 400ms; }

/* Bio Card Border Draw Glow Trigger */
.bio-credential-card {
  position: relative;
  transition: border-color 0.9s var(--ease-editorial), box-shadow 0.9s var(--ease-editorial), transform 0.4s var(--ease-editorial);
}

.bio-credential-card.bio-draw {
  border-color: var(--accent-secondary);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.18);
}

/* Process Section Progress Bar */
.process-pipeline {
  position: relative;
  margin-top: 2.5rem;
}

.process-progress-bar {
  position: absolute;
  top: -1.25rem;
  left: 2%;
  right: 2%;
  height: 3px;
  background: rgba(247, 247, 249, 0.14);
  pointer-events: none;
  z-index: 0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  background: var(--accent-secondary);
  width: 0%;
  height: 100%;
  transition: width 0.15s ease-out, height 0.15s ease-out;
  box-shadow: 0 0 12px var(--accent-secondary);
}

@media (max-width: 992px) {
  .process-progress-bar {
    top: 0;
    bottom: 0;
    left: -0.5rem;
    width: 3px;
    height: 100%;
    right: auto;
  }
  .progress-fill {
    width: 100%;
    height: 0%;
  }
}

.process-card {
  position: relative;
  z-index: 1;
  transform: scale(0.95) translateY(16px);
  opacity: 0;
  transition: transform 0.6s var(--ease-editorial), opacity 0.6s var(--ease-editorial);
}

.process-card.revealed {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* FAQ Icon Transition */
.faq-icon {
  transition: transform 300ms var(--ease-editorial), background-color 300ms ease, color 300ms ease;
}

/* Scroll Reveal Core */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-editorial), transform 0.7s var(--ease-editorial);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Visible Keyboard Focus Rings */
:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 4px;
}

/* Prefers Reduced Motion Overrides */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .spec-char,
  .hero-h1 .hero-word {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .portfolio-card .portfolio-box {
    transform: none !important;
    opacity: 1 !important;
  }
  .bullet {
    transform: scale(1) !important;
  }
  .process-card {
    transform: none !important;
    opacity: 1 !important;
  }
  .btn-spinner {
    animation: none !important;
  }
}

/* Mobile Responsive Navigation Overlay */
@media (max-width: 860px) {
  .logo-img {
    height: 48px;
    max-width: 240px;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 940;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-editorial);
  }

  .mobile-menu-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 86vw;
    max-width: 380px;
    height: 100dvh;
    background: #14141C;
    color: #F7F7F9;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    padding: 1.75rem 1.5rem 2rem 1.5rem;
    transform: translateX(105%);
    transition: transform 0.4s var(--ease-editorial);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.7);
    z-index: 950;
    overflow-y: auto;
    border-left: 1px solid rgba(247, 247, 249, 0.12);
  }

  .nav-menu.is-active {
    transform: translateX(0);
  }

  /* Header inside Mobile Drawer */
  .mobile-menu-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(247, 247, 249, 0.12);
    width: 100%;
  }

  .mobile-brand-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .mobile-brand-tag {
    font-family: var(--font-mono);
    font-size: 0.725rem;
    color: #94A3B8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 0.2rem;
  }

  .mobile-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-tertiary);
    background: rgba(34, 211, 176, 0.1);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(34, 211, 176, 0.25);
    width: fit-content;
  }

  /* Nav Links List in Drawer */
  .nav-list {
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
    width: 100%;
    margin: 0.5rem 0;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: #F7F7F9;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    width: 100%;
    opacity: 0.85;
  }

  .nav-link:hover,
  .nav-link.active {
    opacity: 1;
    background: rgba(99, 102, 241, 0.16);
    color: #818CF8;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-num {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-secondary);
    font-weight: 700;
    width: 22px;
  }

  .nav-text {
    flex: 1;
  }

  /* Actions & CTA Button */
  .nav-actions {
    width: 100%;
  }

  .btn-full-mobile {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    min-height: 52px;
    background: var(--accent-secondary);
  }

  /* Toggle Hamburger Button Styling */
  .mobile-toggle {
    display: flex;
    z-index: 1000;
    color: var(--text-dark);
    position: relative;
  }

  body[data-active-bg="dark"] .mobile-toggle {
    color: var(--text-light);
  }

  .mobile-toggle.is-active {
    color: #F7F7F9 !important;
  }

  .mobile-toggle.is-active .hamburger-bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  .mobile-toggle.is-active .hamburger-bar:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .type-specimen-word {
    font-size: clamp(3rem, 14vw, 6rem);
  }

  .bio-credential-card {
    padding: 1.5rem 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   15. Device & Context Adaptation (Safe Areas, Coarse Pointer, Landscape, Print)
   -------------------------------------------------------------------------- */

/* Coarse Pointer (Touch Devices): 44px Minimum Tap Targets */
@media (pointer: coarse) {
  .nav-link {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }

  .btn {
    min-height: 48px;
    padding: 0.9rem 1.5rem;
  }

  .faq-question {
    min-height: 52px;
    padding: 1.25rem 1.5rem;
  }

  .copy-email-btn {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }

  .mobile-toggle {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
  }
}

/* Smartphone Landscape Orientation */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --header-height: 60px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 3rem;
  }

  .nav-menu {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
    gap: 0.5rem;
  }

  .nav-list {
    margin: 0.25rem 0;
  }

  .nav-link {
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
  }

  .mobile-brand-box {
    display: none;
  }
}

/* Print Stylesheet (Ctrl + P / PDF Export) */
@media print {
  body {
    background: #ffffff !important;
    color: #14141c !important;
    font-size: 11pt;
    line-height: 1.5;
  }

  .header,
  .whatsapp-island,
  .mobile-toggle,
  .mobile-menu-backdrop,
  .marquee-strip,
  .hero-slider-dots,
  .copy-email-btn {
    display: none !important;
  }

  .section {
    padding: 2rem 0 !important;
    page-break-inside: avoid;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .editorial-card,
  .portfolio-card,
  .form-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .faq-item {
    border: 1px solid #e0e0e0 !important;
    margin-bottom: 1rem !important;
  }

  .faq-item summary {
    font-weight: 700;
  }

  .faq-item .faq-answer {
    display: block !important;
    opacity: 1 !important;
    padding: 0.5rem 1rem !important;
  }

  a {
    color: #14141c !important;
    text-decoration: underline;
  }

  .btn {
    display: inline-block;
    border: 1px solid #14141c !important;
    background: transparent !important;
    color: #14141c !important;
    box-shadow: none !important;
  }
}
