/* ==========================================================================
   Aurea — prototipo de landing (cirugía plástica 3D) · lujo cálido
   Paleta: marfil #f7f1ec (campo), espresso #2b201c (estructura), oro rosa
   #b46a55 (acción), dorado #d9a77f (detalle). Tipos: Instrument Serif
   (títulos), Inter (texto).
   Capas (de atrás hacia delante):
     body → .section-bg de cada sección (z -1) → canvas Three.js fijo
     (#aura-3d, z 0) → contenido de cada sección (.container, z 1).
   ========================================================================== */

:root {
   --page: #f7f1ec;
   --ink: #2b201c;
   --ink-lift: #43322c;
   --muted: #77655e;
   --faint: #a8978f;
   --accent: #b46a55;
   --accent-deep: #9c5846;
   --accent-soft: #f3e2d9;
   --gold: #d9a77f;
   --gold-soft: #f6e8dc;
   --line: rgba(43, 32, 28, 0.1);
   --glass: rgba(255, 255, 255, 0.72);
   --shadow: 0 30px 60px -36px rgba(43, 32, 28, 0.4), 0 0 0 1px var(--line);
   --ease: cubic-bezier(0.16, 1, 0.3, 1);
   --header-h: 76px;
   --serif: "Instrument Serif", Georgia, serif;
}

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

html {
   scroll-behavior: smooth;
   overflow-x: clip;
}

body {
   margin: 0;
   font-family: "Inter", system-ui, sans-serif;
   font-size: 16px;
   line-height: 1.6;
   color: var(--ink);
   background: var(--page);
   -webkit-font-smoothing: antialiased;
   overflow-x: clip;
}

h1, h2, h3 {
   font-family: var(--serif);
   font-weight: 400;
   line-height: 1;
   margin: 0;
   letter-spacing: -0.015em;
   color: var(--ink);
}

h1 em,
h2 em {
   font-style: italic;
   color: var(--accent);
}

p {
   margin: 0;
}

a {
   color: inherit;
}

::selection {
   background: var(--accent-soft);
}

.container {
   width: 100%;
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 24px;
}

/* Canvas 3D fijo */
.aura-3d {
   position: fixed;
   inset: 0;
   z-index: 0;
   pointer-events: none;
   opacity: 0;
   transition: opacity 1.4s ease;
}

.aura-3d.is-ready {
   opacity: 1;
}

.aura-3d canvas {
   display: block;
   width: 100% !important;
   height: 100% !important;
}

.proto-ribbon,
.site-footer,
.marquee {
   position: relative;
   z-index: 1;
}

.hero > .container,
.section > .container,
.proc-pin > .container {
   position: relative;
   z-index: 1;
}

/* --------------------------------------------------------------------------
   Fondos
   -------------------------------------------------------------------------- */
.section-bg {
   position: absolute;
   inset: 0;
   z-index: -1;
   overflow: hidden;
   pointer-events: none;
}

.glow {
   position: absolute;
   border-radius: 50%;
   filter: blur(50px);
   animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
   to { transform: translate3d(30px, -30px, 0) scale(1.08); }
}

.bg-hero {
   background: linear-gradient(180deg, #f3e7df 0%, var(--page) 100%);
}

.bg-hero .glow-a {
   width: 620px;
   height: 620px;
   right: -80px;
   top: 0;
   background: radial-gradient(circle, rgba(232, 190, 168, 0.75), transparent 70%);
}

.bg-hero .glow-b {
   width: 360px;
   height: 360px;
   left: -100px;
   bottom: -80px;
   background: radial-gradient(circle, rgba(217, 167, 127, 0.35), transparent 70%);
}

/* Arco tipo galería detrás de la figura */
.bg-hero .arch {
   position: absolute;
   right: 9%;
   top: 10%;
   width: 420px;
   height: 640px;
   border-radius: 210px 210px 0 0;
   background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15));
   box-shadow: inset 0 0 0 1px rgba(217, 167, 127, 0.35);
}

.bg-proc {
   background: linear-gradient(180deg, var(--page) 0%, #f1e4dc 60%, #efdfd5 100%);
}

.bg-proc .glow-a {
   width: 640px;
   height: 640px;
   left: -120px;
   top: 20%;
   background: radial-gradient(circle, rgba(255, 255, 255, 0.95), transparent 70%);
}

.bg-clinic {
   background: linear-gradient(180deg, #efdfd5 0%, var(--page) 30%);
}

.bg-clinic .glow-a {
   width: 420px;
   height: 420px;
   right: -100px;
   top: 10%;
   background: radial-gradient(circle, rgba(232, 190, 168, 0.5), transparent 70%);
}

.bg-contact {
   border-radius: 40px 40px 0 0;
   background:
      radial-gradient(ellipse 50% 60% at 90% 0%, rgba(180, 106, 85, 0.45), transparent 70%),
      linear-gradient(150deg, var(--ink) 0%, var(--ink-lift) 100%);
}

.bg-contact .glow-a {
   width: 380px;
   height: 380px;
   left: -120px;
   bottom: -120px;
   background: radial-gradient(circle, rgba(217, 167, 127, 0.25), transparent 70%);
}

/* --------------------------------------------------------------------------
   Aviso de prototipo + header flotante
   -------------------------------------------------------------------------- */
.proto-ribbon {
   display: flex;
   justify-content: center;
   gap: 16px;
   flex-wrap: wrap;
   padding: 6px 16px;
   font-size: 12px;
   color: rgba(255, 255, 255, 0.85);
   background: var(--ink);
}

.proto-ribbon a {
   color: var(--gold);
   font-weight: 600;
   text-decoration: none;
}

.site-header {
   position: sticky;
   top: 0;
   z-index: 30;
   padding-top: 12px;
   height: var(--header-h);
   pointer-events: none;
}

.header-pill {
   position: relative;
   display: flex;
   align-items: center;
   gap: 18px;
   height: 56px;
   padding: 0 8px 0 22px;
   border-radius: 999px;
   pointer-events: auto;
   background: rgba(255, 255, 255, 0.55);
   border: 1px solid rgba(255, 255, 255, 0.85);
   -webkit-backdrop-filter: blur(18px) saturate(1.4);
   backdrop-filter: blur(18px) saturate(1.4);
   box-shadow: 0 10px 30px -22px rgba(43, 32, 28, 0.45);
   transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header.is-scrolled .header-pill {
   background: rgba(255, 255, 255, 0.86);
   box-shadow: 0 18px 40px -22px rgba(43, 32, 28, 0.45), 0 0 0 1px var(--line);
}

.scroll-progress {
   position: absolute;
   left: 26px;
   right: 26px;
   bottom: -1px;
   height: 2px;
   border-radius: 2px;
   background: linear-gradient(90deg, var(--accent), var(--gold));
   transform: scaleX(var(--progress, 0));
   transform-origin: 0 50%;
}

.brand {
   display: inline-flex;
   align-items: center;
   gap: 10px;
   font-family: var(--serif);
   font-size: 26px;
   letter-spacing: 0.02em;
   text-decoration: none;
   color: var(--ink);
}

.brand-mark {
   width: 24px;
   height: 24px;
   color: var(--accent);
   transition: transform 0.8s var(--ease);
}

.brand:hover .brand-mark {
   transform: rotate(180deg);
}

.main-nav {
   display: flex;
   align-items: center;
   gap: 2px;
   margin: 0 auto;
}

.main-nav a {
   position: relative;
   padding: 8px 14px;
   font-size: 14px;
   font-weight: 500;
   text-decoration: none;
   color: var(--muted);
   transition: color 0.3s ease;
}

.main-nav a::after {
   content: "";
   position: absolute;
   left: 14px;
   right: 14px;
   bottom: 4px;
   height: 1px;
   background: var(--accent);
   transform: scaleX(0);
   transition: transform 0.5s var(--ease);
}

.main-nav a:hover,
.main-nav a.is-active {
   color: var(--ink);
}

.main-nav a.is-active::after {
   transform: none;
}

.main-nav .nav-cta {
   display: none;
}

.nav-toggle {
   display: none;
   position: relative;
   width: 44px;
   height: 44px;
   margin-left: auto;
   padding: 0;
   border: 0;
   border-radius: 50%;
   background: var(--ink);
   cursor: pointer;
}

.nav-toggle span {
   position: absolute;
   left: 14px;
   right: 14px;
   height: 1.5px;
   background: #fff;
   transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 24px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
   position: relative;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   padding: 15px 28px;
   border: 0;
   border-radius: 999px;
   font: 500 15px/1 "Inter", sans-serif;
   letter-spacing: 0.01em;
   text-decoration: none;
   cursor: pointer;
   overflow: hidden;
   isolation: isolate;
   transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}

.btn-primary {
   color: #fff;
   background: var(--ink);
   box-shadow: 0 16px 30px -16px rgba(43, 32, 28, 0.7);
}

.btn-primary::before {
   content: "";
   position: absolute;
   inset: 0;
   z-index: -1;
   border-radius: inherit;
   background: linear-gradient(120deg, var(--accent), var(--gold));
   transform: translateY(101%);
   transition: transform 0.6s var(--ease);
}

.btn-primary:hover {
   box-shadow: 0 22px 40px -18px rgba(180, 106, 85, 0.9);
}

.btn-primary:hover::before {
   transform: none;
}

.btn-arrow {
   display: inline-block;
   transition: transform 0.4s var(--ease);
}

.btn:hover .btn-arrow {
   transform: translateX(4px);
}

.btn-link {
   padding-left: 6px;
   padding-right: 6px;
   color: var(--ink);
   background: none;
}

.btn-link::after {
   content: "";
   position: absolute;
   left: 6px;
   right: 6px;
   bottom: 8px;
   height: 1px;
   background: currentColor;
   transform-origin: 100% 50%;
   transition: transform 0.5s var(--ease);
}

.btn-link:hover::after {
   transform: scaleX(0);
}

.btn:focus-visible,
.main-nav a:focus-visible,
.contact-link:focus-visible,
.proc-switch button:focus-visible {
   outline: 2px solid var(--accent);
   outline-offset: 3px;
}

.header-cta {
   padding: 12px 20px;
   font-size: 14px;
}

.btn-block {
   width: 100%;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
section[id] {
   scroll-margin-top: calc(var(--header-h) + 4px);
}

.hero {
   position: relative;
   min-height: calc(100svh - var(--header-h) - 30px);
   display: flex;
   align-items: center;
   padding: 10px 0 40px;
}

.hero-grid {
   display: grid;
   grid-template-columns: 1.05fr 0.95fr;
   align-items: center;
   gap: 30px;
}

.kicker {
   display: inline-flex;
   align-items: center;
   gap: 10px;
   font-size: 11.5px;
   font-weight: 600;
   letter-spacing: 0.22em;
   text-transform: uppercase;
   color: var(--accent);
}

.kicker::before {
   content: "";
   width: 28px;
   height: 1px;
   background: currentColor;
}

.hero h1 {
   margin: 22px 0;
   font-size: clamp(3.2rem, 7vw, 6.4rem);
   line-height: 0.92;
}

.lead {
   max-width: 470px;
   font-size: 17.5px;
   color: var(--muted);
}

.hero-actions {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 10px 18px;
   margin-top: 32px;
}

.hero-proof {
   display: flex;
   gap: 30px;
   margin: 40px 0 0;
   padding: 22px 0 0;
   list-style: none;
   border-top: 1px solid var(--line);
}

.hero-proof li {
   display: grid;
}

.hero-proof strong {
   font: 400 32px/1 var(--serif);
   color: var(--ink);
}

.hero-proof span {
   margin-top: 4px;
   font-size: 12.5px;
   color: var(--muted);
}

.hero-stage {
   position: relative;
   height: min(680px, calc(100svh - var(--header-h) - 60px));
}

.figure-anchor {
   position: absolute;
   inset: 0 0 64px;
   cursor: grab;
   touch-action: pan-y;
}

.figure-anchor:active {
   cursor: grabbing;
}

.phase-badge {
   position: absolute;
   top: 6%;
   left: 2%;
   display: inline-flex;
   align-items: center;
   gap: 10px;
   padding: 10px 16px;
   font: 400 20px/1 var(--serif);
   font-style: italic;
   color: var(--ink);
   background: var(--glass);
   border: 1px solid rgba(255, 255, 255, 0.95);
   border-radius: 999px;
   -webkit-backdrop-filter: blur(12px);
   backdrop-filter: blur(12px);
   box-shadow: var(--shadow);
   pointer-events: none;
}

.phase-badge i {
   width: 8px;
   height: 8px;
   border-radius: 50%;
   background: var(--faint);
   transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.phase-badge.is-after i {
   background: var(--accent);
   box-shadow: 0 0 0 5px rgba(180, 106, 85, 0.2);
}

.phase-text {
   display: inline-block;
}

.phase-badge.is-flip .phase-text {
   animation: flip 0.6s var(--ease);
}

@keyframes flip {
   from { opacity: 0; transform: translateY(10px); }
}

.drag-hint {
   position: absolute;
   top: 6%;
   right: 2%;
   display: inline-flex;
   align-items: center;
   gap: 8px;
   font-size: 12px;
   color: var(--muted);
   pointer-events: none;
}

.drag-hint svg {
   width: 18px;
   height: 18px;
   fill: none;
   stroke: var(--accent);
   stroke-width: 1.6;
   stroke-linecap: round;
   stroke-linejoin: round;
   animation: sway 2.4s ease-in-out infinite;
}

@keyframes sway {
   50% { transform: translateX(4px); }
}

/* Selector de procedimiento (cápsula deslizante) */
.proc-switch {
   position: absolute;
   left: 50%;
   bottom: 0;
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   padding: 5px;
   background: rgba(255, 255, 255, 0.85);
   border-radius: 999px;
   box-shadow: var(--shadow);
   transform: translateX(-50%);
}

.proc-switch button {
   position: relative;
   z-index: 1;
   padding: 11px 20px;
   font: 500 13.5px/1 "Inter", sans-serif;
   color: var(--muted);
   background: none;
   border: 0;
   border-radius: 999px;
   cursor: pointer;
   white-space: nowrap;
   transition: color 0.4s ease;
}

.proc-switch button.is-on {
   color: #fff;
}

.switch-pill {
   position: absolute;
   top: 5px;
   bottom: 5px;
   left: 5px;
   width: calc((100% - 10px) / 3);
   border-radius: 999px;
   background: var(--ink);
   transform: translateX(calc(var(--pos, 0) * 100%));
   transition: transform 0.5s var(--ease);
}

/* --------------------------------------------------------------------------
   Cinta de procedimientos
   -------------------------------------------------------------------------- */
.marquee {
   overflow: hidden;
   padding: 22px 0;
   border-block: 1px solid rgba(217, 167, 127, 0.4);
   background: var(--ink);
}

.marquee-track {
   display: flex;
   align-items: center;
   gap: 30px;
   width: max-content;
   animation: marquee 44s linear infinite;
}

.marquee span {
   font: 400 clamp(1.6rem, 2.8vw, 2.3rem)/1 var(--serif);
   white-space: nowrap;
   color: #fff;
}

.marquee span:nth-of-type(even) {
   font-style: italic;
   color: var(--gold);
}

.marquee i {
   font-style: normal;
   font-size: 13px;
   color: var(--accent);
}

@keyframes marquee {
   to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Secciones
   -------------------------------------------------------------------------- */
.section {
   position: relative;
   padding: 110px 0;
}

.section-head {
   max-width: 720px;
   margin: 0 auto 56px;
   text-align: center;
}

.section-head.left {
   max-width: 560px;
   margin: 0 0 30px;
   text-align: left;
}

.section-head h2 {
   margin-top: 18px;
   font-size: clamp(2.6rem, 5vw, 4.2rem);
   line-height: 0.95;
}

.section-head h2 em {
   display: block;
}

.section-head p {
   margin-top: 16px;
   font-size: 17px;
   color: var(--muted);
}

/* --------------------------------------------------------------------------
   Procedimientos (sección fijada)
   -------------------------------------------------------------------------- */
#procedimientos {
   padding: 0;
}

.proc-pin {
   --pin: 240svh;
   position: relative;
   height: calc(100svh - var(--header-h) + var(--pin));
}

/* El contenedor fijado es a la vez la rejilla (figura | textos) */
.proc-pin > .proc-grid {
   position: sticky;
   top: var(--header-h);
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 40px;
   align-items: center;
   height: calc(100svh - var(--header-h));
   padding-top: 12px;
   padding-bottom: 12px;
}

.proc-grid > * {
   min-width: 0;
}

.proc-stage {
   position: relative;
   height: 100%;
   max-height: 700px;
}

.proc-stage .figure-anchor {
   inset: 0 0 56px;
   cursor: default;
}

.ba-meter {
   position: absolute;
   left: 50%;
   bottom: 0;
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 10px 18px;
   font: 400 17px/1 var(--serif);
   font-style: italic;
   color: var(--muted);
   background: var(--glass);
   border: 1px solid rgba(255, 255, 255, 0.95);
   border-radius: 999px;
   -webkit-backdrop-filter: blur(12px);
   backdrop-filter: blur(12px);
   box-shadow: var(--shadow);
   transform: translateX(-50%);
   white-space: nowrap;
}

.meter {
   width: 130px;
   height: 4px;
   border-radius: 999px;
   background: rgba(180, 106, 85, 0.2);
   overflow: hidden;
}

.meter i {
   display: block;
   height: 100%;
   width: calc(var(--ba, 0) * 100%);
   border-radius: inherit;
   background: linear-gradient(90deg, var(--gold), var(--accent));
}

#procedimientos .section-head h2 {
   font-size: clamp(2.3rem, 4.2vw, 3.6rem);
}

.proc-list {
   display: grid;
   gap: 10px;
   margin: 0;
   padding: 0;
   list-style: none;
}

.proc-item {
   display: flex;
   gap: 18px;
   padding: 18px 20px;
   border-radius: 22px;
   opacity: 0.45;
   transition: opacity 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease, transform 0.6s var(--ease);
}

.proc-item.is-active {
   opacity: 1;
   background: rgba(255, 255, 255, 0.85);
   box-shadow: var(--shadow);
   transform: translateX(-6px);
}

.pi-num {
   font: 400 26px/1 var(--serif);
   font-style: italic;
   color: var(--accent);
}

.proc-item h3 {
   font-size: 26px;
   margin-bottom: 6px;
}

.proc-item p {
   font-size: 14.5px;
   color: var(--muted);
}

/* Las métricas solo se despliegan en el paso activo */
.pi-metrics {
   display: flex;
   flex-wrap: wrap;
   gap: 6px 20px;
   max-height: 0;
   margin-top: 0;
   overflow: hidden;
   font-size: 12.5px;
   color: var(--muted);
   transition: max-height 0.6s var(--ease), margin-top 0.6s var(--ease);
}

.proc-item.is-active .pi-metrics {
   max-height: 60px;
   margin-top: 12px;
}

.pi-metrics strong {
   font-weight: 600;
   color: var(--ink);
   font-variant-numeric: tabular-nums;
}

.disclaimer {
   margin-top: 16px;
   font-size: 12px;
   color: var(--faint);
}

/* --------------------------------------------------------------------------
   La clínica
   -------------------------------------------------------------------------- */
.feature-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 16px;
   margin: 0;
   padding: 0;
   list-style: none;
}

.feature {
   padding: 30px 26px;
   background: rgba(255, 255, 255, 0.75);
   border-radius: 26px;
   box-shadow: 0 0 0 1px var(--line);
   transition: transform 0.6s var(--ease), box-shadow 0.4s ease, background-color 0.4s ease;
}

.feature:hover {
   transform: translateY(-6px);
   background: #fff;
   box-shadow: var(--shadow);
}

.f-ico {
   display: grid;
   place-items: center;
   width: 54px;
   height: 54px;
   margin-bottom: 22px;
   border-radius: 50%;
   background: var(--gold-soft);
}

.f-ico svg {
   width: 26px;
   height: 26px;
   fill: none;
   stroke: var(--accent);
   stroke-width: 2;
   stroke-linecap: round;
   stroke-linejoin: round;
}

.feature h3 {
   font-size: 25px;
   margin-bottom: 8px;
}

.feature p {
   font-size: 14.5px;
   color: var(--muted);
}

.stats-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   margin-top: 28px;
   padding: 40px;
   border-radius: 30px;
   background:
      radial-gradient(ellipse 45% 90% at 100% 0%, rgba(180, 106, 85, 0.4), transparent 70%),
      linear-gradient(135deg, var(--ink), var(--ink-lift));
   box-shadow: 0 40px 70px -40px rgba(43, 32, 28, 0.7);
}

.stat {
   padding: 6px 28px;
   border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.stat:first-child {
   border-left: 0;
   padding-left: 0;
}

.stat strong {
   display: block;
   font: 400 clamp(2.6rem, 5vw, 4rem)/1 var(--serif);
   color: #fff;
   font-variant-numeric: tabular-nums;
}

.stat strong i {
   font-style: italic;
   color: var(--gold);
}

.stat span {
   display: block;
   margin-top: 8px;
   font-size: 13.5px;
   color: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   Contacto
   -------------------------------------------------------------------------- */
#contacto {
   padding-bottom: 100px;
}

#contacto .kicker {
   color: var(--gold);
}

#contacto .section-head h2 {
   color: #fff;
   font-size: clamp(3rem, 6.4vw, 5rem);
}

#contacto .section-head h2 em {
   color: var(--gold);
}

#contacto .section-head p {
   color: rgba(255, 255, 255, 0.72);
}

.contact-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 60px;
   align-items: center;
}

.contact-links {
   margin: 0;
   padding: 0;
   list-style: none;
   border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-link {
   display: flex;
   align-items: center;
   gap: 16px;
   padding: 18px 4px;
   text-decoration: none;
   border-bottom: 1px solid rgba(255, 255, 255, 0.14);
   transition: padding 0.5s var(--ease);
}

.contact-link:hover {
   padding-left: 14px;
}

.contact-link small {
   display: block;
   font-size: 11px;
   letter-spacing: 0.14em;
   text-transform: uppercase;
   color: rgba(255, 255, 255, 0.55);
}

.contact-link > span:nth-child(2) {
   flex: 1;
   min-width: 0;
   font-weight: 500;
   color: #fff;
   overflow-wrap: anywhere;
}

.c-ico {
   display: grid;
   place-items: center;
   flex: 0 0 44px;
   height: 44px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.1);
   transition: background-color 0.4s ease;
}

.c-ico svg {
   width: 20px;
   height: 20px;
   fill: #fff;
   transition: fill 0.4s ease;
}

.contact-link:hover .c-ico {
   background: #fff;
}

.contact-link:hover .c-ico svg {
   fill: var(--ink);
}

.contact-link.is-wa:hover .c-ico svg {
   fill: #16a34a;
}

.c-go {
   color: var(--gold);
   font-size: 18px;
   transition: transform 0.5s var(--ease);
}

.contact-link:hover .c-go {
   transform: translateX(6px) rotate(-45deg);
}

.contact-place {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-top: 24px;
   font-size: 14px;
   color: rgba(255, 255, 255, 0.7);
}

.pulse {
   position: relative;
   width: 7px;
   height: 7px;
   border-radius: 50%;
   background: var(--gold);
}

.pulse::after {
   content: "";
   position: absolute;
   inset: 0;
   border-radius: 50%;
   background: inherit;
   animation: ping 2s var(--ease) infinite;
}

@keyframes ping {
   from { transform: scale(1); opacity: 0.7; }
   to { transform: scale(3.2); opacity: 0; }
}

.contact-form {
   display: grid;
   gap: 16px;
   padding: 34px;
   background: #fffaf7;
   border-radius: 28px;
   box-shadow: 0 50px 80px -40px rgba(10, 6, 4, 0.85);
}

.contact-form h3 {
   font-size: 32px;
}

.field-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 12px;
}

.field {
   position: relative;
   display: block;
}

.field input,
.field textarea {
   width: 100%;
   padding: 24px 16px 10px;
   font: 15px "Inter", sans-serif;
   color: var(--ink);
   background: var(--page);
   border: 1px solid transparent;
   border-radius: 14px;
   transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.field textarea {
   resize: vertical;
   min-height: 74px;
}

.field > span {
   position: absolute;
   left: 17px;
   top: 17px;
   font-size: 15px;
   color: var(--faint);
   pointer-events: none;
   transform-origin: 0 0;
   transition: transform 0.35s var(--ease), color 0.3s ease;
}

.field input:focus,
.field textarea:focus {
   outline: none;
   background: #fff;
   border-color: var(--accent);
   box-shadow: 0 0 0 4px rgba(180, 106, 85, 0.18);
}

.field input:focus + span,
.field textarea:focus + span,
.field input:not(:placeholder-shown) + span,
.field textarea:not(:placeholder-shown) + span {
   color: var(--accent);
   transform: translateY(-10px) scale(0.75);
}

.chips {
   display: flex;
   flex-wrap: wrap;
   gap: 8px;
   margin: 0;
   padding: 0;
   border: 0;
}

.chips legend {
   width: 100%;
   margin-bottom: 8px;
   padding: 0;
   font-size: 13px;
   color: var(--muted);
}

.chips label {
   position: relative;
   cursor: pointer;
}

.chips input {
   position: absolute;
   opacity: 0;
   pointer-events: none;
}

.chips span {
   display: inline-block;
   padding: 8px 14px;
   font-size: 13.5px;
   color: var(--ink);
   border: 1px solid rgba(43, 32, 28, 0.16);
   border-radius: 999px;
   transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.chips label:hover span {
   border-color: var(--ink);
}

.chips input:checked + span {
   color: #fff;
   background: var(--ink);
   border-color: var(--ink);
}

.chips input:focus-visible + span {
   outline: 2px solid var(--accent);
   outline-offset: 2px;
}

.form-note {
   font-size: 12.5px;
   text-align: center;
   color: var(--faint);
}

.form-note.is-flash {
   color: var(--accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
   padding: 36px 0;
   color: rgba(255, 255, 255, 0.7);
   background: #1f1714;
}

.site-footer .brand {
   color: #fff;
}

.site-footer .brand-mark {
   color: var(--gold);
}

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

.footer-nav {
   display: flex;
   flex-wrap: wrap;
   gap: 22px;
}

.footer-nav a {
   font-size: 14px;
   color: rgba(255, 255, 255, 0.7);
   text-decoration: none;
}

.footer-nav a:hover {
   color: var(--gold);
}

.footer-credit {
   font-size: 13px;
}

.footer-credit a {
   color: var(--gold);
   font-weight: 600;
   text-decoration: none;
}

/* --------------------------------------------------------------------------
   Animaciones de entrada
   -------------------------------------------------------------------------- */
.reveal {
   opacity: 0;
   filter: blur(6px);
   transform: translate3d(0, 34px, 0);
   transition: opacity 0.9s ease, transform 1.1s var(--ease), filter 0.9s ease;
   transition-delay: var(--d, 0ms);
}

.reveal.is-in {
   opacity: 1;
   filter: none;
   transform: none;
}

.split .w {
   display: inline-block;
   overflow: hidden;
   vertical-align: top;
   padding: 0.08em 0.04em 0.14em;
   margin: -0.08em -0.04em -0.14em;
}

.split .w > span {
   display: inline-block;
   transform: translate3d(0, 110%, 0);
   transition: transform 1.2s var(--ease);
   transition-delay: calc(var(--i, 0) * 70ms + var(--d, 0ms));
}

.split.is-in .w > span {
   transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
   :root {
      --header-h: 70px;
   }

   /* Sin backdrop-filter: si no, el menú fijo quedaría encerrado dentro de la cápsula */
   .header-pill,
   .site-header.is-scrolled .header-pill {
      height: 54px;
      padding: 0 6px 0 18px;
      background: rgba(255, 255, 255, 0.95);
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
   }

   .main-nav {
      position: fixed;
      inset: 0;
      z-index: -1;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      gap: 4px;
      margin: 0;
      padding: 100px 32px 40px;
      background: rgba(247, 241, 236, 0.98);
      clip-path: circle(0 at calc(100% - 46px) 46px);
      visibility: hidden;
      transition: clip-path 0.7s var(--ease), visibility 0.7s;
   }

   .main-nav.is-open {
      clip-path: circle(150% at calc(100% - 46px) 46px);
      visibility: visible;
   }

   .main-nav a {
      padding: 4px 0;
      font: 400 clamp(2.4rem, 11vw, 3.4rem)/1.1 var(--serif);
      color: var(--ink);
      opacity: 0;
      transform: translateY(24px);
      transition: opacity 0.5s ease, transform 0.7s var(--ease);
   }

   .main-nav.is-open a {
      opacity: 1;
      transform: none;
      transition-delay: calc(0.15s + var(--i, 0) * 0.06s);
   }

   .main-nav a::after {
      display: none;
   }

   .main-nav a.is-active {
      color: var(--accent);
      font-style: italic;
   }

   .main-nav .nav-cta {
      display: inline-flex;
      margin-top: 26px;
      padding: 16px 28px;
      font: 500 16px/1 "Inter", sans-serif;
      font-style: normal;
      color: #fff;
   }

   .nav-toggle {
      display: block;
   }

   .header-cta {
      display: none;
   }

   .hero-grid,
   .contact-grid {
      grid-template-columns: 1fr;
   }

   .hero {
      padding-top: 30px;
   }

   .hero-stage {
      height: 600px;
   }

   .bg-hero .arch {
      right: 50%;
      top: auto;
      bottom: 4%;
      width: 340px;
      height: 520px;
      transform: translateX(50%);
   }

   .feature-grid {
      grid-template-columns: repeat(2, 1fr);
   }

   .stats-grid {
      grid-template-columns: repeat(2, 1fr);
      row-gap: 30px;
      padding: 34px 26px;
   }

   .stat:nth-child(3) {
      border-left: 0;
      padding-left: 0;
   }

   .section {
      padding: 90px 0;
   }

   .contact-grid {
      gap: 44px;
   }
}

@media (max-width: 767.98px) {
   /* Procedimientos en móvil: título → figura → paso activo, en la pantalla fijada */
   .proc-pin > .proc-grid {
      grid-template-columns: 1fr;
      grid-template-rows: auto minmax(0, 1fr) auto;
      gap: 8px;
      align-items: stretch;
   }

   .proc-copy {
      display: contents;
   }

   #procedimientos .section-head {
      order: -1;
      margin-bottom: 0;
   }

   #procedimientos .section-head h2 {
      margin-top: 8px;
      font-size: 2.2rem;
   }

   .proc-stage {
      height: auto;
      min-height: 220px;
   }

   .proc-list {
      position: relative;
      display: block;
      min-height: 150px;
   }

   /* Solo se ve el paso activo (los demás se apilan ocultos) */
   .proc-item {
      position: absolute;
      inset: 0 0 auto;
      padding: 14px 16px;
      opacity: 0;
      transform: translateY(14px);
      pointer-events: none;
   }

   .proc-item.is-active {
      opacity: 1;
      transform: none;
      pointer-events: auto;
   }

   .proc-item h3 {
      font-size: 22px;
   }

   .proc-item p {
      font-size: 13.5px;
      line-height: 1.45;
   }

   .proc-item.is-active .pi-metrics {
      margin-top: 8px;
   }

   .disclaimer {
      display: none;
   }

   .ba-meter {
      padding: 7px 14px;
      font-size: 15px;
   }
}

@media (max-width: 599.98px) {
   .container {
      padding: 0 18px;
   }

   .proto-ribbon {
      gap: 10px;
      font-size: 11px;
   }

   .hide-sm {
      display: none;
   }

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

   .hero {
      min-height: 0;
   }

   .hero h1 {
      margin: 18px 0;
   }

   .lead {
      font-size: 16px;
   }

   .hero-proof {
      gap: 20px;
   }

   .hero-proof strong {
      font-size: 26px;
   }

   .hero-stage {
      height: 540px;
   }

   .bg-hero .arch {
      width: 280px;
      height: 460px;
   }

   .phase-badge {
      font-size: 17px;
      padding: 8px 13px;
   }

   .drag-hint {
      display: none;
   }

   .proc-switch button {
      padding: 10px 14px;
      font-size: 12.5px;
   }

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

   .stat {
      padding: 6px 16px;
   }

   .field-row {
      grid-template-columns: 1fr;
   }

   .contact-form {
      padding: 24px 20px;
      border-radius: 22px;
   }

   .bg-contact {
      border-radius: 28px 28px 0 0;
   }

   .footer-inner {
      flex-direction: column;
      text-align: center;
   }

   .footer-nav {
      justify-content: center;
   }
}

@media (prefers-reduced-motion: reduce) {
   html {
      scroll-behavior: auto;
   }

   .reveal {
      filter: none;
      transform: none;
      transition: opacity 0.4s ease;
   }

   .split .w > span {
      transform: none;
      transition: none;
   }

   .glow,
   .marquee-track,
   .drag-hint svg,
   .pulse::after {
      animation: none;
   }
}
