/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

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

:root {
   --font-size-text-medium: 0.9rem;
   --neutral-color-text: #1C2024;
   --color-content-primary: #000000;
   --color-bg-light: #FFFFFF;
   --fs-s: clamp(0.875rem, 1vw + 0.5rem, 1rem);
   --fs-m: clamp(1rem, 1vw + 0.6rem, 1.25rem);
   --fs-l: clamp(1.25rem, 1.5vw + 0.5rem, 1.75rem);
} 

my-page {
  display: block;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

/* Previene el flash inicial antes de que JS corra */

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  -webkit-overflow-scrolling: touch;
}

html.fade-active {
    opacity: 1;
}

/* General Website Style rules */
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

body.fade-out {
  opacity: 0;
}

  .hidden {
    display: none;
  }

  .blur {
    -webkit-filter: blur(100px);
    -moz-filter: blur(100px);
    -o-filter: blur(100px);
    -ms-filter: blur(100px);
    filter: blur(100px);
  }

  
  /*
   * Remove text-shadow in selection highlight:
   * https://twitter.com/miketaylr/status/12228805301
   *
   * Customize the background color to match your design.
   */

  ::-moz-selection {
    color: #FFF; 
    background: #000;
    text-shadow: none;
  }
  
  ::selection {
    color: #FFF; 
    background: #000;
    text-shadow: none;
  }
  
  /*
   * A better looking default horizontal rule
   */
  
  hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
  }
  
  /*
   * Remove the gap between audio, canvas, iframes,
   * images, videos and the bottom of their containers:
   * https://github.com/h5bp/html5-boilerplate/issues/440
   */
  
  audio,
  canvas,
  iframe,
  img,
  svg,
  video {
    vertical-align: middle;
    max-width: 100%;
  }
  
  /*
   * Remove default fieldset styles.
   */
  
  fieldset {
    border: 0;
    margin: 0;
    padding: 0;
  }
  
  /*
   * Allow only vertical resizing of textareas.
   */
  
  textarea {
    resize: vertical;
  }

/* Page overlay element */
#page-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--color-bg-light);

  display: flex;
  justify-content: center;
  align-items: center;

  color: var(--color-content-primary);
  text-align: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 900;

  font-family: Arial, sans-serif;
  font-size: clamp(3rem, 2vw, 1.5rem);
  line-height: 1.4;

  margin: 0;
  box-sizing: border-box;
}

#page-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#overlay-text {
  max-width: 60vw;  /* ancho + márgenes */
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (max-width: 600px) {
  #page-overlay {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    height: 100svh; 
    padding: 1.5rem 1rem;
  }

  #overlay-text {
    max-width: 80vw; /* darle más espacio en móvil */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    line-height: 1.5;
  }
}

