/* Computarium marketing site. Same "Registre" tokens as the app (src/MnemoGames.Billing/wwwroot/app.css): IBM Plex Sans
   and Mono, one teal accent, a cool neutral ground with white surfaces in light mode and the same structure in dark.
   The theme follows the system unless the visitor picks one (data-theme on <html>, see site.js). */
:root {
    --ground: #f3f5f7;
    --surface: #fff;
    --surface-alt: #f7f9fa;
    --surface-raised: #fff;
    --band: #fff;
    --step-bg: #f7f9fa;
    --doc-total-bg: #f7f9fa;
    --header-bg: rgba(255, 255, 255, 0.85);
    --border: #e3e8ee;
    --border-soft: #eef1f4;
    --border-strong: #cbd3dc;
    --text: #17202a;
    --text-2: #3a4654;
    --text-3: #5f6b78;
    --accent: #0f6e56;
    --accent-hover: #0b5a46;
    --accent-text: #0f6e56;
    --accent-strong-text: #0b5a46;
    --accent-subtle: #e2f2ec;
    --accent-line: #b8dfd1;
    --accent-step-text: #2e4a41;
    --warn-bg: #fff4e0;
    --warn-text: #8a4b00;
    --cta-bg: #0f6e56;
    --cta-border: #0f6e56;
    --cta-text-2: #d5eee5;
    --shadow: 0 1px 2px rgba(23, 32, 42, 0.04), 0 18px 40px -16px rgba(23, 32, 42, 0.18);
    --shadow-float: 0 16px 32px -14px rgba(23, 32, 42, 0.22);
    --font-sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
    color-scheme: light;
}

/* Dark: the app's dark ground and surfaces, the accent lifted so links and labels stay readable */
:root[data-theme="dark"] {
    --ground: #0e1217;
    --surface: #161e28;
    --surface-alt: #121820;
    --surface-raised: #1b2430;
    --band: #121820;
    --step-bg: #161e28;
    --doc-total-bg: #1b2430;
    --header-bg: rgba(18, 24, 32, 0.85);
    --border: #2a3441;
    --border-soft: #222b36;
    --border-strong: #3a4656;
    --text: #e8edf2;
    --text-2: #c3cdd7;
    --text-3: #9aa7b5;
    --accent: #16846a;
    --accent-hover: #1e9a7c;
    --accent-text: #7fd1b4;
    --accent-strong-text: #8fd9c0;
    --accent-subtle: #143229;
    --accent-line: #1f5a48;
    --accent-step-text: #b5dccd;
    --warn-bg: #3a2a12;
    --warn-text: #f2b36b;
    --cta-bg: #143229;
    --cta-border: #1f5a48;
    --cta-text-2: #b5dccd;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
    --shadow-float: 0 16px 32px -14px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
}

/* Without JavaScript, follow the system setting */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --ground: #0e1217;
        --surface: #161e28;
        --surface-alt: #121820;
        --surface-raised: #1b2430;
    --band: #121820;
    --step-bg: #161e28;
    --doc-total-bg: #1b2430;
        --header-bg: rgba(18, 24, 32, 0.85);
        --border: #2a3441;
        --border-soft: #222b36;
        --border-strong: #3a4656;
        --text: #e8edf2;
        --text-2: #c3cdd7;
        --text-3: #9aa7b5;
        --accent: #16846a;
        --accent-hover: #1e9a7c;
        --accent-text: #7fd1b4;
        --accent-strong-text: #8fd9c0;
        --accent-subtle: #143229;
        --accent-line: #1f5a48;
        --accent-step-text: #b5dccd;
        --warn-bg: #3a2a12;
        --warn-text: #f2b36b;
        --cta-bg: #143229;
        --cta-border: #1f5a48;
        --cta-text-2: #b5dccd;
            --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -16px rgba(0, 0, 0, 0.7);
        --shadow-float: 0 16px 32px -14px rgba(0, 0, 0, 0.75);
        color-scheme: dark;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--accent-strong-text);
}

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

h1, h2, h3, p {
    margin: 0;
}

.mono {
    font-family: var(--font-mono);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
}

.skip-link:focus {
    top: 12px;
    color: #fff;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    backdrop-filter: saturate(1.4) blur(10px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    min-height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand:hover {
    color: var(--text);
}

.brand svg {
    color: var(--accent-text);
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.site-nav {
    display: none;
    gap: 24px;
    font-size: 15px;
}

.site-nav a,
.footer-nav a {
    color: var(--text-2);
    text-decoration: none;
}

.site-nav a:hover,
.footer-nav a:hover {
    color: var(--text);
    text-decoration: underline;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--text-2);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.lang-link:hover {
    background: var(--surface);
    color: var(--text);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--text);
}

/* The toggle shows the theme it switches to */
.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.btn-lg {
    min-height: 48px;
    padding: 12px 22px;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-secondary {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--text-3);
    color: var(--text);
}

.header-actions .btn {
    display: none;
}

/* Sections */
.section {
    padding: 64px 0;
}

.section-alt {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--band);
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
    margin-bottom: 40px;
}

.eyebrow {
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2 {
    font-size: clamp(1.75rem, 4vw, 2.375rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-wrap: balance;
}

.lead {
    color: var(--text-2);
    font-size: 17px;
    text-wrap: pretty;
}

/* Hero */
.hero {
    border-bottom: 1px solid var(--border);
    background-color: var(--ground);
}

.hero .container {
    display: grid;
    gap: 48px;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 64px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.hero-eyebrow {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 3.75rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-wrap: balance;
}

.hero-lead {
    max-width: 520px;
    color: var(--text-2);
    font-size: 19px;
    text-wrap: pretty;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.note {
    color: var(--text-3);
    font-size: 14px;
}

/* Hero illustration: an invoice and the receivables tile, drawn in the app's style */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 500px;
    justify-self: center;
    padding-bottom: 92px;
}

.doc-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.doc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.doc-label {
    display: block;
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doc-number {
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 600;
}

.pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pill-accent {
    background: var(--accent-subtle);
    color: var(--accent-strong-text);
}

.pill-warn {
    padding: 2px 8px;
    background: var(--warn-bg);
    color: var(--warn-text);
}

.doc-lines {
    margin: 0;
    padding: 8px 22px;
}

.doc-lines div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14px;
}

.doc-lines dt,
.doc-lines dd {
    margin: 0;
}

.doc-lines dd {
    font-family: var(--font-mono);
    white-space: nowrap;
}

.doc-lines .tax {
    padding: 4px 0;
    border-bottom: 0;
    color: var(--text-3);
    font-size: 13px;
}

.doc-lines .tax:first-of-type {
    padding-top: 10px;
}

.doc-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    background: var(--doc-total-bg);
    font-weight: 600;
}

.doc-total .mono {
    font-size: 22px;
}

.receivable-card {
    position: absolute;
    left: 12px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 250px;
    padding: 16px 18px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface-raised);
    box-shadow: var(--shadow-float);
}

.receivable-amount {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.receivable-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-3);
    font-size: 13px;
}

/* Steps: quote, order, invoice, payment */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--step-bg);
}

.step-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
}

.step-rule::after {
    content: "";
    flex-grow: 1;
    height: 2px;
    border-radius: 2px;
    background: var(--accent-line);
}

.step-title {
    font-size: 18px;
    font-weight: 600;
}

.step-text {
    color: var(--text-3);
    font-size: 15px;
}

.step-last {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.step-last .step-rule,
.step-last .step-title {
    color: var(--accent-strong-text);
}

.step-last .step-rule::after {
    background: var(--accent);
}

.step-last .step-text {
    color: var(--accent-step-text);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 16px;
}

.feature {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-subtle);
    color: var(--accent-strong-text);
}

.feature h3 {
    font-size: 18px;
    font-weight: 600;
}

.feature p {
    color: var(--text-3);
    font-size: 15px;
}

.extras {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    margin: 16px 0 0;
    padding: 20px 26px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--text-2);
    font-size: 15px;
    list-style: none;
}

.extras li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.extras svg {
    flex-shrink: 0;
    color: var(--accent-text);
}

/* The name */
.name .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px 72px;
}

.name-mark {
    flex: none;
    width: 160px;
    height: 160px;
    border-radius: 28px;
}

.name-copy {
    display: flex;
    flex: 1 1 440px;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.name-copy .lead {
    max-width: 600px;
}

.name-copy h2 em {
    font-weight: 500;
}

/* Closing call to action */
.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 48px;
    padding: 32px 24px;
    border: 1px solid var(--cta-border);
    border-radius: 16px;
    background: var(--cta-bg);
    color: #fff;
}

.cta-copy {
    display: flex;
    flex: 1 1 420px;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.section .cta h2 {
    color: #fff;
    font-size: clamp(1.625rem, 3.5vw, 2.125rem);
}

.cta p {
    color: var(--cta-text-2);
    font-size: 17px;
}

.btn-light {
    background: #fff;
    color: #0b5a46;
    font-weight: 600;
}

.btn-light:hover {
    background: #e2f2ec;
    color: #0b5a46;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.btn-outline-light:hover {
    border-color: #fff;
    color: #fff;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 14px;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding-top: 28px;
    padding-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0 24px;
}

/* Full-height tap targets on phones */
.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* Not found page */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 96px 0;
}

.not-found .code {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
}

@media (min-width: 576px) {
    .container {
        padding: 0 32px;
    }

    .header-actions .btn-primary {
        display: inline-flex;
    }

    .receivable-card {
        left: -28px;
    }

    .cta {
        padding: 48px;
    }

    .name-mark {
        width: 240px;
        height: 240px;
    }
}

@media (min-width: 768px) {
    .header-actions .btn-secondary {
        display: inline-flex;
    }
}

@media (min-width: 992px) {
    .site-nav {
        display: flex;
    }

    .section {
        padding: 88px 0;
    }

    .hero .container {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 56px;
        padding-top: 88px;
        padding-bottom: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
