/* ============================================================
   R3PLICA Landing Page v2.0 — "Design Magazine in Motion"
   Layered on top of style.css (Bootstrap 5 base)
   ============================================================ */

:root {
    --r3-orange: #ff5f00;
    --r3-black: #282828;
    --r3-white: #ffffff;
    --r3-gray-50: #f0f0f0;
    --r3-gray-100: #c8c8c8;
    --r3-gray-text: #787878;
    --r3-gray-border: #a0a0a0;
    --r3-overlay: rgba(40, 40, 40, 0.55);
    --r3-overlay-strong: rgba(40, 40, 40, 0.72);
    --r3-font-display: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --r3-font-body: 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --r3-nav-height: 72px;
    --r3-section-gap: clamp(80px, 10vw, 160px);
}

/* ── Reset for v2 ──────────────────────────────────────────── */
body {
    overflow-x: hidden;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Kill the old navbar from style.css */
body > .navbar.fixed-top {
    display: none !important;
}

/* Design system: all buttons are sharp rectangles, no rounded corners */
.v2-btn,
.v2-nav__btn,
.btn {
    border-radius: 0 !important;
}
/* Pills/badges are the exception — fully rounded */
.v2-pill {
    border-radius: 100px !important;
}

/* ── TYPOGRAPHY ────────────────────────────────────────────── */
.v2-display {
    font-family: var(--r3-font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--r3-black);
    margin: 0 0 1.5rem;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.v2-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    font-family: var(--r3-font-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

/* Primary: orange bg + white text → hover: white bg + orange text */
.v2-btn--primary {
    background: var(--r3-orange);
    color: var(--r3-white);
    border-color: var(--r3-orange);
}
.v2-btn--primary:hover {
    background: var(--r3-white);
    border-color: var(--r3-orange);
    color: var(--r3-orange);
}

/* Secondary: white bg + orange text → hover: orange bg + white text */
.v2-btn--secondary {
    background: var(--r3-white);
    color: var(--r3-orange);
    border-color: var(--r3-orange);
}
.v2-btn--secondary:hover {
    background: var(--r3-orange);
    color: var(--r3-white);
    border-color: var(--r3-orange);
}

/* Secondary on dark bg: white bg + orange text (same states as --secondary) */
.v2-btn--secondary-dark {
    background: var(--r3-white);
    color: var(--r3-orange);
    border-color: var(--r3-orange);
}
.v2-btn--secondary-dark:hover {
    background: var(--r3-orange);
    color: var(--r3-white);
    border-color: var(--r3-orange);
}

.v2-pill {
    display: inline-block;
    font-family: var(--r3-font-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--r3-orange);
    border: 1.5px solid var(--r3-orange);
    padding: 8px 24px;
    margin-bottom: 28px;
}
.v2-pill--dark {
    color: var(--r3-orange);
    border-color: rgba(255, 95, 0, 0.4);
}

/* ── NAVBAR ────────────────────────────────────────────────── */
.v2-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    height: var(--r3-nav-height);
    transition: background 0.35s ease, border-color 0.35s ease;
    /* Default: frosted white on light sections */
    background: rgba(255,255,255,0.75);
    border-bottom: 1px solid var(--r3-gray-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
/* Solid state (same as default — frosted white) */
.v2-nav--solid {
    background: rgba(255,255,255,0.75);
    border-bottom: 1px solid var(--r3-gray-border);
}
/* Dark state: over hero, fullbleed, CTA, footer */
.v2-nav--dark {
    background: rgba(40,40,40,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.v2-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}
@media (min-width: 992px) {
    .v2-nav__inner {
        padding: 0 80px;
    }
}

.v2-nav__logo img {
    transition: filter 0.3s ease;
}
/* Over hero: logo white (inverted) */
.v2-nav--dark .v2-nav__logo img {
    filter: brightness(0) invert(1);
}

.v2-nav__links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-nav__link {
    font-family: var(--r3-font-display);
    font-size: 14px;
    color: var(--r3-gray-text);
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.2s;
}
.v2-nav__link:hover {
    color: var(--r3-black);
}
.v2-nav__link--active {
    color: var(--r3-orange);
}
/* Over hero: light text */
.v2-nav--dark .v2-nav__link {
    color: rgba(255,255,255,0.75);
}
.v2-nav--dark .v2-nav__link:hover {
    color: var(--r3-white);
}
.v2-nav--dark .v2-nav__link--active {
    color: var(--r3-orange);
}

.v2-nav__lang {
    display: flex;
    align-items: center;
    gap: 4px;
}
.v2-nav__lang-sep {
    font-size: 12px;
    color: var(--r3-gray-text);
    opacity: 0.5;
}
.v2-nav--dark .v2-nav__lang-sep {
    color: rgba(255,255,255,0.35);
}

.v2-nav__btn {
    font-family: var(--r3-font-display);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 20px;
    min-width: 140px;
    text-align: center;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
/* Nav secondary (ghost): white bg + orange text → hover: orange bg + white text */
.v2-nav__btn--ghost {
    color: var(--r3-orange);
    border: 1px solid var(--r3-orange);
    background: var(--r3-white);
}
.v2-nav__btn--ghost:hover {
    color: var(--r3-white);
    background: var(--r3-orange);
    border-color: var(--r3-orange);
}

/* Nav primary: orange bg → hover: white bg + orange text */
.v2-nav__btn--primary {
    color: var(--r3-white);
    background: var(--r3-orange);
    border: 1px solid var(--r3-orange);
}
.v2-nav__btn--primary:hover {
    background: var(--r3-white);
    border-color: var(--r3-orange);
    color: var(--r3-orange);
}

.v2-nav__toggle {
    background: none;
    border: none;
    padding: 8px;
}
.v2-nav--dark .v2-nav__toggle img {
    filter: brightness(0) invert(1);
}

/* ── HERO ──────────────────────────────────────────────────── */
.v2-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--r3-black);
}

.v2-hero__media {
    position: absolute;
    inset: 0;
}

.v2-hero__video,
.v2-hero__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.v2-hero__video {
    display: none;
}
/* Show video when sources are loaded */
.v2-hero__video.is-playing {
    display: block;
}
.v2-hero__video.is-playing + .v2-hero__poster {
    display: none;
}

.v2-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(20,20,20,0.80) 0%,
        rgba(20,20,20,0.55) 35%,
        rgba(20,20,20,0.70) 100%
    );
}

.v2-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 820px;
}

.v2-hero__title {
    font-family: var(--r3-font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--r3-white);
    margin: 0 0 24px;
}

.v2-hero__sub {
    font-family: var(--r3-font-body);
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin: 0 0 40px;
}

.v2-hero__ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.v2-hero__ctas .v2-btn {
    min-width: 200px;
    justify-content: center;
}

/* Scroll indicator */
.v2-hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.v2-hero__scroll-line {
    width: 1px;
    height: 48px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}
.v2-hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -48px;
    left: 0;
    width: 1px;
    height: 48px;
    background: var(--r3-orange);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
    0% { transform: translateY(0); }
    100% { transform: translateY(96px); }
}

/* ── BRAND MARQUEE ─────────────────────────────────────────── */
.v2-marquee {
    padding: 56px 0 32px;
    background: var(--r3-white);
}
.v2-marquee__label {
    font-family: var(--r3-font-display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--r3-gray-text);
    text-align: center;
    margin: 0 0 40px;
}
/* Marquee is built entirely via JS to guarantee correctness */

/* ── INTRO ─────────────────────────────────────────────────── */
.v2-intro {
    padding: clamp(48px, 6vw, 80px) 24px var(--r3-section-gap);
    text-align: center;
}

.v2-intro__inner {
    max-width: 720px;
    margin: 0 auto;
}

.v2-intro__text {
    font-family: var(--r3-font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    color: var(--r3-gray-text);
    margin: 0;
}

/* ── FEATURE SECTIONS (asymmetric) ─────────────────────────── */
.v2-feature {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 24px var(--r3-section-gap);
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

@media (min-width: 992px) {
    .v2-feature {
        gap: 64px;
        padding: 0 80px var(--r3-section-gap);
    }
    .v2-feature--right {
        grid-template-columns: 1.5fr 1fr;
    }
    .v2-feature--left {
        grid-template-columns: 1fr 1.5fr;
    }
    .v2-feature--left .v2-feature__media {
        order: 2;
    }
    .v2-feature--left .v2-feature__text {
        order: 1;
    }
}

.v2-feature__media {
    position: relative;
    overflow: hidden;
    background: var(--r3-gray-50);
    border: 1px solid var(--r3-gray-border);
}

.v2-feature__video,
.v2-feature__poster {
    width: 100%;
    height: auto;
    display: block;
}
.v2-feature__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}
.v2-feature__video.is-playing {
    opacity: 1;
}
.v2-feature__placeholder {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: var(--r3-gray-50);
}
.v2-feature__placeholder--wide {
    aspect-ratio: 16 / 10;
}

.v2-feature__title {
    font-family: var(--r3-font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.25;
    color: var(--r3-black);
    margin: 0 0 16px;
}

.v2-feature__desc {
    font-family: var(--r3-font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.55;
    color: var(--r3-gray-text);
    margin: 0;
}

/* ── FULL-BLEED SECTION ────────────────────────────────────── */
.v2-fullbleed {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: var(--r3-section-gap);
}

.v2-fullbleed__media {
    position: absolute;
    inset: 0;
}

.v2-fullbleed__video,
.v2-fullbleed__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.v2-fullbleed__video {
    display: none;
}
.v2-fullbleed__video.is-playing {
    display: block;
}
.v2-fullbleed__video.is-playing + .v2-fullbleed__poster {
    display: none;
}

.v2-fullbleed__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(20,20,20,0.60) 0%,
        rgba(20,20,20,0.35) 35%,
        rgba(20,20,20,0.50) 100%
    );
}

.v2-fullbleed__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 24px;
    max-width: 720px;
}

.v2-fullbleed__title {
    font-family: var(--r3-font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--r3-white);
    margin: 0 0 24px;
}

.v2-fullbleed__desc {
    font-family: var(--r3-font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    line-height: 1.55;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* ── QUALITY BADGES ────────────────────────────────────────── */
.v2-badges {
    padding: 0 24px var(--r3-section-gap);
    max-width: 1200px;
    margin: 0 auto;
}

.v2-badges__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .v2-badges__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .v2-badges__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.v2-badge {
    padding: 32px;
    border: 1px solid var(--r3-gray-border);
    margin: -1px 0 0 -1px; /* collapse borders */
    transition: background-color 0.2s ease;
    cursor: default;
}
.v2-badge:hover {
    background-color: var(--r3-gray-50);
}
.v2-badge:hover .v2-badge__text {
    color: var(--r3-black);
}
.v2-badge:hover .v2-badge__icon {
    transform: scale(1.1);
    filter: invert(49%) sepia(95%) saturate(3000%) hue-rotate(360deg) brightness(100%) contrast(105%);
}

.v2-badge__icon {
    height: 28px;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
    /* filter transition removed to avoid color artifacts */
}

.v2-badge__title {
    font-family: var(--r3-font-display);
    font-weight: 600;
    font-size: 18px;
    color: var(--r3-black);
    margin: 0 0 12px;
}

.v2-badge__text {
    font-family: var(--r3-font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--r3-gray-text);
    margin: 0;
    transition: color 0.2s ease;
}

/* ── FOR PROFESSIONALS (wraps heading + pipeline + benefits) ── */
.v2-professionals {
    padding: var(--r3-section-gap) 0;
    background: var(--r3-gray-50);
}

.v2-professionals__header {
    text-align: center;
    padding: 0 24px;
    margin-bottom: clamp(48px, 6vw, 80px);
}

.v2-professionals__header-inner {
    max-width: 720px;
    margin: 0 auto;
}

.v2-professionals__text {
    font-family: var(--r3-font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.55;
    color: var(--r3-gray-text);
    margin: 0 0 40px;
}

/* Pipeline inside professionals */
.v2-pipeline {
    padding: 0 24px clamp(48px, 6vw, 80px);
    max-width: 1200px;
    margin: 0 auto;
}

.v2-pipeline__inner {
    width: 100%;
    background: var(--r3-white);
    border: 1px solid var(--r3-gray-border);
    padding: 24px;
}

.v2-pipeline__img {
    width: 100%;
    height: auto;
}

/* Benefit boxes inside professionals */
.v2-benefits {
    padding: 0 24px clamp(48px, 6vw, 80px);
    max-width: 1200px;
    margin: 0 auto;
}

.v2-benefits__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 992px) {
    .v2-benefits__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.v2-benefit {
    padding: 32px;
    border: 1px solid var(--r3-gray-border);
    margin: -1px 0 0 -1px;
    background: var(--r3-white);
    transition: background-color 0.2s ease;
    cursor: default;
}
.v2-benefit:hover {
    background-color: var(--r3-black);
}
.v2-benefit:hover .v2-benefit__title {
    color: var(--r3-white);
}
.v2-benefit:hover .v2-benefit__text {
    color: var(--r3-white);
}
.v2-benefit:hover .v2-benefit__icon {
    transform: scale(1.1);
    filter: invert(49%) sepia(95%) saturate(3000%) hue-rotate(360deg) brightness(100%) contrast(105%);
}

.v2-benefit__icon {
    height: 28px;
    margin-bottom: 16px;
    transition: transform 0.2s ease;
}

.v2-benefit__title {
    font-family: var(--r3-font-display);
    font-weight: 600;
    font-size: 18px;
    color: var(--r3-black);
    margin: 0 0 12px;
    transition: color 0.2s ease;
}

.v2-benefit__text {
    font-family: var(--r3-font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--r3-gray-text);
    margin: 0;
    transition: color 0.2s ease;
}

/* ── FOR BRANDS (WHITE) ────────────────────────────────────── */
.v2-brands {
    background: var(--r3-white);
    padding: var(--r3-section-gap) 24px;
    text-align: center;
    overflow: hidden;
}

.v2-brands__inner {
    max-width: 720px;
    margin: 0 auto 64px;
}

.v2-brands__title {
    font-family: var(--r3-font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--r3-black);
    margin: 0 0 24px;
}

.v2-brands__text {
    font-family: var(--r3-font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.55;
    color: var(--r3-gray-text);
    margin: 0 0 40px;
}

.v2-brands__carousel {
    max-width: 1200px;
    margin: 0 auto;
}
/* Card style on light gray */
.v2-brands .card {
    background: var(--r3-white);
    border: 1px solid var(--r3-gray-border);
}
.v2-brands .carousel-inner {
    border-right: 1px solid var(--r3-gray-border);
}
.v2-brands .card-img-overlays {
    color: var(--r3-gray-text);
}
.v2-brands button.indicator {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 1;
}
.v2-brands button.indicator:hover {
    opacity: 1;
}

/* ── FINAL CTA ─────────────────────────────────────────────── */
.v2-cta {
    background: var(--r3-black);
    text-align: center;
    padding: 80px 24px 100px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.v2-cta__logos {
    margin-bottom: 48px;
}
.v2-cta__logos .carousel-item img {
    max-width: 90%;
    height: auto;
}

.v2-cta__title {
    font-family: var(--r3-font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--r3-white);
    margin: 0 0 48px;
}

.v2-cta__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.v2-cta__buttons .v2-btn {
    min-width: 200px;
    justify-content: center;
}

/* ── FOOTER: uses original style.css classes (text-bg-gray-dark, footerlinks, etc.) ── */

/* ── SCROLL REVEAL ─────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in badge/benefit grids */
.reveal .v2-badge,
.reveal .v2-benefit {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.is-revealed .v2-badge,
.reveal.is-revealed .v2-benefit {
    opacity: 1;
    transform: translateY(0);
}
.reveal.is-revealed .v2-badge:nth-child(2),
.reveal.is-revealed .v2-benefit:nth-child(2) {
    transition-delay: 0.1s;
}
.reveal.is-revealed .v2-badge:nth-child(3),
.reveal.is-revealed .v2-benefit:nth-child(3) {
    transition-delay: 0.2s;
}
.reveal.is-revealed .v2-badge:nth-child(4) {
    transition-delay: 0.3s;
}

/* ── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reveal .v2-badge,
    .reveal .v2-benefit {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .v2-marquee__track {
        animation: none;
    }
    .v2-hero__scroll-line::after {
        animation: none;
    }
}

/* ── MOBILE ADJUSTMENTS ────────────────────────────────────── */
@media (max-width: 767px) {
    .v2-hero {
        min-height: 100svh;
    }
    .v2-hero__title {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }
    .v2-hero__ctas {
        flex-direction: column;
        align-items: center;
    }
    .v2-hero__ctas .v2-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .v2-hero__scroll {
        bottom: 24px;
    }
    .v2-marquee__logo {
        width: 110px;
        height: 36px;
    }
    .v2-marquee__logo img {
        max-height: 22px;
        max-width: 90px;
    }
    .v2-marquee__row + .v2-marquee__row {
        margin-top: 24px;
    }
    .v2-fullbleed {
        min-height: 60vh;
    }

    /* Pipeline tab styling override */
    .v2-pipeline .nav-tabs .nav-link {
        font-size: 13px;
    }
    .v2-pipeline__inner {
        padding: 16px;
    }
}
