/* Base reset and variables */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --border: #e2e8f0; /* slate-200 */
  --primary: #0f172a; /* slate-900 */
  --primary-contrast: #ffffff;
  --link: #1d4ed8; /* blue-700 */
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(2, 6, 23, 0.08);
  --maxw: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-alt: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1f2937;
    --primary: #e2e8f0;
    --primary-contrast: #0b1220;
    --link: #60a5fa;
    --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
  }
}

/* Typography */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2 { font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 2.5rem + 1vw, 3.2rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 2.2rem); margin: 0 0 1rem; line-height: 1.2; }

p { color: var(--muted); max-width: 70ch; }
ul { padding-left: 1.2rem; }
ul li { margin: 0.4rem 0; color: var(--muted); }

/* Layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
section { position: relative; padding: clamp(3rem, 5vw, 6rem) 0; }
section.full { min-height: 92vh; display: flex; align-items: center; position: relative; overflow: hidden; }
section.product-section { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0; }
.bg-alt { background: var(--bg-alt); }

/* Header */
header { position: sticky; top: 0; z-index: 100; backdrop-filter: saturate(140%) blur(8px); background: color-mix(in oklab, var(--bg), transparent 20%); border-bottom: 1px solid var(--border); }
header .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0.9rem 1rem; display: flex; justify-content: space-between; align-items: center; }
header .wrap > div { font-weight: 700; letter-spacing: -0.01em; }
header .brand { display: flex; align-items: center; }
header .brand img { display: block; height: 28px; width: auto; }

/* Nav */
header nav { display: flex; gap: 0.6rem; flex-wrap: wrap; }
header nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}
header nav a:hover { color: var(--text); background: color-mix(in srgb, var(--border), transparent 60%); }
header nav a:focus-visible { outline: 2px solid color-mix(in srgb, var(--link), transparent 40%); outline-offset: 2px; }

/* Hero */
section.full .container { display: grid; gap: 1.2rem; }
section.full p { font-size: 1.05rem; }
.hero-logo { display: block; width: min(60%, 360px); max-width: 100%; height: auto; margin: 0 auto 0.75rem; }

/* Hero heading and CTA gradient theme */
section.full .container h1 {
  background: linear-gradient(135deg, #23AAC5 0%, #1b8fa6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
section.full .btn.primary {
  background: linear-gradient(135deg, #23AAC5 0%, #1b8fa6 100%);
  color: #ffffff;
  border-color: #1b8fa6;
  box-shadow: 0 4px 14px color-mix(in srgb, #23AAC5, transparent 70%);
}
section.full .btn.primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, #23AAC5, white 6%) 0%, color-mix(in srgb, #1b8fa6, white 6%) 100%);
  border-color: color-mix(in srgb, #1b8fa6, white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, #23AAC5, transparent 60%);
}

/* Hero animated background (subtle) */
section.full::before, section.full::after {
  content: '';
  position: absolute;
  inset: -20% -10% -10% -10%;
  z-index: -1;
}
section.full::before {
  background: radial-gradient(1200px 600px at 15% 10%, color-mix(in srgb, var(--link), transparent 85%), transparent 60%),
              radial-gradient(900px 500px at 85% 20%, color-mix(in srgb, var(--text), transparent 92%), transparent 60%),
              linear-gradient(135deg, color-mix(in srgb, var(--bg), var(--text) 2%), color-mix(in srgb, var(--bg), var(--text) 1%));
  filter: saturate(120%);
  animation: heroShift 16s ease-in-out infinite alternate;
}
section.full::after {
  background: radial-gradient(800px 400px at 50% 110%, color-mix(in srgb, var(--link), transparent 90%), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroShift {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-2%,0) scale(1.02); }
}
@keyframes heroGlow {
  0% { opacity: 0.35; transform: translateY(0); }
  100% { opacity: 0.5; transform: translateY(-6px); }
}

/* Staggered reveal */
.reveal { opacity: 0; transform: translateY(10px); animation: revealUp .7s ease forwards; }
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .2s; }
.reveal-3 { animation-delay: .35s; }

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

@media (prefers-reduced-motion: reduce) {
  section.full::before, section.full::after { animation: none; }
  .reveal { opacity: 1; transform: none; animation: none; }
}

/* Product sections - full screen impact */
.product-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 8rem) clamp(1rem, 4vw, 3rem);
  position: relative;
  width: 100%;
}

.product-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--bg), var(--primary) 2%) 0%, 
    color-mix(in srgb, var(--bg), var(--primary) 1%) 100%);
  z-index: -1;
}

.product-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.product-content h2 {
  font-size: clamp(2.2rem, 3vw + 1rem, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(135deg, var(--text) 0%, color-mix(in srgb, var(--text), var(--primary) 20%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-content > p {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  margin-bottom: clamp(2rem, 3vw, 3rem);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

.product-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: clamp(2rem, 3vw, 3rem) 0;
  list-style: none;
  padding: 0;
}

.product-features li {
  background: color-mix(in srgb, var(--bg), var(--border) 30%);
  border: 1px solid color-mix(in srgb, var(--border), transparent 50%);
  border-radius: 12px;
  padding: clamp(1rem, 2vw, 1.5rem);
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  transition: all 0.3s ease;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-features li::before {
  content: '✓';
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 24px;
}

.product-features li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--border), var(--primary) 20%);
}

.product-actions {
  margin-top: clamp(2.5rem, 4vw, 4rem);
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

section + section { border-top: 1px solid color-mix(in srgb, var(--border), transparent 60%); }

/* Product visual (mockup) */
.product-visual {
  width: min(680px, 100%);
  margin: 0 auto;
}

/* Visual group for desktop + mobile */
.visual-group { display: grid; gap: 16px; align-items: end; justify-items: center; }
.device { width: 100%; }
.device.desktop { width: 100%; }
.device.mobile { width: min(260px, 42vw); }

.device-screen.desktop { aspect-ratio: 16 / 10; min-height: auto; }
.device-screen.mobile { aspect-ratio: 9 / 19.5; min-height: auto; }

.device-body img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }

.device-frame {
  background: linear-gradient(180deg, #ffffff, color-mix(in srgb, #ffffff, #e2e8f0 15%));
  padding: clamp(8px, 1vw, 14px);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(2,6,23,0.12), 0 2px 6px rgba(2,6,23,0.06) inset;
  border: 1px solid color-mix(in srgb, var(--border), white 20%);
}

.device-screen {
  background: radial-gradient(1000px 500px at 10% 0%, #0b1220, #0b1220 40%, #111827 100%);
  border-radius: 16px;
  padding: clamp(12px, 1.2vw, 16px);
  border: 1px solid color-mix(in srgb, #111827, white 10%);
  min-height: clamp(220px, 35vw, 360px);
  position: relative;
  display: flex;
  flex-direction: column;
}

.device-body { flex: 1; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); }

.preview-tabs {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-tab {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #d1d5db;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
}

/* Section theming: titles and primary buttons */
/* Loop: gradient */
#loop .product-content h2 {
  background: linear-gradient(135deg, rgba(97, 27, 70, 1) 30%, rgba(227, 117, 0, 1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#loop .btn.primary {
  background: linear-gradient(135deg, rgba(97, 27, 70, 1) 30%, rgba(227, 117, 0, 1) 100%);
  color: #ffffff;
  border-color: rgba(227, 117, 0, 1);
  box-shadow: 0 4px 14px color-mix(in srgb, rgba(227,117,0,1), transparent 70%);
}
#loop .btn.primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, rgba(97,27,70,1), white 6%) 30%, color-mix(in srgb, rgba(227,117,0,1), white 6%) 100%);
  border-color: color-mix(in srgb, rgba(227,117,0,1), white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, rgba(227,117,0,1), transparent 60%);
}

/* Single-color themes */
#puri .product-content h2 {
  background: linear-gradient(135deg, #23AAC5 0%, color-mix(in srgb, #23AAC5, white 12%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#puri .btn.primary {
  background: #23AAC5;
  color: #ffffff;
  border-color: #23AAC5;
  box-shadow: 0 4px 14px color-mix(in srgb, #23AAC5, transparent 70%);
}
#puri .btn.primary:hover {
  background: color-mix(in srgb, #23AAC5, white 8%);
  border-color: color-mix(in srgb, #23AAC5, white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, #23AAC5, transparent 60%);
}

#resq .product-content h2 {
  background: linear-gradient(135deg, #D33E22 0%, color-mix(in srgb, #D33E22, white 12%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#resq .btn.primary {
  background: #D33E22;
  color: #ffffff;
  border-color: #D33E22;
  box-shadow: 0 4px 14px color-mix(in srgb, #D33E22, transparent 70%);
}
#resq .btn.primary:hover {
  background: color-mix(in srgb, #D33E22, white 8%);
  border-color: color-mix(in srgb, #D33E22, white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, #D33E22, transparent 60%);
}

#happy .product-content h2 {
  background: linear-gradient(135deg, #14AE5C 0%, color-mix(in srgb, #14AE5C, white 12%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#happy .btn.primary {
  background: #14AE5C;
  color: #ffffff;
  border-color: #14AE5C;
  box-shadow: 0 4px 14px color-mix(in srgb, #14AE5C, transparent 70%);
}
#happy .btn.primary:hover {
  background: color-mix(in srgb, #14AE5C, white 8%);
  border-color: color-mix(in srgb, #14AE5C, white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, #14AE5C, transparent 60%);
}

#passwords .product-content h2 {
  background: linear-gradient(135deg, #23AAC5 0%, color-mix(in srgb, #23AAC5, white 12%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#passwords .btn.primary {
  background: #23AAC5;
  color: #ffffff;
  border-color: #23AAC5;
  box-shadow: 0 4px 14px color-mix(in srgb, #23AAC5, transparent 70%);
}
#passwords .btn.primary:hover {
  background: color-mix(in srgb, #23AAC5, white 8%);
  border-color: color-mix(in srgb, #23AAC5, white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, #23AAC5, transparent 60%);
}

@media (min-width: 1000px) {
  .product-hero { grid-template-columns: 1.1fr 1fr; }
  .product-content { text-align: left; margin: 0; }
  .product-actions { justify-content: flex-start; }
  .visual-group { grid-template-columns: 1fr auto; gap: 20px; }
  .device.mobile { transform: translateY(24px); }
}

/* Buttons */
.btn { 
  display: inline-block; 
  padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1.5rem, 3vw, 2rem); 
  border-radius: 12px; 
  border: 2px solid var(--text); 
  text-decoration: none; 
  font-size: clamp(0.9rem, 1.2vw, 1rem); 
  font-weight: 700; 
  color: var(--text); 
  background: transparent; 
  transition: all .3s ease; 
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text), transparent 85%), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before { left: 100%; }
.btn:hover { 
  background: color-mix(in srgb, var(--text), transparent 94%); 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px color-mix(in srgb, var(--text), transparent 85%);
}
.btn:active { transform: translateY(0px); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--link), transparent 50%); outline-offset: 3px; }

.btn.primary { 
  background: var(--primary); 
  color: var(--primary-contrast); 
  border-color: var(--primary);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary), transparent 70%);
}
.btn.primary::before {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-contrast), transparent 80%), transparent);
}
.btn.primary:hover { 
  background: color-mix(in srgb, var(--primary), var(--primary-contrast) 8%); 
  border-color: color-mix(in srgb, var(--primary), var(--primary-contrast) 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, var(--primary), transparent 60%);
}

/* Footer */
footer { border-top: 1px solid var(--border); text-align: center; font-size: 0.85rem; padding: 2rem; color: color-mix(in srgb, var(--muted), var(--text) 20%); }

/* Utilities */
.center { text-align: center; }

/* Contact section alignment */
#contacto .container.center { text-align: center; }
#contacto .container.center p { text-align: center; margin-left: auto; margin-right: auto; }
#contacto .container.center .btn { display: inline-block; margin: 0.35rem 0.4rem; }

/* Contact primary button theme (match hero) */
#contacto .btn.primary {
  background: linear-gradient(135deg, #23AAC5 0%, #1b8fa6 100%);
  color: #ffffff;
  border-color: #1b8fa6;
  box-shadow: 0 4px 14px color-mix(in srgb, #23AAC5, transparent 70%);
}
#contacto .btn.primary:hover {
  background: linear-gradient(135deg, color-mix(in srgb, #23AAC5, white 6%) 0%, color-mix(in srgb, #1b8fa6, white 6%) 100%);
  border-color: color-mix(in srgb, #1b8fa6, white 10%);
  box-shadow: 0 12px 35px color-mix(in srgb, #23AAC5, transparent 60%);
}

/* Responsive */
@media (min-width: 700px) {
  .product { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  header .wrap { padding: 1rem 1.5rem; }
  section.full .container { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr 1fr; }
  header .brand img { height: 34px; }
}
