/* ==========================================================
   TECYPE.MX — Landing Page
   Hardware Solutions S.A. de C.V.
   ========================================================== */

/* ------------------- CSS Variables ------------------- */
:root {
  --bg-primary: #0b1220;
  --bg-secondary: rgba(30, 41, 59, 0.55);
  --bg-tertiary: rgba(39, 53, 79, 0.45);
  --surface: rgba(51, 65, 85, 0.45);
  --surface-light: rgba(71, 85, 105, 0.5);

  --accent: #3b82f6;
  --accent-secondary: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.05);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.35s 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-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ------------------- Utilities ------------------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent {
  color: var(--accent);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------- Buttons ------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  filter: brightness(1.08);
}

.btn-secondary {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 0.95rem;
}

.btn-full {
  width: 100%;
}

/* ------------------- Loader ------------------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, #162032 0%, var(--bg-primary) 60%);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.page-loader.is-leaving {
  opacity: 0;
  transform: scale(1.02);
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
}

.loader-logo-wrapper {
  margin-bottom: 28px;
}

.loader-logo {
  max-width: 260px;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  animation: logoReveal 0.9s ease 0.2s forwards;
}

@keyframes logoReveal {
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.loader-track {
  width: 160px;
  height: 2px;
  background: var(--surface);
  border-radius: 2px;
  margin: 0 auto 14px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  animation: loadCharge 2s ease 0.5s forwards;
}

@keyframes loadCharge {
  0%   { width: 0%; }
  40%  { width: 50%; }
  70%  { width: 80%; }
  100% { width: 100%; }
}

.loader-subtitle {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.5s ease 0.8s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.loader-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
}

/* ------------------- Header ------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  background: transparent;
  transition: background var(--transition-base), padding var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.6);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--glass-border), inset 0 1px 0 var(--glass-highlight);
  border-bottom: 1px solid var(--glass-border);
}

.site-header.is-scrolled::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  z-index: -1;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  max-height: 40px;
  width: auto;
  transition: transform var(--transition-fast);
}

.logo:hover img {
  transform: scale(1.02);
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  padding: 9px 20px;
  font-size: 0.78rem;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ------------------- Static header (tienda) ------------------- */
.page-tienda .site-header--static {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  background: rgba(15, 23, 42, 0.75);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--glass-border), inset 0 1px 0 var(--glass-highlight);
  border-bottom: 1px solid var(--glass-border);
}

.page-tienda .site-header--static::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  z-index: -1;
  pointer-events: none;
}

.page-tienda .tienda-main {
  margin-top: 64px;
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.page-tienda .tienda-main iframe {
  flex: 1;
  width: 100%;
  border: 0;
  display: block;
}

/* ------------------- Hero ------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(96, 165, 250, 0.06) 0%, transparent 50%),
              var(--bg-primary);
}

.hero-canvas-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin-bottom: 18px;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-title .line {
  display: block;
}

.hero-title .line.accent {
  mix-blend-mode: difference;
  color: #fff;
  position: relative;
  z-index: 2;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: rgba(51, 65, 85, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: perspective(1000px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-card:hover {
  transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 var(--glass-highlight);
}

.card-header {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-light);
}

.card-dot:first-child { background: #ef4444; }
.card-dot:nth-child(2) { background: #eab308; }
.card-dot:nth-child(3) { background: #22c55e; }

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.stat-bar {
  height: 5px;
  background: var(--surface-light);
  border-radius: 3px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.stat-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 75%;
  background: var(--accent);
  border-radius: 3px;
}

.stat-bar.short::after {
  width: 45%;
}

.hero-floating-badge {
  position: absolute;
  bottom: 16px;
  right: 0;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: floatBadge 4s ease-in-out infinite;
}

.badge-icon {
  color: #22c55e;
  font-size: 1rem;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Scroll indicator (in flow under CTA — avoids overlap on mobile) */
.hero-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll-label {
  display: block;
  line-height: 1.2;
}

@media (min-width: 1025px) {
  .hero-text .hero-scroll-indicator {
    align-items: flex-start;
  }
}

.mouse {
  width: 18px;
  height: 28px;
  border: 1.5px solid var(--text-muted);
  border-radius: 10px;
  position: relative;
}

.wheel {
  width: 2px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.8s ease infinite;
}

@keyframes scrollWheel {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* ------------------- Section Headers ------------------- */
.section-header {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 52px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ------------------- Services ------------------- */
.services {
  padding: 100px 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.3) 0%, rgba(30, 41, 59, 0.2) 100%);
  backdrop-filter: blur(4px);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: rgba(51, 65, 85, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 var(--glass-highlight);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  opacity: 0.7;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25), inset 0 1px 0 var(--glass-highlight);
  background: rgba(51, 65, 85, 0.35);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  color: var(--accent);
  margin-bottom: 20px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.service-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.service-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ------------------- Facebook Section ------------------- */
.facebook-section {
  padding: 100px 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 60%), var(--bg-primary);
}

.facebook-wrapper {
  max-width: 800px;
  margin: 0 auto 32px;
}

.facebook-wrapper .iframely-embed {
  background: rgba(51, 65, 85, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), inset 0 1px 0 var(--glass-highlight);
  transition: all var(--transition-base);
}

.facebook-wrapper .iframely-embed:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 var(--glass-highlight);
  background: rgba(51, 65, 85, 0.35);
}

.facebook-wrapper .iframely-responsive {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

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

.facebook-container .iframe-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.facebook-container .iframe-fallback a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}

.facebook-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.facebook-cta .btn-lg {
  white-space: normal;
  max-width: 100%;
}

.facebook-whatsapp {
  text-decoration: none;
}

.facebook-whatsapp-icon {
  display: inline-flex;
  flex-shrink: 0;
}

/* ------------------- Footer ------------------- */
.site-footer {
  background: rgba(30, 41, 59, 0.4);
  border-top: 1px solid var(--glass-border);
  padding: 70px 0 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand img {
  max-height: 36px;
  width: auto;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent);
}

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

.social-links a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.social-links a:hover {
  background: var(--accent);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================
   TIENDA — Fullscreen iframe with macOS window chrome
   ========================================================== */

.page-tienda {
  background: var(--bg-primary);
  overflow: hidden;
}

.page-tienda .site-header--autohide {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  background: rgba(15, 23, 42, 0.65);
  padding: 10px 0;
  box-shadow: 0 1px 0 var(--glass-border), inset 0 1px 0 var(--glass-highlight);
  border-bottom: 1px solid var(--glass-border);
}

.page-tienda .site-header--autohide::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  z-index: -1;
  pointer-events: none;
}

/* Show on hover */
.page-tienda .site-header--autohide:hover,
.page-tienda:has(.site-header--autohide:hover) .site-header--autohide,
.page-tienda .site-header--autohide.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .page-tienda .site-header--autohide {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

.tienda-main {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

.window-chrome {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  overflow: hidden;
}

.window-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.window-content iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.window-content .iframe-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.window-content .iframe-fallback a {
  color: var(--accent);
  text-decoration: underline;
}

/* ------------------- Responsive ------------------- */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text { order: 1; }
  .hero-visual { order: 0; margin-bottom: 16px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-card { transform: none; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-grid { grid-template-columns: 1fr; gap: 50px; }
  .contact-info .section-header { text-align: center; }
  .contact-methods { max-width: 380px; margin: 0 auto; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-base);
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    z-index: 1002;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }

  .nav-link { font-size: 1.05rem; }

  .hero { padding: 110px 0 70px; }
  .hero-title { font-size: 2rem; }
  .hero-floating-badge { display: none; }

  .hero-scroll-indicator {
    margin-top: 22px;
    gap: 6px;
  }

  .hero-scroll-indicator .mouse {
    display: none;
  }

  .hero-scroll-indicator .hero-scroll-label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    padding: 6px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    color: var(--text-secondary);
  }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 26px 22px; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .footer-brand p { margin: 0 auto; }
  .social-links { justify-content: center; }

  .page-tienda .tienda-main {
    margin-top: 64px;
    height: calc(100dvh - 64px);
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .btn-lg { padding: 13px 22px; font-size: 0.9rem; }
  .contact-form { padding: 26px 18px; }
}

/* ------------------- Legal pages ------------------- */
.page-legal {
  background: var(--bg-primary);
  color: var(--text-secondary);
  min-height: 100vh;
}

.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 110px 20px 80px;
}

.legal-main h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.legal-back {
  margin-bottom: 28px;
}

.legal-back a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.legal-back a:hover {
  text-decoration: underline;
}

.legal-prose h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 12px;
}

.legal-prose h2:first-of-type {
  margin-top: 0;
}

.legal-prose p,
.legal-prose li {
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-prose ul {
  padding-left: 1.25rem;
  margin-bottom: 16px;
}

.legal-prose strong {
  color: var(--text-primary);
}

.legal-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-prose a:hover {
  color: var(--accent-secondary);
}

.legal-footer-links {
  text-align: center;
  padding-top: 28px;
  padding-bottom: 8px;
}

.legal-footer-links p {
  margin: 0 0 10px;
}

.legal-footer-links p:last-child {
  margin-bottom: 0;
  font-size: 0.85rem;
}

.legal-footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.legal-footer-links a:hover {
  text-decoration: underline;
}

.page-legal .site-footer {
  margin-top: auto;
}

/* ------------------- Reduced Motion ------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .page-loader { transition: opacity 0.15s ease; }
}
