/* ============================================================================
   LYLIX site design system
   Conservative blue/grey/black palette, system fonts, no JS dependencies.
   ============================================================================ */

:root {
    /* Palette */
    --lx-blue-900: #0f2942;
    --lx-blue-700: #1e3a5f;
    --lx-blue-500: #2563a4;
    --lx-blue-100: #e8eef5;
    --lx-gray-900: #1a1a1a;
    --lx-gray-700: #3b4250;
    --lx-gray-500: #6b7280;
    --lx-gray-300: #d1d5db;
    --lx-gray-100: #f5f6f8;
    --lx-white:    #ffffff;
    --lx-rose:     #7e5861;  /* CTA + brand accent — sparingly */
    --lx-rose-d:   #6b4a52;  /* CTA hover */
    --lx-sage:     #7a8e7c;  /* quiet second accent (subheaders, dividers) */
    --lx-sage-d:   #5e7261;  /* sage hover */
    --lx-green:    #27ae60;  /* success indicators only */
    --lx-red:      #c0392b;  /* errors only */

    /* Typography */
    --lx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
    --lx-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* Layout */
    --lx-content-narrow: 720px;   /* prose */
    --lx-content-wide:   1100px;  /* landing blocks */
    --lx-radius:         0;
    --lx-shadow:         0 1px 2px rgba(15,41,66,0.06);
}

/* ----- Reset / baseline ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--lx-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--lx-gray-900);
    background: var(--lx-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }

/* ----- Typography ----- */
h1, h2, h3, h4 {
    font-family: var(--lx-font);
    color: var(--lx-blue-900);
    line-height: 1.25;
    margin: 0 0 0.5em 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.625rem; margin-top: 1.5em; }
h3 { font-size: 1.25rem; margin-top: 1.2em; }
h4 { font-size: 1.05rem; margin-top: 1em; }

p { margin: 0 0 1em 0; }
strong { color: var(--lx-gray-900); }
small { font-size: 0.85em; color: var(--lx-gray-500); }

a {
    color: var(--lx-blue-500);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.12s ease;
}
a:hover { border-bottom-color: var(--lx-blue-500); }
a:focus-visible { outline: 2px solid var(--lx-blue-500); outline-offset: 2px; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em 0; }
li { margin: 0.25em 0; }

code, kbd, samp {
    font-family: var(--lx-font-mono);
    font-size: 0.92em;
    background: var(--lx-gray-100);
    padding: 1px 5px;
}

/* ----- Layout primitives ----- */
.lx-wrap        { max-width: var(--lx-content-wide); margin: 0 auto; padding: 0 24px; }
.lx-wrap-narrow { max-width: var(--lx-content-narrow); margin: 0 auto; padding: 0 24px; }

.lx-section { padding: 56px 0; }
.lx-section--tight { padding: 32px 0; }
.lx-section--bg { background: var(--lx-gray-100); }
.lx-section--gradient {
    background: linear-gradient(180deg, var(--lx-blue-100) 0%, var(--lx-white) 100%);
}
.lx-section--dark { background: var(--lx-blue-900); color: var(--lx-white); }
.lx-section--dark h1,
.lx-section--dark h2,
.lx-section--dark h3 { color: var(--lx-white); }
.lx-section--dark a { color: #b6d1ec; }
/* Buttons inside dark sections keep their own colors — the .lx-section--dark a
   rule above wins specificity over .lx-btn, so re-assert here. */
.lx-section--dark .lx-btn,
.lx-section--dark .lx-btn:hover { color: var(--lx-white); }
.lx-section--dark .lx-btn--ghost {
    color: var(--lx-white);
    border-color: var(--lx-white);
}
.lx-section--dark .lx-btn--ghost:hover {
    background: var(--lx-white);
    color: var(--lx-blue-900);
}

/* ----- Header / nav ----- */
.lx-header {
    background: var(--lx-white);
    border-bottom: 1px solid var(--lx-gray-300);
    position: sticky; top: 0; z-index: 100;
}
.lx-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
    max-width: var(--lx-content-wide);
    margin: 0 auto;
    padding: 0 24px;
}
.lx-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lx-blue-900);
    border: 0;
    letter-spacing: 0.04em;
}
.lx-logo:hover { border: 0; color: var(--lx-blue-700); }
.lx-logo img { display: block; }

.lx-nav { display: flex; align-items: center; gap: 8px; }
.lx-nav a {
    color: var(--lx-gray-700);
    padding: 8px 12px;
    border: 0;
    border-radius: var(--lx-radius);
    font-size: 0.95rem;
}
.lx-nav a:hover { background: var(--lx-gray-100); color: var(--lx-blue-900); }
.lx-nav a.lx-nav--cta {
    background: var(--lx-blue-700);
    color: var(--lx-white);
    margin-left: 8px;
}
.lx-nav a.lx-nav--cta:hover { background: var(--lx-rose); }

.lx-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--lx-gray-300);
    padding: 6px 10px;
    border-radius: var(--lx-radius);
    font-size: 1rem;
    color: var(--lx-gray-700);
    cursor: pointer;
}

/* ----- Hero ----- */
.lx-hero {
    padding: 72px 0 56px;
    background: linear-gradient(180deg, var(--lx-blue-100) 0%, var(--lx-white) 100%);
    text-align: center;
}
.lx-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 0.4em;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}
.lx-hero p.lead {
    font-size: 1.2rem;
    color: var(--lx-gray-700);
    max-width: 56ch;
    margin: 0 auto 1.5em;
}
.lx-hero__since {
    display: inline-block;
    color: var(--lx-rose);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ----- Buttons ----- */
.lx-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--lx-blue-700);
    color: var(--lx-white);
    border: 0;
    border-radius: var(--lx-radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.12s ease;
}
.lx-btn:hover { background: var(--lx-rose); color: var(--lx-white); border: 0; }
.lx-btn--ghost {
    background: transparent;
    color: var(--lx-blue-700);
    border: 1px solid var(--lx-blue-700);
    padding: 9px 21px;
}
.lx-btn--ghost:hover {
    background: var(--lx-blue-700);
    color: var(--lx-white);
}
.lx-btn--cta {
    background: var(--lx-rose);
    padding: 12px 28px;
    font-size: 1.05rem;
}
.lx-btn--cta:hover { background: var(--lx-rose-d); }

/* ----- Cards ----- */
.lx-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.lx-card {
    background: var(--lx-white);
    border: 1px solid var(--lx-gray-300);
    border-radius: var(--lx-radius);
    padding: 28px 24px;
    box-shadow: var(--lx-shadow);
    display: flex;
    flex-direction: column;
}
.lx-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
    color: var(--lx-blue-900);
}
.lx-card__price {
    color: var(--lx-rose);
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 14px 0;
}
.lx-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    flex: 1 1 auto;
}
.lx-card ul li {
    padding: 4px 0 4px 22px;
    position: relative;
    color: var(--lx-gray-700);
    font-size: 0.95rem;
}
.lx-card ul li::before {
    content: "›";
    position: absolute; left: 6px;
    color: var(--lx-rose);
    font-weight: bold;
}
.lx-card__actions { display: flex; gap: 10px; }

/* ----- Feature grid ----- */
.lx-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px 32px;
}
.lx-feature {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 2px 14px;
    align-items: start;
}
.lx-feature__icon {
    grid-row: 1 / span 2;
    width: 26px;
    height: 26px;
    color: var(--lx-rose);
    margin-top: 2px;
    flex-shrink: 0;
}
.lx-feature h4 {
    color: var(--lx-blue-900);
    margin: 0 0 6px 0;
    font-size: 1.02rem;
}
.lx-feature p { color: var(--lx-gray-700); font-size: 0.94rem; margin: 0; }

/* ----- Section heading with leading icon (features page) ----- */
.lx-h2-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lx-h2-icon__img {
    width: 24px;
    height: 24px;
    color: var(--lx-blue-700);
    flex-shrink: 0;
}

/* ----- Inner-page schematic (floats next to the page intro) ----- */
.lx-page-schematic { display: none; }
@media (min-width: 880px) {
    .lx-page-schematic {
        display: block;
        float: right;
        width: 200px;
        height: auto;
        margin: 4px 0 14px 28px;
        opacity: 0.85;
    }
    .lx-page-schematic img { width: 100%; height: auto; display: block; }
}

/* ----- Sage accent — used sparingly on bg-tinted section heads + a few
   structural underlines so it doesn't compete with rose ----- */
.lx-section--bg h2 {
    border-bottom: 2px solid var(--lx-sage);
    padding-bottom: 8px;
    display: inline-block;
}

/* ----- Hero with side schematic ----- */
.lx-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}
.lx-hero__schematic { display: none; }
@media (min-width: 880px) {
    .lx-hero { text-align: left; }
    .lx-hero__inner {
        grid-template-columns: 1fr auto;
        gap: 56px;
        max-width: var(--lx-content-wide);
        margin: 0 auto;
        padding: 0 24px;
        text-align: left;
    }
    .lx-hero__inner h1 {
        max-width: 22ch;
        margin-left: 0;
        margin-right: 0;
    }
    .lx-hero__inner p.lead {
        margin-left: 0;
        margin-right: 0;
    }
    .lx-hero__schematic {
        display: block;
        opacity: 0.8;
    }
    .lx-hero__schematic img { width: 280px; height: auto; display: block; }
}

/* ----- Trust strip ----- */
.lx-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    text-align: center;
}
.lx-trust__item {
    padding: 14px 8px;
    border-right: 1px solid var(--lx-gray-300);
}
.lx-trust__item:last-child { border-right: 0; }
.lx-trust__num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lx-blue-900);
    display: block;
    line-height: 1.1;
}
.lx-trust__num--accent { color: var(--lx-rose); }
.lx-trust__lbl {
    font-size: 0.78rem;
    color: var(--lx-gray-500);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
    display: inline-block;
}
@media (max-width: 600px) {
    .lx-trust__item { border-right: 0; border-bottom: 1px solid var(--lx-gray-300); }
    .lx-trust__item:last-child { border-bottom: 0; }
}

/* ----- Footer ----- */
.lx-footer {
    background: var(--lx-gray-100);
    border-top: 1px solid var(--lx-gray-300);
    padding: 48px 0 24px;
    color: var(--lx-gray-700);
    font-size: 0.92rem;
}
.lx-footer__cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.lx-footer h4 {
    font-size: 0.85rem;
    color: var(--lx-blue-900);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px 0;
}
.lx-footer ul { list-style: none; padding: 0; margin: 0; }
.lx-footer li { margin: 6px 0; }
.lx-footer a { color: var(--lx-gray-700); border: 0; }
.lx-footer a:hover { color: var(--lx-blue-700); }
.lx-footer__legal {
    border-top: 1px solid var(--lx-gray-300);
    padding-top: 18px;
    color: var(--lx-gray-500);
    font-size: 0.82rem;
}
.lx-footer__legal p { margin: 6px 0; }

/* ----- Responsive ----- */
@media (max-width: 760px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.4rem; }
    .lx-hero { padding: 48px 0 36px; }
    .lx-hero h1 { font-size: 2rem; }
    .lx-hero p.lead { font-size: 1.05rem; }
    .lx-section { padding: 40px 0; }
    .lx-nav { display: none; }
    .lx-nav.lx-nav--open {
        display: flex;
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--lx-white);
        border-bottom: 1px solid var(--lx-gray-300);
        padding: 12px 16px;
        gap: 4px;
    }
    .lx-nav.lx-nav--open a { width: 100%; }
    .lx-nav.lx-nav--open a.lx-nav--cta { margin-left: 0; text-align: center; margin-top: 6px; }
    .lx-nav-toggle { display: inline-block; }
    .lx-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 460px) {
    .lx-footer__cols { grid-template-columns: 1fr; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}
