:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --line: #26262a;
  --fg: #f1efe9;
  --muted: #9a978f;
  --accent: #c8f169;
  --accent-ink: #11140a;
  --radius: 18px;
  --pad: clamp(16px, 5vw, 72px);
  --sans: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
/* grano sutil */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: 0; }

.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  background: linear-gradient(var(--bg) 30%, transparent);
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.nav nav { display: flex; gap: 28px; align-items: center; font-size: 15px; }
.nav nav a { color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--fg); }
.nav .nav-cta { color: var(--fg); border: 1px solid var(--line); padding: 7px 16px; border-radius: 99px; }
.nav .nav-cta:hover { border-color: var(--accent); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* BOTONES */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 99px; border: 1px solid var(--line);
  font-weight: 600; font-size: 15px; transition: transform .25s, background .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--fg); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { border-color: var(--accent); background: #d8ff86; }
.btn-lg { padding: 18px 34px; font-size: 18px; }

/* HERO */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 80px; position: relative;
}
.hero::after {
  content: ""; position: absolute; width: 60vw; height: 60vw; right: -15vw; top: -10vw; z-index: -1;
  background: radial-gradient(circle, rgba(200,241,105,.13), transparent 60%);
  filter: blur(20px);
}
.hero-title {
  font-size: clamp(64px, 15vw, 230px); line-height: .9; letter-spacing: -.055em; font-weight: 800;
  margin: 22px 0 34px;
}
.hero-title .line { display: block; will-change: transform; }
.hero-title .line-2 { padding-left: 8vw; }
.hero-title em { letter-spacing: -.03em; }
.hero-sub { max-width: 560px; font-size: clamp(18px, 1.6vw, 21px); color: #cfccc4; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.scroll-hint {
  position: absolute; bottom: 28px; left: var(--pad);
  font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center;
}
.scroll-hint span { width: 1px; height: 36px; background: var(--line); position: relative; overflow: hidden; }
.scroll-hint span::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--accent);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip { to { top: 100%; } }

/* TICKER */
.ticker { padding: 60px 0; overflow: hidden; border-block: 1px solid var(--line); }
.ticker-row {
  white-space: nowrap; font-size: clamp(40px, 7vw, 110px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1;
  will-change: transform;
}
.ticker-row i { font-style: normal; color: var(--accent); font-size: .5em; vertical-align: middle; margin: 0 .4em; }
.ticker-row.outline { color: transparent; -webkit-text-stroke: 1.5px #4a4a50; transform: translateX(-40%); }
.ticker-row.outline i { -webkit-text-stroke: 0; color: #4a4a50; }

/* SECCIONES */
.section { padding: clamp(100px, 14vw, 180px) var(--pad); }
.section-head { margin-bottom: 64px; }
.section h2, .projects-head h2 {
  font-size: clamp(36px, 5.6vw, 80px); line-height: 1; letter-spacing: -.045em; font-weight: 700; margin-top: 18px;
}

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; min-height: 280px; display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.card:hover { border-color: #3a3a40; }
.card-num { font-family: var(--serif); font-style: italic; font-size: 44px; color: var(--accent); line-height: 1; }
.card h3 { margin-top: auto; font-size: 22px; letter-spacing: -.02em; }
.card p { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* PROYECTOS — horizontal */
.projects { position: relative; }
.projects-sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; padding-top: 70px;
}
.projects-head {
  padding: 0 var(--pad); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.projects-head > div { min-width: 0; }
.projects-head .eyebrow { width: 100%; }
.projects-head h2 { margin-top: 0; }
.projects-count { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.projects-count .pc-cur { color: var(--fg); }

.track { display: flex; gap: 28px; padding: 0 var(--pad); will-change: transform; width: max-content; }
.project {
  width: min(78vw, 980px); flex: none;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; padding: 22px;
}
.shot {
  aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; background: #1c1c20; border: 1px solid var(--line);
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.project:hover .shot img { transform: scale(1.04); }
.project-info { padding-right: 14px; }
.tag { font-family: var(--mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.project h3 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.035em; line-height: 1.05; margin: 10px 0 14px; }
.project p { color: #bdbab2; font-size: 15.5px; }
.project strong { color: var(--fg); }
.link { display: inline-block; margin-top: 18px; font-weight: 600; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* mockups en CSS */
.mock { display: grid; place-items: center; padding: 6%; font-size: 13px; }
.mock-pos { background: radial-gradient(circle at 20% 20%, #2a2418, #17161a); }
.pos { display: grid; grid-template-columns: 1fr 1.05fr; gap: 12px; width: 100%; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pos-grid span { background: #26232a; border: 1px solid #36323a; border-radius: 10px; padding: 18px 8px; text-align: center; font-weight: 600; font-size: 12px; }
.pos-grid span:first-child { border-color: #e0a63c; color: #f4c46a; }
.pos-ticket { background: #f3efe6; color: #1a1a1a; border-radius: 10px; padding: 14px; font-family: var(--mono); font-size: 11px; display: flex; flex-direction: column; gap: 6px; }
.project .pos-ticket p { color: #1a1a1a; white-space: nowrap; display: flex; justify-content: space-between; gap: 6px; }
.pos-ticket .tot { border-top: 1px dashed #999; padding-top: 6px; font-weight: 700; }
.pos-ticket em { font-family: var(--sans); font-style: normal; font-weight: 700; background: #1a1a1a; color: #fff; text-align: center; border-radius: 6px; padding: 8px; margin-top: auto; font-size: 12px; }

.mock-hand { background: radial-gradient(circle at 80% 20%, #13251a, #141418); grid-template-columns: auto 1fr; gap: 24px; }
.phone { width: 170px; background: #0d0d0f; border: 2px solid #2d2d33; border-radius: 22px; padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.score { display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: var(--muted); }
.score b { font-size: 20px; color: var(--fg); }
.clock { text-align: center; font-family: var(--mono); font-size: 13px; color: #4ade80; }
.poss { text-align: center; background: #16a34a; color: #fff; border-radius: 8px; font-weight: 800; font-size: 11px; padding: 5px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.btns span { background: #1d1d22; border-radius: 8px; padding: 12px 4px; text-align: center; font-size: 9.5px; font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.bars p { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.bars i { display: block; height: 8px; border-radius: 9px; background: #232328; position: relative; overflow: hidden; }
.bars i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, #22c55e, var(--accent)); border-radius: 9px; }

.mock-chat { background: #0f1a17 radial-gradient(circle at 30% 80%, #12322a, transparent 60%); }
.chat { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; }
.project .chat p { color: #e9edef; padding: 10px 14px; border-radius: 14px; max-width: 80%; font-size: 13px; line-height: 1.35; }
.chat .in { background: #1f2c33; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat .out { background: #005c4b; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat .audio { display: flex; align-items: center; gap: 10px; width: 190px; }
.chat .audio i {
  flex: 1; height: 18px; display: block;
  background: repeating-linear-gradient(90deg, #8fb5ad 0 2px, transparent 2px 5px);
  mask: linear-gradient(90deg, #000 0 15%, rgba(0,0,0,.4) 15% 22%, #000 22% 48%, rgba(0,0,0,.5) 48% 60%, #000 60% 100%);
}
.chat .audio span { font-family: var(--mono); font-size: 11px; color: #a8c7c0; }

.mock-price { background: radial-gradient(circle at 50% 0%, #1b2236, #141418); }
.search { width: 100%; max-width: 400px; background: #fafafa; color: #18181b; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.search .q { border: 2px solid #2563eb; border-radius: 8px; padding: 9px 12px; margin-bottom: 8px; font-weight: 500; }
.search .q::after { content: "|"; color: #2563eb; animation: blink 1s steps(1) infinite; margin-left: 1px; }
.project .search p { color: #18181b; font-size: 13px; display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid #eee; }
.search b { font-family: var(--mono); }
@keyframes blink { 50% { opacity: 0; } }

/* CÓMO TRABAJO */
.steps { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; padding: 34px 0; border-bottom: 1px solid var(--line);
  counter-increment: s;
}
.steps b { font-size: clamp(24px, 3vw, 40px); letter-spacing: -.03em; font-weight: 600; }
.steps b::before { content: "0" counter(s) "  "; font-family: var(--mono); font-size: 13px; color: var(--accent); vertical-align: middle; margin-right: 14px; font-weight: 400; }
.steps span { color: var(--muted); align-self: center; font-size: 18px; }

/* CONTACTO */
.contact { padding: clamp(100px, 14vw, 200px) var(--pad); text-align: center; overflow: hidden; }
.contact-title { font-size: clamp(52px, 11vw, 170px); line-height: .95; letter-spacing: -.055em; font-weight: 800; margin: 24px 0 48px; }
.contact-title .line { display: block; will-change: transform; }
.contact-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--pad); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}

/* ANIMACIONES DE ENTRADA */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal-side { opacity: 0; transform: translateX(-60px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.is-in { opacity: 1 !important; transform: none !important; }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .hero-title { font-size: 19vw; }
  .hero-title .line-2 { padding-left: 0; }
  .shot.mock { aspect-ratio: auto; min-height: 240px; padding: 24px 18px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 200px; }
  .steps li { grid-template-columns: 1fr; gap: 8px; }

  /* en el celu los proyectos van apilados, sin scroll horizontal */
  .projects { height: auto !important; padding: 100px 0 40px; }
  .projects-sticky { position: static; height: auto; overflow: visible; padding-top: 0; }
  .projects-count { display: none; }
  .track { flex-direction: column; width: auto; transform: none !important; gap: 20px; }
  .project { width: 100%; grid-template-columns: 1fr; gap: 18px; padding: 14px; }
  .project-info { padding: 0 6px 8px; }
  .mock-hand { grid-template-columns: 1fr; justify-items: center; }
  .mock-hand .bars { display: none; }
  .pos { grid-template-columns: 1fr; }
  .pos-grid { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-side { opacity: 1; transform: none; transition: none; }
  [data-drift] { transform: none !important; }
  .scroll-hint span::after, .search .q::after { animation: none; }
}
