/* ==========================================================================
   UniFluent - inner pages

   Shared by every page that is not the homepage: the compact page header,
   the modal, and the content blocks those pages build from. Depends on
   css/brand.css for tokens and chrome.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page header

   The homepage earns a full cinematic hero; inner pages get a quiet header
   that states where you are and gets out of the way.
   -------------------------------------------------------------------------- */

.page-header {
    position: relative;
    padding: clamp(8rem, 14vw, 11rem) 0 clamp(3.5rem, 6vw, 5rem);
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--uf-hairline-soft);
}

.page-header::before {
    content: '';
    position: absolute;
    inset: -40% 0 auto;
    height: 130%;
    background:
        radial-gradient(45% 45% at 50% 40%, rgba(85, 87, 232, 0.22), transparent 70%),
        radial-gradient(35% 35% at 78% 20%, rgba(123, 63, 168, 0.16), transparent 70%);
    pointer-events: none;
}

/* A faint grid, the same device the hero uses, to stop the header reading
   as an empty black band. */
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--uf-hairline-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--uf-hairline-soft) 1px, transparent 1px);
    background-size: 96px 96px;
    -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
    mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent);
    opacity: 0.7;
    pointer-events: none;
}

.page-header__inner {
    position: relative;
    z-index: 1;
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 var(--uf-gutter);
}

.page-header h1 {
    font-size: clamp(2.4rem, 5.4vw, 4rem);
}

.page-header p {
    margin: 1.2rem auto 0;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: var(--uf-text-dim);
}

.page-header .uf-eyebrow {
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Content grid
   -------------------------------------------------------------------------- */

.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1rem, 1.6vw, 1.5rem);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--uf-section) var(--uf-gutter);
}

/* A card that opens something. The arrow is the affordance, so it moves. */
.uf-card--action {
    cursor: pointer;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    color: var(--uf-indigo-soft);
    font-size: 0.88rem;
    font-weight: 600;
}

.learn-more i {
    transition: transform 0.3s var(--uf-ease);
}

.uf-card--action:hover .learn-more i {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    padding: clamp(1rem, 4vw, 2.5rem);
    overflow-y: auto;
    background: rgba(4, 4, 6, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 780px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--uf-ink-panel);
    border: 1px solid var(--uf-hairline);
    border-radius: var(--uf-radius);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}

.modal-content.opening {
    animation: uf-modal-in 0.45s var(--uf-ease);
}

@keyframes uf-modal-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-content.opening { animation: none; }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2.1rem) clamp(1.5rem, 3vw, 2.1rem) 1.4rem;
    border-bottom: 1px solid var(--uf-hairline-soft);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.modal-title-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 1px solid var(--uf-hairline);
    border-radius: 14px;
    background: rgba(85, 87, 232, 0.12);
    color: var(--uf-indigo-soft);
    font-size: 1.2rem;
}

.modal-title-text h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.modal-title-text p {
    margin: 0.35rem 0 0;
    color: var(--uf-text-dim);
    font-size: 0.92rem;
}

.modal-close {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--uf-hairline);
    border-radius: 50%;
    background: transparent;
    color: var(--uf-text-dim);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s var(--uf-ease), border-color 0.3s var(--uf-ease),
                background-color 0.3s var(--uf-ease);
}

.modal-close:hover {
    color: var(--uf-text);
    border-color: rgba(206, 206, 215, 0.32);
    background: rgba(206, 206, 215, 0.08);
}

.modal-body {
    padding: clamp(1.5rem, 3vw, 2.1rem);
}

.modal-body h3 {
    margin: 2rem 0 0.9rem;
    font-size: 1.15rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin: 0 0 1rem;
    color: var(--uf-text-dim);
}

.modal-body ul {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.modal-body li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--uf-text-dim);
    font-size: 0.94rem;
}

/* These lists mix ticks with topic icons, so give every glyph the same box
   and keep the accent colour for ticks alone. */
.modal-body li i {
    flex-shrink: 0;
    width: 1.1rem;
    margin-top: 0.22rem;
    font-size: 0.85rem;
    text-align: center;
    color: var(--uf-indigo-soft);
}

.modal-body li i.fa-check,
.modal-body li i.fa-check-circle {
    color: var(--uf-lime);
}

.highlight-box {
    margin: 1.5rem 0;
    padding: 1.3rem 1.5rem;
    border: 1px solid rgba(85, 87, 232, 0.34);
    border-radius: var(--uf-radius-sm);
    background: rgba(85, 87, 232, 0.09);
}

.highlight-box h4 {
    margin: 0 0 0.5rem;
    font-family: var(--uf-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--uf-indigo-soft);
}

.highlight-box p {
    margin: 0;
    color: var(--uf-text-dim);
    font-size: 0.93rem;
}

/* --------------------------------------------------------------------------
   Closing call to action
   -------------------------------------------------------------------------- */

.page-cta {
    position: relative;
    padding: var(--uf-section) var(--uf-gutter);
    text-align: center;
    border-top: 1px solid var(--uf-hairline-soft);
    background:
        radial-gradient(60% 70% at 50% 100%, rgba(85, 87, 232, 0.18), transparent 70%);
}

.page-cta__inner {
    max-width: 40rem;
    margin: 0 auto;
}

.page-cta p {
    margin: 1.1rem auto 2rem;
    color: var(--uf-text-dim);
}

.page-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   How It Works mocks (Personal Lessons, Arcade)
   The filmstrip that used to surround these was retired for the Flowty
   deck (css/hiw-flow.css); the mock cards themselves live on inside it.
   -------------------------------------------------------------------------- */

.hiw-mock {
    padding: 12% 10% 10%;
    background: #0b0b10;
    color: var(--uf-text);
}

.hiw-mock__title {
    margin: 0 0 0.85rem;
    font-family: var(--uf-serif);
    font-size: 1.05rem;
}

.hiw-mock__tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.hiw-mock__tabs span {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--uf-hairline);
    font-size: 0.62rem;
    color: var(--uf-text-dim);
}

.hiw-mock__tabs .is-on {
    background: rgba(85, 87, 232, 0.22);
    border-color: rgba(139, 141, 255, 0.45);
    color: #fff;
}

.hiw-mock__drop {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    padding: 1.4rem 0.75rem;
    border: 1px dashed rgba(206, 206, 215, 0.28);
    border-radius: 14px;
    text-align: center;
    margin-bottom: 0.75rem;
}

.hiw-mock__drop i {
    color: var(--uf-indigo-soft);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.hiw-mock__drop strong {
    font-size: 0.72rem;
    font-weight: 600;
}

.hiw-mock__drop small {
    color: var(--uf-text-faint);
    font-size: 0.58rem;
}

.hiw-mock--upload > button {
    display: block;
    width: 100%;
    margin-bottom: 0.85rem;
    padding: 0.65rem;
    border: 0;
    border-radius: 10px;
    background: var(--uf-indigo);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
}

.hiw-mock__file {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    background: rgba(206, 206, 215, 0.06);
    border: 1px solid var(--uf-hairline-soft);
}

.hiw-mock__file i { color: #e26b6b; }
.hiw-mock__file b {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
}
.hiw-mock__file em {
    display: block;
    margin-top: 0.15rem;
    font-style: normal;
    font-size: 0.58rem;
    color: var(--uf-text-faint);
}

.hiw-mock--arcade .hiw-mock__xp {
    margin: 0 0 1rem;
    color: var(--uf-lime);
    font-size: 0.78rem;
    font-weight: 600;
}

.hiw-mock__shop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
}

.hiw-mock__shop span {
    aspect-ratio: 1;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 25%, rgba(139, 141, 255, 0.35), transparent 55%),
        rgba(206, 206, 215, 0.08);
    border: 1px solid var(--uf-hairline-soft);
}

