/* Florenda landing + FlorendaID sign-in. Colours and buttons come from brand/fds.css. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
html { --ld-page: var(--fd-bg); }
body { margin: 0; background: var(--fd-bg); color: var(--fd-text); font: 16px/1.6 var(--fd-font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }
.ld-wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right)); }
a.skip-to-auth { position: absolute; left: -999px; top: 10px; z-index: 60; }
a.skip-to-auth:focus { left: 16px; }

/* header */
.ld-top { position: sticky; top: 0; z-index: 30; background: var(--fd-header); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--fd-line); }
.ld-top-in { display: flex; align-items: center; gap: 8px; min-height: 66px; }
.ld-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.ld-brand svg { width: 30px; height: 30px; color: var(--fd-text); }
.ld-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.ld-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: var(--fd-r-sm); color: var(--fd-text-2); font-size: 15px; font-weight: 500; transition: color .16s ease, background-color .16s ease; }
.ld-link:hover { color: var(--fd-text); background: var(--fd-hover); }
.ld-theme { margin: 0 6px; }

/* hero */
.ld-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; z-index: -1; background: linear-gradient(to bottom, transparent, var(--ld-page)); pointer-events: none; }
.ld-hero-in { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 420px); gap: clamp(32px, 6vw, 88px); align-items: center; min-height: calc(100vh - 67px); padding-top: 48px; padding-bottom: 72px; }
.ld-kicker { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 20px; color: var(--fd-accent-ink); font: 500 14px/1.4 var(--fd-mono); letter-spacing: .01em; }
.ld-kicker::after { content: ""; width: 8px; height: 16px; margin-left: 5px; background: var(--fd-accent-ink); animation: ld-blink 1.15s steps(2, jump-none) infinite; }
@keyframes ld-blink { from { opacity: 1; } to { opacity: 0; } }
.ld-hero h1 { font-size: clamp(34px, 4.8vw, 60px); line-height: 1.06; letter-spacing: -.04em; font-weight: 720; text-wrap: balance; }
.ld-hero h1 em { font-style: normal; color: var(--fd-accent-ink); }
.ld-lead { max-width: 54ch; margin-top: 22px; color: var(--fd-text-2); font-size: clamp(17px, 1.6vw, 19.5px); line-height: 1.55; text-wrap: pretty; }
.ld-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ld-note { margin-top: 16px; color: var(--fd-muted); font-size: 14px; }

/* staged entrance: transform and opacity only */
@keyframes ld-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ld-rise { animation: ld-rise .62s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }

/* sign-in card */
.ld-auth { position: relative; min-width: 0; }
.ld-orbit { position: absolute; left: 50%; top: 50%; width: 700px; height: 700px; margin: -350px 0 0 -350px; z-index: -1; color: var(--fd-line-2); pointer-events: none; animation: ld-spin 140s linear infinite; }
@keyframes ld-spin { to { transform: rotate(360deg); } }
.login-box { position: relative; width: 100%; padding: 28px; border: 1px solid var(--fd-line); border-radius: var(--fd-r-lg); background: var(--fd-surface); box-shadow: var(--fd-shadow); scroll-margin-top: 90px; }
.ld-auth-head { margin-bottom: 18px; }
.ld-auth-head h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.02em; font-weight: 680; }
.ld-auth-head p { margin-top: 6px; color: var(--fd-muted); font-size: 14px; line-height: 1.45; }
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-bottom: 18px; padding: 3px; border-radius: 12px; background: var(--fd-bg-2); border: 1px solid var(--fd-line); }
.auth-tab { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--fd-text-2); font: 600 14.5px var(--fd-font); cursor: pointer; transition: color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.auth-tab:hover { color: var(--fd-text); }
.auth-tab.active { background: var(--fd-raised); color: var(--fd-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18), inset 0 0 0 1px var(--fd-line); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: ld-rise .28s ease both; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--fd-text-2); font-size: 13.5px; font-weight: 550; }
.login-form input:not([type="checkbox"]):not([type="hidden"]) { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--fd-line-2); border-radius: var(--fd-r-sm); background: var(--fd-raised); color: var(--fd-text); font: 16px var(--fd-font); transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.login-form input::placeholder { color: var(--fd-muted); opacity: 1; }
.login-form input:hover { border-color: var(--fd-muted); }
.login-form input:focus { outline: none; border-color: var(--fd-accent); box-shadow: 0 0 0 3px var(--fd-accent-soft); }
.login-form input:-webkit-autofill { -webkit-text-fill-color: var(--fd-text); -webkit-box-shadow: 0 0 0 40px var(--fd-raised) inset; caret-color: var(--fd-text); }
.password-field { position: relative; }
.password-field input { padding-right: 50px !important; }
.password-toggle { position: absolute; right: 3px; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 8px; background: transparent; color: var(--fd-muted); cursor: pointer; transition: color .16s ease, background-color .16s ease; }
.password-toggle:hover { color: var(--fd-text); background: var(--fd-hover); }
.password-toggle svg { width: 19px; height: 19px; }
.password-toggle .icon-eye-off, .password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }
.form-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-bottom: 16px; font-size: 14px; }
.remember-me { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--fd-text-2); cursor: pointer; }
.remember-me input { width: 18px; height: 18px; margin: 0; accent-color: var(--fd-accent); }
.forgot-password, .switch-link { min-height: 36px; padding: 0; border: 0; background: none; color: var(--fd-accent-ink); font: 600 14px var(--fd-font); cursor: pointer; }
.forgot-password:hover, .switch-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-alt { margin-top: 14px; color: var(--fd-muted); font-size: 14px; text-align: center; }
.message { margin-bottom: 14px; padding: 10px 13px; border: 1px solid var(--fd-line-2); border-radius: var(--fd-r-sm); background: var(--fd-raised); color: var(--fd-text-2); font-size: 14px; line-height: 1.45; }
.message.error { border-color: color-mix(in srgb, var(--fd-danger) 45%, transparent); background: color-mix(in srgb, var(--fd-danger) 10%, transparent); color: var(--fd-danger); }
.message.success { border-color: color-mix(in srgb, var(--fd-ok) 45%, transparent); background: color-mix(in srgb, var(--fd-ok) 10%, transparent); color: var(--fd-ok); }
.ld-fid { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--fd-line); color: var(--fd-muted); font-size: 13px; line-height: 1.4; }
.ld-fid .fd-id { width: 20px; height: 20px; font-size: 9.5px; border-radius: 6px; }

/* "Try again" link that AuthController inserts after a failed service redirect */
a.login-btn { min-height: 46px; margin-bottom: 4px; border-radius: var(--fd-r-sm); background: var(--fd-accent); color: var(--fd-on-accent); font-weight: 600; }

/* sections */
.ld-sec { padding-top: clamp(56px, 8vw, 104px); }
.ld-head { max-width: 680px; margin-bottom: 34px; }
.ld-head h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; }
.ld-head p { margin-top: 12px; color: var(--fd-text-2); font-size: 17px; }
.ld-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ld-card { position: relative; overflow: hidden; padding: 24px; border: 1px solid var(--fd-line); border-radius: var(--fd-r-lg); background: var(--fd-surface); transition: border-color .2s ease, transform .2s ease; }
.ld-card::before { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--fd-accent-soft), transparent 70%); transition: opacity .25s ease; }
.ld-card:hover { border-color: var(--fd-line-2); transform: translateY(-2px); }
.ld-card:hover::before { opacity: 1; }
.ld-card > * { position: relative; }
.ld-ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border: 1px solid var(--fd-line); border-radius: 12px; background: var(--fd-raised); color: var(--fd-text); }
.ld-ico svg { width: 22px; height: 22px; }
.ld-card h3 { margin-bottom: 7px; font-size: 18px; letter-spacing: -.01em; font-weight: 650; }
.ld-card p { color: var(--fd-text-2); font-size: 15px; line-height: 1.5; }

.ld-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(26px, 4vw, 48px); border: 1px solid var(--fd-line); border-radius: 26px; background: var(--fd-surface); box-shadow: var(--fd-shadow); }
.ld-band h2 { font-size: clamp(27px, 3.3vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; }
.ld-band p { margin-top: 13px; color: var(--fd-text-2); font-size: 16.5px; text-wrap: pretty; }
.ld-price { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; color: var(--fd-muted); font-size: 15px; }
.ld-price b { color: var(--fd-text); font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ld-band .ld-actions { margin-top: 22px; }
.ld-live { padding: 22px; border: 1px solid var(--fd-line); border-radius: var(--fd-r); background: var(--fd-bg-2); }
.ld-live-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ld-live-label { color: var(--fd-muted); font: 500 12.5px var(--fd-mono); }
.ld-live-state { display: inline-flex; align-items: center; gap: 8px; color: var(--fd-muted); font-size: 13.5px; font-weight: 600; }
.ld-live-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ld-live[data-online="1"] .ld-live-state { color: var(--fd-ok); }
.ld-live[data-online="1"] .ld-live-state::before { animation: ld-pulse 2.2s ease-out infinite; }
@keyframes ld-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fd-ok) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.ld-live-name { margin-top: 12px; font-size: 26px; line-height: 1.15; font-weight: 680; letter-spacing: -.02em; }
.ld-live-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.ld-live-stat { padding: 12px 14px; border: 1px solid var(--fd-line); border-radius: var(--fd-r-sm); background: var(--fd-surface); min-width: 0; }
.ld-live-stat small { display: block; color: var(--fd-muted); font-size: 12.5px; }
.ld-live-stat b { display: block; margin-top: 2px; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ld-live-addr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ld-live-addr code { font: 600 15px var(--fd-mono); overflow-wrap: anywhere; }
.ld-term { margin: 0; padding: 18px; overflow: hidden; border: 1px solid var(--fd-line); border-radius: var(--fd-r); background: var(--fd-bg-2); color: var(--fd-text-2); font: 13.5px/1.75 var(--fd-mono); white-space: pre-wrap; }
.ld-term i { font-style: normal; color: var(--fd-accent-ink); }
.ld-term b { font-weight: 500; color: var(--fd-ok); }
.ld-term u { text-decoration: none; color: var(--fd-text); }
.ld-app { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 26px clamp(22px, 4vw, 36px); border: 1px solid var(--fd-line); border-radius: var(--fd-r-lg); }
.ld-app h2 { font-size: 22px; letter-spacing: -.02em; font-weight: 660; }
.ld-app p { margin-top: 3px; color: var(--fd-muted); font-size: 15px; }

.ld-about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.ld-about-text h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
.ld-about-text p { margin-top: 14px; color: var(--fd-text-2); font-size: 17px; text-wrap: pretty; }
.ld-links { display: grid; gap: 10px; }
.ld-links a { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--fd-line); border-radius: var(--fd-r); background: var(--fd-surface); transition: border-color .16s ease, background .16s ease; }
.ld-links a:hover { border-color: var(--fd-line-2); background: var(--fd-raised); }
.ld-links b { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.ld-links span { color: var(--fd-muted); font-size: 14.5px; }
.ld-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ld-faq-item { padding: 22px 24px; border: 1px solid var(--fd-line); border-radius: var(--fd-r); background: var(--fd-surface); }
.ld-faq-item h3 { margin-bottom: 8px; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; font-weight: 650; }
.ld-faq-item p { color: var(--fd-text-2); font-size: 15.5px; text-wrap: pretty; }
.ld-faq-item a { color: var(--fd-accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.ld-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin-top: clamp(56px, 8vw, 96px); padding: 26px 0 34px; border-top: 1px solid var(--fd-line); color: var(--fd-muted); font-size: 14px; }
.ld-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ld-foot a { display: inline-flex; align-items: center; min-height: 32px; transition: color .16s ease; }
.ld-foot a:hover { color: var(--fd-text); }

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

@media (max-width: 1040px) {
    .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .ld-hero-in { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 44px; padding-bottom: 40px; gap: 40px; }
    .ld-orbit { display: none; }
    .ld-auth { width: min(480px, 100%); margin: 0 auto; }
    .ld-band { grid-template-columns: minmax(0, 1fr); }
    .ld-about, .ld-faq { grid-template-columns: minmax(0, 1fr); }
    /* came to sign in (service redirect, form error): the form goes first */
    .landing-auth-open .ld-auth { order: -1; }
}
@media (max-width: 640px) {
    .ld-link { display: none; }
    .ld-grid { grid-template-columns: minmax(0, 1fr); }
    .ld-actions .fd-btn { flex: 1 1 100%; }
    .login-box { padding: 22px 18px; }
    .ld-term { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ld-rise, .ld-orbit, .auth-form.active, .ld-kicker::after, .ld-live-state::before { animation: none !important; }
    .ld-card, .ld-card:hover { transition: none; transform: none; }
}
