/* ─── Brand tokens ──────────────────────────────────── */
:root {
  --bg:               #0e0d09;
  --bg-soft:          #141210;
  --surface:          #1c1a13;
  --surface-elevated: #242118;
  --surface-hover:    #2c2a1e;

  --text:             #f0ece3;
  --muted:            #9e9880;
  --muted-strong:     #cbc5ae;

  --line:             rgba(255, 250, 200, 0.07);
  --line-strong:      rgba(255, 250, 200, 0.13);

  --accent:           #c49210;   /* brand gold */
  --accent-hover:     #d4aa2a;
  --accent-dim:       rgba(196, 146, 16, 0.15);
  --accent-border:    rgba(196, 146, 16, 0.28);

  --olive:            #686646;
  --olive-dark:       #595930;
  --terracotta:       #b85c18;
  --sage:             #8fa898;
  --beige:            #d5cfc3;

  --shadow:           0 24px 72px rgba(0, 0, 0, 0.55);
  --shadow-gold:      0 20px 64px rgba(196, 146, 16, 0.14);
  --radius:           10px;
  --radius-lg:        16px;
  --container:        1180px;
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 40% at 60% 0%, rgba(196, 146, 16, 0.07), transparent),
    linear-gradient(180deg, rgba(104, 102, 70, 0.07), transparent 520px),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 200, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 200, 0.024) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 68%);
}

a          { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; overflow-wrap: break-word; }
ul         { margin: 0; padding: 0; }
img        { display: block; max-width: 100%; }
section    { scroll-margin-top: 96px; }

/* ─── Layout helpers ─────────────────────────────────── */
.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.section { padding: 112px 0; }

/* ─── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px max(20px, calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(14, 13, 9, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand { display: inline-flex; align-items: center; }

.brand-logo {
  height: 46px;
  width: auto;
}

/* Scale up visually without affecting flex layout width */
.site-header .brand-logo {
  transform: scale(2.5);
  transform-origin: left center;
}

.brand-logo--sm { height: 32px; }

/* ─── Navigation ─────────────────────────────────────── */
.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav a,
.site-footer nav a {
  transition: color 160ms ease;
}

.main-nav a:hover,
.site-footer nav a:hover { color: var(--text); }

/* ─── Buttons ────────────────────────────────────────── */
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 24px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--accent);
  color: #0e0d09;
  box-shadow: 0 4px 20px rgba(196, 146, 16, 0.35);
}

.button-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 28px rgba(196, 146, 16, 0.45);
}

.button-outline {
  border-color: var(--accent-border);
  background: var(--accent-dim);
  color: var(--text);
}

.button-outline:hover {
  border-color: rgba(196, 146, 16, 0.55);
  background: rgba(196, 146, 16, 0.12);
}

.button-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

/* ─── Type scale ─────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.8rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

h3 {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.text-accent {
  background: linear-gradient(90deg, var(--accent) 0%, #e8c44a 45%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4.5s linear infinite;
}

/* ─── Section intro block ────────────────────────────── */
.section-intro {
  max-width: 720px;
  margin-bottom: 64px;
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: 96px;
  padding-bottom: 120px;
  overflow: hidden;
  /* Pattern tiled as background */
  background-image: url('assets/patterns/pattern-0.png');
  background-size: 480px auto;
  background-repeat: repeat;
  background-position: center center;
}

/* Dark + warm-glow overlay on top of the pattern */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 80% at 50% 50%, rgba(196, 146, 16, 0.07), transparent 65%),
    rgba(14, 13, 9, 0.89);
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 740px; }

.hero-copy {
  margin-top: 22px;
  color: var(--muted-strong);
  font-size: 1.12rem;
  max-width: 600px;
  line-height: 1.7;
}

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

/* ─── PROBLEM SECTION ────────────────────────────────── */
.problem-section {
  background:
    linear-gradient(180deg, var(--bg-soft), #0f0e0b),
    var(--bg-soft);
  border-block: 1px solid var(--line);
}

.issue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.issue-grid article {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 30px;
  transition: border-color 200ms ease, background 200ms ease;
}

.issue-grid article:hover {
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

.issue-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: grid;
  place-items: center;
  padding: 11px;
  margin-bottom: 20px;
}

.issue-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) sepia(1) saturate(1.8) hue-rotate(-8deg) brightness(0.88);
}

.issue-grid h3 {
  margin-bottom: 10px;
}

.issue-grid p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* ─── PROCESS SECTION ────────────────────────────────── */
.process-section {
  background: var(--bg);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.process-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 30px;
  transition: border-color 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

.process-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.process-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}

.process-card:hover::before { opacity: 1; }

.process-header {
  margin-bottom: 20px;
}

.process-icon {
  display: block;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background-color: var(--accent);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.icon-marketing {
  -webkit-mask-image: url('assets/icons/icon-marketing.png');
  mask-image: url('assets/icons/icon-marketing.png');
}

.icon-ai-chat {
  -webkit-mask-image: url('assets/icons/icon-ai-chat.png');
  mask-image: url('assets/icons/icon-ai-chat.png');
}

.icon-reminder {
  -webkit-mask-image: url('assets/icons/icon-reminder.png');
  mask-image: url('assets/icons/icon-reminder.png');
}

.process-step {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.process-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.process-card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.72;
}

/* ─── SCENARIO (caso de éxito) ───────────────────────── */
.scenario-section {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.scenario-card {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.72fr);
  gap: 56px;
  align-items: start;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 60px);
  background:
    linear-gradient(135deg, rgba(196, 146, 16, 0.06), transparent 52%),
    var(--surface-elevated);
  box-shadow: var(--shadow-gold);
}

.scenario-card h2 { max-width: 540px; }

.scenario-results { padding-top: 8px; }

.scenario-card p:not(.eyebrow) {
  color: var(--muted-strong);
  font-size: 1.06rem;
  line-height: 1.7;
}

/* ─── FINAL CTA ──────────────────────────────────────── */
.final-cta { padding-bottom: 128px; }

.final-cta-inner {
  position: relative;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 76px);
  background:
    linear-gradient(135deg, rgba(196, 146, 16, 0.09), transparent 50%),
    var(--surface-elevated);
  box-shadow: var(--shadow-gold), var(--shadow);
  overflow: hidden;
}

.final-cta-pattern {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: 40%;
  pointer-events: none;
}

.final-cta-pattern img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0.12;
  mask-image: linear-gradient(90deg, transparent, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.7));
}

.final-cta-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.final-cta-content h2 { max-width: 580px; margin-bottom: 0; }

.final-cta-content p:not(.eyebrow) {
  max-width: 560px;
  margin: 20px 0 32px;
  color: var(--muted-strong);
  font-size: 1.06rem;
  line-height: 1.72;
}

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p { font-size: 0.875rem; }

/* ─── Animations ─────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(196, 146, 16, 0.32); }
  50%       { box-shadow: 0 6px 32px rgba(196, 146, 16, 0.54); }
}

/* Header entrance */
.site-header { animation: fade-in 0.5s ease 0.05s both; }

/* Hero staggered entrance */
.hero-content > .eyebrow { animation: fade-up 0.8s  cubic-bezier(0.16,1,0.3,1) 0.18s both; }
.hero-content > h1       { animation: fade-up 0.9s  cubic-bezier(0.16,1,0.3,1) 0.30s both; }
.hero-copy               { animation: fade-up 0.9s  cubic-bezier(0.16,1,0.3,1) 0.44s both; }
.hero-actions            { animation: fade-up 0.9s  cubic-bezier(0.16,1,0.3,1) 0.58s both; }

/* Primary button glow pulse */
.button-primary { animation: btn-pulse 2.8s ease-in-out infinite; }
.button-primary:hover,
.button-primary:focus { animation: none; }

/* Scroll reveal — .visible added by IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.72s cubic-bezier(0.16,1,0.3,1),
    transform 0.72s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity   0.65s cubic-bezier(0.16,1,0.3,1),
    transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.28s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.40s; }
.reveal-stagger.visible > * { opacity: 1; transform: none; }

/* Process icon micro-interaction */
.process-icon {
  transition: transform 300ms cubic-bezier(0.16,1,0.3,1), background-color 300ms ease;
}
.process-card:hover .process-icon {
  transform: scale(1.1) translateY(-3px);
  background-color: var(--accent-hover);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ─── Tablet: 1024px ─────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-content { max-width: 100%; }
}

/* ─── Tablet small: 860px ────────────────────────────── */
@media (max-width: 860px) {
  .section { padding: 88px 0; }

  .section-intro { margin-bottom: 48px; }

  .site-header { flex-wrap: wrap; }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

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

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

  .scenario-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ─── Mobile: 680px ──────────────────────────────────── */
@media (max-width: 680px) {
  /* Layout */
  .container { width: min(100% - 24px, var(--container)); }
  .section   { padding: 64px 0; }

  /* Hero */
  .hero {
    padding-top: 48px;
    padding-bottom: 64px;
  }

  .hero-copy { font-size: 1rem; margin-top: 18px; }

  .hero-actions { margin-top: 28px; }

  .hero-actions .button { width: 100%; justify-content: center; }

  /* Section intro */
  .section-intro { margin-bottom: 36px; }

  /* Header: logo | spacer | button, nav below */
  .site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 12px 16px;
    gap: 0;
  }

  .brand { grid-column: 1; }

  .site-header > .button {
    grid-column: 3;
    margin-left: 12px;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 4px;
    margin-top: 10px;
    border-top: 1px solid var(--line);
    scrollbar-width: none;
    white-space: nowrap;
    font-size: 0.875rem;
  }

  .main-nav::-webkit-scrollbar { display: none; }

  .site-header .button-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  /* Typography */
  h1 {
    font-size: clamp(2.1rem, 9vw, 3rem);
    line-height: 1.06;
  }

  h2 {
    font-size: clamp(1.65rem, 7vw, 2.4rem);
    line-height: 1.1;
  }

  /* Cards */
  .issue-grid article,
  .process-card {
    padding: 22px;
  }

  .issue-icon {
    width: 42px;
    height: 42px;
    padding: 9px;
    margin-bottom: 14px;
  }

  .process-icon {
    width: 56px;
    height: 56px;
  }

  /* Scenario */
  .scenario-card { padding: 26px 22px; }

  /* Final CTA */
  .final-cta { padding-bottom: 72px; }

  .final-cta-pattern { display: none; }

  .final-cta-content .button { width: 100%; justify-content: center; }

  .final-cta-content p:not(.eyebrow) {
    font-size: 1rem;
    margin: 14px 0 24px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-footer nav {
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 0.875rem;
  }

  /* Performance: skip decorative grid on mobile */
  body::before { display: none; }
}

/* ─── Mobile XS: 380px ───────────────────────────────── */
@media (max-width: 380px) {
  .container { width: min(100% - 20px, var(--container)); }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }

  .issue-grid article,
  .process-card { padding: 18px; }

  .site-header { padding: 10px 12px; }
}
