:root {
    --ink: #0a0a0c;
    --ink-soft: #141519;
    --paper: #fafafa;
    --paper-dim: #f0f1f3;
    --blue: #1d89ff;
    --blue-deep: #0f5fc4;
    --red: #e51717;
    --slate: #6b7280;
    --slate-dark: #9aa1ab;
    --line-dark: rgba(255, 255, 255, .14);
    --line-light: #e3e5e9;
    --ff-display: 'Montserrat', sans-serif;
    --ff-body: 'Inter', sans-serif;
    --ff-mono: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-body);
    background: var(--paper);
    color: var(--ink);
    margin: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--ff-display);
    letter-spacing: -0.02em;
}

.eyebrow {
    font-family: var(--ff-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
}

::selection {
    background: var(--blue);
    color: #fff;
}

a {
    color: inherit;
}

/* ---------- scroll spine (signature element) ---------- */
#spine {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
}

#spine svg {
    width: 100%;
    height: 100%;
}

#spine-path {
    fill: none;
    stroke: url(#spineGrad);
    stroke-width: 2.4;
    stroke-linecap: square;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    vector-effect: non-scaling-stroke;
}

/* ---------- nav ---------- */
.mtec-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 18px 0;
    transition: background .35s ease, padding .35s ease, border-color .35s ease;
    border-bottom: 1px solid transparent;
}

.mtec-nav.scrolled {
    background: rgba(10, 10, 12, .82);
    backdrop-filter: blur(14px);
    padding: 12px 0;
    border-bottom: 1px solid var(--line-dark);
}

.mtec-nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.brand-mark svg {
    height: 26px;
    width: auto;
    display: block;
}

.brand-mark span {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .02em;
}

.mtec-nav nav a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    font-size: .86rem;
    font-weight: 500;
    margin-left: 28px;
    transition: color .2s;
}

.mtec-nav nav a:hover {
    color: #fff;
}

.nav-cta {
    border: 1px solid rgba(255, 255, 255, .3) !important;
    padding: 7px 16px;
    border-radius: 2px;
    color: #fff !important;
}

.nav-cta:hover {
    background: var(--blue);
    border-color: var(--blue) !important;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    padding: 140px 28px 80px;
    width: 100%;
}

/* ---------- dark-section background art ---------- */
.bg-canvas-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-canvas-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.bg-beams {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-beams svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bg-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse 70% 60% at 30% 20%, transparent 0%, var(--ink) 88%),
        linear-gradient(180deg, rgba(10, 10, 12, .05) 0%, var(--ink) 98%);
    pointer-events: none;
}

.hero-text-fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, rgba(10, 10, 12, .55) 58%, transparent 78%);
}

.bg-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 30%, #000 0%, transparent 80%);
}

.bg-beams .beam {
    animation: beamDrift 14s ease-in-out infinite;
    transform-origin: center;
}

.bg-beams .beam-b {
    animation-duration: 18s;
    animation-delay: -4s;
}

.bg-beams .beam-c {
    animation-duration: 22s;
    animation-delay: -9s;
}

@keyframes beamDrift {

    0%,
    100% {
        transform: translateX(0) scaleY(1);
    }

    50% {
        transform: translateX(-22px) scaleY(1.03);
    }
}

@media(prefers-reduced-motion:reduce) {
    .bg-beams .beam {
        animation: none;
    }
}

.hero .eyebrow {
    color: var(--blue);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero .eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--red);
    display: inline-block;
}

.hero h1 {
    font-size: clamp(2.6rem, 6.4vw, 5.2rem);
    font-weight: 700;
    line-height: 1.03;
    margin: 0 0 26px;
    max-width: 14ch;
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--blue), #6db8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead-text {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    color: rgba(255, 255, 255, .68);
    max-width: 46ch;
    line-height: 1.55;
    margin-bottom: 40px;
}

.btn-mtec {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--blue);
    color: #fff;
    padding: 15px 26px;
    border-radius: 2px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    border: 1px solid var(--blue);
    transition: .2s;
}

.btn-mtec:hover {
    background: var(--blue-deep);
    border-color: var(--blue-deep);
    color: #fff;
}

.btn-outline-mtec {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #fff;
    padding: 15px 26px;
    border-radius: 2px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .28);
    transition: .2s;
}

.btn-outline-mtec:hover {
    border-color: #fff;
}

.scroll-cue {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .5);
    font-family: var(--ff-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.scroll-cue .bar {
    width: 1px;
    height: 34px;
    background: linear-gradient(var(--blue), transparent);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: .3
    }

    50% {
        opacity: 1
    }
}

/* ---------- reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .8s cubic-bezier(.2, .7, .3, 1), transform .8s cubic-bezier(.2, .7, .3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1.is-visible {
    transition-delay: .1s;
}

.reveal-delay-2.is-visible {
    transition-delay: .2s;
}

.reveal-delay-3.is-visible {
    transition-delay: .3s;
}

/* ---------- statement section ---------- */
.statement {
    background: var(--ink);
    color: #fff;
    padding: clamp(90px, 14vw, 160px) 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.statement-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.statement h2 {
    font-size: clamp(1.7rem, 4.4vw, 3.1rem);
    font-weight: 600;
    line-height: 1.28;
    color: rgba(255, 255, 255, .92);
}

.statement h2 .hl {
    color: var(--blue);
}

.statement h2 .hl-red {
    color: var(--red);
}

/* ---------- section shell ---------- */
.section {
    padding: clamp(80px, 10vw, 140px) 28px;
    position: relative;
}

.section-light {
    background: var(--paper);
}

.section-dim {
    background: var(--paper-dim);
}

.section-inner {
    max-width: 1180px;
    margin: 0 auto;
}

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

.section-head .eyebrow {
    color: var(--blue-deep);
    margin-bottom: 16px;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 18px;
}

.section-head p {
    color: var(--slate);
    font-size: 1.08rem;
    line-height: 1.6;
}

/* diagonal divider echoing logo strokes */
.diag-divider {
    height: 64px;
    width: 100%;
    position: relative;
    background: var(--paper);
}

.diag-divider.to-dim {
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    background: var(--paper-dim);
    margin-top: -64px;
}

.diag-divider.to-ink {
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    background: var(--ink);
    margin-top: -64px;
}

.diag-divider.to-light {
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    background: var(--paper);
    margin-top: -64px;
}

/* ---------- service blocks ---------- */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 56px 0;
    border-top: 1px solid var(--line-light);
}

.service-row:first-of-type {
    border-top: none;
}

.service-row.reverse .service-visual {
    order: 2;
}

.service-num {
    font-family: var(--ff-mono);
    font-size: .8rem;
    color: var(--slate);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-num i {
    color: var(--red);
    font-size: .7rem;
}

.service-copy h3 {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.service-copy p {
    color: var(--slate);
    line-height: 1.65;
    font-size: 1.02rem;
    margin-bottom: 22px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-tag {
    border: 1px solid var(--line-light);
    padding: 8px 14px;
    font-size: .82rem;
    font-weight: 500;
    border-radius: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}

.service-tag i {
    color: var(--blue);
    font-size: .78rem;
}

/* visuals - straight-line geometric mockups */
.service-visual {
    aspect-ratio: 4/3;
    border: 1px solid var(--line-light);
    background: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.mock-browser {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.mock-topbar {
    height: 34px;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    flex-shrink: 0;
}

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

.mock-body {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mock-block {
    background: var(--paper-dim);
    position: relative;
}

.mock-block.accent {
    background: var(--blue);
}

.mock-block.accent-red {
    background: var(--red);
}

.mock-line {
    height: 8px;
    background: var(--paper-dim);
    margin-bottom: 8px;
}

.mock-line.short {
    width: 60%;
}

/* system dashboard visual */
.dash {
    position: absolute;
    inset: 0;
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 16px;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dash-stat {
    border: 1px solid var(--line-light);
    padding: 12px;
}

.dash-stat .n {
    font-family: var(--ff-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--blue-deep);
}

.dash-stat .l {
    font-size: .66rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}

.dash-chart {
    border: 1px solid var(--line-light);
    position: relative;
    padding: 16px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.bar {
    flex: 1;
    background: var(--blue);
    opacity: .85;
}

.bar:nth-child(4n) {
    background: var(--red);
}

/* ICT icon grid visual */
.grid-visual {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.grid-cell {
    border: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--blue);
}

.grid-cell:nth-child(2) {
    color: var(--red);
}

.grid-cell:nth-child(3) {
    color: var(--ink);
}

/* ---------- process ---------- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--line-dark);
    border-left: 1px solid var(--line-dark);
}

.process-step {
    border-right: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    padding: 36px 26px;
}

.process-step .step-n {
    font-family: var(--ff-mono);
    font-size: .78rem;
    color: var(--blue);
    margin-bottom: 22px;
}

.process-step h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.process-step p {
    color: rgba(255, 255, 255, .6);
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
}

/* ---------- why grid ---------- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line-light);
    border: 1px solid var(--line-light);
}

.why-cell {
    background: var(--paper);
    padding: 40px;
}

.why-cell i {
    color: var(--blue);
    font-size: 1.3rem;
    margin-bottom: 18px;
    display: block;
}

.why-cell h4 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.why-cell p {
    color: var(--slate);
    font-size: .94rem;
    line-height: 1.55;
    margin: 0;
}

/* ---------- contact ---------- */
.contact-section {
    background: var(--ink);
    color: #fff;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--line-dark);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-item i {
    color: var(--blue);
    font-size: 1.1rem;
    width: 22px;
    padding-top: 3px;
}

.contact-info-item .label {
    font-family: var(--ff-mono);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--slate-dark);
    margin-bottom: 5px;
}

.contact-info-item a,
.contact-info-item span.val {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.02rem;
}

.contact-info-item a:hover {
    color: var(--blue);
}

.form-control-mtec {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line-dark);
    border-radius: 0;
    color: #fff;
    padding: 14px 4px;
    font-size: 1rem;
}

.form-control-mtec:focus {
    background: transparent;
    border-bottom-color: var(--blue);
    box-shadow: none;
    color: #fff;
}

.form-control-mtec::placeholder {
    color: var(--slate-dark);
}

.form-label-mtec {
    font-family: var(--ff-mono);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--slate-dark);
    margin-bottom: 6px;
}

/* ---------- footer ---------- */
footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .5);
    padding: 36px 28px;
    border-top: 1px solid var(--line-dark);
}

footer .footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: .85rem;
}

footer a {
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

.footer-social a {
    margin-left: 16px;
    font-size: 1rem;
}

/* focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

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

    .service-row.reverse .service-visual {
        order: 0;
    }

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

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

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

    .mtec-nav nav {
        display: none;
    }
}

@media(prefers-reduced-motion:reduce) {
    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .scroll-cue .bar {
        animation: none;
    }
}