/* =========================================================
   START — Custom homepage
   Scoped to body.is-start-home
   ========================================================= */

body.is-start-home {
    --start-bg: #050505;
    --start-surface: rgba(255, 255, 255, 0.035);
    --start-surface-hover: rgba(255, 255, 255, 0.075);
    --start-border: rgba(255, 255, 255, 0.12);
    --start-border-strong: rgba(255, 255, 255, 0.25);
    --start-text: #f4f4f0;
    --start-muted: rgba(244, 244, 240, 0.54);
    --start-soft: rgba(244, 244, 240, 0.32);

    margin: 0;
    min-height: 100vh;
    color: var(--start-text);
    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(255, 255, 255, 0.09),
            transparent 42%
        ),
        var(--start-bg);
}

body.is-start-home .site {
    min-height: 100vh;
}

body.is-start-home .site-content {
    min-height: 100vh;
}

.start-home {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    padding:
        max(24px, env(safe-area-inset-top))
        clamp(24px, 4vw, 72px)
        max(24px, env(safe-area-inset-bottom));
}

.start-home__ambient {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.start-home__grid {
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.055) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.055) 1px,
            transparent 1px
        );
    background-size: 64px 64px;
    mask-image:
        linear-gradient(
            to bottom,
            transparent,
            black 18%,
            black 72%,
            transparent
        );
}

.start-home__glow {
    position: absolute;
    display: block;
    width: 46vw;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.11;
}

.start-home__glow--one {
    top: -28vw;
    left: 8vw;
    background: #ffffff;
}

.start-home__glow--two {
    right: -22vw;
    bottom: -30vw;
    background: #8f98aa;
}

.start-home__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    animation: start-fade-down 900ms ease both;
}

.start-home__brand {
    display: inline-flex;
    gap: 11px;
    align-items: center;
    color: var(--start-text);
    text-decoration: none;
}

.start-home__brand-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--start-border);
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
}

.start-home__brand-name {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.start-home__status {
    display: flex;
    gap: 9px;
    align-items: center;
    color: var(--start-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.start-home__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a9ffb8;
    box-shadow: 0 0 14px rgba(169, 255, 184, 0.7);
    animation: start-status-pulse 2.6s ease-in-out infinite;
}

.start-home__hero {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(420px, 1.1fr);
    gap: clamp(60px, 8vw, 150px);
    align-items: center;
    flex: 1;
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: clamp(70px, 10vh, 150px) 0;
}

.start-home__intro {
    max-width: 680px;
    animation: start-reveal 1000ms 120ms ease both;
}

.start-home__eyebrow {
    margin: 0 0 24px;
    color: var(--start-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.start-home__title {
    margin: 0;
    color: var(--start-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: clamp(76px, 12vw, 190px);
    font-weight: 700;
    line-height: 0.78;
    letter-spacing: -0.085em;
}

.start-home__statement {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.32em;
    margin: clamp(40px, 6vh, 72px) 0 0;
    max-width: 620px;
    color: var(--start-text);
    font-size: clamp(24px, 3.1vw, 48px);
    font-weight: 480;
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.start-home__statement span {
    color: var(--start-soft);
}

.start-home__description {
    max-width: 520px;
    margin: 28px 0 0;
    color: var(--start-muted);
    font-size: clamp(14px, 1.1vw, 17px);
    line-height: 1.7;
}

.start-home__navigation {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--start-border);
    animation: start-reveal 1000ms 260ms ease both;
}

.start-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    gap: 20px;
    align-items: center;
    min-height: 104px;
    padding: 18px 8px;
    color: var(--start-text);
    text-decoration: none;
    border-bottom: 1px solid var(--start-border);
    transition:
        padding 260ms ease,
        background-color 260ms ease,
        border-color 260ms ease;
}

.start-card::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.07),
            transparent 64%
        );
    opacity: 0;
    transform: scaleX(0.75);
    transform-origin: left;
    transition:
        opacity 260ms ease,
        transform 350ms ease;
}

.start-card:hover,
.start-card:focus-visible {
    padding-right: 18px;
    padding-left: 18px;
    border-color: var(--start-border-strong);
    outline: none;
}

.start-card:hover::before,
.start-card:focus-visible::before {
    opacity: 1;
    transform: scaleX(1);
}

.start-card > * {
    position: relative;
    z-index: 1;
}

.start-card__number {
    color: var(--start-soft);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.16em;
}

.start-card__content {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.start-card__content strong {
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 520;
    line-height: 1;
    letter-spacing: -0.035em;
}

.start-card__content small {
    color: var(--start-muted);
    font-size: 12px;
    line-height: 1.4;
}

.start-card__arrow {
    color: var(--start-soft);
    font-size: 18px;
    transform: translate(-4px, 4px);
    transition:
        color 260ms ease,
        transform 260ms ease;
}

.start-card:hover .start-card__arrow,
.start-card:focus-visible .start-card__arrow {
    color: var(--start-text);
    transform: translate(2px, -2px);
}

.start-home__footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: var(--start-soft);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    animation: start-fade-up 900ms 500ms ease both;
}

@keyframes start-reveal {
    from {
        opacity: 0;
        transform: translateY(24px);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes start-fade-down {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes start-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes start-status-pulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.86);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 1050px) {
    .start-home__hero {
        grid-template-columns: 1fr;
        gap: 72px;
        align-items: start;
        padding-top: 110px;
    }

    .start-home__intro {
        max-width: 820px;
    }

    .start-home__navigation {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .start-home {
        padding-right: 20px;
        padding-left: 20px;
    }

    .start-home__status span:last-child {
        display: none;
    }

    .start-home__hero {
        gap: 58px;
        padding-top: 82px;
        padding-bottom: 76px;
    }

    .start-home__title {
        font-size: clamp(68px, 25vw, 110px);
    }

    .start-home__statement {
        max-width: 360px;
    }

    .start-card {
        grid-template-columns: 28px minmax(0, 1fr) 20px;
        gap: 12px;
        min-height: 92px;
    }

    .start-card__content small {
        max-width: 250px;
    }

    .start-home__footer {
        flex-direction: column;
        gap: 8px;
    }

    .start-home__footer span:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .start-home *,
    .start-home *::before,
    .start-home *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   START — Homepage V2 polish
   ========================================================= */

/*
 * Extremely subtle breathing effect.
 * The movement is intentionally almost imperceptible.
 */
body.is-start-home .start-home__title {
    will-change: opacity, filter;
    animation:
        start-reveal 1000ms 120ms ease both,
        start-title-breathe 12s 2s ease-in-out infinite;
}

/*
 * More organic status indicator.
 */
body.is-start-home .start-home__status-dot {
    position: relative;
    isolation: isolate;
}

body.is-start-home .start-home__status-dot::after {
    position: absolute;
    inset: -5px;
    z-index: -1;
    content: "";
    border: 1px solid rgba(169, 255, 184, 0.22);
    border-radius: 50%;
    opacity: 0;
    animation: start-status-ring 2.8s ease-out infinite;
}

/*
 * Sequential card entrance.
 */
body.is-start-home .start-card {
    opacity: 0;
    animation: start-card-enter 700ms ease forwards;
}

body.is-start-home .start-card:nth-child(1) {
    animation-delay: 360ms;
}

body.is-start-home .start-card:nth-child(2) {
    animation-delay: 430ms;
}

body.is-start-home .start-card:nth-child(3) {
    animation-delay: 500ms;
}

body.is-start-home .start-card:nth-child(4) {
    animation-delay: 570ms;
}

body.is-start-home .start-card:nth-child(5) {
    animation-delay: 640ms;
}

/*
 * Thin light sweep on hover.
 */
body.is-start-home .start-card::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -35%;
    z-index: 1;
    width: 22%;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.055),
            transparent
        );
    opacity: 0;
    transform: skewX(-18deg);
}

body.is-start-home .start-card:hover::after,
body.is-start-home .start-card:focus-visible::after {
    opacity: 1;
    animation: start-card-sweep 900ms ease forwards;
}

/*
 * The title and description gain a fraction more contrast
 * while the user interacts with a section.
 */
body.is-start-home .start-home__hero:has(.start-card:hover)
.start-home__description {
    color: rgba(244, 244, 240, 0.66);
}

/*
 * Keyboard accessibility.
 */
body.is-start-home .start-card:focus-visible {
    box-shadow:
        inset 2px 0 0 rgba(255, 255, 255, 0.78),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/*
 * Animations
 */
@keyframes start-title-breathe {
    0%,
    100% {
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        opacity: 0.975;
        filter: brightness(0.965);
    }
}

@keyframes start-status-ring {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    24% {
        opacity: 0.42;
    }

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

@keyframes start-card-enter {
    from {
        opacity: 0;
        transform: translateX(12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes start-card-sweep {
    from {
        left: -35%;
    }

    to {
        left: 120%;
    }
}

/*
 * Preserve the user's reduced-motion preference.
 */
@media (prefers-reduced-motion: reduce) {
    body.is-start-home .start-home__title,
    body.is-start-home .start-card,
    body.is-start-home .start-home__status-dot::after {
        opacity: 1;
        animation: none !important;
        transform: none;
        filter: none;
    }
}
