:root {
  --bg: #F7F4F4;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #6B7280;
  --accent: #7D2D3E;
  --accent-dark: #5C1F2C;
  --line: #EAE0DF;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashSequence 1.9s ease forwards;
}
.splash-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
}
@keyframes splashSequence {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  62%  { opacity: 1; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }
}

/* hero: secuencia de dos fases, controlada por JS via clases is-visible */
.hero-question-wrap {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-question-wrap.is-visible { opacity: 1; }

.hero-inner {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-inner.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hero-question-wrap, .hero-inner { transition: none; }
}

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 500;
}

.eyebrow-light { color: rgba(247,244,244,0.75); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

em { font-style: normal; color: var(--accent); font-weight: 600; }

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.1s linear, transform 0.1s linear;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(247,244,244,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.ts-mark { width: 26px; height: 26px; flex-shrink: 0; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.92rem;
}

.nav-links a:not(.nav-cta) {
  color: var(--muted);
  transition: color 0.15s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--ink); }

.nav-cta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: var(--bg);
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
}

.hero {
  position: relative;
  padding: 6rem 2.5rem 5rem;
  max-width: 900px;
  margin: 0 auto;
  min-height: 340px;
  display: flex;
  align-items: center;
}

.hero-question {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.2;
  color: var(--ink);
}

.hero-title {
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 1.6rem 0 2.2rem;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: var(--bg); color: var(--accent); }
.btn-light:hover { background: #fff; }
.btn-outline-light { border-color: rgba(247,244,244,0.4); color: var(--bg); }
.btn-outline-light:hover { border-color: var(--bg); }

.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 2.5rem;
  text-align: center;
}
.strip p {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 52ch;
  margin: 0 auto;
}
.strip-highlight { color: var(--accent); font-weight: 600; }

.section {
  padding: 5.5rem 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.section-alt { background: var(--surface); max-width: none; }
.section-alt > * { max-width: 1280px; margin-left: auto; margin-right: auto; }

.section-head { margin-bottom: 3rem; max-width: 640px; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.25; }

.service-list {
  border-top: 1px solid var(--line);
}
.service-row {
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding-left 0.3s ease;
}
.service-row:hover,
.service-row:focus-within {
  padding-left: 0.8rem;
}
.service-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.service-row h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  transition: color 0.25s ease;
}
.service-row:hover h3,
.service-row:focus-within h3 { color: var(--accent); }
.service-arrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.3rem;
  opacity: 0.45;
  flex-shrink: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.service-row:hover .service-arrow,
.service-row:focus-within .service-arrow {
  transform: translateX(8px);
  opacity: 1;
}
.service-desc {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 58ch;
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
}
.service-row:hover .service-desc,
.service-row:focus-within .service-desc {
  max-height: 200px;
  opacity: 1;
  margin-top: 0.9rem;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  padding: 2rem;
  border: 1px solid var(--line);
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
}
.case-top {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.case-logo {
  flex-shrink: 0;
  width: 160px;
  height: auto;
  object-fit: contain;
}
.case-info h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.case-info p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; margin: 0 0 0.8rem; }
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: gap 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.case-link:hover { color: var(--accent-dark); border-color: var(--accent-dark); gap: 0.55rem; }
.case-screenshot {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
}
.about-text p { color: var(--muted); line-height: 1.75; margin: 0 0 1.2rem; font-size: 1.02rem; }
.about-values { display: flex; flex-direction: column; justify-content: space-between; }
.value-row { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.value-row h4 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.value-row p { color: var(--muted); margin: 0; font-size: 0.95rem; line-height: 1.55; }

.process { margin-top: 4.5rem; }
.process-list {
  position: relative;
  display: flex;
  gap: 1rem;
}
.process-list::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.process-list::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 1px;
  background: var(--accent);
  z-index: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s ease;
}
.process-list.process-drawn::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .process-list.process-drawn::after { transition: none; }
}
.process-step {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  padding: 0 0.8rem;
}
.process-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
}
.process-step h4 { font-size: 0.95rem; margin-bottom: 0.5rem; line-height: 1.35; }
.process-step p { color: var(--muted); font-size: 0.85rem; line-height: 1.55; margin: 0; max-width: 22ch; margin-left: auto; margin-right: auto; }

.section-cta {
  background: var(--accent);
  max-width: none;
  padding: 6rem 2.5rem;
}
.cta-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.section-cta h2 {
  color: var(--bg);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 1.2rem;
}
.cta-sub { color: rgba(247,244,244,0.8); margin-bottom: 2.2rem; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.footer { padding: 2rem 2.5rem; }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav { padding: 1rem 1.3rem; flex-wrap: wrap; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding-top: 1.3rem;
    margin-top: 1rem;
    border-top: 1px solid var(--line);
  }
  .nav.nav-open .nav-links { display: flex; }
  .nav-cta { align-self: flex-start; }
  .nav-toggle { display: flex; }

  .hero { padding: 3.5rem 1.3rem 3rem; min-height: 260px; }

  .section, .section-alt > * { padding-left: 1.3rem; padding-right: 1.3rem; }
  .section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .section-alt { padding: 3.5rem 0; }

  .service-list { border-left: none; }
  .service-row { padding: 1.8rem 0; }
  .service-row:hover, .service-row:focus-within { padding-left: 0; }
  .service-row h3 { font-size: 1.25rem; }
  .service-desc {
    max-height: none;
    opacity: 1;
    margin-top: 0.6rem;
    overflow: visible;
  }
  .service-arrow { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .process-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .process-list::before {
    top: 0;
    bottom: 0;
    left: 15px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .process-list::after {
    top: 0;
    bottom: auto;
    left: 15px;
    right: auto;
    width: 1px;
    height: 0;
    transform: none;
    transition: height 1.1s ease;
  }
  .process-list.process-drawn::after { height: 100%; }
  .process-step {
    text-align: left;
    padding: 0 0 0 3.2rem;
    width: 100%;
  }
  .process-dot { position: absolute; left: 0; margin: 0; }
  .process-step p { margin-left: 0; max-width: none; }

  .case-top { flex-direction: column; text-align: center; }

  .section-cta { padding: 4rem 1.3rem; }
  .footer-inner { flex-direction: column; gap: 0.4rem; }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
