/* Dynamic overrides for front-page.php (ACF-driven values). */

.hp-home-dynamic .hp-hero .hero-title {
    color: var(--acf-hero-title-color) !important;
    letter-spacing: 0.04em;
    animation-name: hdnHeroTitleRevealStable;
}

.hp-home-dynamic .hp-hero.hero-fonts-pending .hero-title,
.hp-home-dynamic .hp-hero.hero-fonts-pending .hero-sub {
    animation-play-state: paused;
}

.hp-home-dynamic .hp-hero {
    --hero-sub-fit-width: auto;
    --hero-sub-fit-letter-spacing: clamp(0.42em, 0.78vw, 0.7em);
    --hero-mobile-title-size: clamp(2.95rem, 10.45vw, 3.45rem);
}

.hp-home-dynamic .hp-hero .hero-sub {
    color: var(--acf-hero-subtitle-color) !important;
    width: var(--hero-sub-fit-width);
    max-width: min(calc(100vw - 2rem), var(--hero-sub-fit-width, 100%));
    padding-inline: 0;
    letter-spacing: 0;
    overflow: visible;
}

.hp-home-dynamic .hp-hero .hero-sub-inner {
    display: inline-block;
    white-space: nowrap;
    letter-spacing: var(--hero-sub-fit-letter-spacing);
}

.hp-home-dynamic .hp-hero .hero-title-line {
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
}

@keyframes hdnHeroTitleRevealStable {
    0% {
        transform: translateY(28px) scale(1.02);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (min-width: 783px) {
    .hp-home-dynamic .hp-hero .hero-title {
        font-size: var(--acf-hero-title-desktop-size) !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--top {
        font-size: var(--acf-hero-title-line1-desktop-size) !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--bottom {
        font-size: var(--acf-hero-title-line2-desktop-size) !important;
    }

    .hp-home-dynamic .hp-hero .hero-sub {
        font-size: var(--acf-hero-subtitle-desktop-size) !important;
    }
}

@media (max-width: 782px) {
    .hp-home-dynamic .hp-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hp-home-dynamic .hp-hero-content {
        width: 100%;
        max-width: calc(100vw - 32px);
        flex-shrink: 0;
    }

    .hp-home-dynamic .hp-hero .hero-title {
        width: 100%;
        max-width: 100%;
        letter-spacing: 0;
        font-size: var(--acf-hero-title-mobile-size, var(--hero-mobile-title-size)) !important;
        line-height: 0.98 !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line {
        width: max-content;
        max-width: 100%;
        letter-spacing: 0;
        white-space: nowrap;
        text-align: center;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--top {
        font-size: var(--acf-hero-title-line1-mobile-size, inherit) !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--bottom {
        margin-top: clamp(0.48rem, 2.4vw, 0.85rem);
        font-size: var(--acf-hero-title-line2-mobile-size, inherit) !important;
    }

    .hp-home-dynamic .hp-hero .hero-sub {
        margin-top: clamp(0.72rem, 2.7vw, 1rem);
        font-size: clamp(0.92rem, 2.9vw, 1.18rem) !important;
        line-height: 1.28;
    }

    .hp-home-dynamic .hp-hero .hero-sub-inner {
        letter-spacing: var(--hero-sub-fit-letter-spacing);
    }
}

@media (min-width: 783px) and (max-width: 1024px) {
    .hp-home-dynamic .hp-hero .hero-title {
        line-height: 0.9 !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--bottom {
        margin-top: clamp(0.34rem, 0.95vw, 0.62rem);
    }

    .hp-home-dynamic .hp-hero .hero-sub {
        margin-top: clamp(0.75rem, 1.25vw, 1rem);
        padding: 0;
        font-size: clamp(1.06rem, 2.15vw, 1.36rem) !important;
        line-height: 1.35;
    }
}

@media (max-width: 782px) {
    .hp-home-dynamic .hp-hero .hero-sub {
        padding: 0;
    }
}

@media (max-width: 520px) {
    .hp-home-dynamic .hp-hero .hero-title {
        width: 100%;
        max-width: 100%;
        font-size: var(--acf-hero-title-mobile-size, var(--hero-mobile-title-size)) !important;
        line-height: 1 !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--top,
    .hp-home-dynamic .hp-hero .hero-title-line--bottom {
        font-size: inherit !important;
    }

    .hp-home-dynamic .hp-hero .hero-title-line--bottom {
        margin-top: clamp(0.52rem, 2.65vw, 0.72rem);
    }

    .hp-home-dynamic .hp-hero .hero-sub {
        margin-top: clamp(0.72rem, 2.8vw, 0.95rem);
        font-size: clamp(0.92rem, 3vw, 1.04rem) !important;
    }
}

@media (max-width: 390px) {
    .hp-home-dynamic .hp-hero .hero-title {
        font-size: min(var(--acf-hero-title-mobile-size, var(--hero-mobile-title-size)), 2.82rem) !important;
    }
}

@media (max-width: 340px) {
    .hp-home-dynamic .hp-hero .hero-title {
        font-size: min(var(--acf-hero-title-mobile-size, var(--hero-mobile-title-size)), 2.68rem) !important;
    }
}

.hp-home-dynamic .hp-hero .hero-bg::after {
    background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, calc(var(--acf-hero-overlay-opacity) * 0.4)) 0%, rgba(15, 23, 42, calc(var(--acf-hero-overlay-opacity) + 0.1)) 65%) !important;
}

.hp-home-dynamic .hp-intro {
    background: var(--acf-intro-bg-color) !important;
    color: var(--acf-intro-text-color) !important;
}

.hp-home-dynamic .hp-intro .intro-text h2 {
    color: var(--acf-intro-title-color) !important;
}

.hp-home-dynamic .hp-intro .intro-text p {
    color: var(--acf-intro-text-color) !important;
}

.hp-home-dynamic .hp-collection {
    background: var(--acf-collection-bg-color) !important;
}

.hp-home-dynamic .hp-collection .collection-title {
    color: var(--acf-collection-title-color) !important;
}

.hp-home-dynamic .hp-collection .fit-name {
    color: var(--acf-collection-fit-name-color) !important;
}

.hp-home-dynamic .hp-collection .fit-desc {
    color: var(--acf-collection-fit-desc-color) !important;
}

.hp-home-dynamic .hp-shorts {
    background: var(--acf-shorts-bg-color) !important;
    color: var(--acf-shorts-text-color) !important;
}

.hp-home-dynamic .hp-shorts .shorts-content h2 {
    color: var(--acf-shorts-title-color) !important;
}

.hp-home-dynamic .hp-shorts .shorts-content p {
    color: var(--acf-shorts-text-color) !important;
}

.hp-home-dynamic[data-shorts-btn-style="filled"] .hp-shorts .btn-main {
    background: var(--acf-shorts-btn-color) !important;
    color: var(--acf-shorts-bg-color) !important;
    border-color: var(--acf-shorts-btn-color) !important;
}

.hp-home-dynamic[data-shorts-btn-style="filled"] .hp-shorts .btn-main:hover {
    background: transparent !important;
    color: var(--acf-shorts-btn-color) !important;
}

.hp-home-dynamic[data-shorts-btn-style="outline"] .hp-shorts .btn-main {
    background: transparent !important;
    color: var(--acf-shorts-btn-color) !important;
    border-color: var(--acf-shorts-btn-color) !important;
}

.hp-home-dynamic[data-shorts-btn-style="outline"] .hp-shorts .btn-main:hover {
    background: var(--acf-shorts-btn-color) !important;
    color: var(--acf-shorts-bg-color) !important;
}

.hp-home-dynamic .hp-gold-routes {
    --hp-route-indigo: #0f172a;
    --hp-route-ivory: #f6f2ea;
    --hp-route-gold: #b08d57;
    --hp-route-gold-light: #d1ad71;
    --hp-route-gold-dark: #8e642f;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 10px),
        radial-gradient(circle at 20% 25%, rgba(246, 242, 234, 0.22), transparent 28%),
        radial-gradient(circle at 82% 70%, rgba(15, 23, 42, 0.12), transparent 28%),
        linear-gradient(135deg, var(--hp-route-gold-light), var(--hp-route-gold) 48%, #c89c5b);
    color: var(--hp-route-indigo);
    max-width: 100%;
}

.hp-home-dynamic .hp-gold-routes::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
    opacity: 0.26;
}

.hp-home-dynamic .hp-gold-routes__track {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
}

.hp-home-dynamic .hp-route-card {
    position: relative;
    display: grid;
    min-height: clamp(174px, 15vw, 235px);
    place-items: center;
    align-content: center;
    padding: clamp(1.35rem, 2.8vw, 2.8rem);
    border-right: 1px solid rgba(246, 242, 234, 0.36);
    color: var(--hp-route-indigo);
    text-align: center;
    text-decoration: none;
    isolation: isolate;
    box-sizing: border-box;
    transition:
        color 220ms ease,
        transform 260ms ease,
        box-shadow 260ms ease;
}

.hp-home-dynamic .hp-route-card:first-child {
    border-left: 1px solid rgba(246, 242, 234, 0.28);
}

.hp-home-dynamic .hp-route-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.04)),
        rgba(246, 242, 234, 0.08);
    opacity: 0;
    transform: scaleY(0.94);
    transition:
        opacity 260ms ease,
        transform 260ms ease;
}

.hp-home-dynamic .hp-route-card:hover,
.hp-home-dynamic .hp-route-card:focus-visible {
    color: var(--hp-route-ivory);
    transform: translateY(-4px);
    box-shadow: inset 0 -3px 0 var(--hp-route-indigo), 0 18px 34px rgba(15, 23, 42, 0.18);
    outline: none;
}

.hp-home-dynamic .hp-route-card:hover::before,
.hp-home-dynamic .hp-route-card:focus-visible::before {
    opacity: 1;
    transform: scaleY(1);
}

.hp-home-dynamic .hp-route-card__icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-bottom: 0.9rem;
    align-items: center;
    justify-content: center;
}

.hp-home-dynamic .hp-route-card__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: square;
    stroke-linejoin: miter;
    transition: transform 260ms ease;
}

.hp-home-dynamic .hp-route-card:hover .hp-route-card__icon svg,
.hp-home-dynamic .hp-route-card:focus-visible .hp-route-card__icon svg {
    transform: translateY(-2px) scale(1.06);
}

.hp-home-dynamic .hp-route-card__title {
    display: block;
    font-family: var(--hdn-font-headings, Georgia, serif);
    font-size: clamp(2rem, 3vw, 3.2rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.hp-home-dynamic .hp-route-card__line {
    width: 44px;
    height: 1px;
    margin: 1rem 0 0.85rem;
    background: currentColor;
    opacity: 0.82;
}

.hp-home-dynamic .hp-route-card__text {
    max-width: 34ch;
    min-height: 3.2em;
    color: rgba(15, 23, 42, 0.74);
    font-size: 0.9rem;
    line-height: 1.55;
    transition: color 220ms ease;
}

.hp-home-dynamic .hp-route-card:hover .hp-route-card__text,
.hp-home-dynamic .hp-route-card:focus-visible .hp-route-card__text {
    color: rgba(246, 242, 234, 0.82);
}

.hp-home-dynamic .hp-route-card__cta {
    display: inline-flex;
    margin-top: 1.05rem;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    font-size: 0.73rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hp-home-dynamic .hp-route-card__cta span {
    font-size: 1rem;
    transform: translateX(0);
    transition: transform 220ms ease;
}

.hp-home-dynamic .hp-route-card:hover .hp-route-card__cta span,
.hp-home-dynamic .hp-route-card:focus-visible .hp-route-card__cta span {
    transform: translateX(5px);
}

@media (min-width: 1600px) {
    .hp-home-dynamic .hp-route-card {
        min-height: 245px;
    }

    .hp-home-dynamic .hp-route-card__text {
        font-size: 0.96rem;
    }
}

@media (max-width: 1280px) {
    .hp-home-dynamic .hp-route-card {
        min-height: 210px;
        padding: clamp(1.2rem, 2.4vw, 2.1rem);
    }

    .hp-home-dynamic .hp-route-card__title {
        font-size: clamp(1.75rem, 2.6vw, 2.55rem);
    }

    .hp-home-dynamic .hp-route-card__text {
        max-width: 30ch;
        font-size: 0.84rem;
    }

    .hp-home-dynamic .hp-route-card__cta {
        font-size: 0.68rem;
        letter-spacing: 0.14em;
    }
}

@media (max-width: 1040px) {
    .hp-home-dynamic .hp-route-card {
        min-height: 205px;
        padding: 1.15rem 1rem;
    }

    .hp-home-dynamic .hp-route-card__icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.75rem;
    }

    .hp-home-dynamic .hp-route-card__title {
        font-size: clamp(1.55rem, 2.5vw, 2.1rem);
    }

    .hp-home-dynamic .hp-route-card__line {
        margin: 0.75rem 0 0.65rem;
    }

    .hp-home-dynamic .hp-route-card__text {
        min-height: 3.6em;
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .hp-home-dynamic .hp-route-card__cta {
        gap: 0.55rem;
        margin-top: 0.85rem;
    }
}

@media (hover: none) {
    .hp-home-dynamic .hp-route-card:active {
        color: var(--hp-route-ivory);
        transform: scale(0.985);
    }

    .hp-home-dynamic .hp-route-card:active::before {
        opacity: 1;
        transform: scaleY(1);
    }
}

@media (max-width: 900px) {
    .hp-home-dynamic .hp-gold-routes {
        padding: 0.9rem;
        overflow: hidden;
    }

    .hp-home-dynamic .hp-gold-routes__track {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
        scrollbar-width: none;
        box-sizing: border-box;
    }

    .hp-home-dynamic .hp-route-card {
        width: 100%;
        min-height: auto;
        border: 1px solid rgba(246, 242, 234, 0.34);
        background: rgba(246, 242, 234, 0.08);
        padding: 1.35rem 1.15rem;
        scroll-snap-align: none;
    }

    .hp-home-dynamic .hp-route-card:first-child {
        border-left: 1px solid rgba(246, 242, 234, 0.34);
    }

    .hp-home-dynamic .hp-route-card:hover,
    .hp-home-dynamic .hp-route-card:focus-visible {
        transform: none;
    }
}

@media (max-width: 700px) {
    .hp-home-dynamic .hp-route-card {
        padding: 1.25rem 1rem;
    }

    .hp-home-dynamic .hp-route-card__title {
        font-size: clamp(1.8rem, 8vw, 2.45rem);
    }

    .hp-home-dynamic .hp-route-card__text {
        max-width: 31ch;
        font-size: 0.84rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .hp-home-dynamic .hp-gold-routes {
        padding: 0.75rem;
    }

    .hp-home-dynamic .hp-gold-routes__track {
        gap: 0.7rem;
    }

    .hp-home-dynamic .hp-route-card {
        padding: 1.05rem 0.95rem;
    }

    .hp-home-dynamic .hp-route-card__icon {
        width: 36px;
        height: 36px;
    }

    .hp-home-dynamic .hp-route-card__title {
        font-size: clamp(1.75rem, 10vw, 2.25rem);
    }

    .hp-home-dynamic .hp-route-card__cta {
        max-width: 26ch;
        justify-content: center;
        font-size: 0.66rem;
        letter-spacing: 0.13em;
    }

    .hp-home-dynamic .hp-route-card__text {
        min-height: 0;
    }
}

@media (max-width: 900px) and (max-height: 560px) and (orientation: landscape) {
    .hp-home-dynamic .hp-gold-routes__track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hp-home-dynamic .hp-route-card {
        min-height: 190px;
        padding: 0.9rem;
    }

    .hp-home-dynamic .hp-route-card__icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0.5rem;
    }

    .hp-home-dynamic .hp-route-card__title {
        font-size: clamp(1.45rem, 4vw, 2rem);
    }

    .hp-home-dynamic .hp-route-card__text {
        font-size: 0.78rem;
        line-height: 1.42;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-home-dynamic .hp-route-card,
    .hp-home-dynamic .hp-route-card::before,
    .hp-home-dynamic .hp-route-card__icon svg,
    .hp-home-dynamic .hp-route-card__cta span {
        transition: none;
    }
}
