/* ============================================
   Static Pages - Code Blue Academy

   Shared layout for content-heavy static pages:
   contact, FAQ, CAPCE accreditation, privacy,
   terms, cookie policy. Uses the same dark
   surface system as the rest of the marketing
   pages so the visual language stays consistent.
   ============================================ */

/* ===== STATIC HERO ===== */

.static-hero {
    position: relative;
    background-color: var(--color-midnight-950);
    padding-block: var(--space-16) var(--space-12);
    overflow: hidden;
}

.static-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("/static/images/patterns/Code_Blue_Academy_Pattern_Update_5-02.66f68157fc33.png");
    background-size: 400px;
    background-repeat: repeat;
    opacity: 0.06;
    pointer-events: none;
}

.static-hero::after {
    content: '';
    position: absolute;
    top: 30%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(193, 0, 0, 0.30) 0%, transparent 70%);
    pointer-events: none;
}

.static-hero__content {
    position: relative;
    z-index: 1;
    max-width: 56rem;
    margin-inline: auto;
    text-align: center;
}

.static-hero__title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
    line-height: var(--leading-tight);
    color: var(--color-white);
    margin-block-end: var(--space-4);
}

.static-hero__title-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.static-hero__subtitle {
    font-size: var(--text-lg);
    color: var(--color-slate-300);
    line-height: var(--leading-relaxed);
    max-width: 44rem;
    margin-inline: auto;
}

/* ===== STATIC SECTION ===== */

.static-section {
    background-color: var(--surface-dark);
    padding-block: var(--space-16);
}

/* The reading column: 38rem holds the 16 px serif at about 80 characters a
   line (measured: 81 to 83 on the longest lines; 48rem ran to 101). */
.static-content {
    max-width: 38rem;
    margin-inline: auto;
}

.static-content__lead {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-5);
    margin-block-end: var(--space-12);
    padding-block-end: var(--space-10);
    border-bottom: 1px solid var(--color-midnight-700);
}

.static-content__logo {
    height: 56px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.static-content__lead p {
    font-size: var(--text-lg);
    color: var(--color-slate-300);
    line-height: var(--leading-relaxed);
    max-width: none;
}

.static-content__sections {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.static-content__section h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--color-white);
    margin-block-end: var(--space-3);
}

.static-content__section p {
    font-family: var(--font-reading);
    font-size: var(--text-base);
    color: var(--color-slate-300);
    line-height: var(--leading-relaxed);
    margin-block-end: var(--space-3);
    max-width: none;
}

.static-content__section ul {
    list-style: disc;
    padding-inline-start: var(--space-6);
    color: var(--color-slate-300);
    line-height: var(--leading-relaxed);
}

.static-content__section ul li {
    margin-block-end: var(--space-2);
}

.static-content__section a {
    color: var(--color-cb-blue-400);
    text-decoration: underline;
    transition: color var(--duration-fast) var(--ease-default);
}

.static-content__section a:hover {
    color: var(--color-white);
}

/* ===== LEGAL NOTICE BANNER ===== */

.legal-notice {
    background: rgba(var(--accent-gold-rgb), 0.08);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    color: var(--color-slate-200);
    margin-block-end: var(--space-8);
    line-height: var(--leading-relaxed);
}

.legal-notice strong {
    color: var(--neon-gold);
}

.legal-notice a {
    color: var(--color-cb-blue-400);
    text-decoration: underline;
}

.legal-meta {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ===== POLICY: the Refund and Cancellation Policy (#132) =====
   The version line under the title, the lead in two paragraphs, H3s inside
   each section, the term tables (stacked row by row on a phone), and on
   the unpublished preview the gold notice and its Pending notes. */

.policy-version {
    margin-block-start: var(--space-3);
    font-size: var(--text-base);
}

.policy-lead {
    align-items: stretch;
    text-align: start;
    gap: var(--space-3);
}

.policy-heading {
    margin-block: var(--space-6) var(--space-2);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--color-white);
}

.policy-table__wrap {
    margin-block: var(--space-4) var(--space-5);
    overflow-x: auto;
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-md);
}

.policy-table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.policy-table th,
.policy-table td {
    padding: var(--space-3) var(--space-4);
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid var(--color-midnight-700);
    color: var(--color-slate-300);
}

.policy-table thead th {
    background: var(--color-midnight-800);
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    color: var(--color-white);
}

.policy-table tbody th {
    font-weight: var(--weight-semibold);
    color: var(--color-slate-200);
}

.policy-table tbody tr:last-child th,
.policy-table tbody tr:last-child td {
    border-bottom: none;
}

/* A phone (36em and below): the table no longer scrolls sideways with a
   third of it off screen. Each row is a block and every cell sits under its
   column's heading (data-label); the heading row is kept for screen
   readers only. */
@media (max-width: 36em) {
    .policy-table {
        min-width: 0;
    }

    .policy-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .policy-table tbody tr {
        display: block;
        padding: var(--space-4);
        border-bottom: 1px solid var(--color-midnight-700);
    }

    .policy-table tbody tr:last-child {
        border-bottom: none;
    }

    .policy-table tbody th,
    .policy-table tbody td {
        display: block;
        padding: 0;
        border-bottom: none;
    }

    .policy-table tbody td {
        margin-block-start: var(--space-3);
    }

    .policy-table tbody th::before,
    .policy-table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-block-end: var(--space-1);
        font-family: var(--font-display);
        font-size: var(--text-xs);
        font-weight: var(--weight-medium);
        letter-spacing: var(--tracking-wider);
        text-transform: uppercase;
        color: var(--text-muted);
    }
}

.policy-preview p {
    margin: 0;
}

.policy-preview__list {
    margin: var(--space-3) 0 0;
    padding-inline-start: var(--space-5);
    list-style: disc;
}

.policy-preview__list li {
    margin-block-end: var(--space-1);
}

.static-content__section .policy-pending {
    padding: var(--space-2) var(--space-4);
    border-inline-start: 3px solid rgba(var(--accent-gold-rgb), 0.6);
    background: rgba(var(--accent-gold-rgb), 0.08);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-slate-200);
}

.policy-pending strong {
    color: var(--neon-gold);
}

/* ===== CONTACT: RESERVED A SEAT (#pay-by-phone) =====
   The first card on Contact at every width: the phone number for a buyer
   holding a seat. It holds two links, so it is not one target and does not
   light up on hover as the info cards do; the blue accent glow border sets
   it apart. The Call button is the shared 52 px button. */

.contact-pay {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-6);
    margin-block-end: var(--space-10);
    padding: var(--space-6);
    background: var(--color-midnight-800);
    border: 2px solid var(--color-cb-blue);
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 40px rgba(var(--accent-blue-rgb), 0.25),
        0 0 80px rgba(var(--accent-blue-rgb), 0.08);
}

.contact-pay__icon {
    margin: 0;
}

.contact-pay__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-white);
    margin-block-end: var(--space-2);
}

.contact-pay__text {
    color: var(--color-slate-300);
    max-width: none;
    margin: 0;
}

.contact-pay__text + .contact-pay__text {
    margin-block-start: var(--space-2);
}

@media (max-width: 48em) {
    .contact-pay {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .contact-pay__call {
        width: 100%;
    }
}

/* ===== CONTACT PAGE LAYOUT ===== */

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-12);
}

@media (max-width: 64em) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    /* One column: the form, the page's task, comes before the info cards. */
    .contact-form-wrap {
        order: -1;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.contact-info__card {
    position: relative;   /* holds the stretched link below */
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: border-color var(--duration-fast) var(--ease-default),
                box-shadow var(--duration-fast) var(--ease-default);
}

.contact-info__card:hover {
    border-color: var(--color-cb-blue);
    box-shadow: 0 0 30px rgba(68, 120, 204, 0.15);
}

.contact-info__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(68, 120, 204, 0.1);
    border: 1px solid rgba(68, 120, 204, 0.25);
    color: var(--color-cb-blue-400);
    margin-block-end: var(--space-4);
}

.contact-info__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--color-white);
    margin-block-end: var(--space-2);
}

.contact-info__text {
    color: var(--color-slate-400);
    font-size: var(--text-sm);
    margin-block-end: var(--space-3);
    max-width: none;
}

.contact-info__link {
    color: var(--color-cb-blue-400);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-default);
}

.contact-info__link:hover {
    color: var(--color-white);
}

/* The whole card is the link's target (it already lights up on hover): the
   link stretches over it, as the program tile's button does, and the focus
   ring goes round the card. */
.contact-info__link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
}

.contact-info__link:focus-visible {
    outline: none;
}

.contact-info__link:focus-visible::after {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.contact-form-wrap {
    background: var(--color-midnight-800);
    border: 1px solid var(--color-midnight-700);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}

.contact-form__heading {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--color-white);
    margin-block-end: var(--space-2);
}

.contact-form__lead {
    color: var(--color-slate-400);
    margin-block-end: var(--space-6);
    max-width: none;
}

.contact-form__success {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--color-slate-200);
}

.contact-form__success svg {
    color: var(--neon-emerald);
    margin-block-end: var(--space-3);
}

.contact-form__success h3 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-white);
    margin-block-end: var(--space-3);
}

.contact-form__success p {
    color: var(--color-slate-300);
    max-width: 32ch;
    margin-inline: auto;
}

/* Problem with a submission: the shared error alert (.alert.alert--error,
   _components.css) above the button of the refilled form. Only its place
   in the form is set here. */
.contact-form__alert {
    max-width: none;
    margin-block-end: var(--space-4);
}

/* ===== FAQ PAGE ===== */

/* 40rem: an answer then runs to about 79 characters a line (measured; at
   56rem it ran past 100). A group's title and its questions share their
   edges, the shared list being no wider than its container. */
.faq-categories {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    max-width: var(--container-sm);
    margin-inline: auto;
}

.faq-category__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    color: var(--color-white);
    margin-block-end: var(--space-5);
    padding-block-end: var(--space-3);
    border-bottom: 1px solid var(--color-midnight-700);
}

/* The questions are the shared accordion (components/_faq_list.html,
   _components.css FAQ LIST). Here it takes the blue of the information
   pages: a glow card sets its own accent, red by default. */
.faq-categories .glow-card {
    --cc: var(--accent-blue-rgb);
}

/* The link after an answer sits on the open card (midnight-700), where the
   link blue is 3.45:1. The lighter link tone is 5.29:1 there. */
.faq-categories .faq-item__a a {
    color: var(--link-hover);
}

.faq-categories .faq-item__a a:hover {
    color: var(--text-strong);
}

.faq-cta {
    text-align: center;
    margin-block-start: var(--space-16);
    padding-block-start: var(--space-10);
    border-top: 1px solid var(--color-midnight-700);
}

.faq-cta p {
    color: var(--color-slate-300);
    margin-block-end: var(--space-4);
}

/* ===== SECTION BLENDING ===== */
/* 950 → 900: hero fades into the lighter section */
.static-hero::after {
    /* keep the radial glow as the only ::after — no blend needed
       because static-section is the next dark surface and the
       transition is naturally subtle */
}
