@font-face {
  font-family: 'Caoutchouc';
  src: url('../assets/fonts/Caoutchouc Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Figma Color Palette */
  --primary-bg: #F5F6FA;
  --primary-card: rgba(245, 246, 250, 0.75);
  --primary-purple: #E7E2F4;
  --secondary-cyan: #EAF9FC;
  --secondary-yellow: #F8F8E7;

  --navy-dark: #112142;
  --purple-accent: #422E8F;
  --cyan-accent: #6BC9D9;

  --bg-dark: #112142;
  --bg-light: #F5F6FA;
  --bg-card: rgba(245, 246, 250, 0.78);
  --bg-card-border: rgba(255, 255, 255, 0.85);

  --text-dark: #112142;
  --text-purple: #422E8F;
  --text-muted: rgba(17, 33, 66, 0.75);

  /* Specified Typography */
  --font-caoutchouc: 'Caoutchouc', sans-serif;
  --font-epilogue: 'Epilogue', sans-serif;
  --font-heading: 'Caoutchouc', sans-serif;
  --font-body: 'Epilogue', sans-serif;

  /* Layout Spacing (Hebra Lateral Nav MVP) */
  --nav-height: 100px;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 50px;

  /* Safe Area for Mobile Notch */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* Base Typography (Celular por defecto) */
h1,
.h1-title {
  font-family: var(--font-caoutchouc);
  font-size: 64px;
  font-weight: 400;
  line-height: 1.05;
}

h2,
.h2-title {
  font-family: var(--font-caoutchouc);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   BLOB EFFECTS - Border-radius con 8 valores (responsive)
   Sintaxis: X1 X2 X3 X4 / Y1 Y2 Y3 Y4
   -------------------------------------------------------------------------- */

.blob {
  --br-x1: 60%;
  --br-x2: 40%;
  --br-x3: 65%;
  --br-x4: 35%;
  --br-y1: 45%;
  --br-y2: 55%;
  --br-y3: 48%;
  --br-y4: 52%;
  border-radius: var(--br-x1) var(--br-x2) var(--br-x3) var(--br-x4) / var(--br-y1) var(--br-y2) var(--br-y3) var(--br-y4);
  overflow: hidden; /* importante para blobs con contenido interno */
  isolation: isolate; /* evita artefactos con blur */
  will-change: border-radius;
}

.blob--settings {
  --br-x1: 68%;
  --br-x2: 32%;
  --br-x3: 58%;
  --br-x4: 42%;
  --br-y1: 46%;
  --br-y2: 54%;
  --br-y3: 44%;
  --br-y4: 56%;
}

.blob--wardrobe {
  --br-x1: 70%;
  --br-x2: 30%;
  --br-x3: 62%;
  --br-x4: 38%;
  --br-y1: 48%;
  --br-y2: 52%;
  --br-y3: 40%;
  --br-y4: 60%;
}

.blob--kencalo {
  --br-x1: 66%;
  --br-x2: 34%;
  --br-x3: 60%;
  --br-x4: 40%;
  --br-y1: 42%;
  --br-y2: 58%;
  --br-y3: 50%;
  --br-y4: 50%;
}

.blob--share {
  --br-x1: 64%;
  --br-x2: 36%;
  --br-x3: 70%;
  --br-x4: 30%;
  --br-y1: 52%;
  --br-y2: 48%;
  --br-y3: 46%;
  --br-y4: 54%;
}

.blob--glyph {
  --br-x1: 58%;
  --br-x2: 42%;
  --br-x3: 66%;
  --br-x4: 34%;
  --br-y1: 40%;
  --br-y2: 60%;
  --br-y3: 38%;
  --br-y4: 62%;
}

.blob--map {
  --br-x1: 62%;
  --br-x2: 38%;
  --br-x3: 58%;
  --br-x4: 42%;
  --br-y1: 38%;
  --br-y2: 62%;
  --br-y3: 44%;
  --br-y4: 56%;
}

/* Suaviza el blob en pantallas muy pequeñas */
@media (max-width: 480px) {
  .blob,
  [class*="blob--"] {
    border-radius: clamp(48%, 6vw + 40%, 65%) clamp(32%, 4vw + 30%, 52%)
      clamp(46%, 6vw + 38%, 62%) clamp(34%, 4vw + 32%, 54%) /
      clamp(38%, 5vw + 36%, 58%) clamp(42%, 5vw + 40%, 62%)
      clamp(36%, 5vw + 34%, 56%) clamp(44%, 5vw + 42%, 60%);
  }
}

h3,
.h3-title {
  font-family: var(--font-epilogue);
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
}

h4,
.h4-title {
  font-family: var(--font-epilogue);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}

p,
.p-body {
  font-family: var(--font-epilogue);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
}

/* Adaptación de Tipografía para PC / Pantallas Mayores */
@media (min-width: 769px) {

  h1,
  .h1-title {
    font-size: 110px;
  }

  h2,
  .h2-title {
    font-size: 42px;
  }

  h3,
  .h3-title {
    font-size: 22px;
  }

  h4,
  .h4-title {
    font-size: 26px;
  }

  p,
  .p-body {
    font-size: 15px;
  }
}

/* Reset & Box Sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--primary-purple);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

/* Global Organic SVG Vector Background Overlay (Covers Full Screen) */
.app-organic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #ffffff;
}

/* Imagen base de fondo */
.bg-png-full {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Vector SVG que actúa como textura superpuesta */
.bg-vector-full {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15; /* Ajusta este valor (0.1 a 0.5) para dar más o menos intensidad a la textura */
  filter: contrast(1.02);
  z-index: 2;
  mix-blend-mode: overlay; /* Opcional: mezcla el SVG con el fondo para integrarlo como textura */
}

/* Fullscreen 3D Canvas Container */
.fullscreen-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: auto;
  touch-action: none;
}

/* Main App Wrapper */
.app-layout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 10;
  pointer-events: none;
}

/* Glassmorphism Cards & Panels (Figma Glass Effect: #D9D9D9 20%, Light -45º 80%, Depth 73, Frost 8) */
.glass-card {
  background: rgba(217, 217, 217, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top-color: rgba(255, 255, 255, 0.9);
  border-left-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 16px 40px -8px rgba(17, 33, 66, 0.14),
    inset 1px 1px 2px 0 rgba(255, 255, 255, 0.85),
    inset -1px -1px 3px 0 rgba(17, 33, 66, 0.1);
  border-radius: var(--radius-lg);
  will-change: transform;
  transform: translateZ(0);
  color: var(--text-dark);
}

/* Notification Banner */
.notification-banner {
  position: absolute;
  top: max(16px, var(--sat));
  left: 12px;
  right: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  border-left: 5px solid var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 45;
  pointer-events: auto;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.notification-banner.hidden {
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none !important;
}

.banner-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--purple-accent);
}

.banner-content p {
  font-size: 0.82rem;
  color: var(--text-dark);
  line-height: 1.3;
}

/* Main Content Views Router */
.main-content {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* View Sections Strict Visibility and Pointer Events */
.view-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.view-section.active {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.view-section:not(.active) * {
  pointer-events: none !important;
}

/* Scrollable Container */
.scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: max(20px, var(--sat));
  padding-bottom: calc(var(--nav-height) + max(28px, var(--sab)));
  padding-left: 16px;
  padding-right: 16px;
  height: 100%;
}

.view-section.active .scrollable {
  pointer-events: auto;
}



/* Buttons System (Dark Navy Pill - Figma) */
button {
  font-family: var(--font-epilogue);
  cursor: pointer;
  border-radius: var(--radius-pill);
}

.view-section.active button {
  pointer-events: auto;
}

.btn-dark-pill,
.btn-primary-sm {
  background: var(--navy-dark);
  color: #FFFFFF;
  font-family: var(--font-epilogue);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: 0 4px 14px rgba(17, 33, 66, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.btn-dark-pill:active,
.btn-primary-sm:active {
  transform: scale(0.95);
  background: #0d1a34;
}

.btn-accent-sm {
  background: var(--purple-accent);
  color: #FFFFFF;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: none;
  transition: transform 0.2s ease;
  white-space: nowrap;
}

.btn-glow-pulse {
  background: var(--navy-dark);
  color: #FFFFFF;
  font-family: var(--font-epilogue);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(17, 33, 66, 0.3);
  transition: transform 0.2s ease;
}

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

@keyframes glow-pulse-anim {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(107, 201, 217, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 35px rgba(66, 46, 143, 0.6);
    transform: scale(1.03);
  }
}

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

.btn-danger-ghost {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
  padding: 12px 20px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 0.85rem;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-danger-ghost:active {
  background: rgba(220, 53, 69, 0.25);
}

.btn-danger-ghost:active {
  background: rgba(255, 0, 85, 0.25);
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + max(20px, var(--sab)));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20000 !important;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  background: rgba(18, 24, 34, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--primary-neon);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Global Hidden Utility */
.hidden,
.hidden * {
  display: none !important;
  pointer-events: none !important;
}