:root {
  --night: #120b16;
  --night-2: #1d1224;
  --plum: #3d1f4a;
  --purple: #6b406e;
  --gold: #f2c14e;
  --gold-deep: #d9a52e;
  --teal: #1a938a;
  --paper: #fffdfb;
  --tint: #f6eff6;
  --ink: #2a2230;
  --soft: #63586a;
  --rule: #e9e1ea;
  --on-dark: #f4ecf6;
  --on-dark-soft: #c2b3c8;
  --display: "Bricolage Grotesque", Georgia, serif;
  --text: "Public Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: var(--text); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -.015em; color: var(--plum); }
h3 { font-size: 1.3rem; font-weight: 700; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Botones */
.btn { display: inline-block; font-weight: 600; text-decoration: none; padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent; transition: transform .2s, background .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--night); }
.btn--gold:hover { background: #ffd36b; }
.btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--line { border-color: var(--plum); color: var(--plum); }
.btn--line:hover { background: var(--plum); color: #fff; }
.btn--sm { padding: .55em 1.2em; font-size: .95rem; }
.btn--big { font-size: 1.15rem; padding: 1em 2em; }

/* Encabezado */
.top { position: fixed; inset: 0 0 auto; z-index: 30; transition: background .3s, backdrop-filter .3s; }
.top.is-solid { background: rgba(18,11,22,.78); backdrop-filter: blur(12px); }
.top__row { display: flex; align-items: center; gap: 24px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--gold); color: var(--night); font-size: .9rem; font-weight: 800; }
.top__nav { display: flex; gap: 26px; margin-left: auto; }
.top__nav a { color: var(--on-dark-soft); text-decoration: none; font-weight: 500; }
.top__nav a:hover { color: #fff; }
@media (max-width: 760px) { .top__nav { display: none; } .top .btn { margin-left: auto; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; background: radial-gradient(120% 90% at 75% 40%, #3a1d47 0%, var(--night) 60%); color: var(--on-dark); overflow: hidden; isolation: isolate; }
.hero__stage { position: absolute; inset: 0; z-index: -1; }
.hero__stage canvas, .hero__stage spline-viewer { width: 100% !important; height: 100% !important; display: block; }
.hero__grid { padding: 120px 0 90px; }
.hero__copy { max-width: 620px; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.hero h1 { color: #fff; }
.hero__lead { margin-top: 22px; font-size: 1.15rem; color: var(--on-dark-soft); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 48px; font-size: .95rem; color: var(--on-dark-soft); }
.hero__facts strong { display: block; font-family: var(--display); font-size: 1.6rem; color: #fff; }
.hero__scroll { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: drop 1.6s infinite; }
@keyframes drop { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 760px) {
  .hero { align-items: flex-end; }
  .hero__copy { background: linear-gradient(transparent, rgba(18,11,22,.85) 18%); padding-top: 40px; }
}

/* Bloques */
.block { padding: clamp(72px, 10vw, 120px) 0; }
.block--dark { background: var(--night); color: var(--on-dark); overflow: hidden; }
.block--dark h2 { color: #fff; }
.block--tint { background: var(--tint); }
.block__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 48px; }
.block__head p { max-width: 460px; color: var(--soft); }
.block--dark .block__head p { color: var(--on-dark-soft); }

/* Carrusel 3D */
.carousel { position: relative; }
.carousel__viewport { perspective: 1600px; height: 470px; display: grid; place-items: center; cursor: grab; touch-action: pan-y; user-select: none; }
.carousel__viewport.is-drag { cursor: grabbing; }
.carousel__ring { position: relative; width: 300px; height: 400px; transform-style: preserve-3d; }
.card { position: absolute; inset: 0; padding: 30px 28px; border-radius: 24px; background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); backdrop-filter: blur(6px); display: flex; flex-direction: column; transition: opacity .4s, filter .4s; backface-visibility: hidden; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(90% 60% at 20% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); pointer-events: none; }
.card.is-active { border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.card__icon { width: 56px; height: 56px; fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 26px; }
.card h3 { color: #fff; font-size: 1.55rem; margin-bottom: 12px; }
.card p { color: var(--on-dark-soft); font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; }
.tags li { font-size: .8rem; font-weight: 600; padding: .3em .8em; border-radius: 999px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 30px; }
.carousel__btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.carousel__btn:hover { background: var(--gold); border-color: var(--gold); }
.carousel__btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.carousel__btn:hover svg { stroke: var(--night); }
.carousel__count { font-family: var(--display); font-weight: 700; letter-spacing: .08em; min-width: 80px; text-align: center; }

/* Carrusel plano en pantallas chicas */
.carousel.is-flat .carousel__viewport { perspective: none; height: auto; display: block; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: auto; touch-action: auto; padding: 0 16px; }
.carousel.is-flat .carousel__viewport::-webkit-scrollbar { display: none; }
.carousel.is-flat .carousel__ring { display: flex; gap: 14px; width: max-content; height: auto; transform: none !important; }
.carousel.is-flat .card { position: relative; inset: auto; width: min(82vw, 320px); min-height: 380px; transform: none !important; opacity: 1 !important; filter: none !important; scroll-snap-align: center; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; counter-reset: s; }
.steps li { padding: 28px; border: 1px solid var(--rule); border-radius: 20px; background: #fff; }
.steps span { display: block; font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: var(--gold-deep); line-height: 1; margin-bottom: 16px; }
.steps h3 { color: var(--plum); margin-bottom: 8px; }
.steps p { color: var(--soft); font-size: 1rem; }

/* Trabajos */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.work { position: relative; display: block; border-radius: 18px; overflow: hidden; text-decoration: none; background: #fff; box-shadow: 0 18px 40px -26px rgba(61,31,74,.55); transition: transform .3s; }
.work:hover { transform: translateY(-6px); }
.work img { aspect-ratio: 3 / 2; object-fit: cover; object-position: top; width: 100%; }
.work span { display: block; padding: 14px 18px; font-weight: 600; color: var(--plum); }
.works__more { margin-top: 36px; text-align: center; }

/* CTA y pie */
.cta { padding: 0 0 clamp(72px, 10vw, 120px); background: var(--tint); }
.cta__box { padding: clamp(40px, 7vw, 72px); border-radius: 30px; text-align: center; color: var(--on-dark); background: radial-gradient(80% 120% at 80% 0%, #5a2d6a, var(--night) 70%); }
.cta__box h2 { color: #fff; }
.cta__box p { margin: 14px auto 30px; max-width: 480px; color: var(--on-dark-soft); }
.foot { background: var(--night); color: var(--on-dark-soft); font-size: .92rem; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 26px 0; }
.foot a { color: var(--on-dark); }
