/* Site foundation: design tokens, typography, header, footer, buttons and the shared surfaces
   that the homepage (home.css) and the documentation (docs.css) build on.

   The look is a quiet graphite ground with lit-edge panels: each raised surface carries a faint
   highlight along its top edge and a soft drop shadow, so depth comes from light rather than
   from colour. Colour is kept for meaning (links, focus, status) and for the logo. */

/* Self-hosted variable fonts (Latin and Latin Extended subsets), served from wwwroot/fonts.
   Mona Sans (weight 200-900, width 100-125%) and JetBrains Mono: SIL Open Font License. */
@font-face {
    font-family: "Mona Sans";
    font-style: normal;
    font-weight: 200 900;
    font-stretch: 100% 125%;
    font-display: swap;
    src: url("fonts/mona-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Mona Sans";
    font-style: normal;
    font-weight: 200 900;
    font-stretch: 100% 125%;
    font-display: swap;
    src: url("fonts/mona-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: dark;

    /* Ground and surfaces: neutral graphite with a trace of warmth, never navy. */
    --bg: #1a1a1e;
    --bg-raised: #101013;
    --surface: #151518;
    --surface-2: #1b1b1f;
    --surface-3: #232328;
    --well: #09090b;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.13);
    --edge-light: rgba(255, 255, 255, 0.07);

    /* Ink */
    --text: #c9c9cf;
    --text-strong: #f4f4f6;
    --muted: #8d8d97;
    --faint: #5e5e68;

    /* Signals. Cyan is the logo's own hue; it marks links, focus and the engine. */
    --accent: #25a1b7;
    --accent-soft: rgba(92, 212, 232, 0.1);
    --accent-line: rgba(92, 212, 232, 0.38);
    --accent-ink: #061a1e;
    --brand: #7ea6ff;
    --brand-soft: rgba(126, 166, 255, 0.12);
    --hex-line: #2c97ff; /* the hero's hexagon grid lines */
    --brand-2: #5cd4e8;
    --violet: #b9a8ff;
    --warn: #f0b45e;
    --ok: #5fd99f;
    --danger: #ff8a7a;

    --font-display: "Mona Sans", "Segoe UI", system-ui, sans-serif;
    --font-body: "Mona Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --display-stretch: 112%;

    --radius: 14px;
    --radius-sm: 8px;
    --panel-shadow: inset 0 1px 0 var(--edge-light), 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --shadow-lg: inset 0 1px 0 var(--edge-light), 0 2px 4px rgba(0, 0, 0, 0.4), 0 40px 80px -24px rgba(0, 0, 0, 0.85);
    --shadow-md: inset 0 1px 0 var(--edge-light), 0 1px 2px rgba(0, 0, 0, 0.5), 0 24px 48px -20px rgba(0, 0, 0, 0.75);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    --code-highlight-color-1: #8fb8ff;
    --code-highlight-color-2: #6fdbe9;
    --code-highlight-color-3: #9be3b4;
    --code-highlight-color-4: #f3cf8e;
    --code-highlight-color-5: #cdb9ff;
    --code-highlight-color-6: #f5b88a;
    --code-comment-color: #6c6c77;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-color: #3a3a42 var(--bg); }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01" on;
}
::selection { background: rgba(92, 212, 232, 0.28); color: var(--text-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-strong); letter-spacing: -0.012em; line-height: 1.15; margin: 0 0 .6rem; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-stretch: var(--display-stretch); font-weight: 650; letter-spacing: -0.035em; line-height: 1.02; }
h1:focus { outline: none; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-stretch: var(--display-stretch); font-weight: 620; letter-spacing: -0.03em; line-height: 1.06; }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -0.008em; }
p { margin: 0 0 1rem; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { max-width: 100%; }
strong { color: var(--text-strong); font-weight: 600; }

code, pre, kbd { font-family: var(--font-mono); }
code { font-size: .86em; color: #e2e2e8; }
pre { margin: 0; overflow: auto; }
kbd { display: inline-block; padding: .05rem .4rem; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface-2); font-size: .8em; color: var(--text-strong); }

.container { width: min(1200px, calc(100vw - 3rem)); margin: 0 auto; }
.narrow { width: min(860px, calc(100vw - 3rem)); }
.section { padding: 7rem 0; position: relative; }
.section--band { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--flush { padding-top: 0; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(12, 12, 14, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text-strong); text-decoration: none; font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: 1.08rem; letter-spacing: -0.02em; }
/* The wordmark: "Netly" in the accent colour, "DB" in the surrounding text colour. */
.wordmark-netly { color: var(--accent); }
.brand-tag { font-family: var(--font-body); font-stretch: 100%; font-size: .72rem; font-weight: 500; letter-spacing: 0; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 1px 0 var(--edge-light); border-radius: 6px; padding: .16rem .45rem; margin-left: .3rem; }
.top-nav { display: flex; gap: .1rem; align-items: center; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500; padding: .4rem .7rem; border-radius: 8px; white-space: nowrap; transition: color .2s ease, background .2s ease; }
.top-nav a:hover { color: var(--text-strong); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

/* Buttons. The primary is a light key on a dark desk; the secondary is a raised graphite key. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .66rem 1.1rem; border-radius: 10px; font-family: var(--font-body); font-weight: 600; font-size: .93rem; line-height: 1.2;
    text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(180deg, #ffffff, #e4e4e8);
    color: #111114;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 16px -6px rgba(0, 0, 0, 0.6);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffffff, #f0f0f3); }
.btn-secondary {
    color: var(--text-strong);
    background: var(--surface-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.5);
}
.btn-secondary:hover { background: var(--surface-3); }
.btn-tertiary { color: var(--muted); padding-left: .5rem; padding-right: .5rem; }
.btn-tertiary:hover { color: var(--text-strong); }
.btn-tertiary .bi { transition: transform .2s var(--ease-out); }
.btn-tertiary:hover .bi { transform: translateX(3px); }
.btn-sm { padding: .45rem .8rem; font-size: .86rem; border-radius: 8px; }
.btn .bi { font-size: .95em; }

/* Shared surfaces */
.card-surface, .hero-panel, .info-card, .feature-group, .demo-panel, .code-block {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--panel-shadow), 0 0 0 1px var(--line);
}
.code-block { padding: 1.1rem 1.25rem; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; font-size: .85rem; line-height: 1.65; scrollbar-color: #3a3a42 transparent; }
.code-block code { color: #d6d6dc; font-size: inherit; }
.code-comment-block { color: var(--code-comment-color); }

/* Tab buttons (TabList) */
.arch-card {
    display: flex; align-items: center; gap: .6rem;
    color: var(--muted); background: transparent; border: 0; border-radius: 8px;
    padding: .55rem .8rem; text-align: left; cursor: pointer; font: inherit; font-size: .9rem;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.arch-card:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.04); }
.arch-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.arch-card-index { flex: none; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; color: var(--faint); }
.arch-card-label { font-weight: 550; line-height: 1.3; }
.arch-card.active { color: var(--text-strong); background: var(--surface-3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.5); }
.arch-card.active .arch-card-index { color: var(--accent); }

/* Detail panels (EngineExplorer) */
.architecture-detail { padding: 1.75rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--panel-shadow), 0 0 0 1px var(--line); }
.architecture-detail-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .75rem; }
.architecture-detail-header h4 { margin: 0; font-size: 1.35rem; font-stretch: var(--display-stretch); letter-spacing: -0.02em; }
.architecture-detail-summary { margin: .4rem 0 0; color: var(--muted); line-height: 1.6; }
.architecture-detail-body p { color: var(--muted); line-height: 1.65; }

/* Edition cards */
.editions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.edition-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; padding: 2.25rem; box-shadow: var(--panel-shadow), 0 0 0 1px var(--line); }
.edition-card--enterprise { background: radial-gradient(120% 70% at 50% 0%, rgba(92, 212, 232, .07), transparent 60%), var(--surface-2); box-shadow: inset 0 1px 0 rgba(92, 212, 232, .45), 0 1px 2px rgba(0, 0, 0, .5), 0 24px 48px -20px rgba(0, 0, 0, .75), 0 0 0 1px var(--line-strong); }
.edition-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.edition-head h3 { margin: 0; font-size: 1.6rem; font-stretch: var(--display-stretch); letter-spacing: -0.025em; }
.edition-price { font-weight: 550; font-size: 1rem; color: var(--muted); }
.edition-price--pro { color: var(--text-strong); }
.edition-tagline { color: var(--muted); margin: 0 0 1.6rem; line-height: 1.6; }
.edition-list { list-style: none; padding: 1.4rem 0 0; margin: 0 0 1.75rem; display: grid; gap: .7rem; border-top: 1px solid var(--line); }
.edition-list li { color: var(--text); display: flex; gap: .7rem; align-items: flex-start; line-height: 1.45; font-size: .97rem; }
.edition-list .tick { color: var(--muted); flex: none; margin-top: .12rem; font-size: .9rem; }
.edition-list .key { flex: none; margin-top: .12rem; font-size: .9rem; color: var(--accent); }
.edition-foot { color: var(--muted); font-size: .9rem; line-height: 1.6; margin: auto 0 1.4rem; }
.edition-card .btn { align-self: flex-start; }

.demo-panel { padding: 0; overflow: hidden; }
.final-cta { text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 4.5rem 0 2.5rem; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 3rem; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: .6rem; color: var(--text-strong); font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: 1.08rem; letter-spacing: -0.02em; margin-bottom: 1rem; }
.footer-grid p { color: var(--muted); max-width: 40ch; line-height: 1.65; font-size: .93rem; }
.footer-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-links { display: grid; gap: .55rem; align-content: start; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .9rem; transition: color .2s ease; }
.footer-links a:hover { color: var(--text-strong); }
.footer-links-title { margin: 0 0 .3rem; font-size: .9rem; font-weight: 600; color: var(--text-strong); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--faint); font-size: .84rem; }
.footer-bottom p { margin: 0; }

/* Accessibility helpers */
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 200; padding: .5rem .9rem; border-radius: 8px; background: var(--text-strong); color: var(--bg); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: .75rem; }
main:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mobile navigation */
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border-radius: 9px; color: var(--text-strong); font-weight: 600; font-size: .9rem; background: var(--surface-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--line); }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav { position: absolute; right: 0; top: calc(100% + .6rem); min-width: 250px; display: grid; gap: .1rem; padding: .5rem; border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-strong); }
.mobile-nav nav a:not(.btn) { color: var(--text); text-decoration: none; padding: .55rem .7rem; border-radius: 8px; font-weight: 500; }
.mobile-nav nav a:not(.btn):hover { color: var(--text-strong); background: var(--surface-3); }
.mobile-nav nav .btn { margin-top: .5rem; }

@media (max-width: 1100px) {
    .top-nav a { padding: .4rem .5rem; font-size: .87rem; }
    .brand-tag { display: none; }
}

@media (max-width: 940px) {
    .section { padding: 5rem 0; }
    .top-nav, .nav-actions { display: none; }
    .mobile-nav { display: block; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-columns { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
    .editions-grid { grid-template-columns: 1fr; }
    .architecture-detail-header { flex-direction: column; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .container, .narrow { width: calc(100vw - 2rem); }
    .section { padding: 4rem 0; }
    .edition-card { padding: 1.5rem; }
    .code-block { padding: .9rem 1rem; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .arch-card, .btn-tertiary .bi { transition: none; }
}
