:root {
  --bg-dark: #000000;
  --bg-card: rgba(0, 0, 0, 0.6);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --text-main: #FFFFFF;
  --text-muted: #FFFFFF;
  --accent: #F5390C;
  --accent-glow: rgba(245, 57, 12, 0.25);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(245, 57, 12, 0.4);

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --page-gutter: clamp(20px, 4vw, 56px);
  --section-space: clamp(76px, 10vw, 140px);
  --content-safe-bottom: max(var(--dock-gap), env(safe-area-inset-bottom));

  /* Espacio reservado para que el contenido no choque con el nav (arriba)
     ni con el dock flotante (abajo) en páginas sin scroll (web, branding).
     REGLA OBLIGATORIA en mobile: nada debe quedar por debajo de donde
     empieza el dock. El dock mobile mide 54px (42px item + 6px padding x2)
     y está a "bottom: 3.5%" (= 3.5vh) del borde inferior, o sea que su
     borde superior está a "3.5vh + 54px" del fondo de la pantalla; se le
     suman 16px de aire de cortesía. Si el dock cambia de tamaño/posición
     en intro.css, este cálculo debe actualizarse junto con él. */
  --nav-gap: 150px;
  --nav-gap-mobile: 110px;
  --dock-gap: calc(5vh + 96px);
  --dock-gap-mobile: calc(3.5vh + 54px + 16px);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  scroll-padding-bottom: var(--content-safe-bottom);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
  min-width: 320px;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

/* ── BACKGROUND GLOWS ── */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-1 {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(100px);
  animation: float 25s infinite alternate ease-in-out;
}

.glow-2 {
  position: absolute;
  bottom: -25%;
  right: -15%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.025) 0%, transparent 70%);
  filter: blur(120px);
  animation: float 30s infinite alternate-reverse ease-in-out;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.05); }
}

/* ── UTILITIES ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

@media (max-width: 768px) {
  :root {
    --content-safe-bottom: max(var(--dock-gap-mobile), env(safe-area-inset-bottom));
  }
  .container {
    padding-inline: var(--page-gutter);
  }
}

.tagline {
  font-family: var(--font-display);
  font-size: clamp(0.68rem, 0.9vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
  display: inline-block;
}

.title-large {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.title-large span {
  color: var(--accent);
}

.title-section {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.text-lead {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 300;
  max-width: 750px;
}

/* ── TIPOGRAFÍA COMPACTA EN MOBILE (todas las secciones) ──
   Tamaños ~4px más chicos, interlineado más apretado y menos
   espacio entre subtítulo/título/texto. Las páginas que ya tenían
   su propio ajuste de márgenes (web/branding/redes/automatizaciones)
   tienen selectores más específicos que siguen ganando por encima
   de esto — aquí solo se toca tamaño de letra e interlineado, que
   antes no se habían reducido para mobile. */
@media (max-width: 768px) {
  .tagline {
    font-size: 0.68rem;
    letter-spacing: 2.6px;
    margin-bottom: 8px;
  }
  .title-large {
    font-size: clamp(2.25rem, 9vw, 2.85rem);
    line-height: 1.05;
    margin-bottom: 14px;
  }
  .title-section {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
    line-height: 1.05;
    margin-bottom: 12px;
  }
  .text-lead {
    font-size: 0.98rem;
    line-height: 1.5;
  }
  .section-header {
    margin-bottom: 10px;
  }
  body {
    line-height: 1.45;
  }
}

/* ── LIQUIDGLASS (iOS 26 Style) ── */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px -5px rgba(0, 0, 0, 0.6), 
              0 0 15px rgba(255, 74, 17, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
}

/* ── SECTION HEADER ── */
.section-header {
  margin-bottom: 20px;
  max-width: 800px;
}

section {
  padding-block: var(--section-space);
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding-block: clamp(64px, 16vw, 92px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ── FOOTER ── */
footer {
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 24px;
}

.social-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.social-links a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}

/* ── HERO SECTION FULLSCREEN BG (Figma Desktop-4) ── */
#hero {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: url('../assets/IMG SEBAS WEB/01-6.jpeg') no-repeat center center;
  background-size: cover;
}

@media (max-width: 768px) {
  #hero {
    background-image: url('../assets/IMG SEBAS WEB/02-6.jpeg');
  }
}

.hero-grid {
  width: 100%;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.hero-text {
  max-width: 680px;
  background: rgba(0, 0, 0, 0.4);
  padding: 40px;
  border-radius: 28px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .hero-text {
    padding: 24px;
    margin-top: 80px;
  }
}

/* ── HERO FINAL CONTENT (Figma pixel spec) ── */
/* No card/panel behind the text — sits directly on the image, exactly as in the design */
.hero-final-content .hero-text {
  background: none;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  max-width: 660px;
}

.hero-final-content .title-large {
  font-size: clamp(2.6rem, 4.4vw, 4.4rem);
  font-weight: 800;
  margin-bottom: 28px;
}

.hero-final-content .text-lead {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 300;
  max-width: 560px;
  margin-bottom: 8px;
}

.hero-metrics {
  display: flex;
  gap: clamp(36px, 7vw, 96px);
  margin-top: 46px;
  flex-wrap: wrap;
}

.metric-item {
  text-align: center;
}

.metric-item h4 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.6vw, 3.4rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.metric-item p {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .hero-metrics {
    gap: 28px;
  }
}

/* ── FONDOS RADIALES POR PÁGINA ── */
body.page-branding,
body.page-web,
body.page-bio {
  background: radial-gradient(ellipse 1500px 1100px at 0% 0%, #FE7202 0%, #F5390C 22%, #000000 55%, #000000 100%);
  background-attachment: fixed;
}
body.page-redes,
body.page-automatizaciones {
  background: radial-gradient(ellipse 1500px 1100px at 100% 0%, #FE7202 0%, #F5390C 22%, #000000 55%, #000000 100%);
  background-attachment: fixed;
}

/* ── PLANTILLA FIJA: mismo punto de partida del texto en todas las subpáginas ── */
.page-hero-section {
  min-height: 100vh;
  padding-top: var(--nav-gap);
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .page-hero-section { padding-top: var(--nav-gap-mobile); }
}

/* Taglines en negro sobre el degradado radial (branding, web, bio) */
body.page-branding .tagline,
body.page-web .tagline,
body.page-bio .tagline {
  color: #000000;
}

/* En páginas con degradado radial, solo debe verse el degradado (sin glows/blurs detrás) */
body.page-branding .glow-bg,
body.page-redes .glow-bg,
body.page-web .glow-bg,
body.page-automatizaciones .glow-bg,
body.page-bio .glow-bg {
  display: none;
}
