/* ════════════════════════════════════════════════════════════
   VORTEX AMBIENTAL — main.css
   ════════════════════════════════════════════════════════════ */

/* ─── VARIABLES ──────────────────────────────────────────── */
:root {
  --color-primary:       oklch(33% 0.12 162);
  --color-primary-mid:   oklch(43% 0.13 158);
  --color-primary-light: oklch(72% 0.12 155);
  --color-accent:        oklch(63% 0.15 78);
  --color-accent-dark:   oklch(50% 0.14 74);

  --color-bg:            #ffffff;
  --color-bg-alt:        oklch(97% 0.007 160);
  --color-bg-dark:       oklch(20% 0.08 162);
  --color-bg-darker:     oklch(13% 0.05 162);

  --color-text:          oklch(18% 0.04 162);
  --color-text-muted:    oklch(52% 0.05 160);
  --color-border:        oklch(90% 0.018 160);

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;

  --radius:    10px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px oklch(0% 0 0 / 0.07), 0 1px 2px oklch(0% 0 0 / 0.05);
  --shadow-md: 0 4px 16px oklch(0% 0 0 / 0.10), 0 2px 6px oklch(0% 0 0 / 0.06);
  --shadow-lg: 0 8px 32px oklch(0% 0 0 / 0.14);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.25s var(--ease);

  --nav-h: 72px;
  --max-w: 1160px;
  --pad:   clamp(1.25rem, 5vw, 2.5rem);
}


/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }


/* ─── LAYOUT ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}


/* ─── TYPOGRAPHY UTILITIES ───────────────────────────────── */
.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 54ch;
  margin-top: 0.75rem;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header .section-subtitle { margin-inline: auto; }


/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--primary:active { transform: translateY(0); }

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px oklch(63% 0.15 78 / 0.4);
}

.btn--ghost-light {
  color: #fff;
  border: 1.5px solid oklch(100% 0 0 / 0.35);
}
.btn--ghost-light:hover {
  border-color: #fff;
  background: oklch(100% 0 0 / 0.1);
}

.btn--lg {
  font-size: 1rem;
  padding: 0.9rem 2rem;
}

.btn--full {
  width: 100%;
}


/* ─── REVEAL ANIMATION ───────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for grid items */
.valores__grid  .reveal:nth-child(2) { transition-delay: 0.09s; }
.valores__grid  .reveal:nth-child(3) { transition-delay: 0.18s; }
.valores__grid  .reveal:nth-child(4) { transition-delay: 0.27s; }

.servicios__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.servicios__grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.servicios__grid .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Hero: faster, on page load */
.hero .reveal:nth-child(1) { transition-delay: 0.05s; }
.hero .reveal:nth-child(2) { transition-delay: 0.2s; }
.hero .reveal:nth-child(3) { transition-delay: 0.35s; }
.hero .reveal:nth-child(4) { transition-delay: 0.5s; }


/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--nav-h);
}

/* On hero (transparent) — links are light */
.nav:not(.scrolled) .nav__links a   { color: oklch(82% 0.03 160); }
.nav:not(.scrolled) .nav__links a:hover { color: #fff; }
.nav:not(.scrolled) .logo           { color: #fff; }
.nav:not(.scrolled) .nav__cta       { background: oklch(100% 0 0 / 0.12); border: 1.5px solid oklch(100% 0 0 / 0.3); }
.nav:not(.scrolled) .nav__cta:hover { background: oklch(100% 0 0 / 0.22); }
.nav:not(.scrolled) .nav__burger span { background: #fff; }

/* Scrolled — frosted glass */
.nav.scrolled {
  background: oklch(99% 0.005 160 / 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border), var(--shadow-sm);
}
.nav.scrolled .logo  { color: var(--color-primary); }
.nav.scrolled .nav__cta { background: var(--color-primary); color: #fff; border: none; }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: color var(--transition);
}
.logo--light { color: oklch(80% 0.05 160); }

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.logo__sub {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  opacity: 0.65;
}

/* Nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width var(--transition);
}
.nav__links a:hover::after { width: 100%; }

/* CTA nav button */
.nav__cta { margin-left: 0.5rem; }

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  margin-left: auto;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  flex-direction: column;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem var(--pad) 1.5rem;
  box-shadow: var(--shadow-md);
}
.nav__mobile.open { display: flex; }

.nav__mobile a {
  padding: 0.85rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition);
}
.nav__mobile a:hover { color: var(--color-primary); }
.nav__mobile a:last-child { border: none; margin-top: 0.75rem; }

@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  /* On mobile, always show scrolled bg */
  .nav { background: var(--color-bg); box-shadow: 0 1px 0 var(--color-border); }
  .nav .logo { color: var(--color-primary); }
  .nav .nav__burger span { background: var(--color-text); }
}


/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--color-bg-dark);
  color: #fff;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 80% at 65% 45%, oklch(36% 0.14 162 / 0.55) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 5% 90%, oklch(44% 0.13 148 / 0.25) 0%, transparent 55%);
}

.hero__vortex {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-48%);
  width: min(680px, 90vw);
  height: auto;
  color: oklch(60% 0.08 160 / 0.1);
}

/* ─── WAVE BACKGROUND ───────────────────────────────────── */
#wave-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

#wave-background canvas {
  display: block;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-block: 5rem 5rem;
  max-width: 680px;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding: 0.35rem 0.875rem;
  border: 1px solid oklch(63% 0.15 78 / 0.5);
  border-radius: 100px;
  margin-bottom: 1.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.04;
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
}

.hero__title em {
  font-style: normal;
  color: var(--color-primary-light);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.175rem);
  line-height: 1.68;
  color: oklch(86% 0.025 160);
  max-width: 52ch;
  margin-bottom: 2.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: oklch(65% 0.05 160);
  font-size: 0.72rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition);
  animation: heroFloat 2.8s ease-in-out infinite;
  z-index: 2;
}
.hero__scroll:hover { color: oklch(85% 0.05 160); }

@keyframes heroFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}


/* ─── VALORES ────────────────────────────────────────────── */
.valores {
  padding-block: 5rem;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.valores__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.valor {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.valor__icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.valor h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.valor p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .valores__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .valores__grid { grid-template-columns: 1fr; }
}


/* ─── ABOUT ──────────────────────────────────────────────── */
.about {
  padding-block: 6.5rem;
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__text .section-title { margin-bottom: 0.25rem; }

.about__text p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.72;
}

.about__text strong { color: var(--color-text); font-weight: 600; }

.about__cta { margin-top: 0.5rem; align-self: flex-start; }

/* Card */
.about__card {
  background: var(--color-bg-dark);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about__stat { display: flex; flex-direction: column; gap: 0.2rem; }

.about__stat-num {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent);
}

.about__stat-label {
  font-size: 0.8rem;
  color: oklch(70% 0.04 160);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.about__divider {
  height: 1px;
  background: oklch(100% 0 0 / 0.1);
}

.about__quote {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.65;
  color: oklch(88% 0.025 160);
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about__tags span {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border: 1px solid oklch(100% 0 0 / 0.15);
  border-radius: 100px;
  color: oklch(78% 0.04 160);
}

@media (max-width: 860px) {
  .about__inner { grid-template-columns: 1fr; gap: 3rem; }
}


/* ─── SERVICIOS ──────────────────────────────────────────── */
.servicios {
  padding-block: 6.5rem;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.servicios__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.servicio-card {
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.servicio-card:hover {
  border-color: oklch(60% 0.1 162);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.servicio-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.75rem;
}

.servicio-card__icon {
  width: 52px;
  height: 52px;
  background: oklch(97% 0.012 162);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.servicio-card:hover .servicio-card__icon {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.servicio-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.servicio-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.servicio-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .servicios__grid { grid-template-columns: 1fr; }
  .servicio-card--wide { flex-direction: column; }
}



/* ─── CONTACTO ───────────────────────────────────────────── */
.contacto {
  padding-block: 6.5rem;
  background: var(--color-bg-dark);
  color: #fff;
}

.contacto__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: start;
}

/* Left side */
.contacto .section-tag { color: var(--color-accent); }

.contacto__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.contacto__desc {
  font-size: 1rem;
  color: oklch(78% 0.03 160);
  line-height: 1.7;
  max-width: 44ch;
  margin-bottom: 2.5rem;
}

.contacto__datos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacto__dato {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: oklch(82% 0.04 160);
  font-size: 0.95rem;
  transition: color var(--transition);
}
.contacto__dato:hover { color: var(--color-accent); }

.contacto__dato-icon {
  width: 36px;
  height: 36px;
  background: oklch(100% 0 0 / 0.08);
  border: 1px solid oklch(100% 0 0 / 0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Form */
.contacto__form-wrap { position: relative; }

.contacto__form {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--color-text);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.form-group label span { color: var(--color-primary); }

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.72rem 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  resize: vertical;
  min-height: 44px;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: oklch(72% 0.04 160);
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: oklch(75% 0.05 162);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px oklch(33% 0.12 162 / 0.1);
}

.form-group textarea { min-height: 120px; }

.form-note {
  text-align: center;
  font-size: 0.76rem;
  color: var(--color-text-muted);
  margin-top: -0.25rem;
}

/* Success state */
.form-success {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.form-success__icon { color: var(--color-primary); }

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
}

.form-success p {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* Submit button loading state */
.btn--loading {
  opacity: 0.75;
  pointer-events: none;
}

@media (max-width: 860px) {
  .contacto__inner { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}


/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--color-bg-darker);
  padding-block: 2rem;
  border-top: 1px solid oklch(100% 0 0 / 0.06);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer__copy {
  font-size: 0.82rem;
  color: oklch(55% 0.04 160);
}

.footer__links {
  display: flex;
  gap: 1.75rem;
}

.footer__links a {
  font-size: 0.82rem;
  color: oklch(55% 0.04 160);
  transition: color var(--transition);
}
.footer__links a:hover { color: oklch(80% 0.04 160); }

@media (max-width: 580px) {
  .footer__inner  { justify-content: center; text-align: center; }
  .footer__links  { justify-content: center; flex-wrap: wrap; }
}


/* ─── RESPONSIVE MISC ────────────────────────────────────── */
@media (max-width: 480px) {
  .hero__actions        { flex-direction: column; }
  .hero__actions .btn   { width: 100%; }
  .hero__scroll         { display: none; }
  .about__cta           { width: 100%; }
}
