:root {
  --bg: #16281d;
  --bg-soft: #1e3527;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.13);
  --glass-border: rgba(255, 255, 255, 0.18);
  --ink: #f5f2e6;
  --muted: #b7c6b0;
  --accent: #d8e8b0;
  --accent-dark: #16281d;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

/* Fixed background photo, softly blurred + green tint so it reads as
   texture/atmosphere rather than competing with the foreground glass UI */
.bg-photo {
  position: fixed;
  inset: -20px;
  z-index: -2;
  background: url('assets/fondo-vela.jpg') center 35% / cover no-repeat;
  filter: blur(7px) saturate(1.05);
  transform: scale(1.04);
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(160deg, rgba(8, 18, 12, 0.92), rgba(13, 26, 18, 0.94) 55%, rgba(7, 15, 10, 0.96)),
    linear-gradient(0deg, rgba(40, 80, 50, 0.22), rgba(40, 80, 50, 0.22));
  mix-blend-mode: normal;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  margin: 0;
}
em { font-style: italic; color: var(--accent); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; color: var(--muted); line-height: 1.7; }
button { font: inherit; }

/* Background decorative blobs */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-1 {
  width: 520px; height: 520px;
  top: -120px; left: -100px;
  background: radial-gradient(circle, #4d7a52, transparent 70%);
}
.blob-2 {
  width: 480px; height: 480px;
  bottom: -140px; right: -120px;
  background: radial-gradient(circle, #6fae6e, transparent 70%);
  animation-delay: 4s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}

/* Header */
.site-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.header-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 22px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: box-shadow .4s var(--ease-out), background .4s var(--ease-out);
}

.logo-slot {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-radius: 50%;
  overflow: hidden;
}
.logo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pill-nav {
  position: relative;
  display: flex;
  padding: 4px;
}

.nav-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  transition: left .45s var(--ease-out), width .45s var(--ease-out);
  z-index: 0;
}

.nav-list {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color .35s var(--ease-out);
}
.nav-link.is-active { color: var(--accent-dark); }
.nav-link:hover:not(.is-active) { color: var(--ink); }

.cta-btn {
  flex-shrink: 0;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.cta-btn:active { transform: translateY(0) scale(0.97); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .25s var(--ease-out);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
  width: 100%;
  max-width: 1100px;
  margin-top: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  transition: max-height .45s var(--ease-out), opacity .3s var(--ease-out), padding .45s var(--ease-out);
}
.mobile-panel.is-open {
  max-height: 320px;
  opacity: 1;
  padding: 8px 0;
}
.mobile-list li a {
  display: block;
  padding: 14px 28px;
  font-size: 0.95rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), color .25s;
}
.mobile-panel.is-open .mobile-list li a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-list li:nth-child(1) a { transition-delay: .05s; }
.mobile-list li:nth-child(2) a { transition-delay: .1s; }
.mobile-list li:nth-child(3) a { transition-delay: .15s; }
.mobile-list li:nth-child(4) a { transition-delay: .2s; }
.mobile-list li a:hover { color: var(--ink); }

/* Sections */
main { position: relative; z-index: 1; }

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 160px 24px 100px;
  scroll-margin-top: 120px;
}
.section:not(.hero-section) { padding-top: 140px; }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 16px; }
.section-lead { margin-top: 12px; }

/* Hero */
.hero-section { padding-top: 190px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 22px;
}
.hero-text { max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; align-items: center; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.btn-primary {
  background: var(--ink);
  color: var(--accent-dark);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.btn-primary:active { transform: translateY(0) scale(.96); }

.btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: transform .3s var(--ease-out), background .3s var(--ease-out);
}
.btn-icon:hover { transform: translateY(-3px) rotate(45deg); background: var(--glass-strong); }

.hero-visual { position: relative; min-height: 420px; }
.img-slot {
  border-radius: 28px;
  background: var(--glass);
  border: 1px dashed var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.hero-photo { width: 100%; height: 480px; }
.hero-photo img { object-position: top center; }
.img-slot-label { opacity: 0.6; }
.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.img-slot:has(img) { border-style: solid; padding: 0; }

.floating-card {
  position: absolute;
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.card-quote { top: -30px; left: -20px; max-width: 220px; font-style: italic; font-size: 0.85rem; }
.card-quote p { color: var(--ink); margin: 0; }
.card-stat { top: 40px; right: -24px; max-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.card-progress { bottom: -20px; left: 20px; width: 210px; display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stat-value { font-size: 0.95rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.progress-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  animation: fillBar 1.4s var(--ease-out) forwards;
  animation-play-state: paused;
}
.in-view .progress-fill { animation-play-state: running; }
@keyframes fillBar { to { width: var(--target); } }
.progress-value { align-self: flex-end; font-size: 0.8rem; color: var(--ink); }

.float-anim {
  animation: floaty 5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Timeline (Mi Historia) */
.timeline {
  position: relative;
  max-width: 880px;
  margin: 120px auto 0;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--glass-border);
  overflow: hidden;
  border-radius: 2px;
}
.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent), rgba(216, 232, 176, 0.3));
  transition: height 0.15s linear;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 44px 72px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-left { left: 0; text-align: right; }
.timeline-right { left: 50%; text-align: left; }

.timeline-dot {
  position: absolute;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px var(--glass-border);
}
.timeline-left .timeline-dot { right: -7px; }
.timeline-right .timeline-dot { left: -7px; }

.timeline-card { display: inline-block; text-align: left; width: 100%; max-width: 380px; }
.timeline-left .timeline-card { margin-left: auto; }
.timeline-right .timeline-card { margin-right: auto; }
.img-slot.timeline-photo {
  width: 100%;
  height: 210px;
  margin-bottom: 18px;
  border: none;
  background: transparent;
}
.timeline-photo img {
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 25%, transparent 92%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 25%, transparent 92%);
}
.timeline-card h3 { color: var(--ink); margin-bottom: 8px; font-size: 1.15rem; }

.reveal.reveal-left { transform: translate(-40px, 0); }
.reveal.reveal-right { transform: translate(40px, 0); }
.reveal.reveal-left.in-view, .reveal.reveal-right.in-view { transform: translate(0, 0); }

@media (max-width: 720px) {
  .timeline-line { left: 18px; }
  .timeline-item, .timeline-left, .timeline-right {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 0 0 56px 52px;
  }
  .timeline-left .timeline-dot, .timeline-right .timeline-dot { left: 11px; right: auto; }
  .timeline-left .timeline-card, .timeline-right .timeline-card { margin: 0; max-width: 100%; }
  .reveal.reveal-left, .reveal.reveal-right { transform: translate(0, 24px); }
}

/* Glass cards / grids */
.cards-grid, .product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.glass-card {
  padding: 32px 28px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .4s var(--ease-out), background .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.glass-card:hover {
  transform: translateY(-8px);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}
.glass-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--ink); }
.card-icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--glass-strong);
  color: var(--accent);
  margin-bottom: 16px;
  transition: transform .4s var(--ease-out);
}
.glass-card:hover .card-icon { transform: rotate(180deg); }

.product-photo { width: 100%; height: 160px; margin-bottom: 18px; }

/* Contact info (email / phone) */
.contact-info {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}
.contact-info-text {
  color: var(--muted);
  margin-bottom: 20px;
}
.contact-info-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.contact-info-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform .3s var(--ease-out), background .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.contact-info-item:hover {
  transform: translateY(-3px);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
}
.contact-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass-strong);
  color: var(--accent);
  flex-shrink: 0;
  transition: transform .4s var(--ease-out);
}
.contact-info-item:hover .contact-info-icon { transform: rotate(-12deg) scale(1.08); }

/* Contact form */
.contact-form-wrap {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}
.contact-form-wrap:hover { transform: none; background: var(--glass); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp .5s var(--ease-out);
}
.contact-form[hidden] { display: none; }
.contact-form.is-hiding {
  animation: fadeDown .4s var(--ease-out) forwards;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 12px 0 4px;
  animation: successPop .55s cubic-bezier(.34, 1.56, .64, 1);
}
.form-success[hidden] { display: none; }
.form-success h3 {
  color: var(--ink);
  font-size: 1.4rem;
  margin-top: 6px;
  opacity: 0;
  animation: fadeUp .4s var(--ease-out) .15s forwards;
}
.form-success p {
  max-width: 380px;
  opacity: 0;
  animation: fadeUp .4s var(--ease-out) .25s forwards;
}
.form-success .btn-again {
  margin-top: 14px;
  opacity: 0;
  animation: fadeUp .4s var(--ease-out) .35s forwards;
}

.success-check { color: var(--accent); margin-bottom: 4px; }
.check-circle {
  stroke-dasharray: 182;
  stroke-dashoffset: 182;
  animation: drawCircle .6s var(--ease-out) forwards;
}
.check-mark {
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
  animation: drawCheck .4s var(--ease-out) .5s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes successPop {
  0% { opacity: 0; transform: scale(.85) translateY(10px); }
  60% { opacity: 1; transform: scale(1.03) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeDown {
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out), transform .2s var(--ease-out);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.contact-form .btn {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.contact-form .btn:disabled { cursor: default; opacity: 0.85; }
.contact-form .btn.is-sending .btn-label { opacity: 0; }
.contact-form .btn.is-sending::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid rgba(22, 40, 29, 0.35);
  border-top-color: var(--accent-dark);
  animation: spin 0.7s linear infinite;
}
.btn-label { transition: opacity .2s var(--ease-out); }
@keyframes spin { to { transform: rotate(360deg); } }

.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.form-note { font-size: 0.8rem; color: var(--accent); min-height: 1em; transition: opacity .3s var(--ease-out); }
.form-note.is-error { color: #e39a9a; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 36px;
  color: var(--muted);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-badges {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-badge {
  height: 44px;
  width: auto;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  transition: transform .3s var(--ease-out), background .3s var(--ease-out);
}
.footer-badge:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.22);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 40px; }
  .cards-grid, .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .pill-nav, .cta-btn { display: none; }
  .nav-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .cards-grid, .product-grid { grid-template-columns: 1fr; }
}
