/*
  Public marketing pages (Pages/Public/*) rendered under PublicLayout.
  Styling rides MudBlazor palette variables so it tracks the active brand theme
  and dark mode automatically — no per-brand CSS. Loaded globally from App.razor;
  every class is namespaced `marketing-`/`public-` so it can't bleed into the portal.
*/

.public-appbar {
    background: var(--mud-palette-appbar-background);
    backdrop-filter: saturate(1.1) blur(2px);
}

.public-nav-link {
    color: var(--mud-palette-appbar-text);
    font-weight: 600;
    font-size: .95rem;
    opacity: .85;
    transition: opacity .15s ease;
}

.public-nav-link:hover {
    opacity: 1;
}

/* Sticky footer. MudBlazor's .mud-layout is `position:relative; height:100%`
   (not a flex container), and that 100% only resolves if every ancestor is
   height:100% — which it isn't, so the layout collapses to its content height
   and a short page leaves the footer floating mid-screen with empty space below.
   Pin the layout to at least the viewport height (vh is viewport-relative, so it
   doesn't depend on the ancestor chain) and lay it out as a flex column, so the
   content area fills the screen and the footer sits at the bottom on any short
   public page (coming-soon, legal pages, the maintenance notice). */
.public-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.public-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.public-main > main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* ── Hero ─────────────────────────────────────────────────────── */
/* Always a dark, brand-tinted band so the white headline/lede stay readable in
   both light and dark mode. Built from the (dark in both modes) appbar colour
   blended toward the brand primary — NOT the secondary, which is a light cream
   on these brands and washed the centre out. Solid fallback first for browsers
   without color-mix(). */
.marketing-hero {
    position: relative;
    overflow: hidden;
    color: #f5f5ee;
    background: var(--mud-palette-appbar-background);
    background:
        radial-gradient(1100px 460px at 82% -12%,
            rgba(var(--mud-palette-primary-rgb), .30), transparent 60%),
        linear-gradient(155deg,
            var(--mud-palette-appbar-background) 0%,
            color-mix(in srgb, var(--mud-palette-appbar-background) 72%, var(--mud-palette-primary)) 100%);
    padding: clamp(64px, 10vw, 120px) 0 clamp(72px, 11vw, 132px);
}

.marketing-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.marketing-hero-shapes span {
    position: absolute;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    opacity: .18;
    filter: blur(8px);
}

.marketing-hero-shapes span:nth-child(1) { width: 320px; height: 320px; top: -80px; right: -60px; }
.marketing-hero-shapes span:nth-child(2) { width: 200px; height: 200px; bottom: -70px; left: 8%; opacity: .12; }
.marketing-hero-shapes span:nth-child(3) { width: 140px; height: 140px; top: 30%; right: 22%; opacity: .10; }

.marketing-eyebrow {
    color: var(--mud-palette-primary);
    filter: brightness(1.4);
    letter-spacing: .14em;
    font-weight: 700;
}

.marketing-hero-title {
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.01em;
    margin: .35em 0 .4em;
}

.marketing-hero-lede {
    color: rgba(245, 245, 238, .86);
    max-width: 62ch;
    font-weight: 400;
}

.marketing-btn-ghost {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}
.marketing-btn-ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
}

/* ── Coming soon placeholder ──────────────────────────────────── */
/* The hero is the whole page while the public site is a placeholder, so it grows
   to fill the body area between the app bar and footer, with its content centred. */
.marketing-comingsoon {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}
.marketing-comingsoon .marketing-hero {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
}

/* ── Sections ─────────────────────────────────────────────────── */
.marketing-section { padding: clamp(48px, 7vw, 88px) 0; }
.marketing-page-head { padding: clamp(48px, 7vw, 80px) 0 8px; }
.marketing-lede { color: var(--mud-palette-text-secondary); max-width: 64ch; }

/* ── Highlight cards ──────────────────────────────────────────── */
.marketing-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.marketing-card {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    padding: 26px;
    transition: transform .12s ease, box-shadow .12s ease;
}
.marketing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.marketing-card-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), .12);
    margin-bottom: 14px;
}

.marketing-card-title { margin-bottom: 6px; }
.marketing-card-summary { color: var(--mud-palette-text-secondary); }

/* ── Feature list ─────────────────────────────────────────────── */
.marketing-feature {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 16px;
    padding: 32px;
}

.marketing-feature-head { display: flex; gap: 18px; align-items: flex-start; }
.marketing-feature-summary { color: var(--mud-palette-text-secondary); margin-top: 4px; }

.marketing-ticks {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px 28px;
}
.marketing-ticks li { display: flex; gap: 10px; align-items: flex-start; }

/* ── CTA band ─────────────────────────────────────────────────── */
.marketing-cta-band {
    background: var(--mud-palette-appbar-background);
    color: #f0f0e6;
    padding: clamp(40px, 6vw, 64px) 0;
}
.marketing-cta-inner {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.marketing-cta-title { color: #fff; margin-bottom: .2em; }
.marketing-cta-body { color: rgba(240, 240, 230, .82); margin: 0; max-width: 52ch; }

/* ── Prose (About) ────────────────────────────────────────────── */
.marketing-prose { color: var(--mud-palette-text-primary); }

/* ── Footer (Hie house style) ─────────────────────────────────── */
/* Deliberately dark in both light and dark mode (like the Hie public footer). */
.marketing-footer {
    position: relative;
    background: var(--mud-palette-dark, #0f131b);
    color: rgba(255, 255, 255, .72);
    padding: 56px 0 28px;
}
/* Flex row (not grid auto-fit, which collapsed to a single column here): the
   brand block sits wide on the left, the link/contact columns line up to its
   right, and everything wraps on narrow screens. */
.marketing-footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 56px;
}
.marketing-footer-brand { flex: 1 1 320px; min-width: 240px; }
.marketing-footer-col { flex: 0 1 auto; min-width: 150px; }
.marketing-footer-contact { min-width: 200px; }
.marketing-footer-tag { color: rgba(255, 255, 255, .55); max-width: 42ch; }
.marketing-footer-social { display: flex; gap: 4px; margin-left: -8px; }
.marketing-footer-social .mud-icon-button { color: rgba(255, 255, 255, .75); }
.marketing-footer-social .mud-icon-button:hover { color: #fff; }
.marketing-footer-heading {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    color: rgba(255, 255, 255, .9);
    margin-bottom: 12px;
}
.marketing-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.marketing-footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.marketing-footer-contact .mud-icon-root { opacity: .6; margin-top: 2px; flex: 0 0 auto; }

/* Bottom bar: copyright + version left, legal links right. */
.marketing-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.marketing-footer-legal { color: rgba(255, 255, 255, .5); }
.marketing-footer-version { color: rgba(255, 255, 255, .3); margin-left: 8px; }
.marketing-footer-legal-links { display: flex; gap: 20px; }
.marketing-footer-legal-links a { color: rgba(255, 255, 255, .6); font-size: .8rem; }

/* Thin brand accent strip along the very bottom (the Hie green/brand pop). */
.marketing-footer-accent {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--mud-palette-primary);
}

/* Gradient hero title (falls back to the solid colour set above). */
.marketing-hero-title {
    background: linear-gradient(92deg, #ffffff 0%, rgba(255, 255, 255, .72) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Alternating section background. */
.marketing-section-alt { background: var(--mud-palette-background-gray, rgba(0, 0, 0, .025)); }

/* ── Stat strip ───────────────────────────────────────────────── */
.marketing-stats-band {
    border-top: 1px solid var(--mud-palette-lines-default);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
}
.marketing-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    padding: 36px 0;
}
.marketing-stat { text-align: center; padding: 8px 12px; }
.marketing-stat-value {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--mud-palette-primary);
}
.marketing-stat-label {
    margin-top: 6px;
    color: var(--mud-palette-text-secondary);
    font-size: .95rem;
}

/* ── FAQ ──────────────────────────────────────────────────────── */
.marketing-faq {
    background: transparent;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    overflow: hidden;
}

/* ── Cookie consent banner ────────────────────────────────────── */
.cookie-consent {
    position: fixed;
    bottom: 16px; left: 16px; right: 16px;
    z-index: 1400;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.cookie-consent-text { margin: 0; flex: 1 1 320px; }
.cookie-consent-actions { display: flex; gap: 8px; }

/* Honeypot field — present in the DOM for bots, off-screen for people. */
.hp-field {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* 768 = LayoutBreakpoints.CondensedTable — nearest tier; adopting it beats an allowlist
   entry (#1030). Pinned against LayoutBreakpointStaticAnalysisTests. */
@media (max-width: 767.98px) {
    .marketing-feature-head { flex-direction: column; gap: 12px; }
}
