/* ============================================
   Respondia — Landing Page Styles
   Paleta extraída de la portada de YouTube:
   Crema cálido, azul cornflower, verde esmeralda
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg-cream: #F8EFE5;
  --bg-cream-rgb: 248, 239, 229;

  --blue: #5B9BD5;
  --blue-dark: #3D7AB8;
  --blue-soft: rgba(91, 155, 213, 0.35);

  --green: #3AAF55;
  --green-dark: #2D8E44;
  --green-soft: rgba(58, 175, 85, 0.35);

  --yt-red: #FF0000;
  --yt-red-hover: #CC0000;

  --text-primary: #1A1A1A;
  --text-secondary: #5C5C5C;
  --text-muted: #8A8A8A;

  --white: #FFFFFF;
  --white-rgb: 255, 255, 255;

  --modal-backdrop: rgba(26, 26, 26, 0.4);
  --modal-bg: rgba(255, 255, 255, 0.85);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Gradient Blobs (matching YouTube cover aesthetic) --- */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: -15%;
  left: -15%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, var(--blue-soft) 0%, transparent 70%);
  filter: blur(80px);
  animation: blobFloat1 18s ease-in-out infinite alternate;
}

body::after {
  bottom: -15%;
  right: -15%;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, var(--green-soft) 0%, transparent 70%);
  filter: blur(80px);
  animation: blobFloat2 20s ease-in-out infinite alternate;
}

@keyframes blobFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(5%, 3%) scale(1.05); }
  100% { transform: translate(-2%, 5%) scale(0.97); }
}

@keyframes blobFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-4%, -3%) scale(1.03); }
  100% { transform: translate(3%, -5%) scale(0.98); }
}

/* --- Subtle Grain Texture Overlay --- */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Page Container --- */
.page-container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* --- Language Switcher --- */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-bottom: 2.5rem;
}

.lang-switch a {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  letter-spacing: 0.02em;
}

.lang-switch a:hover {
  color: var(--text-primary);
  background-color: rgba(var(--white-rgb), 0.5);
}

.lang-switch a.active {
  color: var(--text-primary);
  font-weight: 600;
  background-color: rgba(var(--white-rgb), 0.6);
}

/* --- Hero / Header Section --- */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s var(--transition-base) both;
}

.logo-wrapper {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 0 0 3px rgba(var(--white-rgb), 0.7);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.logo:hover {
  transform: scale(1.04);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(var(--white-rgb), 0.9);
}

.site-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.tagline {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

/* --- YouTube CTA Button --- */
.cta-youtube {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.1rem 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  background: var(--yt-red);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
  box-shadow: 0 4px 18px rgba(255, 0, 0, 0.25);
  letter-spacing: 0.01em;
}

.cta-youtube:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 0, 0, 0.35);
  background: var(--yt-red-hover);
}

.cta-youtube:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 0, 0, 0.25);
}

.cta-youtube svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* --- Latest Video Section --- */
.latest-video-section {
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s 0.15s var(--transition-base) both;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding-top: 0.5rem;
  animation: fadeInUp 0.8s 0.25s var(--transition-base) both;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(var(--white-rgb), 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--white-rgb), 0.6);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base);
}

.contact-btn:hover {
  transform: translateY(-1px);
  background: rgba(var(--white-rgb), 0.7);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.contact-btn:active {
  transform: translateY(0);
}

.contact-btn svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.footer-copy {
  margin-top: 2rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--modal-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--white-rgb), 0.6);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform var(--transition-base);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.modal-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-reveal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    filter var(--transition-base);
  box-shadow: 0 4px 15px rgba(91, 155, 213, 0.25);
}

.modal-reveal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(91, 155, 213, 0.35);
  filter: brightness(1.05);
}

.modal-reveal-btn:active {
  transform: translateY(0);
}

.modal-reveal-btn svg {
  width: 18px;
  height: 18px;
}

/* Email display after reveal */
.email-display {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.email-display.is-visible {
  display: flex;
}

.email-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(var(--white-rgb), 0.6);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--white-rgb), 0.8);
  user-select: all;
  word-break: break-all;
  letter-spacing: 0.01em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(var(--white-rgb), 0.5);
  color: var(--text-primary);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.modal-close {
  display: block;
  margin: 1.25rem auto 0;
  padding: 0.4rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* --- Fade-in Animation --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive: Tablet (≥480px) --- */
@media (min-width: 480px) {
  .page-container {
    padding: 2.5rem 2rem 4rem;
  }

  .logo {
    width: 120px;
    height: 120px;
  }
}

/* --- Responsive: Desktop (≥768px) --- */
@media (min-width: 768px) {
  .page-container {
    padding: 3.5rem 2rem 5rem;
  }

  .logo {
    width: 130px;
    height: 130px;
  }

  .tagline {
    font-size: 1.15rem;
  }
}

/* --- Focus Styles (Accessibility) --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Selection Color --- */
::selection {
  background: rgba(91, 155, 213, 0.2);
  color: var(--text-primary);
}
