/* ============================================================
   landing-6 · "The page keeps your hours"
   The whole page is lit by the visitor's actual local time.
   Six light states set every colour on the page via custom
   properties. Things grow where you touch. 51% said once.
   ============================================================ */

/* ---------- reset-ish ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.02rem;
    line-height: 1.65;
    background: var(--bg);
    color: var(--ink);
    transition: background-color 1.4s ease, color 1.4s ease;
    overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }

/* ---------- the six lights ----------
   Each daypart is a complete palette. The inline head script
   sets data-daypart before first paint; JS re-checks hourly. */

:root {
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --firefly: none;
    --photo-filter: none;
    --tint-blend: soft-light;
}

html[data-daypart="dawn"] {
    --photo-filter: brightness(0.88) saturate(0.8) sepia(0.28);
    --tint: rgba(250, 170, 130, 0.18);
    --tint-blend: normal;
    --bg: #f6efe3;
    --bg-2: #efe5d3;
    --ink: #2b2f20;
    --ink-soft: #565d47;
    --accent: #8a4a22;
    --line: #d9cdb6;
    --pill-bg: rgba(253, 250, 242, 0.95);
    --pill-ink: #2b2f20;
    --btn-bg: #2b2f20;
    --btn-ink: #f6f2e4;
    --sprout-stem: #4d6b43;
    --sprout-leaf: #6e8a55;
    --theme: #f6efe3;
}

html[data-daypart="morning"] {
    --photo-filter: brightness(0.98);
    --bg: #f2f5ea;
    --bg-2: #e8eedb;
    --ink: #1e2a1c;
    --ink-soft: #4c5a48;
    --accent: #2f6b3a;
    --line: #d2dcc4;
    --tint: rgba(214, 236, 190, 0.22);
    --pill-bg: rgba(252, 253, 248, 0.95);
    --pill-ink: #1e2a1c;
    --btn-bg: #1e2a1c;
    --btn-ink: #f2f5ea;
    --sprout-stem: #39714a;
    --sprout-leaf: #55915f;
    --theme: #f2f5ea;
}

html[data-daypart="midday"] {
    --photo-filter: brightness(1.02);
    --bg: #f7f8f2;
    --bg-2: #edf0e3;
    --ink: #182417;
    --ink-soft: #47533f;
    --accent: #256b45;
    --line: #d7ddcb;
    --tint: rgba(255, 252, 214, 0.16);
    --pill-bg: rgba(253, 254, 250, 0.95);
    --pill-ink: #182417;
    --btn-bg: #182417;
    --btn-ink: #f7f8f2;
    --sprout-stem: #2f7a4c;
    --sprout-leaf: #4f9a62;
    --theme: #f7f8f2;
}

html[data-daypart="golden"] {
    --photo-filter: brightness(0.95) sepia(0.32) saturate(1.45) contrast(1.02);
    --tint: rgba(255, 156, 66, 0.2);
    --tint-blend: normal;
    --bg: #f7f1e2;
    --bg-2: #f0e6cd;
    --ink: #2b2312;
    --ink-soft: #5c5138;
    --accent: #8f5716;
    --line: #e0d3b3;
    --pill-bg: rgba(254, 250, 240, 0.95);
    --pill-ink: #2b2312;
    --btn-bg: #2b2312;
    --btn-ink: #f7f1e2;
    --sprout-stem: #6c7a3a;
    --sprout-leaf: #8b8f4a;
    --theme: #f7f1e2;
}

html[data-daypart="dusk"] {
    --photo-filter: brightness(0.5) saturate(0.6) hue-rotate(-12deg);
    --tint: rgba(96, 58, 110, 0.4);
    --tint-blend: normal;
    --bg: #221d27;
    --bg-2: #2b2531;
    --ink: #f1ebe1;
    --ink-soft: #beb4ae;
    --accent: #e0a86e;
    --line: #3c3443;
    --pill-bg: rgba(248, 244, 236, 0.96);
    --pill-ink: #262130;
    --btn-bg: #262130;
    --btn-ink: #f1ebe1;
    --sprout-stem: #8ba07a;
    --sprout-leaf: #a4b489;
    --firefly: block;
    --theme: #221d27;
}

html[data-daypart="night"] {
    --photo-filter: brightness(0.48) saturate(0.5) hue-rotate(30deg) contrast(1.05);
    --tint: rgba(14, 28, 48, 0.32);
    --tint-blend: normal;
    --bg: #0c1410;
    --bg-2: #131e17;
    --ink: #e8e6d6;
    --ink-soft: #a7b1a0;
    --accent: #a9d3b4;
    --line: #24322a;
    --pill-bg: rgba(240, 242, 232, 0.95);
    --pill-ink: #14201a;
    --btn-bg: #14201a;
    --btn-ink: #e8e6d6;
    --sprout-stem: #7fae8c;
    --sprout-leaf: #98c2a0;
    --firefly: block;
    --theme: #0c1410;
}

/* ---------- utilities ---------- */

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

.skip-link {
    position: absolute;
    left: 1rem; top: -3rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--btn-bg);
    color: var(--btn-ink);
    border-radius: 0.4rem;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

.container {
    width: min(100% - 3rem, 42rem);
    margin-inline: auto;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Film grain, very quiet. */
.grain {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 240px 240px;
}

/* ---------- type ---------- */

h1, h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-variation-settings: "opsz" 110, "SOFT" 70;
    line-height: 1.06;
    letter-spacing: -0.01em;
    margin: 0 0 1.1rem;
}

h1 {
    font-size: clamp(2.3rem, 8.6vw, 5rem);
    font-weight: 370;
}

h1 em {
    font-style: italic;
    font-variation-settings: "opsz" 110, "SOFT" 100, "WONK" 1;
}

h2 { font-size: clamp(1.75rem, 5.6vw, 3rem); }

p { margin: 0 0 1.2rem; }

.eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1.4rem;
    transition: color 1.4s ease;
}

section p:not(.eyebrow) { color: var(--ink-soft); transition: color 1.4s ease; }

a { color: var(--accent); }

/* ---------- arrival: things grow in ---------- */

[data-grow] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
[data-grow].is-grown { opacity: 1; transform: none; }

/* ---------- hero ---------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #10190f; /* paints instantly while the photo loads */
    color: #f5f3e8;
}

.hero-photo {
    filter: var(--photo-filter);
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.6s ease, filter 1.4s ease;
}
.hero-photo.is-loaded { opacity: 1; }

/* The canopy breathes: light moving through leaves. */
@media (prefers-reduced-motion: no-preference) {
    .hero-photo.is-loaded { animation: breathe 16s ease-in-out infinite alternate; }
}
@keyframes breathe {
    from { transform: scale(1); }
    to   { transform: scale(1.05); }
}

.hero-tint {
    position: absolute;
    inset: 0;
    background: var(--tint);
    mix-blend-mode: var(--tint-blend);
    transition: background 1.4s ease;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8, 16, 11, 0.42) 0%,
        rgba(8, 16, 11, 0.08) 28%,
        rgba(8, 16, 11, 0.3) 50%,
        rgba(8, 16, 11, 0.62) 66%,
        rgba(8, 16, 11, 0.82) 86%,
        rgba(8, 16, 11, 0.9) 100%
    );
}

.topbar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
}

.wordmark {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.3rem;
    color: #f5f3e8;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.wordmark-dot { color: #a9d3a0; }

.login-link {
    color: #f5f3e8;
    text-decoration: none;
    font-size: 0.92rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(245, 243, 232, 0.4);
    border-radius: 999px;
}
.login-link:hover { border-color: rgba(245, 243, 232, 0.85); }

.hero-content {
    position: relative;
    z-index: 3;
    width: min(100% - 2.75rem, 46rem);
    margin-inline: auto;
    padding-bottom: clamp(2.5rem, 7vh, 4.5rem);
}

.greeting {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.02rem;
    color: rgba(245, 243, 232, 0.88);
    margin-bottom: 1.1rem;
}

.hero h1 {
    color: #f8f6ec;
    text-wrap: balance;
    margin-bottom: 1rem;
}

.hero-sub {
    color: rgba(245, 243, 232, 0.85);
    max-width: 34rem;
    margin-bottom: 1.8rem;
}

.touch-hint {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.9rem;
    color: rgba(245, 243, 232, 0.62);
    margin: 1.4rem 0 0;
}

/* ---------- claim pill ---------- */

.claim { margin: 0; }

.claim-pill {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 30rem;
    padding: 0.3rem 0.3rem 0.3rem 1rem;
    background: var(--pill-bg);
    border-radius: 999px;
    box-shadow: 0 18px 50px -18px rgba(5, 15, 9, 0.55);
}

.claim-prefix {
    color: #5f6a58;
    font-size: 0.94rem;
    white-space: nowrap;
}

.claim-pill input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--pill-ink);
    padding: 0.55rem 0.25rem 0.55rem 0;
}
.claim-pill input::placeholder { color: #9aa392; }
.claim-pill input:focus { outline: none; }
.claim-pill:focus-within {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.claim-pill button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    min-height: 44px;
    padding: 0 1.2rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--btn-bg);
    color: var(--btn-ink);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 1.4s ease;
}
.claim-pill button:hover { transform: scale(1.03); }
.claim-pill button:active { transform: scale(0.98); }

/* ---------- fireflies (dusk + night only) ---------- */

.fireflies { position: absolute; inset: 0; z-index: 2; display: var(--firefly); }

.firefly {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffe9a0;
    box-shadow: 0 0 10px 3px rgba(255, 233, 160, 0.5);
    opacity: 0;
    animation:
        drift var(--dur) ease-in-out var(--delay) infinite alternate,
        blink calc(var(--dur) / 2) ease-in-out var(--delay) infinite;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(var(--dx), var(--dy)); }
}
@keyframes blink {
    0%, 100% { opacity: 0; }
    45%      { opacity: 0.95; }
}

/* ---------- sections ---------- */

section { padding-block: clamp(4.5rem, 13vw, 8rem); }

/* --- the split --- */

.split { background: var(--bg); transition: background-color 1.4s ease; }

.split .big51 {
    font-family: var(--serif);
    font-weight: 600;
    font-variation-settings: "opsz" 144, "SOFT" 40;
    font-size: clamp(6.5rem, 36vw, 17rem);
    line-height: 0.9;
    margin: 0 0 1rem -0.04em;
    background-image: url("/fbl/images/unsplash/moss.jpg");
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
}
.split .big51 .pc { font-size: 0.42em; font-weight: 500; }

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .split .big51 { color: var(--accent); background-image: none; }
}

.split-bar { margin: 2rem 0 2.2rem; }

.bar-track {
    height: 14px;
    border-radius: 999px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: background-color 1.4s ease, border-color 1.4s ease;
}

.bar-living {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background-image: url("/fbl/images/unsplash/moss.jpg");
    background-size: 900px auto;
    background-position: center;
    transition: width 1.6s cubic-bezier(0.25, 0.7, 0.2, 1) 0.25s;
}
.split-bar.is-grown .bar-living { width: 51%; }

.bar-labels {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

/* --- divider branch --- */

.divider {
    display: flex;
    justify-content: center;
    padding-block: 0.5rem;
    background: var(--bg);
    transition: background-color 1.4s ease;
}

.divider .stem {
    stroke: var(--sprout-stem);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.divider .leaf {
    fill: var(--sprout-leaf);
    opacity: 0;
    transition: opacity 0.7s ease;
}
.divider.is-grown .stem { animation: draw-stem 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.divider.is-grown .l1 { opacity: 1; transition-delay: 0.55s; }
.divider.is-grown .l2 { opacity: 1; transition-delay: 0.85s; }
.divider.is-grown .l3 { opacity: 1; transition-delay: 1.15s; }

@keyframes draw-stem { to { stroke-dashoffset: 0; } }

/* --- product --- */

.product { background: var(--bg); transition: background-color 1.4s ease; }

.product-figure {
    margin: 2.5rem 0 0;
    border-radius: 1.1rem;
    overflow: hidden;
}
.product-figure img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

/* --- funds photo band --- */

.funds {
    position: relative;
    overflow: hidden;
    color: #f5f3e8;
}

.funds-photo, .closing-photo {
    filter: var(--photo-filter);
    transition: filter 1.4s ease;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.funds-scrim, .closing-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(7, 14, 10, 0.72), rgba(7, 14, 10, 0.55) 45%, rgba(7, 14, 10, 0.78));
}

.funds-content, .closing-content { position: relative; z-index: 2; }

.funds .eyebrow { color: #cfe4c2; }

.funds-list {
    list-style: none;
    margin: 0 0 1.8rem;
    padding: 0;
    font-family: var(--serif);
    font-size: clamp(1.6rem, 6.4vw, 3rem);
    font-variation-settings: "opsz" 90, "SOFT" 70;
    line-height: 1.28;
}

.funds-note {
    color: rgba(245, 243, 232, 0.78);
    font-size: 0.95rem;
    max-width: 30rem;
    margin: 0;
}

/* --- closing --- */

.closing {
    position: relative;
    overflow: hidden;
    color: #f5f3e8;
    text-align: left;
}

.closing h2 { color: #f8f6ec; max-width: 22ch; }

.closing-alt {
    margin: 1.4rem 0 0;
    font-size: 0.95rem;
    color: rgba(245, 243, 232, 0.8);
}
.closing-alt a { color: #dcebc9; }

/* ---------- footer ---------- */

.footer {
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding-block: 2.6rem 3.2rem;
    transition: background-color 1.4s ease, border-color 1.4s ease;
}

.footer-line {
    font-family: var(--serif);
    font-style: italic;
    margin-bottom: 0.9rem;
}

.footer-credits, .footer-meta {
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
}
.footer-meta a { color: var(--ink-soft); }

/* ---------- sprouts: things grow where you touch ---------- */

.sprout-layer {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    overflow: hidden;
}

.sprout {
    position: absolute;
    transform-origin: 50% 100%;
    opacity: 1;
    transition: opacity 1.6s ease;
}
.sprout.is-fading { opacity: 0; }

.sprout .s-stem {
    fill: none;
    stroke: var(--sprout-stem);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw-stem 1.1s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.sprout .s-leaf {
    fill: var(--sprout-leaf);
    transform: scale(0);
    animation: leaf-out 0.8s cubic-bezier(0.34, 1.45, 0.4, 1) forwards;
}

@keyframes leaf-out { to { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
    .sprout-layer .sprout { animation: sway 3.4s ease-in-out 1.2s infinite alternate; }
}
@keyframes sway {
    from { rotate: -1.6deg; }
    to   { rotate: 1.6deg; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    [data-grow] { opacity: 1; transform: none; transition: none; }
    .hero-photo, .hero-photo.is-loaded { animation: none; transition: none; opacity: 1; }
    .fireflies { display: none; }
    .divider .stem { animation: none; stroke-dashoffset: 0; }
    .divider .leaf { opacity: 1; transition: none; }
    .bar-living { transition: none; }
    .split-bar.is-grown .bar-living { width: 51%; }
    .sprout .s-stem { animation: none; stroke-dashoffset: 0; }
    .sprout .s-leaf { animation: none; transform: scale(1); }
}

/* ---------- wider screens: more air, same calm ---------- */

@media (min-width: 880px) {
    .container { width: min(100% - 5rem, 62rem); }

    .hero-content { padding-bottom: 6rem; }

    .split-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        gap: clamp(2rem, 6vw, 5rem);
        align-items: center;
    }
    .big51 { margin-bottom: 0; }
    .split-copy { max-width: 34rem; }

    .product-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: clamp(2.5rem, 6vw, 5rem);
        align-items: center;
    }
    .product-copy { max-width: 32rem; }
    .product-figure { margin-top: 0; }
    .product-figure img { aspect-ratio: 3 / 4; }

    .funds { padding-block: 10rem; }
    .closing { padding-block: 9rem; }
}
