/* ==========================================================================
   Yuanxi Tech — Capabilities-forward layout, three equal image columns
   ========================================================================== */

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

:root {
    --bg:       #f7f5f0;
    --bg-card:  #ffffff;
    --ink:      #111111;
    --ink-2:    #3a3a3a;
    --ink-3:    #6b6b6b;
    --muted:    #9a9a94;
    --line:     #e2dfd8;
    --accent:   #111111;
    --bg-glass: rgba(247, 245, 240, 0.88);
    --container: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--ink);
}

h1 { font-size: clamp(2rem, 3.8vw, 3rem);   line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.05rem;                    line-height: 1.35; }

h2 em {
    font-style: italic;
    font-weight: 400;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    margin-bottom: 14px;
    font-weight: 500;
}

.eyebrow-light { color: rgba(255, 255, 255, 0.55); }

.section-head {
    max-width: 600px;
    margin-bottom: 64px;
}

.section-head h2 { margin-bottom: 14px; }

.section-desc {
    font-size: 1rem;
    color: var(--ink-3);
    max-width: 480px;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-glass);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 1rem;
}

.header-download {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-size: 0.82rem;
}

.download-link {
    border-bottom: 1px solid currentColor;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: opacity 0.2s ease;
}

.download-link:hover {
    opacity: 0.58;
}

.download-password {
    color: var(--ink-3);
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
}


.nav {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-left: auto;
    font-size: 0.9rem;
}

.nav a {
    color: var(--ink-3);
    transition: color 0.2s;
}

.nav a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Resource login dialog
   -------------------------------------------------------------------------- */

.resource-modal-target {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.resource-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#resource-login:target ~ .resource-modal,
#resource-login-error:target {
    display: flex;
}

.resource-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.58);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.resource-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    padding: 42px;
    background: var(--bg);
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.resource-modal-card .eyebrow {
    margin-bottom: 12px;
}

.resource-modal-card h2 {
    margin-bottom: 12px;
}

.resource-modal-intro {
    color: var(--ink-3);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 28px;
}

.resource-modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.resource-modal-close:hover {
    background: var(--line);
    color: var(--ink);
}

.resource-login-form {
    display: grid;
    gap: 9px;
}

.resource-login-form label {
    color: var(--ink-2);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

.resource-login-form input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    color: var(--ink);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.resource-login-form input:focus {
    border-color: var(--ink-3);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.resource-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.resource-form-actions .btn {
    justify-content: center;
    flex: 1;
}

.resource-login-error {
    display: none;
    padding: 11px 13px;
    margin-top: 6px;
    color: #8b3535;
    background: #f7e9e6;
    border: 1px solid #e8c9c3;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.45;
}

#resource-login-error:target .resource-login-error {
    display: block;
}

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

.hero {
    padding: 96px 0 72px;
    border-bottom: 1px solid var(--line);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 80px;
    align-items: end;
}

.hero-text {
    max-width: 640px;
}

.hero-text .eyebrow {
    margin-bottom: 18px;
}

.hero-text .hero-title {
    width: 100%;
    white-space: nowrap;
    font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
    font-size: clamp(0.75rem, 1.9vw, 1.75rem);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin-bottom: 22px;
}

.footer-inner p:first-child {
    white-space: nowrap;
    font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
    font-size: clamp(0.68rem, 2vw, 0.82rem);
    font-style: italic;
    letter-spacing: -0.01em;
}

.hero-text .lead {
    font-size: 1.05rem;
    color: var(--ink-3);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #000;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-outline:hover {
    border-color: var(--ink);
}

/* Hero stats */
.hero-stats {
    display: flex;
    gap: 48px;
    align-items: flex-end;
    padding-bottom: 8px;
}

.stat-item {
    text-align: right;
}

.stat-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--ink);
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Capabilities — paired images and editorial copy
   -------------------------------------------------------------------------- */

.capabilities {
    padding: 112px 0 128px;
    overflow: hidden;
}

.capability-rows {
    display: flex;
    flex-direction: column;
    gap: 104px;
    margin-top: 72px;
}

.capability-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.85fr);
    gap: 92px;
    align-items: center;
}

.capability-row:nth-child(even) {
    grid-template-columns: minmax(330px, 0.85fr) minmax(0, 1fr);
}

.capability-row:nth-child(even) .visual-piece {
    grid-column: 2;
    grid-row: 1;
}

.capability-row:nth-child(even) .capability-copy {
    grid-column: 1;
    grid-row: 1;
}

.visual-piece {
    width: min(100%, 510px);
    margin: 0;
    background: var(--bg);
    aspect-ratio: 1.16;
    overflow: hidden;
    justify-self: start;
    transition: transform 0.4s ease;
}

.visual-piece img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.visual-piece-circuit {
    transform: none;
}

.visual-piece-software {
    justify-self: end;
    transform: none;
}

.visual-piece-structure {
    transform: none;
}

.visual-piece-circuit:hover {
    transform: translate(-5px, -7px) rotate(-6deg);
}

.visual-piece-software:hover {
    transform: translate(5px, -7px) rotate(2deg);
}

.visual-piece-structure:hover {
    transform: translate(-5px, -7px) rotate(-4deg);
}

.capability-copy {
    width: 100%;
    max-width: 440px;
    justify-self: end;
}

.capability-row:nth-child(even) .capability-copy {
    justify-self: start;
}

.story-index {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.capability-copy h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.65rem, 2.3vw, 2.15rem);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.12;
    margin-bottom: 16px;
}

.capability-copy p {
    color: var(--ink-3);
    font-size: 0.95rem;
    line-height: 1.75;
}

.story-note {
    display: block;
    margin-top: 20px;
    color: var(--ink-2);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about {
    padding: 96px 0;
    border-bottom: 1px solid var(--line);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: start;
}

.about-text h2 { margin-top: 6px; }

.about-body p {
    font-size: 1rem;
    color: var(--ink-3);
    line-height: 1.75;
    margin-bottom: 16px;
    max-width: 560px;
}

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

.contact {
    padding: 96px 0 80px;
    background: var(--ink);
    color: #f0ede8;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: start;
}

.contact-head .contact-title {
    color: #fff;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
    font-size: clamp(1.15rem, 2.25vw, 2rem);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-top: 8px;
    margin-bottom: 32px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-block h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    margin-bottom: 10px;
}

.contact-block p,
.contact-block a {
    font-size: 0.95rem;
    color: #f0ede8;
    line-height: 1.7;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.contact-block a:hover {
    border-color: rgba(255, 255, 255, 0.7);
}

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

.site-footer {
    background: #0c0c0c;
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

/* --------------------------------------------------------------------------
   EveLink product page
   -------------------------------------------------------------------------- */

.evelink-page .evelink-hero {
    padding: 64px 0 96px;
}

.evelink-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    gap: 80px;
    align-items: end;
}

.footer-copyright {
    font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
    font-style: italic;
    letter-spacing: 0.01em;
}

.evelink-hero .hero-title {
    max-width: 760px;
    font-family: 'Palatino Linotype', 'Book Antiqua', Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
}

.evelink-hero .lead {
    max-width: 650px;
    margin-top: 28px;
}

.evelink-hero-aside {
    border-left: 1px solid var(--line);
    padding-left: 28px;
    color: var(--ink-3);
}

.evelink-hero-aside .story-index {
    display: block;
    margin-bottom: 16px;
}

.evelink-showcase {
    padding: 64px 0 128px;
    border-top: 1px solid var(--line);
}

.evelink-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 64px;
    column-gap: 48px;
    margin-top: 64px;
}

.evelink-feature-wide {
    grid-column: 1 / -1;
}

.evelink-feature {
    min-width: 0;
}

.evelink-state {
    display: none;
}

.evelink-feature-wide {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 56px;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 32px;
}

.evelink-feature-wide .evelink-feature-copy {
    min-height: 0;
}

.evelink-command-feature {
    grid-template-columns: minmax(320px, 0.55fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.evelink-command-feature .evelink-feature-copy {
    min-height: 0;
}

.evelink-command-feature .evelink-media-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

.evelink-command-feature .evelink-command-copy {
    grid-column: 1;
    grid-row: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
}

.evelink-ai-feature {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
    gap: 48px;
}

.evelink-ai-feature .evelink-media-switch {
    grid-column: 1;
    grid-row: 1;
}

.evelink-ai-feature .evelink-feature-copy {
    grid-column: 2;
    grid-row: 1;
}

.evelink-media-switch {
    position: relative;
    width: 100%;
    overflow: visible;
    background: transparent;
    border: 0;
}

.evelink-media {
    position: relative;
    inset: auto;
    display: none;
    cursor: pointer;
}

.evelink-media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 680px;
    object-fit: initial;
    background: transparent;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.evelink-command-feature .evelink-media img {
    max-height: none;
    width: 100%;
    margin: 0 auto;
}

.evelink-ai-feature .evelink-media img {
    max-height: none;
    width: 100%;
}

.evelink-media:hover img {
    transform: perspective(900px) rotateY(-2deg) rotateZ(-0.35deg) scale(1.018);
    filter: brightness(1.035);
}

.evelink-media-switch .evelink-media {
    animation: evelink-image-in 0.5s ease both;
}

.evelink-media-ai {
    display: block;
}

@keyframes evelink-image-in {
    from {
        opacity: 0;
        transform: perspective(900px) rotateY(3deg) rotateZ(0.5deg) scale(0.985);
    }
    to {
        opacity: 1;
        transform: perspective(900px) rotateY(0) rotateZ(0) scale(1);
    }
}

.evelink-feature-copy {
    max-width: 720px;
    padding-top: 24px;
}
#evelink-theme-day:checked ~ .evelink-media-switch .evelink-media-day,
#evelink-theme-night:checked ~ .evelink-media-switch .evelink-media-night,
#evelink-command-1:checked ~ .evelink-media-switch .evelink-media-command-1,
#evelink-command-2:checked ~ .evelink-media-switch .evelink-media-command-2,
#evelink-command-3:checked ~ .evelink-media-switch .evelink-media-command-3 {
    display: block;
}

.evelink-feature-copy {
    max-width: 720px;
    padding-top: 24px;
}

.evelink-feature-copy h3 {
    font-size: clamp(1.3rem, 2.1vw, 1.8rem);
    margin: 8px 0 12px;
}

.evelink-feature-copy p {
    max-width: 680px;
    color: var(--ink-3);
    line-height: 1.8;
}

.evelink-feature-copy .story-note {
    display: block;
    margin-top: 18px;
}

.evelink-command-copy {
    display: none;
}

#evelink-command-1:checked ~ .evelink-command-copy-1,
#evelink-command-2:checked ~ .evelink-command-copy-2,
#evelink-command-3:checked ~ .evelink-command-copy-3 {
    display: flex;
}

/* --------------------------------------------------------------------------
   EveLink page — background theme switcher (white / default / night)
   State lives on hidden radios at the top of <body>; the three dots sit at
   the far right of the header and the themes swap the palette variables.
   Night (black) is the default state, set in the markup.
   -------------------------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.evelink-page .header-download {
    margin-left: auto;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 22px;
}

.theme-dot {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-dot:hover {
    transform: scale(1.08);
}

.theme-dot-white {
    background: #ffffff;
}

.theme-dot-cream {
    background: #f7f5f0;
}

.theme-dot-night {
    background: #14140f;
    border-color: rgba(128, 128, 128, 0.45);
}

#page-bg-white:checked ~ .site-header .theme-dot-white,
#page-bg-cream:checked ~ .site-header .theme-dot-cream,
#page-bg-night:checked ~ .site-header .theme-dot-night {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink);
}

#page-bg-white:focus-visible ~ .site-header .theme-dot-white,
#page-bg-cream:focus-visible ~ .site-header .theme-dot-cream,
#page-bg-night:focus-visible ~ .site-header .theme-dot-night {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

html:has(#page-bg-white:checked) {
    --bg: #ffffff;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.88);
}

html:has(#page-bg-night:checked) {
    color-scheme: dark;
    --bg: #131311;
    --bg-card: #1d1d19;
    --ink: #f4f1ea;
    --ink-2: #dcd8d0;
    --ink-3: #a8a49b;
    --muted: #837e75;
    --line: #2f2e29;
    --accent: #f4f1ea;
    --bg-glass: rgba(19, 19, 17, 0.86);
}

/* index.html pieces that hard-code colours instead of palette variables */
html:has(#page-bg-night:checked) .visual-piece img {
    mix-blend-mode: normal;
    filter: brightness(0.9);
}

html:has(#page-bg-night:checked) .btn-primary {
    color: var(--bg);
}

html:has(#page-bg-night:checked) .btn-primary:hover {
    background: #ffffff;
}

html:has(#page-bg-night:checked) .contact {
    background: #1d1d19;
}

html:has(#page-bg-night:checked) .resource-modal-backdrop {
    background: rgba(0, 0, 0, 0.72);
}

html:has(#page-bg-night:checked) .resource-modal-card {
    background: var(--bg-card);
    border-color: var(--line);
}

html:has(#page-bg-night:checked) .resource-login-form input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

@media (max-width: 768px) {
    .theme-switch {
        gap: 7px;
        margin-left: 14px;
    }

    .theme-dot {
        width: 16px;
        height: 16px;
    }

    .header-download {
        gap: 8px;
        font-size: 0.72rem;
    }

    .download-password {
        white-space: nowrap;
    }


    .evelink-page .evelink-hero {
        padding: 40px 0 64px;
    }

    .evelink-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .evelink-hero-aside {
        max-width: 480px;
    }

    .evelink-showcase {
        padding: 44px 0 88px;
    }

    .evelink-feature-grid {
        grid-template-columns: 1fr;
        gap: 44px;
        margin-top: 48px;
    }

    .evelink-feature-wide {
        grid-column: auto;
        grid-template-columns: 1fr;
        gap: 28px;
        border-top: 1px solid var(--line);
        padding-top: 24px;
    }

    .evelink-feature-wide .evelink-feature-copy,
    .evelink-command-feature .evelink-feature-copy {
        min-height: 0;
    }

    .evelink-feature-wide .evelink-media-switch,
    .evelink-command-feature .evelink-media-switch,
    .evelink-command-feature .evelink-command-copy,
    .evelink-ai-feature .evelink-media-switch,
    .evelink-ai-feature .evelink-feature-copy {
        grid-column: auto;
        grid-row: auto;
    }

    .evelink-feature-wide .evelink-media-switch {
        order: 1;
    }

    .evelink-command-feature .evelink-command-copy {
        padding-top: 0;
    }

}

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

@media (max-width: 1024px) {
    .wrap { padding: 0 28px; }

    .hero-text .hero-title {
        font-size: clamp(0.7rem, 1.9vw, 1.35rem);
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-stats {
        justify-content: flex-start;
        gap: 40px;
    }

    .stat-item { text-align: left; }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 900px) {
    .capability-rows {
        gap: 72px;
        margin-top: 56px;
    }

    .capability-row,
    .capability-row:nth-child(even) {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
        gap: 52px;
    }
}

@media (max-width: 768px) {
    .capability-rows {
        gap: 64px;
    }

    .nav {
        gap: 26px;
    }

    .capability-row,
    .capability-row:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .capability-row:nth-child(even) .visual-piece,
    .capability-row:nth-child(even) .capability-copy {
        grid-column: auto;
        grid-row: auto;
    }

    .visual-piece,
    .visual-piece-software {
        width: min(88%, 480px);
        justify-self: center;
    }

    .capability-copy,
    .capability-row:nth-child(even) .capability-copy {
        max-width: 560px;
        justify-self: start;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .nav {
        gap: 16px;
        font-size: 0.8rem;
    }

    .theme-switch {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .hero,
    .capabilities,
    .about,
    .contact {
        padding: 64px 0;
    }

    .nav {
        display: none;
    }

    .hero-stats {
        gap: 24px;
    }

    .resource-modal-card {
        padding: 34px 24px 28px;
    }

    .resource-form-actions {
        gap: 8px;
    }

    .resource-form-actions .btn {
        padding-left: 16px;
        padding-right: 16px;
    }

    .icp-record {
        flex-basis: 100%;
        text-align: center;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }
}

