:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --primary: 24 95% 53%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --destructive: 0 84.2% 60.2%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 24 95% 53%;
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  overflow-x: clip;
  line-height: 1.925;
}

body.no-scroll {
  overflow: hidden;
}

img,
iframe {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  text-wrap: balance;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

p {
  max-width: 65ch;
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
  font-size: 1.175rem;
}

.container-custom {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.section-spacing {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.bg-gradient-soft {
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--background)) 52%, hsl(var(--primary) / 0.05) 100%);
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.bg-card {
  background-color: hsl(var(--card));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-muted {
  color: hsl(var(--muted-foreground));
}

.text-destructive {
  color: hsl(var(--destructive));
}

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1-5 { margin-top: 0.375rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.pt-8 { padding-top: 2rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.text-sm { font-size: 1rem; }
.text-base { font-size: 1,175rem; text-align: center }
.text-lg { font-size: 1.175rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.grid {
  display: grid;
  gap: var(--grid-gap, 2rem);
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-8 { --grid-gap: 2rem; }
.gap-12 { --grid-gap: 3rem; }
.items-center { align-items: center; }
.col-span-2 { grid-column: span 2 / span 2; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center-flex { align-items: center; }
.justify-between { justify-content: space-between; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.border-t { border-top: 1px solid hsl(var(--border)); }
.border-b { border-bottom: 1px solid hsl(var(--border)); }
.border-subtle { border-color: hsl(var(--border) / 0.5); }

.object-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aspect-square { aspect-ratio: 1 / 1; }
.aspect-5-6 { aspect-ratio: 5 / 6; }
.aspect-4-3 { aspect-ratio: 4 / 3; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(12px);
}

.site-nav {
  height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--primary));
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  color: hsl(var(--foreground) / 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}

.nav-link.active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: hsl(var(--foreground));
  transition: background-color 0.2s ease;
}

.menu-button:hover {
  background: hsl(var(--muted));
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  background: rgb(0 0 0 / 0.35);
}

.mobile-overlay.open {
  display: block;
}

.mobile-sheet {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: min(400px, 86vw);
  height: 100vh;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  border-left: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  padding: 1.25rem;
  box-shadow: -10px 0 25px -10px rgb(0 0 0 / 0.25);
}

.mobile-sheet.open {
  transform: translateX(0);
}

.mobile-sheet-header {
  display: flex;
  justify-content: flex-end;
}

.hero-card-glow {
  position: absolute;
  right: -1.5rem;
  bottom: -1.5rem;
  width: 12rem;
  height: 12rem;
  z-index: -1;
  border-radius: 1rem;
  background: hsl(var(--primary) / 0.2);
}

.project-card {
  display: block;
}

.project-card-box {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: hsl(var(--card));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover .project-card-box {
  transform: translateY(-0.25rem);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.project-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-card-img img {
  transform: scale(1.1);
}

.project-card-title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.project-card:hover .project-card-title {
  color: hsl(var(--primary));
}

.project-card-text {
  display: -webkit-box;
  margin-bottom: 1rem;
  overflow: hidden;
  color: hsl(var(--muted-foreground));
  font-size: 0.93rem;
  -webkit-box-orient: vertical;
  text-align:start
}

.project-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 500;
  transition: gap 0.2s ease;
}

.project-card:hover .project-card-cta {
  gap: 0.5rem;
}

.project-card-cta svg {
  transition: transform 0.2s ease;
}

.project-card:hover .project-card-cta svg {
  transform: translateX(0.25rem);
}

.video-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
  padding-bottom: 56.25%;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tiktok-card,
.link2-card {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  background: hsl(var(--card));
  
  /* Asegura que la tarjeta mantenga el tamaño ideal del reproductor */
  width: 100%;
  max-width: 340px; 
  margin: 0 auto;
}

.tiktok-card:hover,
.link2-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.2);
}

/* --- Estilos para el contenedor del video --- */

.video2-frame {
  position: relative;
  width: 100%;
  padding-top: 160%; /* Relación de aspecto vertical 9:16 */
  background-color: #000; 
}

.video2-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-card,
.link-card {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  background: hsl(var(--card));
}

.video-card:hover,
.link-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.2);
}

.video-caption {
  padding: 0.175rem 0.25rem 0.25rem;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  text-align: center;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1 rem;
  padding: 1 rem;
  color: hsl(var(--muted-foreground));
  font-size: 1.125rem;
  font-weight: 550;
  text-align: center;
}

.link-card:hover {
  color: hsl(var(--primary));
}

.contact-card {
  border-radius: 1rem;
  background: hsl(var(--card));
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.form-label {
  display: block;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  margin-top: 0.375rem;
  border: 1px solid hsl(var(--input));
  border-radius: 0.5rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0.625rem 0.75rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-control:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.error-message {
  min-height: 1.25rem;
  margin-top: 0.375rem;
  color: hsl(var(--destructive));
  font-size: 0.875rem;
}

.btn-primary {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.75rem 1rem;
  font-weight: 700;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(0.97);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  display: grid;
  gap: 0.75rem;
}

.toast {
  min-width: min(22rem, calc(100vw - 2rem));
  transform: translateY(0.5rem);
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--background));
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  padding: 0.875rem 1rem;
  color: hsl(var(--foreground));
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.footer {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.footer-muted {
  color: hsl(var(--secondary-foreground) / 0.8);
}

.footer-soft {
  color: hsl(var(--secondary-foreground) / 0.6);
}

.footer a:hover {
  color: hsl(var(--primary));
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  border-top: 1px solid hsl(var(--border) / 0.5);
  padding-top: 2rem;
}

.icon-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reveal {
  transform: translateY(1.25rem);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.from-left { transform: translateX(-1.25rem); }
.reveal.from-right { transform: translateX(1.25rem); }
.reveal.visible,
.reveal.from-left.visible,
.reveal.from-right.visible {
  transform: translate(0, 0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .reveal,
  .reveal.from-left,
  .reveal.from-right {
    transform: none;
    opacity: 1;
  }
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .desktop-nav {
    display: flex;
  }

  .menu-button.mobile-only {
    display: none;
  }

  .md-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-flex-row { flex-direction: row; }
  .footer-bottom { flex-direction: row; }
  .md-text-3xl { font-size: 1.875rem; }
  .md-text-4xl { font-size: 2.25rem; }
  .md-text-5xl { font-size: 3rem; }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .lg-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg-text-6xl { font-size: 3.75rem; }
}

@media (max-width: 1023px) {
  .col-span-2 { grid-column: auto; }
}
