/*
 * Coming-soon theme: aligned with the Laravel app's scholarly palette
 * (openbook/resources/css/prototype.css) — deep navy primary, lavender
 * secondary/accent, cool neutral borders. The previous golden theme is
 * preserved in styles.css.golden.bak. The logo assets are untouched.
 */

@font-face {
    font-family: 'Manrope';
    src: url('assets/Manrope-VariableFont_wght.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

:root {
    /* App tokens (prototype.css): foreground hsl(222 41% 13%),
       primary hsl(212 100% 14%), background hsl(250 100% 99%),
       card white, muted-foreground hsl(218 8% 29%),
       muted hsl(235 100% 97%), secondary hsl(230 100% 94%),
       accent hsl(228 92% 93%), border hsl(227 8% 79%). */
    --ink: #141c2f;
    --navy: #002147;
    --navy-mid: #084d9b;
    --paper: #fafaff;
    --surface: #ffffff;
    --muted: #444850;
    --soft: #eef0ff;
    --lavender: #e0e6ff;
    --lavender-strong: #dce3fd;
    --line: rgba(20, 28, 47, 0.16);
    --line-strong: rgba(20, 28, 47, 0.3);
    --navy-soft: rgba(0, 33, 71, 0.1);
    --glow: rgba(8, 77, 155, 0.16);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Manrope', 'Avenir Next', Avenir, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
a {
    font: inherit;
    color: inherit;
}

.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;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.5rem);
}

.skip-link:focus {
    opacity: 1;
    outline: 3px solid var(--navy-mid);
    outline-offset: 3px;
    pointer-events: auto;
    transform: translateY(0);
}

/* ---------- Shell & ambient ---------- */

.page-shell {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100svh;
    overflow: hidden;
}

.page-shell::before {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(rgba(20, 28, 47, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 28, 47, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    content: '';
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.page-shell::after {
    position: absolute;
    top: -28rem;
    left: 50%;
    z-index: -2;
    width: 74rem;
    height: 74rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow), transparent 66%);
    content: '';
    transform: translateX(-50%);
}

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

.ambient__ring {
    position: absolute;
    border: 1px solid rgba(0, 33, 71, 0.22);
    border-radius: 50%;
}

.ambient__ring--one {
    top: 8rem;
    right: -16rem;
    width: 32rem;
    height: 32rem;
    animation: slow-spin 32s linear infinite;
}

.ambient__ring--one::before,
.ambient__ring--two::before {
    position: absolute;
    top: 50%;
    left: -0.35rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--navy);
    box-shadow: 0 0 0 7px var(--navy-soft);
    content: '';
}

.ambient__ring--two {
    bottom: -8rem;
    left: -10rem;
    width: 22rem;
    height: 22rem;
    border-color: rgba(20, 28, 47, 0.1);
    animation: slow-spin 24s linear infinite reverse;
}

.ambient__dot {
    position: absolute;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--ink);
    opacity: 0.18;
    animation: drift 8s ease-in-out infinite alternate;
}

.ambient__dot--one { top: 18%; left: 6%; }
.ambient__dot--two { top: 30%; right: 10%; animation-delay: -3s; }
.ambient__dot--three { bottom: 22%; left: 42%; animation-delay: -5s; }

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

@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(1.4rem, -1.8rem, 0); }
}

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

.site-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100% - 2rem, 76rem);
    margin-inline: auto;
    padding: clamp(1rem, 3vh, 2rem) 0 0.5rem;
}

.brand {
    display: inline-flex;
    width: clamp(13rem, 24vw, 20rem);
    padding: 0.5rem;
    border-radius: 1rem;
    transition: opacity 180ms ease, transform 180ms ease;
    animation: brand-arrival 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.brand:hover {
    opacity: 0.82;
    transform: translateY(-2px);
}

.brand img {
    display: block;
    width: 100%;
    height: auto;
}

@keyframes brand-arrival {
    from { opacity: 0; transform: translateY(-0.75rem); }
    to { opacity: 1; transform: translateY(0); }
}

.status-pill {
    position: absolute;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.status-pill__signal {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--navy);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 33, 71, 0.45); }
    70% { box-shadow: 0 0 0 0.55rem rgba(0, 33, 71, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 33, 71, 0); }
}

/* ---------- Main grid (hero ~62% / features ~38%) ---------- */

.main-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 8fr 5fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    width: min(100% - 2rem, 76rem);
    min-height: 0;
    margin-inline: auto;
}

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

.hero h1 {
    margin: 0;
    max-width: 14ch;
    font-size: clamp(2.3rem, 4.4vw, 3.9rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 100ms both;
}

.hero h1 span {
    color: transparent;
    background: linear-gradient(100deg, var(--ink) 30%, var(--navy-mid) 85%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero__lede {
    max-width: 34rem;
    margin: clamp(0.9rem, 2vh, 1.4rem) 0 0;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 220ms both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(1.1rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Signup form ---------- */

.signup-form {
    max-width: 33rem;
    margin-top: clamp(1.2rem, 3vh, 2.2rem);
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 340ms both;
}

.signup-form > label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.signup-form__control {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 10px 34px rgba(15, 27, 51, 0.08);
}

.signup-form__control input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.5rem 0.85rem 1.2rem;
    border: 0;
    background: transparent;
    font-size: 1.05rem;
    color: var(--ink);
    outline: none;
}

.signup-form__control input::placeholder {
    color: rgba(68, 72, 80, 0.6);
}

.signup-form__control button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.7rem;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.signup-form__control button:hover {
    background: #28324a;
    transform: translateY(-1px);
}

.signup-form__control button:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.signup-form__control button svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.signup-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.signup-form__note {
    margin: 0.6rem 0 0 0.4rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.signup-form__status {
    min-height: 1.2em;
    margin: 0.4rem 0 0 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.signup-form__status.is-success { color: #1d7a3d; }
.signup-form__status.is-error { color: #ba1a1a; }

.brand:focus-visible,
.signup-form button:focus-visible,
.feature-item:focus-visible,
.feature-dots button:focus-visible,
.site-footer a:focus-visible {
    outline: 3px solid var(--navy-mid);
    outline-offset: 3px;
}

/* ---------- Countdown ---------- */

.countdown {
    margin-top: clamp(1.4rem, 4vh, 2.6rem);
    animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 460ms both;
}

.countdown__caption {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.countdown__units {
    display: flex;
    gap: 0.55rem;
}

.countdown__unit {
    min-width: 4.3rem;
    padding: 0.65rem 0.7rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 27, 51, 0.06);
    text-align: center;
}

.countdown__unit strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.countdown__unit span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Feature story (auth-style expanding list) ---------- */

.feature-story {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding-left: clamp(1.5rem, 3vw, 3rem);
    border-left: 1px solid var(--line);
}

.section-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
}

.feature-story__heading {
    margin: 0.6rem 0 0;
    max-width: 22ch;
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: clamp(1.1rem, 2.5vh, 1.8rem);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: transparent;
    text-align: left;
    cursor: pointer;
    opacity: 0.55;
    transition:
        opacity 400ms ease,
        border-color 400ms ease,
        background 400ms ease,
        box-shadow 400ms ease;
}

.feature-item:hover {
    opacity: 0.85;
}

.feature-item.is-active {
    opacity: 1;
    border-color: rgba(0, 33, 71, 0.45);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 27, 51, 0.09);
}

.feature-item__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: background 400ms ease, color 400ms ease;
}

.feature-item.is-active .feature-item__number {
    background: var(--navy);
    color: #ffffff;
}

.feature-item__body {
    display: block;
    min-width: 0;
    padding-top: 0.2rem;
}

.feature-item__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.feature-item__sub {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 450ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 450ms ease,
        margin-top 450ms ease;
}

.feature-item__sub > span {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.55;
}

.feature-item.is-active .feature-item__sub {
    grid-template-rows: 1fr;
    margin-top: 0.3rem;
    opacity: 1;
}

/* ---------- Progress dots ---------- */

.feature-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: clamp(1rem, 2.5vh, 1.6rem);
}

.feature-dots button {
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--line-strong);
    cursor: pointer;
    transition: width 400ms ease, background 400ms ease;
}

.feature-dots button:hover {
    background: var(--muted);
}

.feature-dots button.is-active {
    width: 1.7rem;
    background: var(--navy);
}

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

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(100% - 2rem, 76rem);
    margin-inline: auto;
    padding: 1rem 0 clamp(1rem, 2.5vh, 1.6rem);
    color: var(--muted);
    font-size: 0.8rem;
}

.site-footer a {
    font-weight: 700;
    text-decoration: none;
    transition: color 180ms ease;
}

.site-footer a:hover {
    color: var(--ink);
}

/* ---------- Responsive: stacked layout ---------- */

@media (max-width: 58rem) {
    .main-grid {
        grid-template-columns: 1fr;
        align-content: safe center;
        align-items: start;
        gap: clamp(1.2rem, 3.5vh, 2.4rem);
        padding: 0.5rem 0;
        overflow-y: auto;
    }

    .feature-story {
        padding-left: 0;
        border-left: 0;
        padding-top: clamp(1rem, 2.5vh, 1.8rem);
        border-top: 1px solid var(--line);
    }

    .feature-story__heading {
        max-width: 30ch;
    }

    .hero h1 {
        max-width: 18ch;
        font-size: clamp(1.9rem, 7vw, 2.6rem);
    }

    .hero__lede {
        display: none;
    }

    .countdown {
        margin-top: 1.2rem;
    }

    .countdown__caption {
        margin-bottom: 0.45rem;
        font-size: 0.7rem;
    }

    .countdown__units {
        gap: 0.4rem;
    }

    .countdown__unit {
        min-width: 3.4rem;
        padding: 0.45rem 0.5rem 0.4rem;
    }

    .countdown__unit strong {
        font-size: 1.1rem;
    }

    .feature-item {
        padding: 0.55rem 0.75rem;
    }

    .feature-dots {
        margin-top: 0.9rem;
    }

    .status-pill {
        position: static;
        margin-left: 1rem;
    }

    .site-header {
        justify-content: space-between;
    }

    .site-footer__message {
        display: none;
    }
}

/* ---------- Short viewports ---------- */

@media (max-height: 46rem) {
    .site-header {
        padding-top: 0.8rem;
    }

    .brand {
        width: clamp(10rem, 18vw, 14rem);
    }

    .hero h1 {
        font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    }

    .hero__lede {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .signup-form {
        margin-top: 1rem;
    }

    .countdown {
        margin-top: 1rem;
    }

    .countdown__unit {
        min-width: 3.6rem;
        padding: 0.45rem 0.55rem 0.4rem;
    }

    .countdown__unit strong {
        font-size: 1.15rem;
    }

    .feature-story__heading {
        font-size: 1.15rem;
    }

    .feature-list {
        gap: 0.4rem;
        margin-top: 0.8rem;
    }

    .feature-item {
        padding: 0.5rem 0.75rem;
    }

    .feature-dots {
        margin-top: 0.8rem;
    }
}

@media (max-height: 46rem) and (max-width: 58rem) {
    .ambient__dot--three {
        display: none;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}
