/* ==========================================================================
   UBC IT — editorial theme
   Light paper base, navy sections, one accent per division (telecom / agro).
   ========================================================================== */

:root {
    --paper: #f4f2ed;
    --paper-2: #ecE9e2;
    --white: #ffffff;
    --ink: #1f2733;
    --ink-2: #283142;
    --ink-3: #161c26;
    --text: #3a4352;
    --muted: #4f5866;
    --line: rgba(31, 39, 51, 0.14);
    --line-dark: rgba(255, 255, 255, 0.12);
    --on-dark: #e9e6df;
    --on-dark-muted: #bcc2cc;

    --accent: #1a6fe0;          /* telecom default */
    --accent-on-dark: #4da3ff;

    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --container: 1200px;
    --gutter: 32px;
    --header-h: 96px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.theme-agro {
    --accent: #15803d;
    --accent-on-dark: #4ade80;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

ul,
ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
}

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

.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 2000;
    background: var(--white);
    color: var(--ink);
    padding: 8px 14px;
}

.skip-link:focus {
    left: 8px;
}

/* Type ------------------------------------------------------------------- */
h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1.04;
}

.display {
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    font-weight: 300;
}

.accent {
    color: var(--accent);
}

.lead {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--text);
    max-width: 52ch;
}

.mono,
.kicker,
.eyebrow {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.eyebrow-num {
    color: var(--accent);
}

.eyebrow-rule {
    width: 40px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.kicker {
    margin-bottom: 18px;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    padding: 15px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn .arrow,
.btn-text .accent {
    font-family: var(--mono);
    color: var(--accent);
    transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
    transform: translate(2px, -2px);
}

.btn-dark {
    background: var(--ink);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--ink-2);
}

.btn-dark .arrow,
.btn-ghost .arrow,
.btn-light .arrow {
    color: var(--accent-on-dark);
}

.btn-ghost {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--on-dark);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
    border-color: var(--on-dark);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent .arrow {
    color: var(--white);
}

.btn-accent:hover {
    filter: brightness(1.08);
}

.btn-light {
    background: var(--paper);
    color: var(--ink);
}

.btn-light .arrow {
    color: var(--accent);
}

.btn-light:hover {
    background: var(--white);
}

.btn-light:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ink);
}

.btn-text:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Header ----------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--ink);
    color: var(--on-dark);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo img {
    height: 76px;
    width: auto;
}

.division-switch {
    margin-left: auto;
}

.switch {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line-dark);
}

.switch a {
    padding: 5px 12px;
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.switch a:hover {
    color: var(--white);
}

.switch a[aria-current="page"] {
    background: var(--accent-on-dark);
    color: var(--ink);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.92rem;
    color: var(--on-dark);
    opacity: 0.85;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-tools {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lang-switch {
    display: flex;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--on-dark-muted);
}

.lang-switch a:hover,
.lang-switch a[aria-current="page"] {
    color: var(--white);
}

.lang-switch a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--accent-on-dark);
    text-underline-offset: 5px;
}

.hamburger {
    display: none;
    margin-left: 12px;
    background: none;
    border: 0;
    padding: 6px;
}

.hamburger .bar {
    display: block;
    width: 22px;
    height: 1.5px;
    margin: 6px 0;
    background: var(--white);
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.hamburger[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Hero ------------------------------------------------------------------- */
.hero {
    padding: 96px 0 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.9rem);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.hero-lead {
    margin-top: 32px;
    font-size: 1.15rem;
    line-height: 1.65;
    max-width: 46ch;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 40px;
}

.hero-art img {
    width: 100%;
    height: auto;
    max-width: 560px;
    margin-left: auto;
}

.hero-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 72px;
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}


.hero-certs {
    display: flex;
    gap: 28px;
}

.hero-certs img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

/* Sections --------------------------------------------------------------- */
.section {
    padding: 120px 0;
}

.section-dark {
    background: var(--ink);
    color: var(--on-dark);
}

.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

.section-dark .lead,
.section-dark p {
    color: var(--on-dark-muted);
}

.section-dark .accent {
    color: var(--accent-on-dark);
}

.section-dark .eyebrow-num {
    color: var(--accent-on-dark);
}

.section-dark .eyebrow,
.section-dark .kicker,
.section-dark .mono {
    color: var(--on-dark-muted);
}

/* Dark section with a muted photo behind it (navy duotone) */
.section-dark.has-photo {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.section-dark.has-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--section-photo) center / cover no-repeat;
    filter: grayscale(1) contrast(1.1);
    opacity: 0.22;
    mix-blend-mode: luminosity;
}

.section-dark.has-photo::after {
    /* fade the photo out towards the text side */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, var(--ink) 0%, rgba(31, 39, 51, 0.55) 55%, rgba(31, 39, 51, 0.2) 100%);
}

/* Two dark sections in a row (e.g. /agro: why + contact) */
.section-dark + .section-dark {
    border-top: 1px solid var(--line-dark);
}

.section-head {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: end;
    margin-bottom: 64px;
}

/* Services grid ---------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.service {
    display: flex;
    flex-direction: column;
    padding: 36px 32px 40px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s var(--ease);
}

.service:hover {
    background: var(--paper-2);
}

.service-wide {
    grid-column: 1 / -1;
}

.service-wide p {
    max-width: 80ch;
}

.service-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    min-height: 104px;
}

.service-num {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.service-icon svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.75;
}

.service:hover .service-icon {
    background: var(--accent);
    color: var(--white);
}

.service-badge {
    width: 104px;
    height: 104px;
    object-fit: contain;
}

.service h3 {
    font-size: 1.4rem;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.service p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-link {
    margin-top: auto;
    padding-top: 22px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
}

.service-link .arrow {
    font-family: var(--mono);
}

.service-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Why -------------------------------------------------------------------- */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
}

.why-grid .lead {
    margin-top: 28px;
}

.why-list li {
    display: grid;
    grid-template-columns: 48px 1fr;
    padding: 26px 0;
    border-top: 1px solid var(--line-dark);
}

.why-list li:last-child {
    border-bottom: 1px solid var(--line-dark);
}

.why-list .mono {
    color: var(--accent-on-dark);
    padding-top: 6px;
}

.why-list h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.why-list p {
    font-size: 0.95rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 88px;
    border-top: 1px solid var(--line-dark);
}

.stats div {
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    padding: 32px 0 0;
}

.stats dt {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.stats dd {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 300;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--white);
}

/* Clients ---------------------------------------------------------------- */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: var(--white);
}

.clients-grid li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    padding: 24px 32px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.clients-grid img {
    max-height: 72px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.85;
    transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

.clients-grid li:hover img {
    filter: none;
    opacity: 1;
}

/* Logos whose artwork is small inside a square canvas */
.clients-grid img.zoom {
    transform: scale(1.7);
}

/* Square logos on a solid background: a bit larger */
.clients-grid img.boxed {
    transform: scale(1.25);
}

/* Thin, detailed artwork: darker grayscale so it doesn't look faded */
.clients-grid img.faint {
    filter: grayscale(1) contrast(1.8);
    opacity: 1;
}

/* Tall/stacked logos need more height to match the visual weight of wide ones */
.clients-grid img.tall {
    max-height: 96px;
}

/* Contact ---------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
}

.contact .display {
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
}

.contact .lead {
    margin: 24px 0 36px;
}

.contact-direct {
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--line-dark);
}

.contact-email {
    display: inline-flex;
    gap: 14px;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--white);
    border-bottom: 1px solid var(--line-dark);
    padding-bottom: 6px;
}

.contact-email .arrow {
    font-family: var(--mono);
    color: var(--accent-on-dark);
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 24px;
}

.contact-list a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--on-dark);
    font-size: 0.95rem;
}

.contact-list a:hover,
.contact-email:hover {
    color: var(--accent-on-dark);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field span {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.field input,
.field textarea {
    width: 100%;
    padding: 10px 0 12px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--white);
    font: inherit;
    font-size: 1.05rem;
    resize: vertical;
    transition: border-color 0.25s var(--ease);
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-on-dark);
}

.contact-form .btn-light {
    align-self: flex-start;
}

.form-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-captcha:empty {
    display: none;
}

.form-status {
    min-height: 1.6em;
    font-size: 0.95rem;
}

.form-status.is-success {
    color: #4ade80;
}

.form-status.is-error {
    color: #f87171;
}

/* Footer ----------------------------------------------------------------- */
.site-footer {
    background: var(--ink-3);
    color: var(--on-dark-muted);
    padding-top: 72px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
}

.footer-brand .mono {
    margin-top: 18px;
    color: var(--on-dark-muted);
}

.footer-title {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-dark);
    margin-bottom: 16px;
}

.footer-list + .footer-title {
    margin-top: 32px;
}

.footer-list li {
    margin-bottom: 10px;
    font-size: 0.92rem;
}

.footer-list a:hover {
    color: var(--white);
}

.footer-list a.footer-division {
    color: var(--accent-on-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    padding-bottom: 28px;
    border-top: 1px solid var(--line-dark);
}

.footer-bottom .mono {
    color: var(--on-dark-muted);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
    .nav-links {
        gap: 22px;
    }

    .main-nav {
        gap: 22px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    :root {
        --gutter: 20px;
        --header-h: 72px;
    }

    .header-inner {
        gap: 14px;
    }

    .logo img {
        height: 54px;
    }

    .hamburger {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--ink);
        border-top: 1px solid var(--line-dark);
        padding: 8px var(--gutter) 28px;
        transform: translateY(-120%);
        visibility: hidden;
        transition: transform 0.3s var(--ease), visibility 0.3s;
    }

    .main-nav.is-open {
        transform: translateY(0);
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--line-dark);
        font-size: 1.05rem;
    }

    .nav-tools {
        justify-content: space-between;
        margin-top: 24px;
    }

    .hero {
        padding-top: 56px;
    }

    .hero-grid,
    .section-head,
    .why-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-art img {
        max-width: 320px;
        margin: 8px auto 0;
    }

    .hero-strip {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 48px;
    }

    .section {
        padding: 80px 0;
    }

    .section-head {
        gap: 20px;
        margin-bottom: 40px;
    }

    .why-grid,
    .contact-grid {
        gap: 48px;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Odd number of logos: let the last one span the full row */
    .clients-grid li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

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

    .logo img {
        height: 46px;
    }

    .switch a {
        padding: 5px 9px;
    }

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

    .service {
        padding: 28px 24px 32px;
    }

    .clients-grid li {
        height: 110px;
        padding: 16px;
    }

    .clients-grid img {
        max-width: 130px;
        max-height: 56px;
    }

    .clients-grid img.tall {
        max-height: 74px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* ===== CLI·OPS product page ======================================= */
.service-tag {
    margin-left: 12px;
    padding: 3px 8px;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--accent);
}

.product-logo {
    color: var(--ink);
    margin-bottom: 26px;
}

.product-logo svg {
    display: block;
    height: 60px;
    width: auto;
}

.service-logo {
    color: var(--ink);
}

.service-logo svg {
    display: block;
    width: 72px;
    height: 72px;
}

/* Hero dashboard mock */
.dash {
    background: var(--ink);
    color: var(--on-dark);
    padding: 22px 24px 18px;
    box-shadow: 0 30px 60px -30px rgba(31, 39, 51, 0.55);
    max-width: 520px;
    margin-left: auto;
}

.dash-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-dark);
}

.dash .mono {
    color: var(--on-dark-muted);
}

.dash-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4ade80;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-dark);
}

.dash-kpis div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-kpis .mono {
    font-size: 0.66rem;
}

.dash-kpis strong {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--white);
    letter-spacing: -0.03em;
}

.dash-tabs {
    display: flex;
    gap: 18px;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.dash-tabs .is-active {
    color: var(--white);
    box-shadow: inset 0 -2px 0 var(--accent-on-dark);
    padding-bottom: 6px;
}

.dash-kpis em {
    font-style: normal;
    font-family: var(--mono);
    font-size: 0.64rem;
    color: var(--on-dark-muted);
}

.dash-kpis em.up {
    color: #4ade80;
}

.dash-chart {
    padding: 14px 0 6px;
    border-bottom: 1px solid var(--line-dark);
}

.dash-chart .mono {
    display: block;
    font-size: 0.64rem;
    margin-bottom: 8px;
}

.dash-chart svg {
    display: block;
    width: 100%;
    height: 74px;
}

.dash-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawLine 2.2s var(--ease) 0.3s forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.dash-area {
    opacity: 0;
    animation: fadeArea 1s ease 1.6s forwards;
}

@keyframes fadeArea {
    to { opacity: 1; }
}

.dash-table {
    padding-top: 4px;
}

.dash-row {
    display: grid;
    grid-template-columns: 84px 1fr 96px 66px;
    align-items: center;
    gap: 12px;
    padding: 9px 6px;
    margin: 0 -6px;
    border-bottom: 1px solid var(--line-dark);
    animation: rowPick 12s infinite both;
    animation-delay: calc(var(--i) * 2s);
}

.dash-row-head {
    font-size: 0.62rem;
    white-space: nowrap;
    color: var(--on-dark-muted);
    animation: none;
}

.dash-row:last-child {
    border-bottom: 0;
}

@keyframes rowPick {
    0%, 2% { background: transparent; }
    4%, 13% { background: rgba(77, 163, 255, 0.10); }
    16%, 100% { background: transparent; }
}

.dash-num,
.dash-rate {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--on-dark);
}

.dash-rate,
.dash-row-head span:last-child {
    text-align: right;
}

.dash-state {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.dash-state i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.state-txt-new { color: #cbd5e1; }
.state-txt-healthy { color: #4ade80; }
.state-txt-watch { color: #fb923c; }
.state-txt-resting { color: #c084fc; }

.spark {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.spark i {
    width: 6px;
    border-radius: 1px;
    animation: sparkIn 0.4s var(--ease) both;
    animation-delay: calc(0.6s + var(--i) * 0.06s);
}

.spark i.ok {
    height: 18px;
    background: #4ade80;
}

.spark i.miss {
    height: 6px;
    background: rgba(255, 255, 255, 0.22);
}

.spark-empty {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    height: 9px;
    width: 87px;
}

@keyframes sparkIn {
    from { transform: scaleY(0); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}

.dash-note {
    margin-top: 10px;
    text-align: right;
    font-size: 0.6rem;
    color: rgba(188, 194, 204, 0.6);
}

/* Problem / security blocks */
.pains {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.pain {
    padding: 32px 32px 36px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pain .service-num {
    display: block;
    margin-bottom: 28px;
}

.pain h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

.pain p {
    font-size: 0.95rem;
}

/* How it works: alternating step rows */
.section-how {
    background: var(--paper-2);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 56px;
    align-items: center;
    padding: 40px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.step-flip .step-copy {
    order: 2;
}

.step-num {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 16px;
}

.step h3 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 300;
    margin-bottom: 14px;
}

.step p {
    max-width: 46ch;
}

/* Shared animation styles */
.anim {
    width: 100%;
    height: auto;
    font-family: var(--mono);
}

.anim .node circle:first-child,
.anim .agent circle:first-child {
    fill: var(--white);
    stroke: var(--ink);
    stroke-width: 1.25;
}

.anim .glyph {
    fill: var(--ink);
}

.anim .glyph-line {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.anim .glyph-fill {
    fill: var(--ink);
}

.anim .node-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-anchor: middle;
    fill: var(--muted);
    text-transform: uppercase;
}

.anim .chip-num {
    font-size: 13px;
    fill: var(--ink);
}

/* 1 · Pool: one chip lights up per call */
.pool-title {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-anchor: middle;
    fill: var(--muted);
}

.pool-chip rect {
    fill: var(--white);
    stroke: var(--line);
    stroke-width: 1;
    animation: chipPick 10s infinite both;
    animation-delay: calc(var(--i) * 2s);
}

.pool-chip .chip-num {
    animation: chipText 10s infinite both;
    animation-delay: calc(var(--i) * 2s);
}

.pool-chip .chip-dot {
    fill: #4ade80;
}

@keyframes chipPick {
    0%, 2% { fill: var(--white); stroke: var(--line); }
    5%, 17% { fill: var(--accent); stroke: var(--accent); }
    20%, 100% { fill: var(--white); stroke: var(--line); }
}

@keyframes chipText {
    0%, 2% { fill: var(--ink); }
    5%, 17% { fill: var(--white); }
    20%, 100% { fill: var(--ink); }
}

.pool-links path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 5 6;
    opacity: 0;
    animation: linkOn 10s infinite both, dashFlow 0.9s linear infinite;
    animation-delay: calc(var(--i) * 2s), 0s;
}

@keyframes linkOn {
    0%, 3% { opacity: 0; }
    6%, 16% { opacity: 1; }
    19%, 100% { opacity: 0; }
}

@keyframes dashFlow {
    to { stroke-dashoffset: -22; }
}

/* 2 · Lifecycle: states light up in turn, history fills in */
.state rect {
    fill: transparent;
    stroke: var(--line);
    stroke-width: 1.25;
    animation: stateOn 12s infinite both;
    animation-delay: calc(var(--i) * 3s);
}

.state text {
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-anchor: middle;
    fill: var(--muted);
    animation: stateText 12s infinite both;
    animation-delay: calc(var(--i) * 3s);
}

.state-new { --c: #64748b; }
.state-healthy { --c: #16a34a; }
.state-watch { --c: #ea7c1e; }
.state-resting { --c: #8b5cf6; }

@keyframes stateOn {
    0%, 1% { fill: transparent; stroke: var(--line); }
    3%, 23% { fill: var(--c); stroke: var(--c); }
    25%, 100% { fill: transparent; stroke: var(--line); }
}

@keyframes stateText {
    0%, 1% { fill: var(--muted); }
    3%, 23% { fill: var(--white); }
    25%, 100% { fill: var(--muted); }
}

.state-arrow {
    stroke: var(--muted);
    stroke-width: 1.25;
}

.life-label,
.life-legend {
    font-size: 10.5px;
    letter-spacing: 0.12em;
    fill: var(--muted);
}

.life-legend .ok { fill: #16a34a; }
.life-legend .miss { fill: #cbd5e1; }

.tick {
    opacity: 0;
    animation: tickIn 12s infinite both;
    animation-delay: calc(var(--i) * 0.7s);
}

.tick-ok { fill: #16a34a; }
.tick-miss { fill: #cbd5e1; }

@keyframes tickIn {
    0% { opacity: 0; }
    2%, 92% { opacity: 1; }
    100% { opacity: 0; }
}

/* 3 · Latch: outbound call, latch to agent B, callback reaches B */
.agent circle:first-child {
    transition: none;
}

.agent-main circle:first-child {
    animation: agentGlow 9s infinite both;
}

@keyframes agentGlow {
    0%, 70% { stroke: var(--ink); stroke-width: 1.25; }
    74%, 96% { stroke: #16a34a; stroke-width: 3; }
    100% { stroke: var(--ink); stroke-width: 1.25; }
}

.latch-chip rect {
    fill: var(--white);
    stroke: var(--accent);
    stroke-width: 1.5;
}

.latch-out,
.latch-in {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 100;
}

.latch-out {
    stroke: var(--accent);
    animation: drawOut 9s infinite both;
}

.latch-in {
    stroke: #16a34a;
    animation: drawIn 9s infinite both;
}

@keyframes drawOut {
    0% { stroke-dashoffset: 100; opacity: 1; }
    25%, 40% { stroke-dashoffset: 0; opacity: 1; }
    48%, 100% { stroke-dashoffset: 0; opacity: 0.15; }
}

@keyframes drawIn {
    0%, 48% { stroke-dashoffset: 100; opacity: 1; }
    72%, 96% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

.latch-pin {
    opacity: 0;
    animation: pinIn 9s infinite both;
}

.latch-pin rect {
    fill: var(--ink);
}

.latch-pin text {
    font-size: 11px;
    text-anchor: middle;
    fill: var(--white);
}

@keyframes pinIn {
    0%, 28% { opacity: 0; transform: translateY(6px); }
    34%, 96% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; }
}

.latch-check {
    opacity: 0;
    animation: checkIn 9s infinite both;
}

.latch-check circle {
    fill: #16a34a;
}

.latch-check path {
    fill: none;
    stroke: var(--white);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes checkIn {
    0%, 72% { opacity: 0; }
    76%, 96% { opacity: 1; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .anim *,
    .dash * {
        animation: none !important;
    }

    .dash-line {
        stroke-dashoffset: 0;
    }

    .pool-links:first-of-type path,
    .tick,
    .latch-pin,
    .latch-check {
        opacity: 1;
    }
}

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

    .step {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px 24px;
    }

    .step-flip .step-copy {
        order: 0;
    }

    .dash {
        margin: 0 auto;
    }

    .dash-row {
        grid-template-columns: 66px 1fr 72px 54px;
        gap: 8px;
    }

    .dash-state {
        font-size: 0.74rem;
    }

    .dash-num,
    .dash-rate {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .dash-row {
        grid-template-columns: 64px 1fr 70px 48px;
    }

    .dash-row-head {
        font-size: 0.56rem;
        letter-spacing: 0.04em;
    }
}

/* CLI·OPS: problem list (styled as pain points, not features) */
.problems {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.problem {
    display: flex;
    gap: 16px;
    padding: 26px 24px 28px;
    background: rgba(234, 124, 30, 0.06);
    border-left: 3px solid #ea7c1e;
}

.problem-mark {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ea7c1e;
    color: var(--white);
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.85rem;
}

.problem h3 {
    font-size: 1.2rem;
    margin: 2px 0 10px;
}

.problem p {
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .problems {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* CLI·OPS hero title is longer than the division pages' */
.page-cliops .hero h1 {
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
}

/* Agro header logo: leaf grows from its stem on page load */
.logo-agro {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.logo-leaf {
    position: absolute;
    left: 21.42%;      /* 190 / 887 */
    top: 25.62%;       /* 72 / 281 */
    width: 6.764%;     /* 60 / 887 */
    height: 21.35%;    /* 60 / 281 */
    overflow: visible;
}

.logo-leaf .leaf {
    transform-box: fill-box;
    transform-origin: 5% 100%;   /* the stem, at the leaf's bottom-left */
    animation: leafGrow 1.1s cubic-bezier(0.34, 1.4, 0.5, 1) 0.35s both;
}

@keyframes leafGrow {
    0% { transform: rotate(-45deg) scale(0); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: rotate(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .logo-leaf .leaf {
        animation: none;
    }
}

/* Featured service card (CLI·OPS): dark, full width */
.service-featured {
    background: var(--ink);
    color: var(--on-dark);
}

.service-featured:hover {
    background: var(--ink-2);
}

.service-featured h3 {
    color: var(--white);
}

.service-featured p,
.service-featured .service-num {
    color: var(--on-dark-muted);
}

.service-featured .service-logo {
    color: var(--on-dark);
}

.service-featured .service-link {
    color: var(--accent-on-dark);
}

.service-featured .service-tag {
    background: var(--accent-on-dark);
    color: var(--ink);
}

/* Featured card: no need for the badge-height reserve, pull the title up */
.service-featured .service-top {
    min-height: 0;
    margin-bottom: 4px;
}

.service-featured .service-logo svg {
    width: 64px;
    height: 64px;
}

/* Technology rows ("the tools behind the work") */
.tech-rows {
    border-top: 1px solid var(--line);
}

.tech-row {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.6fr;
    gap: 32px;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.tech-row h3 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.25rem;
}

.tech-dash {
    width: 18px;
    height: 1.5px;
    background: var(--accent);
}

.tech-row p {
    font-size: 0.95rem;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.tech-items li {
    padding: 5px 10px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
}

@media (max-width: 900px) {
    .tech-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ---------- CLI·OPS site (cli-ops.io): SVG logo in header/footer, no division switch ---------- */
.logo-cliops {
    display: inline-flex;
    color: var(--on-dark);
}

.logo-cliops svg {
    display: block;
    height: 44px;
    width: auto;
}

.page-cliops .main-nav {
    margin-left: auto;
}

@media (max-width: 900px) {
    .logo-cliops svg {
        height: 36px;
    }

    .page-cliops .hamburger {
        margin-left: auto;
    }
}
