/* Página: Ruta Comercial Digital (metodo.html) */

/* ========================================
   HERO DEL MÉTODO
   ======================================== */
.m-hero {
    position: relative;
    background: var(--color-cream);
    padding: 150px 0 clamp(70px, 9vw, 120px);
    overflow: hidden;
}

/* Hojas de papel decorativas que flotan en el fondo */
.m-hero::before,
.m-hero::after {
    content: '';
    position: absolute;
    border-radius: 0 100% 0 100%;
    opacity: 0.55;
    filter: drop-shadow(2px 4px 4px rgba(31, 20, 15, 0.12));
    animation: leafFloat 9s ease-in-out infinite;
}

.m-hero::before {
    width: 140px; height: 56px;
    top: 120px; right: 6%;
    background: #cc9927;
    transform: rotate(-24deg);
}

.m-hero::after {
    width: 100px; height: 40px;
    bottom: 60px; left: 4%;
    background: #3f7a5f;
    transform: rotate(18deg);
    animation-delay: -4s;
}

@keyframes leafFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -14px; }
}

.m-hero__inner {
    max-width: 85rem;
    margin: 0 auto;
    padding: 0 calc(2rem + 24px);
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(40px, 6vw, 100px);
    align-items: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #6e797b;
}

.breadcrumb li + li::before {
    content: '/';
    margin-right: 8px;
    color: var(--color-gold);
}

.breadcrumb a {
    color: #515a63;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover { color: var(--color-navy); }

.m-hero__title {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 1.02;
    color: var(--color-navy);
    margin-bottom: 18px;
}

.m-hero__title em {
    font-style: italic;
    color: var(--color-gold);
}

.m-hero__subtitle {
    font-family: var(--font-headline);
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    line-height: 1.4;
    color: #1a1e23;
    max-width: 560px;
    margin-bottom: 20px;
}

.m-hero__text {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.85;
    color: #38414a;
    max-width: 540px;
    margin-bottom: 36px;
}

.m-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Imagen: tarjeta de papel con arco superior */
.m-hero__art {
    position: relative;
    justify-self: center;
    width: min(100%, 400px);
    perspective: 1000px;
}

.m-hero__frame {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 999px 999px 18px 18px;
    overflow: hidden;
    background: #efe7da;
    box-shadow:
        0 2px 4px rgba(31, 20, 15, 0.08),
        0 30px 60px -28px rgba(31, 20, 15, 0.45);
    border: 10px solid #fbfaf7;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.m-hero__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 8%;
    display: block;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.m-hero__art:hover .m-hero__frame { transform: translateY(-6px) rotate(-1deg); }
.m-hero__art:hover .m-hero__frame img { transform: scale(1.05); }

/* Sello circular con texto girando */
.m-hero__seal {
    position: absolute;
    left: -34px;
    bottom: 40px;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: var(--color-navy);
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 30px -12px rgba(0, 20, 35, 0.6);
}

.m-hero__seal svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: sealSpin 18s linear infinite;
}

.m-hero__seal text {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    fill: #f5f0e8;
}

.m-hero__seal strong {
    font-family: var(--font-headline);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--color-gold-light);
}

@keyframes sealSpin { to { transform: rotate(360deg); } }

/* Botones (reutilizan .btn del sitio) */
.btn--navy {
    background: var(--color-navy);
    color: #ffffff;
}

.btn--navy:hover {
    background: #002a45;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -10px rgba(0, 42, 69, 0.6);
}

.btn--outline {
    background: transparent;
    color: var(--color-navy);
    border: 1.5px solid rgba(0, 52, 85, 0.35);
}

.btn--outline:hover {
    border-color: var(--color-navy);
    background: rgba(0, 52, 85, 0.06);
    transform: translateY(-2px);
}

.btn svg { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.btn:hover svg { transform: translateX(4px); }

/* ========================================
   LAS 4 FASES
   ======================================== */
.phases {
    position: relative;
    background: #ffffff;
    padding: clamp(80px, 10vw, 130px) 0;
}

.phases__inner {
    max-width: 85rem;
    margin: 0 auto;
    padding: 0 calc(2rem + 24px);
}

.section-head {
    max-width: 720px;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.section-head h2 {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    line-height: 1.1;
    color: var(--color-navy);
}

.section-head h2 em {
    font-style: italic;
    color: var(--color-gold);
}

.phases__track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Línea punteada que conecta las fases; se dibuja con el scroll */
/* La línea va por encima de las tarjetas, como un camino que las une */
.phases__wrap { padding-top: 34px; }

.phases__line {
    position: absolute;
    top: 0;
    left: 2%;
    right: 2%;
    height: 2px;
    pointer-events: none;
    z-index: 0;
}

.phases__line svg {
    width: 100%;
    height: 12px;
    overflow: visible;
    display: block;
    margin-top: -5px;
}

.phases__line path {
    stroke: var(--color-gold);
    stroke-width: 2;
    stroke-dasharray: 6 8;
    fill: none;
}

.phase {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: #fbfaf7;
    border: 1px solid rgba(0, 52, 85, 0.08);
    border-radius: 18px;
    padding: 24px 24px 28px;
    isolation: isolate;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
    outline: none;
}

/* Al pasar el mouse el azul entra desde abajo y los colores se invierten */
.phase::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--color-navy);
    transform: translateY(101%);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.phase:hover,
.phase:focus-visible {
    transform: translateY(-10px);
    border-color: transparent;
    box-shadow: 0 34px 60px -30px rgba(0, 52, 85, 0.55);
}

.phase:hover::before,
.phase:focus-visible::before { transform: translateY(0); }

.phase__num {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--color-gold);
    color: #ffffff;
    font-family: var(--font-headline);
    font-size: 1.05rem;
    margin-bottom: 26px;
    box-shadow: 0 0 0 8px #ffffff;
    transition: background-color 0.4s ease, color 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.phase:hover .phase__num,
.phase:focus-visible .phase__num {
    background: #ffffff;
    color: var(--color-gold);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.12);
    transform: rotate(-10deg) scale(1.08);
}

.phase__tag {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 8px;
    transition: color 0.4s ease;
}

.phase__title {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 1.4rem;
    line-height: 1.2;
    color: var(--color-navy);
    margin-bottom: 10px;
    transition: color 0.4s ease;
}

.phase__q {
    font-family: var(--font-headline);
    font-style: italic;
    font-size: 1rem;
    line-height: 1.45;
    color: #6e5a2a;
    margin-bottom: 14px;
    transition: color 0.4s ease;
}

.phase__text {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.75;
    color: #38414a;
    transition: color 0.4s ease;
}

.phase:hover .phase__tag,
.phase:focus-visible .phase__tag { color: var(--color-gold-light); }

.phase:hover .phase__title,
.phase:focus-visible .phase__title { color: #ffffff; }

.phase:hover .phase__q,
.phase:focus-visible .phase__q { color: var(--color-gold-light); }

.phase:hover .phase__text,
.phase:focus-visible .phase__text { color: rgba(255, 255, 255, 0.8); }

/* ========================================
   CONTEXTO
   ======================================== */
.context {
    background: var(--color-cream);
    padding: clamp(80px, 10vw, 130px) 0;
}

.context__inner {
    max-width: 85rem;
    margin: 0 auto;
    padding: 0 calc(2rem + 24px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 100px);
    align-items: center;
}

.context__art {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 60px -32px rgba(31, 20, 15, 0.4);
}

.context__art img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.context__art:hover img { transform: scale(1.06) rotate(-0.6deg); }

.context__art::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

.context__title {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1.15;
    color: var(--color-navy);
    margin-bottom: 26px;
}

.context__text p {
    font-family: var(--font-body);
    font-size: 0.97rem;
    line-height: 1.9;
    color: #38414a;
    margin-bottom: 18px;
}

.context__text p strong { color: var(--color-navy); font-weight: 600; }

/* ========================================
   FRASE DESTACADA
   ======================================== */
.quote-band {
    position: relative;
    background:
        radial-gradient(70% 120% at 85% 10%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 60%),
        var(--color-navy);
    padding: clamp(80px, 11vw, 150px) 0;
    text-align: center;
    overflow: hidden;
}

.quote-band__text {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 1.12;
    color: #ffffff;
}

.quote-band__text em {
    font-style: italic;
    color: var(--color-gold-light);
}

.quote-band__text .qw {
    display: inline-block;
}

.quote-band__mark {
    display: block;
    font-family: var(--font-headline);
    font-size: 5rem;
    line-height: 0.6;
    color: var(--color-gold);
    margin-bottom: 18px;
}

/* ========================================
   LLAMADO FINAL
   ======================================== */
.m-cta {
    background: var(--color-cream);
    padding: 0 0 clamp(80px, 10vw, 130px);
}

.m-cta__card {
    position: relative;
    max-width: calc(85rem - 4rem - 48px);
    margin: 0 auto;
    margin-inline: calc(2rem + 24px);
    background: #ffffff;
    border-radius: 24px;
    padding: clamp(36px, 5vw, 64px);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto;
    gap: 32px;
    align-items: center;
    box-shadow: 0 30px 70px -40px rgba(0, 52, 85, 0.45);
    overflow: hidden;
}

@media (min-width: 1440px) {
    .m-cta__card { margin-inline: auto; }
}

.m-cta__card::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204, 153, 39, 0.18), rgba(204, 153, 39, 0) 70%);
    pointer-events: none;
}

.m-cta__title {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
    color: var(--color-navy);
    margin-bottom: 12px;
}

.m-cta__text {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.75;
    color: #38414a;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1100px) {
    .phases__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .phases__line { display: none; }
    .phases__wrap { padding-top: 0; }
}

@media (max-width: 900px) {
    .m-hero { padding-top: 120px; }
    .m-hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }
    .m-hero__art { order: -1; width: min(78%, 320px); }
    .m-hero__seal { left: -18px; width: 104px; height: 104px; }
    .context__inner { grid-template-columns: minmax(0, 1fr); }
    .m-cta__card { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .m-hero__inner,
    .phases__inner,
    .context__inner { padding: 0 24px; }
    .phases__track { grid-template-columns: minmax(0, 1fr); }
    .m-cta__card { margin-inline: 24px; }
    .m-hero__ctas .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .m-hero::before, .m-hero::after, .m-hero__seal svg { animation: none; }
    .phase, .phase::before, .phase__num { transition: none; }
}
