:root {
    --bg: #040607;
    --grid-line: rgba(110, 255, 160, 0.08);
    --grid-highlight: rgba(162, 255, 210, 0.05);
    --surface: rgba(5, 10, 12, 0.85);
    --border: rgba(150, 255, 190, 0.4);
    --border-soft: rgba(150, 255, 190, 0.2);
    --text: #e7ffe9;
    --text-muted: rgba(231, 255, 233, 0.75);
    --accent: #f7d354;
    --accent-strong: #00ff99;
    --danger: #ff7f7f;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(0deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, var(--grid-highlight), transparent 45%),
        radial-gradient(circle at 80% 5%, rgba(255, 214, 102, 0.12), transparent 40%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 35%);
    z-index: -1;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

a:hover {
    color: var(--accent-strong);
}

.grid-shell {
    padding-bottom: 4rem;
}

.frame {
    width: min(1200px, calc(100% - 2rem));
    margin: 2.5rem auto;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.frame--wide {
    width: min(1300px, calc(100% - 2rem));
}

.masthead {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: 1rem;
}

.masthead .frame {
    margin-top: 1rem;
    background: rgba(4, 8, 10, 0.9);
    backdrop-filter: blur(10px);
}

.masthead__badge {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin-bottom: 0.5rem;
}

.masthead__icon {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.masthead__icon img {
    width: 48px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 6px rgba(0, 255, 153, 0.5));
}

.masthead__icon p {
    margin: 0;
    color: var(--accent-strong);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 1rem;
}

.masthead__meta {
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.masthead__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-link {
    color: var(--text);
    border-bottom: none;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link.is-active,
.nav-link:focus-visible,
.nav-link:hover {
    background: rgba(0, 255, 153, 0.12);
    color: var(--accent-strong);
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.hero__intro h1 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.2;
    margin: 0.5rem 0 1rem;
}

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

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

.hero__cta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.button {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.button--primary {
    background: rgba(0, 255, 153, 0.2);
}

.button--ghost {
    border-style: dashed;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    background: rgba(0, 255, 153, 0.3);
}

.hero__diagram {
    border: 1px solid var(--border);
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__diagram img {
    width: 100%;
    max-width: 460px;
    height: auto;
    display: block;
}

.stack header p {
    color: var(--text-muted);
}

h2 {
    font-size: clamp(1.5rem, 2.5vw, 2.4rem);
    margin: 0.4rem 0 1rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service {
    border: 1px dashed var(--border);
    padding: 1.5rem;
    background: rgba(6, 13, 15, 0.85);
    min-height: 100%;
}

.service--highlight {
    border-style: solid;
    background: rgba(247, 211, 84, 0.08);
}

.service__code {
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin: 0 0 0.5rem;
}

.service h3 {
    margin: 0 0 0.6rem;
}

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

.service ul {
    padding-left: 1rem;
    margin: 0;
    color: var(--text);
}

.service li {
    margin-bottom: 0.4rem;
}

.footnote {
    margin-top: 1.2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.panel {
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.panel--outline {
    background: rgba(10, 20, 23, 0.6);
}

pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-soft);
    padding: 1rem;
    color: var(--accent-strong);
    overflow-x: auto;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.data-grid dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.data-grid dd {
    margin: 0.2rem 0 0;
}

.list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-left: 0;
    list-style: none;
}

.list-inline li {
    border: 1px dashed var(--border);
    padding: 0.3rem 0.6rem;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-card {
    border: 1px solid var(--border);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
}

.contact-card__value {
    font-size: 1.1rem;
    margin: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

input,
textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.65rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
}

input:focus,
textarea:focus {
    outline: 2px solid var(--accent-strong);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkbox input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.25rem;
}

.form-message {
    font-size: 0.9rem;
}

.form-message.is-success {
    color: var(--accent-strong);
}

.form-message.is-error {
    color: var(--danger);
}

.footer {
    text-align: center;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer__links a {
    border-bottom: none;
}

.footer__copy {
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 720px) {
    .frame {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .masthead {
        position: static;
    }

    .hero__cta {
        flex-direction: column;
    }

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

    .masthead__icon {
        width: 100%;
        justify-content: flex-start;
    }

    .hero__diagram {
        padding: 1rem;
    }

    .hero__diagram img {
        max-width: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.001s !important;
        animation-duration: 0.001s !important;
    }
}
