/* ==============================================================
   The public homepage (Homepage/*.razor). Vesta's theme tokens only — dark by default, and light
   when the theme says so — so the site and the app are one brand. Ported from the Lovable site's
   Tailwind classes; the class names are hp-* so nothing here reaches the app's pages.
   ============================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.hp-container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 768px) {
    .hp-container { padding-inline: 2rem; }
}

.hp-narrow { max-width: 56rem; }
.hp-narrow-form { max-width: 42rem; }
.hp-center { text-align: center; }

.hp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hp-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

/* -------------------------------------------------------------- Sections */

.hp-section {
    padding-block: 4rem;
    background: hsl(var(--background));
}

.hp-section-compact { padding-block: 3rem; }

/* Every other section a step lighter, as the original alternated two navies. */
.hp-band { background: hsl(var(--card)); }

@media (min-width: 768px) {
    .hp-section { padding-block: 6rem; }
    .hp-section-compact { padding-block: 4rem; }
}

.hp-section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.hp-section-heading h2,
.hp-split-text h2 {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: hsl(var(--foreground));
}

.hp-h2-small.hp-h2-small {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    font-weight: 600;
}

.hp-lead {
    font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
    line-height: 1.6;
    color: hsl(var(--foreground) / 0.8);
    max-width: 42rem;
    margin: 0 auto;
}

.hp-eyebrow {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: hsl(var(--foreground) / 0.8);
    margin: 0 0 0.5rem;
}

.hp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: hsl(var(--foreground) / 0.1);
    color: hsl(var(--foreground) / 0.85);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.hp-pill-accent {
    background: hsl(var(--accent) / 0.2);
    color: hsl(var(--accent));
    font-weight: 500;
    padding: 0.375rem 1rem;
}

/* -------------------------------------------------------------- Buttons */

.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.2s, color 0.2s;
}

.hp-btn .hp-icon { width: 1.125rem; height: 1.125rem; }

.hp-btn:focus-visible,
.hp-header a:focus-visible,
.hp-faq summary:focus-visible,
.hp-step-tabs input:focus-visible + label {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

.hp-btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 8px 32px -8px hsl(var(--primary) / 0.4);
}

.hp-btn-secondary {
    background: hsl(var(--accent));
    color: hsl(var(--vesta-navy-raw));
    box-shadow: 0 8px 32px -8px hsl(var(--accent) / 0.4);
}

.hp-btn-primary:hover,
.hp-btn-secondary:hover {
    transform: scale(1.05);
}

.hp-btn-primary:hover { box-shadow: 0 12px 40px -8px hsl(var(--primary) / 0.5); }
.hp-btn-secondary:hover { box-shadow: 0 12px 40px -8px hsl(var(--accent) / 0.5); }

.hp-btn-ghost {
    background: transparent;
    color: hsl(var(--foreground));
    border-color: hsl(var(--foreground) / 0.25);
}

.hp-btn-ghost:hover {
    background: hsl(var(--foreground) / 0.08);
    border-color: hsl(var(--foreground) / 0.4);
}

.hp-btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* The way into the app, on its way through the login server (homepage.js). */
a[data-app-link][aria-busy="true"] {
    cursor: progress;
}

a[data-app-link][aria-busy="true"]::before {
    content: "";
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    margin-inline-end: 0.4em;
    vertical-align: -0.1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: hp-spin 0.7s linear infinite;
}

/* In a button the gap already spaces it. */
.hp-btn[data-app-link][aria-busy="true"]::before {
    margin-inline-end: 0;
}

@keyframes hp-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hp-btn-primary:hover, .hp-btn-secondary:hover { transform: none; }
}

/* -------------------------------------------------------------- Header */

.hp-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: hsl(var(--background) / 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--foreground) / 0.1);
}

.hp-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 4rem;
}

.hp-logo img {
    display: block;
    height: 2rem;
    width: auto;
}

.hp-header-links,
.hp-header-actions {
    display: none;
}

.hp-header-links {
    flex: 1;
    justify-content: center;
    gap: 2rem;
}

.hp-header-links a,
.hp-menu-panel > a:not(.hp-btn) {
    font-weight: 500;
    color: hsl(var(--foreground) / 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.hp-header-links a:hover,
.hp-menu-panel > a:not(.hp-btn):hover {
    color: hsl(var(--foreground));
}

.hp-header-actions {
    align-items: center;
    gap: 0.75rem;
}

/* The language menu: a disclosure, dropping down from the bar, or opening in place in the small-screen menu. */
.hp-languages {
    position: relative;
}

.hp-languages summary {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground) / 0.7);
    list-style: none;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.hp-languages summary::-webkit-details-marker { display: none; }
.hp-languages summary:hover,
.hp-languages[open] summary { color: hsl(var(--foreground)); background: hsl(var(--foreground) / 0.08); }
.hp-languages summary .hp-icon { width: 1.125rem; height: 1.125rem; }

.hp-languages summary:focus-visible,
.hp-languages-list a:focus-visible {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

.hp-languages-list {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 10;
    min-width: 10rem;
    margin: 0;
    padding: 0.375rem;
    list-style: none;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--popover));
    box-shadow: 0 10px 40px hsl(220 45% 5% / 0.5);
    animation: hp-fade-in 0.15s ease-out;
}

.hp-languages-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: calc(var(--radius) - 6px);
    color: hsl(var(--popover-foreground) / 0.8);
    text-decoration: none;
}

.hp-languages-list a:hover { background: hsl(var(--foreground) / 0.08); color: hsl(var(--popover-foreground)); }

.hp-languages-list a[aria-current] {
    color: hsl(var(--primary));
    font-weight: 600;
}

/* In the small-screen menu: the list opens in place, as plain links. */
.hp-languages-inline summary {
    padding-inline: 0;
    font-size: 1.125rem;
}

.hp-languages-inline .hp-languages-list {
    position: static;
    margin-top: 0.5rem;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1.5rem;
}

@media (min-width: 1024px) {
    .hp-header-bar { height: 5rem; }
    .hp-logo img { height: 2.5rem; }
    .hp-header-links, .hp-header-actions { display: flex; }
    .hp-menu { display: none; }
}

/* The small-screen menu: a disclosure. */
.hp-menu summary {
    list-style: none;
    display: flex;
    padding: 0.5rem;
    color: hsl(var(--foreground));
    cursor: pointer;
}

.hp-menu summary::-webkit-details-marker { display: none; }
.hp-menu .hp-menu-close { display: none; }
.hp-menu[open] .hp-menu-open { display: none; }
.hp-menu[open] .hp-menu-close { display: block; }

.hp-menu-panel {
    position: absolute;
    inset: 4rem 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--foreground) / 0.1);
    animation: hp-fade-in 0.2s ease-out;
}

.hp-menu-panel > a:not(.hp-btn) {
    font-size: 1.125rem;
    padding-block: 0.5rem;
}


/* -------------------------------------------------------------- Hero */

/* Brand navy with white text in either theme. Redefining --foreground on the grid makes its content follow, and
   leaves the waitlist dialog, which also sits in this section, on the theme's colours. */
.hp-hero {
    background: hsl(var(--vesta-navy-raw));
}

.hp-hero-grid {
    --foreground: 0 0% 100%;
    display: grid;
    color: hsl(var(--foreground));
}

.hp-hero-text {
    padding: 5rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hp-hero-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1.25rem;
    max-width: 28rem;
    color: hsl(var(--foreground));
}

.hp-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 28rem;
}

.hp-hero-actions .hp-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.hp-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (min-width: 768px) {
    .hp-hero-grid {
        grid-template-columns: 1fr 2fr;
        min-height: 640px;
        align-items: center;
    }

    .hp-hero-text { padding: 7rem 0 3rem; }
    .hp-hero-text h1 { font-size: 1.25rem; max-width: 20rem; }
    .hp-hero-actions .hp-btn { font-size: 0.75rem; }
    .hp-hero-image { padding-top: 5rem; }
}

@media (min-width: 1024px) {
    .hp-hero-text h1 { font-size: 1.5rem; max-width: 24rem; }
    .hp-hero-actions .hp-btn { font-size: 0.875rem; }
}

@media (min-width: 1280px) {
    .hp-hero-text h1 { font-size: 2rem; max-width: 28rem; }
    .hp-hero-actions { flex-direction: row; }
}

/* -------------------------------------------------------------- Problem: the carousel */

.hp-carousel {
    position: relative;
    max-width: 56rem;
    margin: 0 auto;
}

.hp-carousel-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 16px 48px -12px hsl(0 0% 0% / 0.4);
}

@media (min-width: 768px) {
    .hp-carousel-frame { aspect-ratio: 16 / 9; }
}

.hp-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s, transform 0.5s;
}

.hp-slide[data-before] { transform: translateX(-100%); }

.hp-slide[data-active] {
    opacity: 1;
    transform: none;
}

.hp-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Text over a photo stays light in either theme. */
.hp-slide figcaption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background: linear-gradient(to top, hsl(220 47% 12% / 0.92), hsl(220 47% 12% / 0.4) 50%, transparent);
    color: hsl(0 0% 100%);
}

.hp-slide h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.hp-slide p {
    margin: 0;
    max-width: 36rem;
    font-size: 0.875rem;
    color: hsl(0 0% 100% / 0.85);
}

@media (min-width: 768px) {
    .hp-slide figcaption { padding: 2.5rem; }
    .hp-slide h3 { font-size: 1.5rem; }
    .hp-slide p { font-size: 1rem; }
}

.hp-carousel-step {
    position: absolute;
    top: 33%;
    display: flex;
    padding: 0.5rem;
    border: 0;
    border-radius: 999px;
    background: hsl(0 0% 100% / 0.2);
    backdrop-filter: blur(8px);
    color: hsl(0 0% 100%);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s;
}

.hp-carousel-step:hover { background: hsl(0 0% 100% / 0.3); }
.hp-carousel-previous { left: 1rem; }
.hp-carousel-next { right: 1rem; }

@media (min-width: 768px) {
    .hp-carousel-step { top: 50%; }
}

.hp-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.hp-carousel-dots[hidden],
.hp-carousel-step[hidden] { display: none; }

.hp-carousel-dots button {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: hsl(var(--foreground) / 0.3);
    cursor: pointer;
    transition: width 0.3s, background-color 0.3s;
}

.hp-carousel-dots button:hover { background: hsl(var(--foreground) / 0.5); }

.hp-carousel-dots button[data-active] {
    width: 2rem;
    background: hsl(var(--primary));
}

@media (prefers-reduced-motion: reduce) {
    .hp-slide { transition: none; }
}

/* -------------------------------------------------------------- Cards */

.hp-cards {
    display: grid;
    gap: 1.5rem;
}

.hp-cards-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .hp-cards-3 { grid-template-columns: repeat(2, 1fr); }
    .hp-cards-4 { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
    .hp-cards-centered { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .hp-cards-3 { grid-template-columns: repeat(3, 1fr); }
}

.hp-card {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid hsl(var(--foreground) / 0.2);
    background: hsl(var(--foreground) / 0.1);
    transition: background-color 0.3s;
}

.hp-card:hover { background: hsl(var(--foreground) / 0.15); }

.hp-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: hsl(var(--foreground));
}

.hp-card p {
    margin: 0;
    line-height: 1.6;
    color: hsl(var(--foreground) / 0.8);
}

.hp-card-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    border-radius: 0.75rem;
}

.hp-card-small h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.hp-cards-centered .hp-card { text-align: center; }

.hp-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--primary));
    transition: background-color 0.3s;
}

.hp-card:hover .hp-card-icon { background: hsl(var(--primary) / 0.3); }

.hp-card-icon-small {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
}

.hp-card-icon-small .hp-icon { width: 1.25rem; height: 1.25rem; }

.hp-card-icon-accent {
    margin-inline: auto;
    background: hsl(var(--accent) / 0.2);
    color: hsl(var(--accent));
}

.hp-card-edge {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: hsl(var(--foreground) / 0.8);
}

/* -------------------------------------------------------------- Comparison */

.hp-comparison {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.hp-comparison thead { display: none; }

.hp-comparison tr {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--foreground) / 0.2);
    background: hsl(var(--foreground) / 0.1);
}

.hp-comparison tbody th {
    grid-column: 1 / -1;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hp-comparison td {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 4.5rem;
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-size: 0.875rem;
}

.hp-comparison td::before {
    content: attr(data-column);
    font-size: 0.75rem;
    color: hsl(var(--foreground) / 0.8);
}

.hp-comparison td.hp-vesta {
    border: 2px solid hsl(var(--accent));
    border-radius: 0.5rem;
}

.hp-comparison td.hp-vesta::before {
    color: hsl(var(--accent));
    font-weight: 600;
}

@media (min-width: 768px) {
    .hp-comparison {
        overflow: hidden;
        border-radius: 1rem;
        border: 1px solid hsl(var(--foreground) / 0.2);
    }

    .hp-comparison thead { display: table-header-group; }
    .hp-comparison tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
    .hp-comparison thead tr { background: hsl(var(--foreground) / 0.1); }
    .hp-comparison tbody tr:nth-child(odd) { background: hsl(var(--foreground) / 0.04); }
    .hp-comparison tbody tr:nth-child(even) { background: hsl(var(--foreground) / 0.08); }

    .hp-comparison th,
    .hp-comparison td {
        display: table-cell;
        min-height: 0;
        padding: 1rem;
        vertical-align: middle;
        text-align: center;
    }

    .hp-comparison td::before { content: none; }

    .hp-comparison th:first-child,
    .hp-comparison tbody th {
        text-align: left;
        font-family: var(--font-sans);
        font-weight: 500;
    }

    .hp-comparison thead th {
        font-family: var(--font-heading);
        font-weight: 600;
        color: hsl(var(--foreground) / 0.85);
    }

    /* Vesta's column, outlined top to bottom. */
    .hp-comparison .hp-vesta,
    .hp-comparison td.hp-vesta {
        border: 0;
        border-radius: 0;
        border-inline: 2px solid hsl(var(--accent));
    }

    .hp-comparison thead .hp-vesta {
        border-top: 2px solid hsl(var(--accent));
        color: hsl(var(--accent));
    }

    .hp-comparison tbody tr:last-child .hp-vesta { border-bottom: 2px solid hsl(var(--accent)); }
}

.hp-yes,
.hp-no {
    display: inline-flex;
}

.hp-yes { color: hsl(var(--accent)); }
.hp-no { color: hsl(var(--foreground) / 0.8); }
.hp-yes .hp-icon, .hp-no .hp-icon { width: 1.25rem; height: 1.25rem; }

.hp-cell-text { color: hsl(var(--foreground) / 0.85); }
.hp-cell-vesta { color: hsl(var(--foreground)); font-weight: 600; }

.hp-comparison-footer {
    margin-top: 2rem;
    text-align: center;
    color: hsl(var(--foreground) / 0.8);
}

/* -------------------------------------------------------------- Early access */

.hp-dotted {
    position: relative;
    overflow: hidden;
}

.hp-dotted::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle at 2px 2px, hsl(var(--foreground)) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

.hp-dotted > .hp-container { position: relative; }

.hp-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.hp-badge-icon .hp-icon { width: 2rem; height: 2rem; }

.hp-badge-icon-soft {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary));
}

.hp-badge-icon-soft .hp-icon { width: 1.75rem; height: 1.75rem; }


/* -------------------------------------------------------------- How it works: tabs from a radio group */

.hp-steps {
    max-width: 48rem;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid hsl(var(--foreground) / 0.1);
    background: hsl(var(--foreground) / 0.04);
}

.hp-step-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 1rem 1rem 0;
}

.hp-step-tabs input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hp-step-tabs label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    background: hsl(var(--foreground) / 0.05);
    color: hsl(var(--foreground) / 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.hp-step-tabs .hp-icon { width: 1.25rem; height: 1.25rem; }
.hp-step-tabs .hp-step-title { display: none; }

@media (min-width: 640px) {
    .hp-step-tabs .hp-step-title { display: block; }
    .hp-step-tabs .hp-step-number { display: none; }
}

.hp-step-tabs input:checked + label {
    background: hsl(var(--vesta-navy-raw));
    color: hsl(0 0% 100%);
    border-color: hsl(var(--primary) / 0.5);
}

.hp-step-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .hp-step-panel { padding: 3rem; }
}

/* The panel of the checked step. */
.hp-steps:has(.hp-step-tabs input:nth-of-type(1):checked) .hp-step-panel:nth-child(1),
.hp-steps:has(.hp-step-tabs input:nth-of-type(2):checked) .hp-step-panel:nth-child(2),
.hp-steps:has(.hp-step-tabs input:nth-of-type(3):checked) .hp-step-panel:nth-child(3),
.hp-steps:has(.hp-step-tabs input:nth-of-type(4):checked) .hp-step-panel:nth-child(4) {
    display: flex;
}

.hp-step-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 6rem;
    margin-bottom: 1.5rem;
    border-radius: 999px;
    border: 2px solid hsl(var(--primary));
    background: hsl(var(--vesta-navy-raw));
    color: hsl(var(--primary));
}

.hp-step-badge .hp-icon { width: 2rem; height: 2rem; margin-bottom: 0.25rem; }

.hp-step-badge span {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: hsl(0 0% 100% / 0.7);
}

.hp-step-panel h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.hp-step-panel p {
    max-width: 36rem;
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: hsl(var(--foreground) / 0.8);
}

/* -------------------------------------------------------------- Sport pioneer */

.hp-split {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.hp-split-text {
    text-align: center;
}

.hp-split-text .hp-lead { margin-bottom: 2rem; }

.hp-split-image {
    display: none;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 16px 48px -12px hsl(0 0% 0% / 0.4);
}

.hp-supporting {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground) / 0.8);
}

@media (min-width: 1024px) {
    .hp-split { grid-template-columns: 1fr 1fr; }
    .hp-split-text { text-align: left; }
    .hp-split-text .hp-lead { margin-inline: 0; }
    .hp-split-image { display: block; }
}

/* -------------------------------------------------------------- FAQ */

.hp-faq {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hp-faq details {
    padding-inline: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid hsl(var(--foreground) / 0.2);
    background: hsl(var(--foreground) / 0.1);
    transition: background-color 0.2s;
}

.hp-faq details[open] { background: hsl(var(--foreground) / 0.15); }

.hp-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    transition: color 0.2s;
}

.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary:hover { color: hsl(var(--accent)); }

.hp-faq-chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}

.hp-faq details[open] .hp-faq-chevron { transform: rotate(90deg); }

.hp-faq details p {
    margin: 0;
    padding-bottom: 1.25rem;
    line-height: 1.6;
    color: hsl(var(--foreground) / 0.8);
}

/* -------------------------------------------------------------- Forms and dialogs */

.hp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hp-form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hp-form-row { grid-template-columns: 1fr 1fr; }
}

.hp-field { display: block; }

.hp-field input,
.hp-field select,
.hp-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid hsl(var(--input));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font: inherit;
}

.hp-field textarea { resize: vertical; }

.hp-form-Contact .hp-field :is(input, textarea) {
    border-color: hsl(var(--foreground) / 0.2);
    background: hsl(var(--foreground) / 0.05);
}
.hp-field input::placeholder, .hp-field textarea::placeholder { color: hsl(var(--foreground) / 0.5); }

.hp-field select {
    appearance: none;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, hsl(var(--foreground) / 0.8) 50%),
                      linear-gradient(135deg, hsl(var(--foreground) / 0.8) 50%, transparent 50%);
    background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
    background-size: 0.35rem 0.35rem;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
}

.hp-field :is(input, select, textarea):focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px hsl(var(--primary));
}

.hp-form-actions { display: flex; justify-content: center; }
.hp-dialog .hp-form-actions .hp-btn { width: 100%; }

.hp-form-success,
.hp-form-error {
    margin: 0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 500;
    animation: hp-fade-in 0.3s ease-out;
}

.hp-form-success { background: hsl(var(--primary) / 0.15); }

.hp-form-error {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: hsl(var(--destructive) / 0.2);
    border: 1px solid hsl(var(--destructive) / 0.6);
}

/* Off-screen rather than display:none, which some bots know to skip. */
.hp-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hp-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: hidden auto;
    padding: 1.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
    box-shadow: 0 10px 40px hsl(220 45% 5% / 0.7);
}

.hp-dialog::backdrop {
    background: hsl(220 45% 5% / 0.8);
}

.hp-dialog[open] { animation: hp-fade-in 0.2s ease-out; }

.hp-dialog h2 {
    margin: 0 2rem 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.hp-dialog-description {
    margin: 0 0 1.5rem;
    color: hsl(var(--foreground) / 0.7);
}

.hp-dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    padding: 0.25rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: hsl(var(--foreground) / 0.8);
    cursor: pointer;
}

.hp-dialog-close:hover { color: hsl(var(--foreground)); }
.hp-dialog-close .hp-icon { width: 1.25rem; height: 1.25rem; }

/* -------------------------------------------------------------- Footer */

.hp-footer {
    padding-block: 4rem;
    background: hsl(var(--background));
    border-top: 1px solid hsl(var(--foreground) / 0.1);
}

.hp-footer-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .hp-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
    .hp-footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
}

.hp-footer-brand img {
    display: block;
    height: 2rem;
    width: auto;
    margin-bottom: 1rem;
}

.hp-footer-brand p {
    max-width: 20rem;
    margin: 0;
    font-size: 0.875rem;
    color: hsl(var(--foreground) / 0.8);
}

.hp-footer h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.hp-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-footer li a {
    display: inline-block;
    padding-block: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground) / 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.hp-footer li a:hover { color: hsl(var(--foreground)); }

.hp-footer-copyright {
    margin: 3rem 0 0;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--foreground) / 0.1);
    font-size: 0.875rem;
    color: hsl(var(--foreground) / 0.8);
}

/* -------------------------------------------------------------- Motion */

@keyframes hp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hp-fade-up {
    from { opacity: 0; transform: translateY(2rem); }
    to { opacity: 1; transform: none; }
}

.hp-fade-up { animation: hp-fade-up 0.6s ease-out both; }
.hp-stagger-1 { animation-delay: 0.1s; }
.hp-stagger-3 { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .hp-fade-up, .hp-dialog[open], .hp-menu-panel, .hp-form-success { animation: none; }
}
