/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --color-yellow:  #f3fc5a;
  --color-cyan:    #2AEBF0;
  --color-green:   #00ff7f;
  --color-pink:    #fc3c78;
  --color-purple:  #b06afc;
  --color-orange:  #ff8c42;
  --color-white:   #FCFDF2;
  --color-dark:    #1a1a1a;
  --menu-width:    285px;
  --font-primary:  'Source Sans 3', 'Source Sans Pro', sans-serif;
  --font-secondary: 'Open Sans', sans-serif;
  --transition-speed: 300ms;
}

/* Page accent color per section */
html[data-page="index"]       { --page-accent: var(--color-yellow); }
html[data-page="about"]       { --page-accent: var(--color-green);  }
html[data-page="contact"]     { --page-accent: var(--color-cyan);   }
html[data-page="fotografias"] { --page-accent: var(--color-pink);   }
html[data-page="poesia"]      { --page-accent: var(--color-purple); }
html[data-page="musica"]      { --page-accent: var(--color-orange); }
html[data-page="shop"]        { --page-accent: #111111; }

/* ============================================================
   Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
  background-image: url("img/granulo.jpg");
  /* Page fade-in transition */
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

body.page-visible {
  opacity: 1;
}

/* ============================================================
   Side menu (index)
   ============================================================ */
.menu {
  background: rgba(0,0,0,0.92);
  left: calc(-1 * var(--menu-width));
  height: 100vh;
  position: fixed;
  top: 0;
  width: var(--menu-width);
  will-change: left;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.menu ul {
  border-top: 1px solid rgba(255,255,255,0.08);
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-primary);
  line-height: 50px;
  padding: 3px 3px 3px 20px;
}

.menu a {
  color: rgba(255,255,255,0.75);
  font-size: 0.78em;
  font-weight: 300;
  letter-spacing: 8px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 150ms ease, letter-spacing 150ms ease;
}

.menu a:hover {
  color: var(--page-accent);
  letter-spacing: 12px;
}

.icon-close {
  padding-left: 20px;
  padding-top: 30px;
  padding-bottom: 20px;
  position: relative;
}

/* ============================================================
   Utility
   ============================================================ */
.inline    { float: left; }
.clearBoth { clear: both; }

.icon-menu {
  cursor: pointer;
  font-family: var(--font-secondary);
  font-size: 2em;
  padding-left: 10px;
  background: black;
  border: 1px white solid;
  display: inline;
}

.icon-menu i { margin-right: 5px; }

.loler {
  cursor: pointer;
  padding: 25px 0 0 25px;
  text-decoration: none;
  text-transform: uppercase;
}

#nav-icon {
  margin-left: auto;
  margin-top: auto;
  position: relative;
  text-align: center;
}

/* ============================================================
   Canvas background
   ============================================================ */
#canvas {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -100;
  background: url(img/granulo2.jpg) no-repeat center center;
  background-size: cover;
  will-change: contents;
}

/* ============================================================
   Typography
   ============================================================ */
.white {
  font-family: var(--font-primary);
  color: var(--color-white);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 18px;
  text-transform: uppercase;
  margin: 0;
}

.parrafo {
  font-family: var(--font-primary);
  letter-spacing: 5px;
  color: white;
}

.pc {
  font-family: var(--font-primary);
  letter-spacing: 10px;
  font-weight: 300;
  color: var(--page-accent);
  font-size: 0.85em;
  text-transform: uppercase;
  text-align: left;
  margin: 0;
}

.pc2 {
  font-family: var(--font-primary);
  letter-spacing: 12px;
  color: var(--page-accent);
  font-size: clamp(0.6rem, 1.5vw, 0.85rem);
  text-align: center;
  font-weight: 300;
  text-transform: uppercase;
  margin: 10px 0 0;
}

.p {
  font-family: var(--font-primary);
  letter-spacing: 5px;
  font-size: 1em;
  color: white;
}

.big {
  font-family: var(--font-primary);
  color: var(--color-white);
}

/* ============================================================
   Decorative HR lines — animate in on load
   ============================================================ */
.hr, .hr1, .hr2, .hr3, .hr4, .hr5 {
  color: var(--color-white);
  border-color: var(--color-white);
  display: block;
  margin: 0 auto;
  opacity: 0;
  animation: hrFadeIn 0.5s ease forwards;
}

.hr  { width: 300px; height: 10px; animation-delay: 0.05s; }
.hr1 { width: 250px; height: 10px; animation-delay: 0.10s; }
.hr2 { width: 200px;               animation-delay: 0.15s; }
.hr3 { width: 150px; height: 10px; animation-delay: 0.20s; }
.hr4 { width: 100px;               animation-delay: 0.25s; }
.hr5 { width:  50px; height:  5px; animation-delay: 0.30s; }

@keyframes hrFadeIn {
  from { opacity: 0; transform: scaleX(0.4); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ============================================================
   Custom font
   ============================================================ */
@font-face {
  font-family: "cwsSans";
  src: url(fonts/cwsSans.ttf) format("truetype");
  font-display: swap;
}

/* ============================================================
   Layout — vertically centered block (flexbox)
   ============================================================ */
.outer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* .middle kept for backwards compatibility but no longer needed as table-cell */
.middle {
  display: contents;
}

.inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  text-align: center;
}

/* ============================================================
   Draggable elements — cursor + hint animation
   ============================================================ */
#drag {
  cursor: crosshair;
  width: 400px;
  text-align: center;
  /* Wiggle hint runs once after 1.2s to signal the element is interactive */
  animation: hintWiggle 0.7s ease-in-out 1.2s 1 both;
}

@keyframes hintWiggle {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(14px); }
  50%  { transform: translateX(-10px); }
  75%  { transform: translateX(6px); }
  100% { transform: translateX(0); }
}

#drag2 {
  border: 10px black solid;
  margin: 0 .5em;
  cursor: grab;
}

#drag2:active {
  cursor: grabbing;
}

.click-menu {
  cursor: pointer;
  padding: 8px 0;
}

#slider {
  width: 100%;
  margin: 16px 0 0;
}

.ratonizq { cursor: e-resize; }

/* ============================================================
   jQuery UI slider overrides
   ============================================================ */
.ui-slider-horizontal .ui-slider-handle {
  background-color: var(--page-accent);
}

.ui-slider-horizontal {
  background-color: var(--page-accent);
  opacity: 1;
  border: 0;
}

/* ============================================================
   Mobile responsive — index
   ============================================================ */
@media (max-width: 480px) {
  #drag {
    width: 90vw;
  }

  .white {
    letter-spacing: clamp(4px, 3vw, 18px);
  }

  .pc2 {
    letter-spacing: clamp(2px, 2vw, 12px);
  }
}
