/* ==========================================================================
   Smarter.Yachts Home Hero
   Responsive replacement for /assets/css/hero.css

   Compatible with:
   - current index.php hero markup
   - current hero.js carousel
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO BASE
   -------------------------------------------------------------------------- */

.sy-hero {
    --sy-hero-transition: 380ms;
    --sy-hero-bg: var(--color-hero-background);
    --sy-hero-accent: var(--color-brand-hero);
    --sy-hero-text: var(--color-text-primary);
    --sy-hero-muted: var(--color-text-secondary);

    position: relative;
    min-height: calc(100svh - 70px);
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    background: var(--color-hero-background);
}

.sy-hero__video {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
}

.sy-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(
            circle at 77% 40%,
            var(--color-hero-glow),
            var(--color-transparent) 34%
        ),
        linear-gradient(
            90deg,
            var(--color-hero-overlay-start) 0%,
            var(--color-hero-overlay-middle) 46%,
            var(--color-hero-overlay-end) 100%
        );
}

.sy-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: 110px;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        var(--color-transparent),
        var(--surface-1, var(--color-page-end))
    );
}

.sy-hero__container {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(280px, 0.85fr);
    align-items: center;
    gap: clamp(44px, 6vw, 96px);
    padding-top: clamp(78px, 9vh, 110px);
    padding-bottom: clamp(64px, 8vh, 94px);
}

/* --------------------------------------------------------------------------
   LEFT COLUMN
   -------------------------------------------------------------------------- */

.sy-hero__message {
    min-width: 0;
    max-width: 760px;
}

.sy-hero__brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 16px;
    color: var(--color-brand-hero);
    font-size: clamp(13px, 1.05vw, 16px);
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sy-hero__brand::before {
    content: "";
    flex: 0 0 auto;
    width: 31px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sy-hero__headline {
    max-width: 720px;
    margin: 0;
    color: var(--color-text-primary);
    font-size: clamp(46px, 5.4vw, 78px);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.sy-hero__intro {
    max-width: 650px;
    margin: 24px 0 0;
    color: var(--color-text-secondary);
    font-size: clamp(17px, 1.45vw, 22px);
    line-height: 1.55;
}

.sy-hero__benefits {
    display: grid;
    gap: 11px;
    max-width: 640px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.sy-hero__benefits li {
    position: relative;
    margin: 0;
    padding: 0 0 0 31px;
    color: var(--color-text-primary);
    font-size: clamp(15px, 1.05vw, 18px);
    line-height: 1.45;
}

.sy-hero__benefits li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: var(--color-brand-hero);
    font-size: 19px;
    font-weight: 850;
    line-height: 1.35;
}

.sy-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 31px;
}

.sy-hero .sy-hero__actions .btn {
    width: auto;
    min-width: 190px;
    margin-top: 0;
}

.sy-hero .btn-secondary {
    color: var(--color-text-primary) !important;
    border-color: var(--color-border-strong) !important;
    background: var(--color-overlay) !important;
}

.sy-hero .btn-secondary:hover {
    border-color: var(--color-text-secondary) !important;
    background: var(--color-overlay-active) !important;
}

/* --------------------------------------------------------------------------
   RIGHT COLUMN / CAROUSEL
   -------------------------------------------------------------------------- */

.sy-hero__showcase {
    min-width: 0;
    width: min(100%, 350px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none;
    padding-top: 26px;
}

.sy-hero__showcase:focus-visible {
    border-radius: 20px;
    outline: 2px solid var(--color-brand-hero);
    outline-offset: 10px;
}

.sy-hero__phone-stage {
    position: relative;
    width: 100%;
    height: clamp(430px, 56vh, 570px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sy-hero__phone-stage::before {
    content: "";
    position: absolute;
    inset: 13% -21% 6%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--color-accent-medium),
        var(--color-transparent) 68%
    );
    filter: blur(18px);
}

.sy-hero__phone-transition {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity var(--sy-hero-transition) ease,
        transform var(--sy-hero-transition) cubic-bezier(.22, .61, .36, 1),
        filter var(--sy-hero-transition) ease;
}

.sy-hero__phone {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 24px 35px var(--shadow-card));
}

.sy-hero__solution {
    min-height: 68px;
    margin-top: 10px;
    text-align: center;
    transition:
        opacity var(--sy-hero-transition) ease,
        transform var(--sy-hero-transition) cubic-bezier(.22, .61, .36, 1),
        filter var(--sy-hero-transition) ease;
}

.sy-hero__solution-label {
    display: block;
    color: var(--color-text-subtle);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.3;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.sy-hero__solution-title {
    display: inline-block;
    margin-top: 6px;
    color: var(--color-text-primary);
    font-size: clamp(20px, 1.65vw, 26px);
    font-weight: 720;
    line-height: 1.2;
    text-decoration: none;
    text-wrap: balance;
    transition: color 180ms ease;
}

.sy-hero__solution-title:hover,
.sy-hero__solution-title:focus-visible {
    color: var(--color-brand-hero);
}

.sy-hero__phone-transition.is-changing,
.sy-hero__solution.is-changing {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
    filter: blur(4px);
}

/* --------------------------------------------------------------------------
   CONTROLS
   -------------------------------------------------------------------------- */

.sy-hero__controls {
    width: 100%;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.sy-hero__position {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
}

.sy-hero__counter {
    color: var(--color-text-subtle);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: 0.08em;
}

.sy-hero__counter strong {
    color: var(--color-text-primary);
    font-size: 12px;
}

.sy-hero__dots {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}

.sy-hero__dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--color-border-strong);
    cursor: pointer;
    transition:
        width 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.sy-hero__dot:hover {
    transform: scale(1.25);
    background: var(--color-text-secondary);
}

.sy-hero__dot.is-active {
    width: 23px;
    background: var(--color-brand-hero);
}

.sy-hero__arrow {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border-strong);
    border-radius: 50%;
    background: var(--color-hero-control);
    color: var(--color-text-primary);
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.sy-hero__arrow:hover,
.sy-hero__arrow:focus-visible {
    transform: translateY(-2px);
    border-color: var(--color-brand-hero);
    background: var(--color-accent-soft);
}

.sy-hero:not(.is-ready) .sy-hero__controls {
    visibility: hidden;
}

.sy-hero.is-error .sy-hero__controls {
    display: none;
}

/* --------------------------------------------------------------------------
   COMPACT USE CASES BELOW HERO
   -------------------------------------------------------------------------- */

.sy-usecases {
    padding-top: clamp(36px, 4.5vw, 58px);
    padding-bottom: clamp(44px, 5.5vw, 72px);
}

.sy-usecases__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 19px;
}

.sy-usecases__header h2 {
    margin: 4px 0 0;
    font-size: clamp(25px, 2.65vw, 38px);
}

.sy-usecases__eyebrow {
    color: var(--color-brand-hero);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sy-usecases__all {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.sy-usecases__grid {
    gap: 12px;
}

.sy-usecases__card {
    min-height: 0;
    padding: 16px 17px;
}

.sy-usecases__card h3 {
    margin: 0 0 5px;
    font-size: 15px;
}

.sy-usecases__card p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0.74;
}

/* --------------------------------------------------------------------------
   LARGE TABLET / SMALL DESKTOP
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .sy-hero__container {
        grid-template-columns:
            minmax(0, 1.05fr)
            minmax(250px, 0.75fr);
        gap: clamp(30px, 4.5vw, 58px);
    }

    .sy-hero__headline {
        font-size: clamp(43px, 5.7vw, 64px);
    }

    .sy-hero__showcase {
        width: min(100%, 310px);
    }

    .sy-hero__phone-stage {
        height: clamp(380px, 50vh, 485px);
    }
}

/* --------------------------------------------------------------------------
   TABLET / MOBILE STACK
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
    .sy-hero {
        min-height: auto;
        align-items: flex-start;
        padding-top:70px;
    }

    .sy-hero__video {
        opacity: 0.43;
    }

    .sy-hero__overlay {
        background:
            radial-gradient(
                circle at 50% 48%,
                var(--color-accent-soft),
                var(--color-transparent) 32%
            ),
            linear-gradient(
                180deg,
                var(--color-hero-overlay-mobile-start) 0%,
                var(--color-hero-overlay-mobile-end) 100%
            );
    }

    .sy-hero__container {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-top: 46px;
        padding-bottom: 58px;
        text-align: center;
    }

    .sy-hero__message {
        width: 100%;
        max-width: 680px;
        margin-inline: auto;
        padding-top: 0;
    }

    .sy-hero__brand {
        justify-content: center;
        margin-bottom: 13px;
        font-size: 12px;
    }

    .sy-hero__headline {
        max-width: 640px;
        margin-inline: auto;
        font-size: clamp(38px, 8.6vw, 58px);
        line-height: 1.02;
    }

    .sy-hero__intro {
        max-width: 560px;
        margin: 18px auto 0;
        font-size: 17px;
        line-height: 1.5;
    }

    .sy-hero__benefits {
        width: 100%;
        max-width: 520px;
        margin: 24px auto 0;
        text-align: left;
    }

    .sy-hero__benefits li {
        font-size: 15px;
    }

    .sy-hero__actions {
        justify-content: center;
        margin-top: 27px;
    }

    .sy-hero .sy-hero__actions .btn {
        width: auto;
        min-width: 220px;
    }

    .sy-hero__showcase {
        width: min(100%, 245px);
        padding-top: 0;
    }

    .sy-hero__phone-stage {
        height: 310px;
    }

    .sy-hero__solution {
        min-height: 60px;
        margin-top: 8px;
    }

    .sy-hero__controls {
        margin-top: 6px;
    }

    .sy-usecases__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE
   -------------------------------------------------------------------------- */

@media (max-width: 520px) {
    .sy-hero__container {
        gap: 28px;
        padding-top: 100px;
        padding-right: 18px;
        padding-bottom: 46px;
        padding-left: 18px;
    }

    .sy-hero__brand {
        gap: 8px;
        margin-bottom: 10px;
        font-size: 10px;
        letter-spacing: 0.15em;
    }

    .sy-hero__brand::before {
        width: 22px;
    }

    .sy-hero__headline {
        font-size: clamp(30px, 8vw, 42px);
        letter-spacing: -0.035em;
    }

    .sy-hero__intro {
        margin-top: 15px;
        font-size: 15px;
        line-height: 1.48;
    }

    .sy-hero__benefits {
        max-width: 360px;
        gap: 9px;
        margin-top: 21px;
    }

    .sy-hero__benefits li {
        padding-left: 27px;
        font-size: 14px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .sy-hero__benefits li::before {
        font-size: 17px;
    }

    .sy-hero__actions {
        gap: 10px;
        margin-top: 24px;
    }

    .sy-hero .sy-hero__actions .btn {
        width: auto;
        min-width: 210px;
        max-width: 100%;
    }

    .sy-hero__showcase {
        width: min(100%, 220px);
    }

    .sy-hero__phone-stage {
        height: 285px;
    }

    .sy-hero__phone-stage::before {
        inset: 16% -24% 7%;
    }

    .sy-hero__solution {
        min-height: 55px;
        margin-top: 5px;
    }

    .sy-hero__solution-label {
        font-size: 9px;
    }

    .sy-hero__solution-title {
        margin-top: 5px;
        font-size: 19px;
    }

    .sy-hero__controls {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 8px;
    }

    .sy-hero__arrow {
        width: 40px;
        height: 40px;
    }

    .sy-hero__dots {
        gap: 5px;
    }

    .sy-hero__dot {
        width: 6px;
        height: 6px;
    }

    .sy-hero__dot.is-active {
        width: 18px;
    }
}

/* --------------------------------------------------------------------------
   VERY SMALL DEVICES
   -------------------------------------------------------------------------- */

@media (max-width: 380px) {
    .sy-hero__container {
        padding-right: 14px;
        padding-left: 14px;
    }

    .sy-hero__headline {
        font-size: 32px;
    }

    .sy-hero__intro {
        font-size: 14px;
    }

    .sy-hero__benefits {
        max-width: 330px;
    }

    .sy-hero__benefits li {
        font-size: 13px;
    }

    .sy-hero .sy-hero__actions .btn {
        min-width: 190px;
    }

    .sy-hero__showcase {
        width: min(100%, 205px);
    }

    .sy-hero__phone-stage {
        height: 265px;
    }
}

/* --------------------------------------------------------------------------
   SHORT MOBILE LANDSCAPE / SHORT VIEWPORTS
   -------------------------------------------------------------------------- */

@media (max-width: 820px) and (max-height: 720px) {
    .sy-hero__container {
        gap: 24px;
        padding-top: 20px;
        padding-bottom: 38px;
    }

    .sy-hero__intro {
        margin-top: 12px;
    }

    .sy-hero__benefits {
        margin-top: 18px;
    }

    .sy-hero__actions {
        margin-top: 20px;
    }

    .sy-hero__showcase {
        width: min(100%, 205px);
    }

    .sy-hero__phone-stage {
        height: 260px;
    }
}

/* --------------------------------------------------------------------------
   ACCESSIBILITY
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .sy-hero__phone-transition,
    .sy-hero__solution,
    .sy-hero__dot,
    .sy-hero__arrow {
        transition-duration: 0.01ms !important;
    }
}
