/*
 * "First Light" landing page.
 *
 * Concept: the page scrolls from night (the navy header and hero) to sunrise (the
 * final call to action), echoing the brand's dusk/dawn "sky" gradients and
 * Proverbs 4:18. Every rule is scoped to .fr so nothing leaks into the shared
 * header, footer, or other pages. Colours come from the brand variables in
 * base.html; the only new accent is --fr-paper, a warm parchment neutral.
 * Refined 2: nothing below 12px, keyword kicker inside the H1, per-example
 * "Ask this question" links. Design notes: docs/design/first-light-refined-2.md
 */

.fr {
    --fr-night: var(--brand-header, #11192c);
    --fr-night-deep: #0c1224;
    --fr-navy: var(--brand-navy, #2b3a7f);
    --fr-navy-dark: var(--brand-navy-dark, #1e2b69);
    --fr-navy-subtle: var(--brand-navy-subtle-bg, #eef2ff);
    --fr-ember: var(--brand-orange, #fa8334);
    --fr-gold: var(--brand-accent, #fcd34d);
    --fr-wisdom: var(--accent-wisdom, #b45309);
    --fr-wisdom-bg: var(--accent-wisdom-bg, #fffbeb);
    --fr-growth: var(--accent-growth, #0f766e);
    --fr-growth-bg: var(--accent-growth-bg, #f0fdfa);
    --fr-peace: var(--accent-peace, #4338ca);
    --fr-peace-bg: var(--accent-peace-bg, #eef2ff);
    --fr-love: var(--accent-love, #be123c);
    --fr-love-bg: var(--accent-love-bg, #fff1f2);
    --fr-mist: var(--brand-background, #e6eef4);
    --fr-paper: #faf7f2;
    --fr-ink: var(--brand-header, #11192c);
    --fr-ink-soft: #4a5570;
    --fr-line: rgba(17, 25, 44, 0.1);
    --fr-on-dark: rgba(255, 255, 255, 0.86);
    --fr-on-dark-soft: rgba(255, 255, 255, 0.72);
    --fr-dawn-gradient: linear-gradient(135deg, var(--fr-gold) 0%, var(--fr-ember) 100%);
    --fr-radius: 1rem;
    --fr-radius-lg: 1.5rem;
    --fr-shadow: 0 1px 2px rgba(17, 25, 44, 0.05), 0 16px 36px -18px rgba(17, 25, 44, 0.22);
    --fr-shadow-lift: 0 2px 4px rgba(17, 25, 44, 0.06), 0 24px 48px -20px rgba(17, 25, 44, 0.3);
    --fr-display: 'First Light Display', Georgia, 'Times New Roman', serif;
    --fr-sans: var(--font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    --fr-gutter: 1rem;
    --fr-max: 72rem;
    --fr-ease: cubic-bezier(0.22, 1, 0.36, 1);

    font-family: var(--fr-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--fr-ink);
    background: var(--fr-paper);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 640px) { .fr { --fr-gutter: 1.5rem; } }
@media (min-width: 1024px) { .fr { --fr-gutter: 2rem; } }

/* Neutralise base.html's global uppercase display headings inside this page.
   :where() keeps specificity at one class so the component classes below win. */
.fr :where(h1, h2, h3, h4, p, figure, blockquote, ul, ol) {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.fr :where(ul, ol) { padding: 0; list-style: none; }

/* base.min.css sets every <p> in Playfair Display. Playfair is a display face and
   thins out at body sizes, so body copy here uses the brand sans; headings and the
   closing verse opt back into --fr-display explicitly. */
.fr :where(p, li, figcaption) { font-family: inherit; }

.fr :where(a) { text-decoration: none; color: inherit; }

.fr .fr-icon {
    font-size: 1.2em;
    width: 1em;
    height: 1em;
    line-height: 1;
    overflow: hidden;
    flex-shrink: 0;
    vertical-align: -0.2em;
}

.fr :focus-visible {
    outline: 3px solid var(--fr-navy);
    outline-offset: 3px;
    border-radius: 0.5rem;
}

.fr-hero :focus-visible,
.fr-section--night :focus-visible,
.fr-sticky :focus-visible {
    outline-color: var(--fr-gold);
}

/* ---------- Layout primitives ---------- */

.fr-wrap {
    width: 100%;
    max-width: var(--fr-max);
    margin-inline: auto;
    padding-inline: var(--fr-gutter);
    box-sizing: border-box;
}

.fr-center { text-align: center; }

.fr-section {
    position: relative;
    padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.fr-section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.fr-section--paper { background: var(--fr-paper); }
.fr-section--mist { background: var(--fr-mist); }

.fr-section--night {
    color: #fff;
    background:
        radial-gradient(80% 60% at 50% 120%, rgba(250, 131, 52, 0.28), transparent 70%),
        linear-gradient(180deg, var(--fr-night) 0%, var(--fr-navy-dark) 100%);
    overflow: hidden;
}

.fr-heading { margin-bottom: clamp(2rem, 4vw, 3rem); }
.fr-heading--center { text-align: center; }
.fr-heading--center .fr-lede { margin-inline: auto; }

.fr-heading--split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.fr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    /* Refined 2: a deeper amber than --fr-wisdom, which was 4.28:1 on the mist sections. */
    color: #92400e;
}

.fr-eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: var(--fr-dawn-gradient);
}

.fr .fr-eyebrow { letter-spacing: 0.16em; text-transform: uppercase; }
.fr-eyebrow--on-dark { color: var(--fr-gold); }

.fr-title {
    margin-top: 0.75rem;
    font-family: var(--fr-display);
    font-size: clamp(1.9rem, 2.6vw + 1.1rem, 3rem);
    font-weight: 600;
    line-height: 1.12;
    color: var(--fr-ink);
    text-wrap: balance;
}

.fr .fr-title { letter-spacing: -0.01em; }
.fr-title--on-dark { color: #fff; }

.fr-lede {
    margin-top: 1rem;
    max-width: 40rem;
    font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
    color: var(--fr-ink-soft);
    text-wrap: pretty;
}

.fr-lede--on-dark { color: var(--fr-on-dark); }

.fr-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--fr-navy);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, gap 0.2s var(--fr-ease);
}

.fr-link:hover { border-bottom-color: currentColor; gap: 0.55rem; }
.fr-link--on-dark { color: var(--fr-gold); }
.fr-link--ink { color: var(--fr-ink); }

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

.fr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem 1.4rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font-family: var(--fr-sans);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s var(--fr-ease), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.fr-btn:hover { transform: translateY(-1px); }
.fr-btn:active { transform: translateY(0); }
.fr-btn .fr-icon { transition: transform 0.2s var(--fr-ease); }
.fr-btn:hover .fr-icon { transform: translateX(2px); }
.fr-btn--lg { min-height: 3.5rem; padding: 0.95rem 1.75rem; font-size: 1.0625rem; }
.fr-btn--block { width: 100%; box-sizing: border-box; }

.fr-btn--dawn {
    color: var(--fr-night);
    background: var(--fr-ember);
    box-shadow: none;
}

.fr-btn--dawn:hover { background: var(--fr-gold); box-shadow: 0 8px 22px -12px var(--fr-ember); }

.fr-btn--ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.32);
}

.fr-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.55); }

.fr-btn--night {
    color: #fff;
    background: var(--fr-night);
    box-shadow: 0 12px 28px -14px rgba(17, 25, 44, 0.7);
}

.fr-btn--night:hover { background: var(--fr-navy-dark); }

.fr-btn--outline {
    color: var(--fr-navy);
    background: #fff;
    border-color: rgba(43, 58, 127, 0.3);
}

.fr-btn--outline:hover { background: var(--fr-navy-subtle); border-color: var(--fr-navy); }

/* ---------- Hero: night sky with a dawn horizon ---------- */

.fr-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 6.5rem);
    background:
        radial-gradient(90% 55% at 50% 118%, rgba(250, 131, 52, 0.55) 0%, rgba(250, 131, 52, 0) 62%),
        radial-gradient(45% 30% at 50% 108%, rgba(252, 211, 77, 0.45) 0%, rgba(252, 211, 77, 0) 70%),
        linear-gradient(180deg, var(--fr-night) 0%, #172150 52%, var(--fr-navy) 100%);
}

/* Stars: a handful of 1px dots tiled across the upper sky. No images. */
.fr-hero__sky,
.fr-section__stars {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(1px 1px at 22px 34px, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(1px 1px at 128px 86px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 196px 22px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 64px 150px, rgba(255, 255, 255, 0.45), transparent),
        radial-gradient(1px 1px at 232px 170px, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 164px 128px, rgba(252, 211, 77, 0.6), transparent);
    background-size: 260px 210px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 72%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 72%);
    opacity: 0.8;
}

/* The curve of the earth, in the colour of the section below. */
.fr-hero__horizon {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -1px;
    height: clamp(2rem, 5vw, 3.75rem);
    background: var(--fr-paper);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* First light on the rim. Drawn above the curve only: a box-shadow would bleed
   below it and leave a tinted seam where the hero meets the next section. */
.fr-hero__horizon::before {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 55%;
    height: 5rem;
    background: radial-gradient(50% 100% at 50% 100%, rgba(252, 211, 77, 0.4), transparent 72%);
    pointer-events: none;
}

.fr-hero__grid {
    display: grid;
    /* minmax(0, 1fr): without it the sideways-scrolling tab row sets the column's
       minimum width and pushes the whole hero past the edge of a phone screen. */
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 3.5rem);
    align-items: center;
}

@media (min-width: 960px) {
    .fr-hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.fr-hero__title {
    margin-top: 1rem;
    font-family: var(--fr-display);
    font-size: clamp(2.7rem, 4.8vw + 0.5rem, 4.65rem);
    font-weight: 600;
    line-height: 1.04;
    color: #fff;
    text-wrap: balance;
}

.fr .fr-hero__title { letter-spacing: -0.015em; }

.fr-hero__title em {
    display: block;
    margin-top: .1em;
    font-style: normal;
    color: #ffcb94;
}

.fr-hero__lede {
    margin-top: 1.25rem;
    max-width: 34rem;
    font-size: clamp(1.0625rem, 0.5vw + 1rem, 1.25rem);
    line-height: 1.6;
    color: var(--fr-on-dark);
    text-wrap: pretty;
}

.fr-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (max-width: 479px) {
    .fr-hero__actions .fr-btn { width: 100%; }
}

.fr-hero__fine {
    margin-top: 0.875rem;
    font-size: 0.875rem;
    color: var(--fr-on-dark-soft);
}

.fr-hero__proof {
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fr-on-dark);
}

.fr-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    margin-top: 1.75rem;
    font-size: 0.9rem;
    color: var(--fr-on-dark);
}

.fr-signals li { display: inline-flex; align-items: center; gap: 0.45rem; }
.fr-signals .fr-icon { color: var(--fr-gold); font-size: 1.15rem; }

/* ---------- Hero example conversation (glass card) ---------- */

.fr-demo {
    position: relative;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--fr-radius-lg);
    background: rgba(24, 34, 66, 0.8);
    /* A translucent surface without an expensive moving backdrop filter. */
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) { .fr-demo { padding: 1.25rem; } }

.fr-demo__caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fr-on-dark-soft);
}

.fr-demo__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--fr-gold);
    box-shadow: 0 0 0 4px rgba(252, 211, 77, 0.18);
}

.fr-demo__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0 -1rem 1rem;
    padding: 0.2rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.fr-demo__tabs::-webkit-scrollbar { display: none; }

@media (min-width: 640px) {
    .fr-demo__tabs { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
}

.fr-demo__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    min-height: 2.75rem;
    padding: 0.65rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: .55rem;
    background: transparent;
    color: var(--fr-on-dark);
    font: 600 0.875rem/1.2 var(--fr-sans);
    cursor: pointer;
    scroll-snap-align: start;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fr-demo__tab:hover { background: rgba(255, 255, 255, 0.1); }
.fr-demo__tab .fr-icon { font-size: 1.05rem; color: var(--fr-gold); }

.fr-demo__tab[aria-selected="true"] {
    background: #fff;
    border-color: #fff;
    color: var(--fr-night);
}

.fr-demo__tab[aria-selected="true"] .fr-icon { color: var(--fr-wisdom); }

.fr-demo__stage { display: grid; }

.fr-demo__panel {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-radius: 1rem;
}

/* Hidden panels keep their height in the shared cell so switching never shifts layout. */
.fr-demo__panel[hidden] { display: flex; visibility: hidden; }


@keyframes fr-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.fr-bubble { max-width: 100%; padding: 1rem 1.1rem; }
.fr-bubble p { font-size: 0.975rem; line-height: 1.6; }

.fr-bubble__who {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.fr-bubble--you {
    align-self: flex-end;
    border-radius: .8rem .8rem .25rem .8rem;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.fr-bubble--you .fr-bubble__who { color: var(--fr-on-dark-soft); }

.fr-bubble--guide {
    align-self: flex-start;
    border-radius: .8rem .8rem .8rem .25rem;
    background: var(--fr-paper);
    color: var(--fr-ink);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}

.fr-bubble--guide .fr-bubble__who { color: var(--fr-wisdom); }

.fr-verses {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    margin-top: 0.8rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--fr-line);
}

.fr-verses__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fr-ink-soft);
}

.fr-verses ul { display: contents; }

.fr-verses li {
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(180, 83, 9, 0.22);
    border-radius: 999px;
    background: var(--fr-wisdom-bg);
    color: var(--fr-wisdom);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Refinement: full Latin coverage, page-local chrome, and an unhurried demo. */
@font-face {
    font-family: 'First Light Display';
    src: url("../fonts/PlayfairDisplay-SemiBold.faa6a72b4161.woff2") format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
.first-light-refined-page { min-height: 100vh; display: flex; flex-direction: column; }
.first-light-refined-page > main { flex-grow: 1; }
/* The shared site header is left exactly as on every other page: its secondary row
   carries the tagline and, for signed-in readers, the credits readout. */
.fr *, .fr *::before, .fr *::after { box-sizing: border-box; }
.fr [hidden]:not(.fr-demo__panel) { display: none !important; }
.fr :is(section, figure) { scroll-margin-top: 78px; }
.fr .fr-demo__tab { box-shadow: none; margin: 0; white-space: normal; }
.fr-demo__tab:hover { transform: none; }
.fr-demo__tab[aria-selected="true"] { background: var(--fr-paper); }
.fr-demo__caption { font-size: .75rem; letter-spacing: .08em; line-height: 1.65; }
.fr-demo__reflection { border-left: 2px solid var(--fr-ember); margin-top: 1rem; padding-left: .8rem; }
.fr-demo__reflection > span { color: var(--fr-wisdom); font-size: .75rem; font-weight: 650; }
.fr-demo__reflection p { margin-top: .25rem; font-size: .85rem; color: var(--fr-ink-soft); }
.fr-demo__footer { padding: 1rem .2rem 0; }
.fr-demo__footer p { color: var(--fr-on-dark-soft); font-size: .8125rem; }
.fr-demo__footer .fr-link { font-size: .85rem; min-height: 44px; }
.fr-hero__lede { font-size: clamp(1rem, 1.4vw, 1.125rem); line-height: 1.8; max-width: 30rem; }
/* The eyebrow now lives inside the H1; reset the heading's display type for it. */
.fr .fr-h1-kicker { display: flex; max-width: 27rem; margin-bottom: 1.1rem; font-family: var(--fr-sans); font-size: .75rem; line-height: 1.5; letter-spacing: .16em; }
.fr-demo__ask { margin-top: .75rem; min-height: 44px; font-size: .9375rem; }
.fr-signals { gap: .6rem 1.2rem; font-size: .8rem; }
.fr .fr-btn--ghost { padding-inline: 0; border-color: transparent; background: none; box-shadow: none; }
.fr .fr-btn--ghost:hover { text-decoration: underline; text-underline-offset: 6px; }
.fr-wayfinding { position: sticky; top: 0; z-index: 35; background: var(--fr-paper); border-bottom: 1px solid var(--fr-line); }
.fr-wayfinding .fr-wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.fr-wayfinding a { display: flex; align-items: center; justify-content: center; padding-block: 1rem; min-height: 54px; font-size: .8125rem; font-weight: 600; color: var(--fr-ink-soft); text-align: center; }
.fr-wayfinding a:hover { color: var(--fr-navy); background: var(--fr-navy-subtle); }
@media (min-width: 800px) {
    .fr-wayfinding .fr-wrap { display: flex; justify-content: center; gap: 3rem; }
    .fr-wayfinding a { padding-inline: 1rem; font-size: .85rem; }
}
@media (max-width: 479px) {
    .fr-hero__actions { gap: .2rem; }
    .fr-hero__actions .fr-btn--ghost { width: auto; }
    .fr-hero__title { font-size: clamp(2.35rem, 10vw, 3.1rem); line-height: 1.09; }
    .fr-demo { padding: 1rem; }
    .fr-demo__tab { font-size: .8rem; }
}

.first-light-refined-page.fr-no-free .site-header-mobile-ai-cta { display: none; }
.fr-chip--static:hover { transform: none; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.24); }
