/* MKN Systems: same layout as the original site, polished. Brand orange comes from the logo,
   darkened where it carries white text so contrast stays above WCAG AA (4.5:1). */
:root {
    --brand: #b8541a;
    --brand-hover: #9c4615;
    --brand-link: #a84c16;
    --brand-soft: #fbefe6;
    --ink: #1d232b;
    --text: #2c333c;
    --muted: #5f6b78;
    --light: #f5f6f8;
    --line: #e4e7eb;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(29, 35, 43, .08), 0 2px 6px rgba(29, 35, 43, .05);
}

body {
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand-link); text-underline-offset: .18em; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid rgba(184, 84, 26, .55); outline-offset: 2px; }

.skip-link {
    position: absolute; left: -9999px; top: .5rem; z-index: 1000;
    background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 6px;
}
.skip-link:focus { left: .5rem; color: #fff; }

.container-narrow { max-width: 820px; }

/* Buttons */
.btn { font-weight: 600; letter-spacing: .01em; border-radius: 10px; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.05rem; }
.btn-brand {
    --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-hover); --bs-btn-hover-border-color: var(--brand-hover);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-hover); --bs-btn-active-border-color: var(--brand-hover);
    --bs-btn-focus-shadow-rgb: 184, 84, 26;
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
    box-shadow: 0 6px 16px rgba(184, 84, 26, .25);
}
.btn-outline-light { --bs-btn-hover-color: var(--ink); border-width: 2px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.navbar-site { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
    display: block; padding: .5rem .9rem; border-radius: 8px;
    color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav-links a:hover { background: var(--light); color: var(--ink); }
.nav-links a.active { color: var(--brand-link); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; border-radius: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); transition: transform .2s, opacity .2s; }

@media (max-width: 767.98px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; padding: .5rem 1rem 1rem; background: #fff;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .8rem .75rem; }
    .nav-links a.active { box-shadow: inset 3px 0 0 var(--brand); padding-left: 1rem; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Home hero */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; place-items: center;
    min-height: clamp(480px, 78vh, 720px);
    padding: 6rem 0; color: #fff; text-align: center;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 55%; z-index: -2; }
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(14, 17, 22, .32) 0%, rgba(14, 17, 22, .12) 60%, rgba(14, 17, 22, .3) 100%),
        linear-gradient(180deg, rgba(14, 17, 22, .2) 0%, rgba(14, 17, 22, 0) 35%, rgba(14, 17, 22, .45) 100%);
}
.hero-content { max-width: 780px; }
.hero h1 { color: #fff; font-weight: 800; font-size: clamp(2.2rem, 5.2vw, 3.7rem); line-height: 1.1; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); margin: 1.25rem auto 2rem; max-width: 640px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; }
.hero-actions .btn { min-width: 170px; text-transform: uppercase; font-size: .95rem; letter-spacing: .06em; }

/* Features */
.features { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.feature {
    height: 100%; text-align: center; padding: 2.25rem 1.75rem;
    border-radius: var(--radius); background: #fff; border: 1px solid var(--line);
    transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
    display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.25rem;
    border-radius: 50%; background: var(--brand-soft); color: var(--brand);
}
.feature h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.feature p { color: var(--muted); margin: 0; }

/* Call to action */
.cta-band {
    position: relative; overflow: hidden; color: #fff;
    padding: clamp(4rem, 9vw, 6.5rem) 0;
    background: radial-gradient(ellipse at 15% 0%, rgba(184, 84, 26, .35), transparent 55%), var(--ink);
}
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.5rem); margin-bottom: 1.75rem; }
.cta-band .btn { text-transform: uppercase; font-size: .95rem; letter-spacing: .06em; }

/* Inner pages */
.page-title { background: var(--light); border-bottom: 1px solid var(--line); padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.page-title h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 2.75rem); }

.about-cover { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0; min-height: 560px; display: flex; align-items: center; }
.about-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 57% 80%; z-index: -2; }
.about-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .35) 100%); }
.about-card {
    background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px);
    border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem); box-shadow: var(--shadow);
}
.about-card h2 { font-size: 1.9rem; margin-bottom: 1rem; }

.founder { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.founder-photo img { border-radius: 50%; box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line), var(--shadow); }
.founder-bio { max-width: 560px; margin: .5rem auto 1.5rem; color: var(--muted); font-size: 1.075rem; }

.contact { padding: clamp(3rem, 7vw, 5rem) 0; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow); }
.form-label { font-weight: 600; color: var(--ink); }
.form-control { border-radius: 10px; padding: .7rem .9rem; border-color: #d3d8de; }
.form-control:focus { border-color: #d98a55; box-shadow: 0 0 0 .25rem rgba(184, 84, 26, .18); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.prose-section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }

/* Blog */
.blog-list { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.post-card { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.post-card:first-child { padding-top: 0; }
.post-card:last-child { border-bottom: 0; }
.post-card h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.3; margin-bottom: .6rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--brand-link); }
.post-card p { color: var(--muted); }
.post-meta { color: var(--muted); font-size: .9rem; margin-bottom: .5rem; }
.read-more { font-weight: 600; text-decoration: none; }

.post-header { background: var(--light); border-bottom: 1px solid var(--line); padding: clamp(2.25rem, 5vw, 3.5rem) 0 2rem; }
.post-header h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.2; margin: .75rem 0 1rem; }
.back-link { font-weight: 600; text-decoration: none; font-size: .95rem; }
.post-body { padding-top: clamp(2rem, 5vw, 3rem); padding-bottom: clamp(3rem, 7vw, 4.5rem); font-size: 1.075rem; line-height: 1.75; }
.post-body::after { content: ""; display: block; clear: both; }
.post-body h2 { font-size: 1.55rem; margin-top: 2.75rem; margin-bottom: 1rem; }
.post-body h3 { font-size: 1.2rem; margin-top: 2.25rem; margin-bottom: .75rem; }
.post-body li { margin-bottom: .35rem; }
.post-body pre {
    background: var(--ink); color: #e9ecef; border-radius: 10px;
    padding: 1rem 1.25rem; margin: 1rem 0 1.5rem; font-size: .9rem; line-height: 1.6;
    white-space: pre-wrap; word-break: break-word;
}
.post-body pre code { color: inherit; background: none; padding: 0; font-size: inherit; }
.post-body :not(pre) > code { background: #f1f2f4; color: #9a3412; padding: .12em .4em; border-radius: 5px; font-size: .9em; word-break: break-word; }
.post-body figure { margin: 1.5rem 0 2rem; }
.post-body figure img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.post-body figcaption { font-size: .875rem; color: var(--muted); margin-top: .5rem; text-align: center; }
.post-body .figure-float { float: right; max-width: 216px; margin: .25rem 0 1rem 1.75rem; }
.post-body .note { background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; }
.post-body .code-label { font-weight: 600; color: var(--ink); margin: 1.25rem 0 0; font-size: .95rem; }
@media (max-width: 575.98px) {
    .post-body .figure-float { float: none; margin: 1.5rem auto; }
}

/* Footer */
.site-footer { background: var(--light); border-top: 1px solid var(--line); padding: 1.75rem 0; font-size: .95rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--brand-link); text-decoration: underline; }

/* Errors and the /doc listing */
.error-page { padding: clamp(4rem, 12vw, 8rem) 0; }
.error-code { font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: .5rem; }
.listing-page { background: var(--light); }
.listing { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.listing td, .listing th { padding: .6rem .9rem; }
.listing a { text-decoration: none; word-break: break-word; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
