/* ======================================================
   VALENCIA STUDIO
====================================================== */

/* ================= VARIABLES ================= */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
               Helvetica, Arial, "Segoe UI", sans-serif;

  /* Dark */
  --bg: #0e0e0e;
  --bg-muted: #161616;
  --surface: rgba(20, 20, 20, 0.7);

  --text: #f5f5f5;
  --text-muted: #8a8a8a;

  --border: rgba(255, 255, 255, 0.12);
  --accent: #ffffff;
}

[data-theme="light"] {
  /* Light */
  --bg: #f6f6f6;
  --bg-muted: #ededed;
  --surface: rgba(255, 255, 255, 0.75);

  --text: #0e0e0e;
  --text-muted: #6e6e6e;

  --border: rgba(0, 0, 0, 0.12);
  --accent: #000000;
}

/* ================= BASE ================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  color: var(--text);
  text-decoration: none;
  position: relative;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.65;
}

/* Subrayado editorial */
a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

a:hover::after {
  transform: scaleX(1);
}

/* ================= HEADER ================= */
.site-header {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border 0.3s ease;
}

.logo {
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ================= THEME TOGGLE ================= */
.theme-toggle {
  width: 42px;
  height: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  position: relative;
  cursor: pointer;
  transition: border 0.3s ease;
}

.theme-toggle .dot {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 3px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1),
              background 0.3s ease;
}

[data-theme="light"] .theme-toggle .dot {
  transform: translateX(18px);
}



/* ================= SECTIONS ================= */
.section {
  padding: 120px 0;
}

.section-muted {
  background: var(--bg-muted);
  transition: background 0.4s ease;
}

.section-title {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ================= HERO LOAD ANIMATION ================= */

.hero-title,
.hero-text {
  opacity: 0;
  transform: translateY(24px);
}

/* ================= HERO ================= */
.hero-title {
  font-size: clamp(5rem, 6vw, 8rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.hero-text {
  font-size: 1.3rem; /* tamaño editorial equilibrado */
  line-height: 1.3;
  margin-top: 30px;
  max-width: 720px;
  color: var(--text-muted);
}

/* ================= HERO ANIMATION ================= */

.hero {
  overflow: hidden;
}

.hero-indicator {
  position: absolute;
  left: 50%;
  bottom: 48px;
  width: 1px;
  height: 48px;
  background: var(--text);
  opacity: 0.35;
  transform: translateX(-50%);
  animation: heroPulse 2.8s ease-in-out infinite;
}

/* Pulso silencioso */
@keyframes heroPulse {
  0% {
    opacity: 0.25;
    transform: translateX(-50%) scaleY(0.6);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-50%) scaleY(1);
  }
  100% {
    opacity: 0.25;
    transform: translateX(-50%) scaleY(0.6);
  }
}


/* ================= WORK ================= */
.project {
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.project:hover {
  transform: translateY(-6px);
  opacity: 0.88;
}

.project-thumb {
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.4,0,.2,1),
              opacity 0.4s ease;
}

/* Micro-interacción editorial */
.project:hover .project-thumb img {
  transform: scale(1.04);
  opacity: 0.92;
}

.project h5 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.project span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= STUDIO ================= */
.editorial-text {
  font-size: 1.2rem;
  max-width: 640px;
}

/* ================= SERVICES ================= */
.service {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  transition: opacity 0.3s ease;
}

.service:hover {
  opacity: 0.65;
}

/* ================= CLIENTS ================= */
.clients div {
  font-size: 1rem;
  color: var(--text-muted);
  padding: 6px 0;
}

/* ================= FOOTER ================= */
.footer {
  padding: 48px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .hero-title {
    font-size: 2.4rem;
  }
	
/* ================= SCROLL REVEAL ================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes opcionales */
.reveal-fast {
  transition-duration: 0.6s;
}

.reveal-slow {
  transition-duration: 1s;
}
	
/* ======================================================
   RESPONSIVE FIXES — MOBILE & TABLET
   Editorial spacing · Stable scroll · Readability
====================================================== */

/* -------- RESET DE DESPLAZAMIENTOS RAROS -------- */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Evita que elementos grandes rompan el viewport */
img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* -------- CONTENEDOR -------- */
@media (max-width: 991px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* -------- HEADER -------- */
@media (max-width: 768px) {
  .site-header {
    padding: 8px 0;
  }

  .site-header .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* -------- HERO -------- */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh; /* evita saltos en mobile */
    align-items: flex-start;
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .hero-title {
    font-size: 2.2rem;
    line-height: 1.15;
  }

  .hero-text {
    margin-top: 20px;
    font-size: 1.5rem;
  }

  .hero-indicator {
    display: none; /* en mobile no aporta */
  }
}

/* -------- SECTIONS -------- */
@media (max-width: 768px) {
  .section {
    padding: 80px 0;
  }

  .section-title {
    margin-bottom: 32px;
  }
}

/* -------- WORK / PROJECTS -------- */
@media (max-width: 768px) {
  .project {
    margin-bottom: 48px;
  }

  .project h5 {
    margin-top: 12px;
    font-size: 1rem;
  }

  .project span {
    display: block;
    margin-top: 4px;
  }

  .project-thumb {
    margin-bottom: 12px;
  }
}

/* -------- TEXTO EDITORIAL -------- */
@media (max-width: 768px) {
  .editorial-text {
    font-size: 1.05rem;
    line-height: 1.7;
    padding-right: 0;
  }

  p {
    margin-bottom: 1.4rem;
  }
}

/* -------- SERVICES -------- */
@media (max-width: 768px) {
  .service {
    padding: 16px 0;
    font-size: 0.95rem;
  }
}

/* -------- CLIENTS -------- */
@media (max-width: 768px) {
  .clients {
    row-gap: 12px;
  }

  .clients div {
    padding: 4px 0;
  }
}

/* -------- FOOTER -------- */
@media (max-width: 768px) {
  .footer {
    padding: 32px 0;
  }

  .footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* -------- SCROLL REVEAL (MOBILE OPTIMIZATION) -------- */
@media (max-width: 768px) {
  .reveal {
    transform: translateY(16px);
  }
}

/* ======================================================
   HERO — EXACT BREAKPOINTS (EDITORIAL)
====================================================== */

/* -------- BASE HERO -------- */
.hero {
  overflow: hidden;
}

.hero-title,
.hero-text {
  will-change: transform, opacity;
}

/* -------- iPhone SE / MINI -------- */
@media (max-width: 375px) {
  .hero {
    min-height: 115svh;
    padding-top: 140px;
    padding-bottom: 100px;
  }

  .hero-title {
    font-size: 2.2rem;
    line-height: 1.15;
  }

  .hero-text {
    font-size: 1rem;
    line-height: 1.7;
    margin-top: 20px;
  }
}

/* -------- iPhone NORMAL -------- */
@media (min-width: 376px) and (max-width: 414px) {
  .hero {
    min-height: 110svh;
    padding-top: 140px;
    padding-bottom: 100px;
  }

  .hero-title {
    font-size: 2.5rem;
    line-height: 1.14;
  }

  .hero-text {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 22px;
  }
}

/* -------- iPhone PLUS / MAX -------- */
@media (min-width: 415px) and (max-width: 480px) {
  .hero {
    min-height: 105svh;
    padding-top: 140px;
    padding-bottom: 90px;
  }

  .hero-title {
    font-size: 2.7rem;
    line-height: 1.13;
  }

  .hero-text {
    font-size: 1.1rem;
    line-height: 1.7;
  }
}

/* -------- TABLET -------- */
@media (min-width: 481px) and (max-width: 768px) {
  .hero {
    min-height: 100svh;
    padding-top: 160px;
    padding-bottom: 120px;
  }

  .hero-title {
    font-size: 3.2rem;
    line-height: 1.12;
  }

  .hero-text {
    font-size: 1.15rem;
    max-width: 520px;
  }
}

/* ======================================================
   CLIENTS — CONSISTENT SPACING (EDITORIAL FIX)
====================================================== */

/* Contenedor */
.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  column-gap: 32px;
  row-gap: 20px;
}

/* Cada cliente */
.clients div {
  margin: 0;              /* elimina márgenes heredados */
  padding: 0;             /* evita inflado visual */
  line-height: 1.6;
  text-align: left;
  white-space: nowrap;    /* evita saltos raros */
}

/* -------- MOBILE -------- */
@media (max-width: 768px) {
  .clients {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .clients div {
    white-space: normal;
  }
}

/* -------- TABLET -------- */
@media (min-width: 769px) and (max-width: 1024px) {
  .clients {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 18px;
  }
}



}
