/* ==========================================================================
   Myervill LLC — main stylesheet
   Light theme, soft blue/sand palette. Desktop-first; breakpoints at 900px and 600px.
   Uses modern CSS: nesting, oklch(), color-mix(), clamp().
   ========================================================================== */

:root {
    color-scheme: light;

    --bg:        oklch(98.5% 0.006 250);
    --surface:   oklch(100% 0 0);
    --surface-2: oklch(96.5% 0.012 250);
    --line:      oklch(90% 0.014 250);
    --text:      oklch(32% 0.025 255);
    --muted:     oklch(52% 0.02 255);
    --accent:    oklch(56% 0.093 250);
    --accent-2:  oklch(48% 0.105 253);
    --accent-sf: oklch(94% 0.028 250);
    --sand:      oklch(95% 0.03 80);

    --radius: 16px;
    --wrap: 1080px;
    --shadow-sm: 0 1px 2px oklch(45% 0.04 255 / 0.06),
                 0 4px 12px oklch(45% 0.04 255 / 0.05);
    --shadow-lg: 0 2px 4px oklch(45% 0.04 255 / 0.04),
                 0 18px 44px oklch(45% 0.04 255 / 0.10);
}

/* --- Base ---------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(58rem 38rem at 88% -12%, oklch(88% 0.055 250 / 0.55), transparent 62%),
        radial-gradient(46rem 34rem at -8% 8%, var(--sand), transparent 58%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    line-height: 1.15;
    margin: 0 0 0.5em;
    color: oklch(26% 0.03 255);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1em;
    text-wrap: pretty;
}

a {
    color: var(--accent-2);
    text-decoration-color: color-mix(in oklch, var(--accent) 35%, transparent);
    text-underline-offset: 0.2em;

    &:hover {
        text-decoration-color: currentColor;
    }
}

::selection {
    background: var(--accent-sf);
    color: var(--accent-2);
}

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

.wrap {
    width: min(100% - 2.5rem, var(--wrap));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;

    &:focus {
        left: 1rem;
        top: 1rem;
        z-index: 10;
        padding: 0.6rem 1rem;
        background: var(--surface);
        border-radius: 8px;
        box-shadow: var(--shadow-lg);
    }
}

.eyebrow {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--accent-2);
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    font-size: 0.975rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;

    &:hover {
        transform: translateY(-1px);
    }

    &:active {
        transform: translateY(0);
    }
}

.btn-solid {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 4px 14px color-mix(in oklch, var(--accent) 32%, transparent);

    &:hover {
        box-shadow: 0 8px 22px color-mix(in oklch, var(--accent) 38%, transparent);
    }
}

.btn-outline {
    color: var(--accent-2);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);

    &:hover {
        border-color: color-mix(in oklch, var(--accent) 45%, var(--line));
    }
}

.btn-sm { padding: 0.5rem 1.05rem; font-size: 0.9rem; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 1.03rem; }

.icon {
    width: 1em;
    height: 1em;
    flex: none;
}

/* --- Header -------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in oklch, var(--bg) 78%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid color-mix(in oklch, var(--line) 60%, transparent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    flex: none;
}

.brand-suffix {
    color: var(--muted);
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;

    & a:not(.btn) {
        color: var(--muted);
        font-size: 0.975rem;
        font-weight: 500;
        text-decoration: none;

        &:hover {
            color: var(--accent-2);
        }
    }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
    padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-inner {
    max-width: 46rem;
}

.hero .lead {
    max-width: 40rem;
    font-size: clamp(1.075rem, 1rem + 0.4vw, 1.25rem);
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

/* --- Sections ------------------------------------------------------------ */

.section {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-alt {
    background: color-mix(in oklch, var(--surface) 70%, transparent);
    border-block: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
}

.section-head {
    max-width: 40rem;
    margin: 0 0 2.75rem;

    & p:last-child {
        margin: 0;
        color: var(--muted);
    }
}

.section-note {
    margin: 1.75rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

/* --- Featured project ---------------------------------------------------- */

.project-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(1.75rem, 3.5vw, 3rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    box-shadow: var(--shadow-lg);
}

.project-copy {
    & > p:last-of-type {
        color: var(--muted);
    }

    & h3 {
        font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
        margin-bottom: 0.15em;
    }
}

.project-tagline {
    margin-bottom: 1em;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-2);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: var(--accent-sf);
    color: var(--accent-2);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.4rem 0 1.9rem;
    padding: 0;
    list-style: none;

    & li {
        padding: 0.3rem 0.75rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface-2);
        color: var(--muted);
        font-size: 0.85rem;
    }
}

/* --- Project visual ------------------------------------------------------ */

.project-visual {
    margin: 0;
    display: flex;
    justify-content: center;
}

.visual-card {
    width: min(100%, 20rem);
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(160deg, var(--accent-sf), var(--surface) 65%);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.qr-box {
    padding: 1.1rem;
    border-radius: 12px;
    background: var(--surface);
    color: oklch(38% 0.05 255);
    box-shadow: var(--shadow-sm);

    & svg {
        display: block;
        width: 100%;
        height: auto;
    }
}

.visual-caption {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--muted);
}

/* --- Service cards ------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card {
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;

    & p:last-child {
        margin: 0;
        color: var(--muted);
    }

    &:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
}

/* --- Contact ------------------------------------------------------------- */

.contact-panel {
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    background:
        radial-gradient(38rem 20rem at 50% -30%, var(--accent-sf), transparent 70%),
        var(--surface);
    box-shadow: var(--shadow-lg);
    text-align: center;

    & .section-head {
        max-width: 34rem;
        margin: 0 auto 2rem;
    }
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
    padding: 2.25rem 0;
    border-top: 1px solid var(--line);
    background: color-mix(in oklch, var(--surface) 60%, transparent);
    font-size: 0.925rem;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    & p {
        margin: 0;
    }

    & nav {
        display: flex;
        gap: 1.4rem;
    }

    & a {
        color: var(--muted);
        text-decoration: none;

        &:hover {
            color: var(--accent-2);
        }
    }
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
    .project-card {
        grid-template-columns: 1fr;
    }

    .project-visual {
        order: -1;
    }

    .visual-card {
        width: min(100%, 17rem);
    }
}

@media (max-width: 600px) {
    body {
        font-size: 1rem;
    }

    .site-nav {
        gap: 1rem;

        & a:not(.btn) {
            display: none;
        }
    }

    .brand-suffix {
        display: none;
    }

    .actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

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

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
    }
}
