:root {
    --ink: #14161b;
    --ink-2: #1a1d23;
    --surface: #1a1d23;
    --surface-alt: #22262e;
    --paper: #14161b;
    --white: #f0f2f4;
    --mist: #9aa1ac;
    --line: #313640;
    --line-light: rgba(255, 255, 255, 0.14);
    --accent: #3fb950;
    --accent-hover: #56d364;
    --accent-soft: rgba(63, 185, 80, 0.14);
    --text-muted: #9aa1ac;
    --text-faint: #6c7480;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    --aux-orange: #ff5f1f;
    --aux-orange-hover: #ff7d47;
    --aux-orange-soft: rgba(255, 95, 31, 0.14);
    --aux-shadow: 0 0 24px rgba(255, 95, 31, 0.25);
    --content: min(1100px, calc(100vw - 40px));
    --container: min(760px, calc(100vw - 40px));
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --tap-target: 44px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--white);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
    padding: 8px;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 12px;
    z-index: 20;
    transform: translateY(-160%);
    background: var(--accent);
    color: var(--white);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--content);
    margin: 16px auto 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--white);
    background: rgba(20, 22, 27, 0.72);
    backdrop-filter: blur(18px);
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(20, 22, 27, 0.94);
    border-color: var(--line);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.34);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 206px;
}

.brand img {
    width: 218px;
    height: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-hover);
    outline: none;
}

.hero {
    position: relative;
    min-height: 88svh;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: var(--white);
    background: var(--ink);
}

.hero__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, rgba(63, 185, 80, 0.16), transparent 28%),
        linear-gradient(90deg, rgba(20, 22, 27, 0.96) 0%, rgba(20, 22, 27, 0.88) 42%, rgba(20, 22, 27, 0.52) 70%, rgba(20, 22, 27, 0.2) 100%),
        linear-gradient(180deg, rgba(20, 22, 27, 0.3) 0%, rgba(20, 22, 27, 0.9) 100%),
        url("/assets/loophole-hero.png") center right / cover no-repeat;
}

.hero__content {
    position: relative;
    width: var(--content);
    margin: 0 auto;
    padding-top: 92px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-hover);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hero__brand .eyebrow {
    margin: 0;
}

.hero__brand-mark {
    width: 26px;
    height: auto;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 7.5vw, 6.8rem);
    line-height: 0.94;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 12px;
    font-size: 1.08rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.hero__copy {
    max-width: 640px;
    margin: 28px 0 0;
    color: var(--text-muted);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: var(--tap-target);
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

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

.button--primary:hover,
.button--primary:focus-visible {
    background: var(--accent-hover);
}

.button--secondary {
    color: var(--accent-hover);
    border-color: var(--accent);
    background: transparent;
}

.button--secondary:hover,
.button--secondary:focus-visible {
    background: var(--accent-soft);
}

.button--aux.button--primary {
    background: var(--aux-orange);
    box-shadow: var(--aux-shadow);
}

.button--aux.button--primary:hover,
.button--aux.button--primary:focus-visible {
    background: var(--aux-orange-hover);
}

.button--aux.button--secondary {
    color: var(--aux-orange-hover);
    border-color: var(--aux-orange);
}

.button--aux.button--secondary:hover,
.button--aux.button--secondary:focus-visible {
    background: var(--aux-orange-soft);
}

.band {
    padding: 78px 0;
    background: var(--ink);
}

.band--light {
    background: var(--surface);
}

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

.section-grid,
.feature,
.contact,
.section-heading,
.research-grid,
.service-grid,
.site-footer {
    width: var(--content);
    margin: 0 auto;
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: start;
}

.section-grid--tight {
    align-items: center;
}

.section-grid p,
.feature p,
.contact p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.band--ink .section-grid p {
    color: var(--text-muted);
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 48px;
    margin-bottom: 34px;
}

.section-heading h2 {
    grid-column: 2;
}

.section-heading .eyebrow {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.service-card {
    min-height: 260px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    box-shadow: none;
}

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 34px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent-hover);
    background: var(--accent-soft);
    font-weight: 800;
}

.service-card p {
    margin: 0;
    color: var(--text-muted);
}

.service-card .price {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 1.9rem;
    font-weight: 800;
}

.service-card .price span {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.service-card h3 + .price {
    margin-top: 4px;
}

.service-card .price + p {
    margin-bottom: 20px;
}

.service-card .button {
    display: inline-block;
    margin-top: 8px;
}

.pricing-note {
    max-width: 62ch;
    margin: 28px auto 0;
    color: var(--text-muted);
    text-align: center;
}

.pricing-note a {
    color: var(--accent-hover);
}

.credential-list {
    display: grid;
    gap: 18px;
}

.credential-list article {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.credential-list article:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.credential-list h3 {
    color: var(--white);
}

.credential-list p {
    color: var(--text-muted);
}

.research-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 16px;
}

.research-item {
    min-height: 300px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
}

.research-item__visual {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    margin: -8px -8px 26px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--ink);
}

.research-item__visual--ssh {
    background:
        linear-gradient(90deg, rgba(20, 22, 27, 0.96), rgba(20, 22, 27, 0.72)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 16px);
}

.ssh-diagram {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 20px;
}

.ssh-node {
    flex: 0 0 auto;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ssh-node--broker {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--accent-soft);
}

.ssh-node small {
    color: var(--text-faint);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: normal;
    text-align: center;
}

.ssh-link {
    position: relative;
    flex: 1 1 auto;
    height: 1px;
    min-width: 24px;
    background: var(--line);
}

.ssh-link span {
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-hover);
    box-shadow: 0 0 10px 2px rgba(63, 185, 80, 0.6);
    transform: translate(0, -50%);
    animation: ssh-pulse 2.6s linear infinite;
}

.ssh-link:last-of-type span {
    animation-delay: 1.3s;
}

@keyframes ssh-pulse {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.research-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: -8px -8px 26px;
}

.research-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--ink);
}

.research-item__type {
    margin: 0 0 34px;
    color: var(--accent-hover);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.research-item p:not(.research-item__type) {
    margin: 0;
    color: var(--text-muted);
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
}

.link-row .text-link {
    margin-top: 0;
}

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: 52px;
    align-items: center;
}

.feature__copy p + p {
    margin-top: 16px;
}

.text-link {
    display: inline-flex;
    margin-top: 22px;
    color: var(--accent-hover);
    font-weight: 850;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.terminal-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--white);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.terminal-panel__bar {
    display: flex;
    gap: 7px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.terminal-panel__bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-hover);
}

.terminal-panel__bar span:nth-child(2) {
    background: var(--accent-hover);
    opacity: 0.7;
}

.terminal-panel__bar span:nth-child(3) {
    background: var(--accent-hover);
    opacity: 0.45;
}

.terminal-panel dl {
    margin: 0;
    padding: 0 22px 22px;
}

.terminal-panel__mark {
    width: 88px;
    height: auto;
    margin: 28px auto 6px;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.24));
}

.terminal-panel div {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.terminal-panel div:last-child {
    border-bottom: 0;
}

.terminal-panel dt {
    color: var(--accent-hover);
    font-size: 0.84rem;
    font-weight: 850;
    text-transform: uppercase;
}

.terminal-panel dd {
    margin: 7px 0 0;
    color: var(--text-muted);
}

.actions--center {
    justify-content: center;
}

.quickstart {
    max-width: 640px;
    margin: 36px auto 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.quickstart__bar {
    display: flex;
    gap: 7px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.quickstart__bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-hover);
}

.quickstart__bar span:nth-child(2) {
    opacity: 0.7;
}

.quickstart__bar span:nth-child(3) {
    opacity: 0.45;
}

.quickstart pre {
    margin: 0;
    padding: 20px 22px 24px;
    overflow-x: auto;
    color: var(--white);
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.92rem;
    line-height: 1.7;
}

.quickstart__comment {
    color: var(--text-faint);
}

.product-band {
    background:
        radial-gradient(circle at 24% 36%, rgba(255, 95, 31, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(255, 95, 31, 0.12), rgba(255, 95, 31, 0.03)),
        var(--ink);
}

.product-feature {
    width: var(--content);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1fr);
    gap: 58px;
    align-items: center;
}

.aux-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 34px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--aux-shadow);
    text-align: center;
}

.aux-showcase__logo {
    width: min(86%, 360px);
    height: auto;
}

.aux-showcase__subtitle {
    margin: -4px 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.aux-showcase__actions {
    width: min(100%, 330px);
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-faint);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.product-copy {
    display: grid;
    justify-items: start;
    gap: 18px;
}

.product-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 40px;
    align-items: start;
}

address {
    margin-top: 18px;
    color: var(--text-muted);
    font-style: normal;
    font-size: 1.12rem;
}

.contact__panel {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
}

.contact__panel .domain {
    margin-top: 18px;
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 850;
}

.contact__panel .email {
    margin-top: 18px;
    color: var(--accent-hover);
    font-size: 1.12rem;
    font-weight: 800;
}

.contact__panel .email a {
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 0 34px;
    color: var(--text-muted);
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    font-weight: 750;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

@media (max-width: 820px) {
    :root {
        --content: min(100vw - 28px, 720px);
    }

    .site-header {
        position: absolute;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 10px;
    }

    .site-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .site-nav a {
        flex: 0 0 auto;
        padding: 7px 10px;
        font-size: 0.86rem;
    }

    .hero {
        min-height: 88svh;
    }

    .hero__backdrop {
        background:
            radial-gradient(circle at 18% 24%, rgba(63, 185, 80, 0.16), transparent 32%),
            linear-gradient(90deg, rgba(20, 22, 27, 0.97) 0%, rgba(20, 22, 27, 0.9) 56%, rgba(20, 22, 27, 0.64) 100%),
            linear-gradient(180deg, rgba(20, 22, 27, 0.24) 0%, rgba(20, 22, 27, 0.9) 100%),
            url("/assets/loophole-hero.png") 67% center / cover no-repeat;
    }

    .hero__content {
        padding-top: 220px;
        padding-bottom: 46px;
    }

    h1 {
        font-size: clamp(2.65rem, 15vw, 4.35rem);
    }

    .band {
        padding: 64px 0;
    }

    .section-grid,
    .section-heading,
    .feature,
    .product-feature,
    .contact {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .section-heading h2,
    .section-heading .eyebrow {
        grid-column: auto;
        grid-row: auto;
    }

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

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

    .service-card {
        min-height: auto;
    }

    .research-item {
        min-height: auto;
    }

    .research-gallery {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .feature {
        align-items: stretch;
    }

    .terminal-panel {
        min-width: 0;
    }

    .aux-showcase {
        padding: 28px 22px;
    }
}

@media (max-width: 520px) {
    .brand img {
        width: 206px;
    }

    .hero__actions,
    .button {
        width: 100%;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

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