/* ============================================
   MARCO STUDIO — Sistema de diseño
   ============================================ */

/* ---------- TOKENS ---------- */
:root {
  /* Colores */
  --color-bg: #F7F3F4;
  --color-bg-alt: #EDE8E6;
  --color-surface: #FFFFFF;
  --color-placeholder: #E9E4E2;
  --color-brown: #3B2213;   /* marrón del logo (más de la mitad de la marca) */
  --color-ink: #3B2213;
  --color-ink-soft: #5A3B2A;
  --color-muted: #6E5A4E;   /* gris-marrón cálido */
  --color-muted-2: #7D6A5D;
  --color-line: #E2DCDA;
  --color-line-strong: #C0C5C1;
  --color-accent: #647F78;
  --color-accent-soft: #C9D6D2;
  --color-sage-soft: #E1E9E5;   /* salvia suave: sección Proceso y footer */
  --color-dark: #3B2213;
  --color-dark-soft: #4E6862;
  --color-mauve: #4E6862;
  --color-coral: #E2664A;   /* acento cálido (punto de los logos) */

  /* Degradés */
  --gradient-sage: linear-gradient(100deg, #4E6862 0%, #647F78 30%, #9FB1AB 68%, #CFCDC5 100%);
  --gradient-hover: linear-gradient(180deg, #FFFFFF 0%, #E4EBE8 55%, #C9D6D2 100%);

  /* Tipografías */
  --font-display: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'Courier New', monospace;

  /* Tamaños tipográficos */
  --fs-hero: clamp(3rem, 8vw, 6.5rem);
  --fs-h1: clamp(2.5rem, 5vw, 4rem);
  --fs-h2: clamp(2rem, 4vw, 3rem);
  --fs-h3: clamp(1.5rem, 2.5vw, 2rem);
  --fs-h4: 1.25rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-mini: 0.75rem;

  /* Espaciados */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --max-width: 1280px;
  --gutter: 1.5rem;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Otros */
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ---------- TIPOGRAFÍA ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.display-italic {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mini);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  font-weight: 500;
}

.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.h4 { font-size: var(--fs-h4); }

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(12px, 2vw, 24px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 10px 0 14px;
  background: rgba(247, 243, 244, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled .site-header__inner {
  background: rgba(247, 243, 244, 0.96);
  box-shadow: 0 8px 32px -12px rgba(59, 34, 19, 0.18);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-image: url('../images/Logos/logo-marco-studio.png');
  background-size: 150%;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;   /* separa los links del borde derecho de la barra */
}

.nav__list {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__link {
  font-size: var(--fs-small);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-dark);
  transition: width var(--transition);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--fs-small);
  font-weight: 500;
  padding: 0.5rem 0;
}

.nav__dropdown-trigger svg {
  width: 12px;
  height: 12px;
  transition: transform var(--transition-fast);
}

.nav__dropdown:hover .nav__dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: -1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.15);
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  transition: background var(--transition-fast);
}

.nav__dropdown-link:hover {
  background: var(--color-bg-alt);
}

.nav__dropdown-link strong {
  display: block;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.nav__dropdown-link small {
  color: var(--color-muted);
  font-size: var(--fs-mini);
}

/* CTA Header */
.btn-header {
  background: var(--color-accent);
  color: #FFFFFF;
  padding: 0.75rem 1.125rem;
  border-radius: 10px;
  font-size: var(--fs-small);
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-header:hover {
  background: var(--color-muted-2);
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-dark);
  transition: var(--transition);
}

.hamburger.is-active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 88px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: 2rem var(--gutter);
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
}

.mobile-menu__submenu {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--color-line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu__submenu a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-muted);
}

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-dark);
  color: var(--color-bg);
}

.btn--primary:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(100, 127, 120, 0.6);
}

.btn--secondary {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-ink);
}

.btn--secondary:hover {
  background: var(--color-dark);
  color: #FFFFFF;
}

.btn--accent {
  background: var(--color-accent);
  color: white;
}

.btn--accent:hover {
  background: var(--color-muted-2);
  transform: translateY(-2px);
}

.btn--ghost {
  padding: 0.5rem 0;
  background: none;
  font-size: var(--fs-small);
  font-weight: 500;
  border-bottom: 1px solid var(--color-ink);
  border-radius: 0;
}

.btn--ghost:hover {
  gap: 0.75rem;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn__arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ---------- BOTONES GLOBO ---------- */
.btn:not(.btn--ghost),
.btn-header,
.plan__toggle,
.home-cta__form button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 999px;
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.18),
    inset 0 -8px 16px rgba(59, 34, 19, 0.12),
    0 12px 24px -14px rgba(59, 34, 19, 0.35);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.35s ease, background var(--transition-fast), color var(--transition-fast);
}

/* volumen suave: luz difusa arriba a la izquierda */
.btn:not(.btn--ghost)::before,
.btn-header::before,
.plan__toggle::before,
.home-cta__form button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(130% 160% at 28% 0%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.35s ease;
}

.btn--secondary,
.btn--outline-light {
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.25),
    inset 0 -8px 16px rgba(59, 34, 19, 0.05),
    0 10px 20px -14px rgba(59, 34, 19, 0.25);
}

.btn:not(.btn--ghost):hover,
.btn-header:hover,
.plan__toggle:hover,
.home-cta__form button:hover {
  transform: scale(1.04);
  box-shadow:
    inset 0 2px 10px rgba(255, 255, 255, 0.22),
    inset 0 -8px 16px rgba(59, 34, 19, 0.12),
    0 18px 30px -16px rgba(59, 34, 19, 0.4);
}

.btn:not(.btn--ghost):active,
.btn-header:active,
.plan__toggle:active,
.home-cta__form button:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 3px 10px rgba(59, 34, 19, 0.18),
    0 6px 12px -10px rgba(59, 34, 19, 0.3);
  transition-duration: 0.12s;
}

/* ---------- SECCIONES BASE ---------- */
section {
  padding: var(--space-2xl) 0;
}

main {
  padding-top: 88px;
}

section[id] {
  scroll-margin-top: 96px;
}

.section-header {
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.section-header__text {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.section-header .eyebrow {
  display: block;
  margin-bottom: 1rem;
}

.section-header .display {
  font-size: var(--fs-h2);
  margin-bottom: 1rem;
}

.section-header__sub {
  color: var(--color-muted);
  font-size: 1.125rem;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.1);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card__description {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  font-size: var(--fs-small);
  line-height: 1.6;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap var(--transition-fast);
}

.card__link:hover {
  gap: 0.75rem;
  color: var(--color-accent);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--color-sage-soft);
  color: var(--color-ink);
  border-top: 1px solid rgba(100, 127, 120, 0.25);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-mini);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  color: var(--color-muted-2);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col li {
  font-size: var(--fs-small);
  color: var(--color-muted);
}

.footer-col a {
  font-size: var(--fs-small);
  color: var(--color-muted);
  transition: color var(--transition-fast);
}

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

.footer-brand .logo {
  color: var(--color-ink);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: var(--fs-small);
  color: var(--color-muted);
  max-width: 300px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #FFFFFF;
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-mini);
  color: var(--color-muted-2);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom a {
  color: var(--color-muted-2);
}

/* ---------- WHATSAPP FLOAT ---------- */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 90;
  transition: all var(--transition);
  animation: pulse 2s infinite;
}

.wa-float:hover {
  transform: scale(1.1);
}

@keyframes pulse {
  0% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: var(--fs-mini);
  color: var(--color-muted);
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.breadcrumb__sep {
  opacity: 0.4;
}

/* ---------- ANIMACIONES ---------- */
.reveal {
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mientras entran, las tarjetas usan SIEMPRE la transición de entrada (si no, el
   `transition` propio de cada tarjeta la pisa y entran de golpe). Al terminar,
   js/main.js agrega .reveal-done y la tarjeta vuelve a su transición de hover. */
.reveal:not(.reveal-done) {
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}


.reveal--from-left {
  transform: translateX(-90px);
}

.reveal--from-right {
  transform: translateX(90px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* En celular (una sola columna) las tarjetas suben desde abajo mientras se hace scroll,
   en vez de deslizarse desde un costado. */
@media (max-width: 768px) {
  .reveal--from-left,
  .reveal--from-right {
    transform: translateY(44px);
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 968px) {
  :root {
    --space-2xl: 4rem;
    --space-3xl: 6rem;
  }

  .nav__list,
  .btn-header {
    display: none;
  }

  .hamburger {
    display: flex;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 1.25rem;
  }

  section {
    padding: var(--space-xl) 0;
  }

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

  .wa-float {
    width: 52px;
    height: 52px;
    bottom: 16px;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .wa-float { animation: none; }
}

/* ---------- UTILIDADES ---------- */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
