/* Public marketing site (see MarketingLayout.razor and Components/Pages/Marketing).
   Follows the visitor's OS/browser colour scheme directly via prefers-color-scheme, deliberately
   ignoring data-bs-theme (which reflects the dashboard's own JS-driven, per-user/localStorage
   theme state - irrelevant and potentially misleading for an anonymous marketing-site visitor,
   see docs/site-restructure-plan.md). For the same reason nothing here uses Bootstrap's themed
   components (cards, buttons, form controls, accordions): every colour is one of the --mk-*
   variables below, so the pages stay correct whatever data-bs-theme is set to. Bootstrap's grid
   and spacing utilities are fine - they carry no colour. */
.marketing-shell {
    --mk-bg: #ffffff;
    --mk-surface: #f5f7f3;
    --mk-border: #e1e5de;
    --mk-text: #1f2a24;
    --mk-muted: #55615a;
    --mk-accent: #2f6f3e;
    --mk-accent-hover: #255a32;
    --mk-on-accent: #ffffff;
    --mk-accent-soft: #e4f0e6;
    --mk-danger: #b3261e;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--mk-bg);
    color: var(--mk-text);
    font-size: 1rem;
    line-height: 1.6;
    /* Bootstrap's wider row gutters reach past a section's padding on a phone. */
    overflow-x: clip;
}

@media (prefers-color-scheme: dark) {
    .marketing-shell {
        --mk-bg: #14181a;
        --mk-surface: #1c2224;
        --mk-border: #2e3639;
        --mk-text: #e2e7e4;
        --mk-muted: #9ca7a2;
        --mk-accent: #7fd68a;
        --mk-accent-hover: #9be3a4;
        --mk-on-accent: #10231a;
        --mk-accent-soft: #1d2f24;
        --mk-danger: #ff8a80;
    }
}

.marketing-shell h1,
.marketing-shell h2,
.marketing-shell h3,
.marketing-shell h4 {
    color: var(--mk-text);
    line-height: 1.25;
}

.marketing-shell a {
    color: var(--mk-accent);
}

/* Header and footer */
.marketing-header {
    border-bottom: 1px solid var(--mk-border);
}

.marketing-footer {
    border-top: 1px solid var(--mk-border);
    color: var(--mk-muted);
    font-size: 0.875rem;
}

.marketing-header__inner,
.marketing-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.marketing-header img {
    height: 32px;
}

.marketing-header .marketing-logo-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .marketing-header .marketing-logo-light {
        display: none;
    }

    .marketing-header .marketing-logo-dark {
        display: inline;
    }
}

.marketing-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

/* Plain links only: the "Get started" button in the nav keeps its own button colours. */
.marketing-shell .marketing-nav a:not(.mk-btn),
.marketing-shell .marketing-footer a {
    text-decoration: none;
    color: inherit;
}

.marketing-nav a {
    font-weight: 600;
}

.marketing-shell .marketing-nav a.active:not(.mk-btn),
.marketing-shell .marketing-nav a:not(.mk-btn):hover,
.marketing-shell .marketing-footer a:hover {
    color: var(--mk-accent);
}

.marketing-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.marketing-main {
    flex: 1;
}

/* Page furniture */
.mk-section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

.mk-section--narrow {
    max-width: 760px;
}

.mk-band {
    background-color: var(--mk-surface);
    border-top: 1px solid var(--mk-border);
    border-bottom: 1px solid var(--mk-border);
}

.mk-hero {
    text-align: center;
    padding-top: 4.5rem;
    padding-bottom: 4rem;
}

.mk-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    max-width: 18em;
    margin: 0 auto 1rem;
}

.mk-lead {
    font-size: 1.2rem;
    color: var(--mk-muted);
    max-width: 40em;
    margin: 0 auto 2rem;
}

.mk-page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mk-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.mk-muted {
    color: var(--mk-muted);
}

.mk-small {
    font-size: 0.875rem;
}

.mk-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.mk-actions--start {
    justify-content: flex-start;
}

/* Buttons */
.marketing-shell .mk-btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 0.5rem;
    border: 1px solid var(--mk-accent);
    background-color: var(--mk-accent);
    color: var(--mk-on-accent);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.marketing-shell .mk-btn:hover {
    background-color: var(--mk-accent-hover);
    border-color: var(--mk-accent-hover);
    color: var(--mk-on-accent);
}

.marketing-shell .mk-btn--outline {
    background-color: transparent;
    color: var(--mk-accent);
}

.marketing-shell .mk-btn--outline:hover {
    background-color: var(--mk-accent-soft);
    color: var(--mk-accent);
}

.marketing-shell .mk-btn--small {
    padding: 0.4rem 0.9rem;
}

.marketing-shell .mk-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Cards and feature lists */
.mk-card {
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--mk-border);
    border-radius: 0.75rem;
    background-color: var(--mk-bg);
}

.mk-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.mk-card p:last-child,
.mk-card ul:last-child {
    margin-bottom: 0;
}

.mk-card--featured {
    border-color: var(--mk-accent);
    box-shadow: 0 0 0 1px var(--mk-accent);
}

.mk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0.9rem;
    border-radius: 0.6rem;
    background-color: var(--mk-accent-soft);
    color: var(--mk-accent);
    font-size: 1.5rem;
}

.mk-ticks {
    list-style: none;
    padding-left: 0;
}

.mk-ticks li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.4rem;
}

.mk-ticks li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--mk-accent);
    font-weight: 700;
}

.mk-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background-color: var(--mk-accent-soft);
    color: var(--mk-accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.mk-notice {
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--mk-border);
    border-left: 4px solid var(--mk-accent);
    border-radius: 0.5rem;
    background-color: var(--mk-surface);
}

.mk-notice--error {
    border-left-color: var(--mk-danger);
}

/* Pricing */
.mk-price {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.mk-price small {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--mk-muted);
}

.mk-table {
    width: 100%;
    border-collapse: collapse;
}

.mk-table th,
.mk-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--mk-border);
    text-align: left;
}

.mk-table td.mk-num,
.mk-table th.mk-num {
    text-align: right;
    white-space: nowrap;
}

.mk-table tfoot td {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Forms */
.mk-field {
    margin-bottom: 1rem;
}

.mk-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.marketing-shell .mk-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--mk-border);
    border-radius: 0.5rem;
    background-color: var(--mk-bg);
    color: var(--mk-text);
    font: inherit;
}

.marketing-shell .mk-input:focus {
    outline: 2px solid var(--mk-accent);
    outline-offset: 1px;
}

.marketing-shell .mk-input:disabled {
    background-color: var(--mk-surface);
    color: var(--mk-muted);
}

.marketing-shell .validation-message,
.marketing-shell .validation-errors {
    color: var(--mk-danger);
    font-size: 0.875rem;
}

/* Kept off screen rather than display:none, which some form-filling bots skip. */
.mk-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* FAQ */
.mk-faq details {
    border-bottom: 1px solid var(--mk-border);
    padding: 1rem 0;
}

.mk-faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
}

.mk-faq details > div {
    margin-top: 0.75rem;
    color: var(--mk-muted);
}

.mk-faq details > div p:last-child {
    margin-bottom: 0;
}

/* Long-form text: terms and privacy, rendered from Markdown */
.mk-prose h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
}

.mk-prose ul {
    padding-left: 1.25rem;
}

.mk-prose table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mk-prose th,
.mk-prose td {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--mk-border);
    text-align: left;
    vertical-align: top;
}

.mk-prose th {
    background-color: var(--mk-surface);
}

/* Room for a cookie name on one line where the page is wide enough. */
.mk-prose th:first-child {
    width: 36%;
}

.mk-prose code {
    color: inherit;
    overflow-wrap: anywhere;
}

/* Lands a link to a section (the cookie notice's "Read more") with a little room above it. */
.mk-prose h2 {
    scroll-margin-top: 1.5rem;
}

/* The sample calendar on the Demo page */
.mk-demo-frame {
    padding: 1.25rem;
    border: 1px solid var(--mk-border);
    border-radius: 0.75rem;
    background-color: #ffffff;
    color: #212529;
    overflow-x: auto;
}
