:root {
    --bg: #080b12;
    --bg-alt: #0d131f;
    --surface: #131b28;
    --surface-2: #182333;
    --border: rgba(255, 255, 255, .09);
    --border-2: rgba(255, 255, 255, .16);
    --text: #f2f4f7;
    --muted: #a3adbd;
    --font-display: 'Archivo', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --module-accent: #8b5cf6;
    --page-gutter: clamp(20px, 4vw, 48px);
    --section-space: clamp(72px, 9vw, 132px);
}

html {
    color-scheme: dark;
}

body {
    background:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        var(--bg);
    background-size: 72px 72px;
    font-family: var(--font-body);
}

h1,
h2,
h3,
.brand,
.nm-title,
.plan-price,
.stat strong {
    font-family: var(--font-display);
}

h1,
h2,
h3 {
    text-wrap: balance;
}

p,
li {
    text-wrap: pretty;
}

.container {
    max-width: 1240px;
    padding-inline: var(--page-gutter);
}

.nav {
    background: rgba(8, 11, 18, .88);
    backdrop-filter: blur(18px) saturate(135%);
}

.agency-nav-menu {
    right: -360px;
    left: auto;
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 0;
    width: min(820px, calc(100vw - 48px));
    padding: 0 !important;
    overflow: hidden;
    border-color: rgba(255, 255, 255, .12);
    border-radius: 16px !important;
    background: rgba(14, 20, 33, .98);
    box-shadow: 0 28px 70px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(124, 58, 237, .05);
    transform: translateY(-6px);
}

.agency-nav-overview {
    padding: 22px;
    border-right: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(124, 58, 237, .13), rgba(124, 58, 237, .025));
}

.agency-nav-kicker,
.agency-nav-heading {
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.agency-nav-menu.mega .agency-nav-featured {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 176px;
    margin-top: 13px;
    padding: 16px;
    border: 1px solid rgba(167, 139, 250, .16);
    background: rgba(11, 15, 23, .38);
}

.agency-nav-menu.mega .agency-nav-featured:hover,
.agency-nav-menu.mega .agency-nav-featured.is-active {
    border-color: rgba(167, 139, 250, .4);
    background: rgba(124, 58, 237, .13);
}

.agency-nav-featured .nm-desc {
    margin-top: 4px;
    white-space: normal;
}

.agency-nav-arrow {
    width: 18px;
    height: 18px;
    margin-top: auto;
    color: var(--primary-light);
    transition: transform .16s ease;
}

.agency-nav-featured:hover .agency-nav-arrow {
    transform: translateX(3px);
}

.agency-nav-modules {
    min-width: 0;
    padding: 22px;
}

.agency-nav-heading {
    display: flex;
    justify-content: space-between;
    margin: 0 10px 10px;
}

.agency-nav-heading span:last-child {
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.agency-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
}

.agency-nav-menu.mega .agency-nav-grid a {
    min-width: 0;
    padding: 11px 10px;
}

.agency-nav-grid .nm-txt {
    min-width: 0;
}

.agency-nav-grid .nm-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-group:hover .agency-nav-menu,
.nav-group:focus-within .agency-nav-menu {
    transform: translateY(0);
}

.nav-inner {
    min-height: 74px;
}

.nav-link,
.nav-trigger {
    position: relative;
}

.nav-link::after,
.nav-trigger::before {
    position: absolute;
    right: 6px;
    bottom: -12px;
    left: 6px;
    height: 1px;
    content: '';
    background: var(--primary-light);
    opacity: 0;
    transform: scaleX(.3);
    transition: opacity .16s ease, transform .16s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after,
.nav-trigger:hover::before,
.nav-trigger.is-active::before {
    opacity: 1;
    transform: scaleX(1);
}

.btn {
    border-radius: 9px;
    font-family: var(--font-display);
    letter-spacing: -.01em;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.btn::after {
    content: '→';
    transition: transform .16s ease;
}

.btn:hover::after {
    transform: translateX(3px);
}

.btn-primary {
    background: #7540e8;
    box-shadow: 0 10px 30px -18px rgba(124, 58, 237, .9);
}

.btn-primary:hover {
    background: #8657eb;
}

.nav-dashboard-link::after {
    display: inline-block;
    margin-left: 3px;
    content: '→';
    transition: transform .16s ease;
}

.nav-dashboard-link:hover::after {
    transform: translateX(3px);
}

@media (min-width: 861px) {
    .nav-actions .nav-cta,
    .nav-actions > .btn-primary {
        min-height: 49px;
        font-size: 15px;
    }
}

.eyebrow {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #c4b5fd;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gradient-text {
    background: none;
    color: #bba8ff;
    -webkit-text-fill-color: currentColor;
}

.page-hero {
    min-height: 430px;
    padding: clamp(88px, 11vw, 150px) 0 72px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.page-hero::before {
    inset: 0;
    height: auto;
    background:
        linear-gradient(90deg, rgba(124, 58, 237, .12), transparent 34%),
        radial-gradient(circle at 82% 35%, rgba(56, 189, 248, .06), transparent 28%);
}

.page-hero .container {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
    align-items: end;
    gap: 48px;
}

.page-hero .eyebrow,
.page-hero h1 {
    grid-column: 1;
}

.page-hero h1 {
    max-width: 780px;
    margin: 22px 0 0;
    font-size: clamp(2.65rem, 5vw, 4.75rem);
    line-height: 1;
    letter-spacing: -.048em;
}

.agency-hero h1 {
    max-width: 780px;
    font-size: clamp(2.5rem, 5vw, 4.35rem);
}

.module-detail-grid h1 {
    font-size: clamp(2.45rem, 5vw, 4.15rem);
}

.page-hero .lead {
    grid-column: 2;
    grid-row: 1 / span 2;
    max-width: 420px;
    margin: 0;
    padding-left: 24px;
    border-left: 1px solid var(--border-2);
    font-size: 1.12rem;
}

main {
    counter-reset: marketing-section;
}

section.section {
    position: relative;
    padding-block: var(--section-space);
    border-bottom: 1px solid var(--border);
    counter-increment: marketing-section;
}

section.section.alt {
    background: rgba(13, 19, 31, .74);
}

section.section > .container::before {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(30px, 5vw, 58px);
    color: #8d99aa;
    content: '0' counter(marketing-section) ' / POCKET PROTOCOLS';
    background-image: linear-gradient(90deg, transparent 0 240px, var(--border-2) 240px, transparent 100%);
    background-position: left center;
    background-repeat: no-repeat;
    background-size: 100% 1px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
}

.section-head {
    max-width: 760px;
    margin: 0 0 52px;
    text-align: left;
}

.section-head h2,
.section h2 {
    font-size: clamp(2.2rem, 4.8vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.section-head p {
    max-width: 660px;
    margin: 18px 0 0;
    font-size: 1.08rem;
}

.marketing-home .section h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.7rem);
    line-height: 1.06;
    letter-spacing: -.035em;
}

.coverage-svg {
    transform: translateX(-4%);
}

.marketing-home .feature-row {
    display: block;
}

.marketing-home .feature-row .feature-wide {
    width: 100%;
}

.marketing-students #how .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-students #how .card,
.marketing-students #how .card:nth-child(n) {
    grid-column: auto;
}

/* Editorial feature directory: varied spans replace the generic three-up grid. */
.cards {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--border);
    background: var(--border);
}

.card {
    grid-column: span 6;
    min-height: 240px;
    border: 0;
    border-radius: 0;
    padding: clamp(26px, 4vw, 44px);
    background: var(--bg-alt);
    box-shadow: none;
    transition: background-color .18s ease;
}

.card:nth-child(4n + 1),
.card:nth-child(4n + 4) {
    grid-column: span 7;
}

.card:nth-child(4n + 2),
.card:nth-child(4n + 3) {
    grid-column: span 5;
}

#agency-modules .cards > .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.card:hover {
    border-color: transparent;
    background: #121b2a;
    transform: none;
}

.card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    margin-bottom: 28px;
    background: transparent;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ic) 45%, transparent);
}

.card h3 {
    font-size: 1.45rem;
}

.feature-row {
    grid-column: 1 / -1;
    gap: 1px;
}

/* Agency modules read like an operational directory, not a tile marketplace. */
.module-grid {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--border-2);
}

.module-card {
    display: grid;
    grid-template-columns: minmax(170px, .65fr) minmax(240px, 1fr) minmax(280px, 1.45fr) auto;
    align-items: start;
    gap: clamp(20px, 4vw, 54px);
    padding: 32px 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.module-card > div:first-child {
    grid-column: 1;
}

.module-card h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

.module-card > p {
    grid-column: 2;
    grid-row: 2;
}

.module-card ul {
    grid-column: 3;
    grid-row: 1 / span 3;
    margin: 0;
}

.module-card .module-price,
.module-card .btn {
    grid-column: 4;
}

.module-card .module-price {
    padding: 0;
    text-align: right;
}

.module-card .btn {
    align-self: end;
}

.module-card .module-badge {
    display: inline-block;
    white-space: nowrap;
}

.module-badge,
.agency-proof span {
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.module-showcase {
    border-radius: 0;
    border-width: 1px 0;
    padding-inline: 0;
    background: transparent;
    box-shadow: none;
}

.portal-preview,
.agency-dashboard-shot,
.agency-screenshot-grid figure {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 32px 70px -46px #000;
}

.agency-module-slider {
    width: 100%;
    max-width: 100%;
    overscroll-behavior-inline: contain;
}

.portal-preview::before,
.agency-dashboard-shot::before,
.agency-screenshot-grid figure::before {
    position: absolute;
    top: -25px;
    left: 0;
    color: #8d99aa;
    content: 'ADMIN PORTAL / LIVE WORKFLOW';
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
}

.agency-screenshot-grid .agency-screenshot--app::before {
    content: 'MEMBER APP / FIELD VIEW';
}

.agency-screenshot-grid .agency-screenshot--requester::before {
    content: 'REQUESTER STATUS / EXTERNAL VIEW';
}

.agency-flow {
    gap: 0;
    border-top: 1px solid var(--border-2);
}

.agency-flow article {
    min-height: 210px;
    border-left: 0;
    border-right: 1px solid var(--border);
    background: transparent;
}

.agency-flow article:last-child {
    border-right: 0;
}

.agency-flow strong {
    color: #c4b5fd;
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Module-specific signals. */
.module-theme-agency-alerts { --module-accent: #fb7185; }
.module-theme-ce-log { --module-accent: #22d3ee; }
.module-theme-certifications { --module-accent: #fbbf24; }
.module-theme-contacts { --module-accent: #60a5fa; }
.module-theme-calendars { --module-accent: #a78bfa; }
.module-theme-apparatus { --module-accent: #fb923c; }
.module-theme-standbys { --module-accent: #4ade80; }

.module-detail-hero {
    border-top: 3px solid var(--module-accent);
}

.module-detail-hero .gradient-text,
.module-detail-hero .eyebrow {
    color: var(--module-accent);
}

.module-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--border);
    background: var(--border);
}

.module-capabilities article {
    border: 0;
    border-radius: 0;
    padding: 32px;
    background: var(--bg-alt);
}

/* Pricing and forms are information tools, not floating cards. */
.plans {
    gap: 1px;
    padding: 1px;
    background: var(--border);
}

.plan {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.plan.featured {
    outline: 1px solid rgba(167, 139, 250, .55);
    outline-offset: -1px;
}

.agency-form-shell,
.contact-form {
    border-radius: 12px;
    background: rgba(13, 19, 31, .92);
}

.agency-form-shell {
    max-width: 1040px;
    padding: clamp(24px, 5vw, 56px);
}

.agency-form-section {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 34px 0 18px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.agency-form-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.agency-form-section > span {
    color: #c4b5fd;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.agency-form-section strong,
.agency-form-section small {
    display: block;
}

.agency-form-section strong {
    font-family: var(--font-display);
    font-size: 15px;
}

.agency-form-section small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.form-field label {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: .035em;
}

.form-field input,
.form-field textarea,
.form-field select,
.agency-form-shell .form-field select {
    border-radius: 7px;
    background-color: #0b111c;
}

.module-check {
    border-radius: 7px;
}

.module-check:has(input:checked) {
    border-color: rgba(167, 139, 250, .65);
    background: rgba(124, 58, 237, .12);
}

.faq-item {
    border-radius: 0;
    border-width: 0 0 1px;
    background: transparent;
}

.faq-item[open] {
    background: rgba(255, 255, 255, .025);
}

.cta {
    text-align: left;
}

.cta .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        'marker marker'
        'heading actions'
        'copy actions';
    align-items: end;
    column-gap: 32px;
    row-gap: 0;
}

.cta .container::before {
    grid-area: marker;
}

.cta h2,
.cta p {
    max-width: 720px;
}

.cta h2 {
    grid-area: heading;
}

.cta p {
    grid-area: copy;
    margin-right: 0;
    margin-left: 0;
}

.cta .store-row {
    grid-area: actions;
    justify-content: flex-end;
    margin-bottom: 0;
}

.footer {
    background: #070a10;
}

.footer-grid {
    grid-template-columns: 1.55fr .8fr 1.2fr .7fr .8fr;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.footer-col a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 40px;
}

.footer-col a::after {
    content: '↗';
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity .16s ease, transform .16s ease;
}

.footer-col a:hover::after {
    opacity: .7;
    transform: translate(0, 0);
}

.footer-operations {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin-top: 52px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: #7f8b9c;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.footer-operations span:first-child {
    color: #a7f3d0;
}

.footer-operations i {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 7px;
    border-radius: 50%;
    background: #34d399;
}

.shot.is-missing {
    display: grid;
    min-height: 420px;
    place-items: center;
    border: 1px dashed var(--border-2);
    background:
        linear-gradient(135deg, rgba(124, 58, 237, .08), transparent 52%),
        #0b111c;
}

.shot.is-missing::before {
    max-width: 180px;
    padding: 20px;
    color: var(--muted);
    content: 'APP SCREEN / CAPTURE COMING SOON';
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.5;
    text-align: center;
}

.shot.is-missing img {
    display: none;
}

@media (max-width: 1100px) {
    .module-card {
        grid-template-columns: minmax(150px, .7fr) 1fr;
    }

    .module-card h3,
    .module-card > p { grid-column: 2; }
    .module-card ul { grid-column: 1 / -1; grid-row: auto; }
    .module-card .module-price { grid-column: 1; text-align: left; }
    .module-card .btn { grid-column: 2; }
}

@media (max-width: 980px) {
    .agency-nav-menu {
        right: -250px;
    }

    .page-hero .container {
        grid-template-columns: 1fr;
    }

    .page-hero .lead {
        grid-column: 1;
        grid-row: auto;
        max-width: 650px;
    }

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

@media (max-width: 860px) {
    .agency-nav-menu {
        right: auto;
        left: auto;
        display: flex;
        flex-direction: column;
        width: auto;
        overflow: visible;
        transform: none;
    }

    .agency-nav-overview,
    .agency-nav-modules {
        padding: 0;
    }

    .agency-nav-overview {
        border-right: 0;
        background: none;
    }

    .agency-nav-kicker,
    .agency-nav-heading {
        display: none;
    }

    .agency-nav-menu.mega .agency-nav-featured {
        flex-direction: row;
        align-items: flex-start;
        min-height: 0;
        margin: 0;
        padding: 10px;
        border: 0;
        background: none;
    }

    .agency-nav-arrow {
        display: none;
    }

    .agency-nav-grid {
        display: flex;
        flex-direction: column;
    }

    .nav-group:hover .agency-nav-menu,
    .nav-group:focus-within .agency-nav-menu {
        transform: none;
    }
}

@media (max-width: 760px) {
    body {
        background-size: 48px 48px;
    }

    .nav-link::after,
    .nav-trigger::before {
        display: none;
    }

    .agency-nav-menu {
        right: auto;
        transform: none;
    }

    .nav-burger {
        width: 44px;
        height: 44px;
    }

    .audience-switch a {
        display: grid;
        min-height: 44px;
        place-items: center;
        padding-block: 8px;
    }

    .agency-slider-nav {
        gap: 2px;
    }

    .agency-slider-nav a {
        position: relative;
        width: 44px;
        height: 44px;
        background: transparent;
    }

    .agency-slider-nav a::after {
        position: absolute;
        top: 50%;
        right: 5px;
        left: 5px;
        height: 7px;
        border-radius: 999px;
        content: '';
        background: var(--border-2);
        transform: translateY(-50%);
    }

    .agency-slider-nav a.is-active::after {
        background: var(--primary);
    }

    .footer-col a {
        min-height: 44px;
    }

    .page-hero {
        min-height: 0;
        padding: 72px 0 56px;
    }

    .page-hero h1 {
        font-size: clamp(2.4rem, 11vw, 3.55rem);
    }

    .agency-hero h1,
    .module-detail-grid h1 {
        font-size: clamp(2.35rem, 10.5vw, 3.45rem);
    }

    .page-hero .lead {
        padding: 18px 0 0;
        border-top: 1px solid var(--border-2);
        border-left: 0;
    }

    section.section > .container::before {
        background-image: linear-gradient(90deg, transparent 0 190px, var(--border-2) 190px, transparent 100%);
    }

    .cards,
    .module-capabilities {
        display: block;
        border: 0;
        background: transparent;
    }

    .marketing-students #how .cards {
        display: block;
    }

    .card,
    .card:nth-child(n),
    .module-capabilities article {
        min-height: 0;
        border-bottom: 1px solid var(--border);
    }

    .module-card {
        display: flex;
        gap: 16px;
    }

    .module-card .module-price {
        text-align: left;
    }

    .agency-flow {
        grid-template-columns: 1fr;
    }

    .agency-flow article {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .cta .container {
        display: block;
    }

    .cta .store-row {
        justify-content: flex-start;
        margin-top: 30px;
    }

    .cta .btn {
        margin-top: 24px;
    }

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

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

    .footer-about {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}
