/* ==========================================================================
   Myriatech — homepage stylesheet
   Tokens: ink / porcelain / heritage blue #00558A
   Type:   Marcellus (display) · Archivo (body) · IBM Plex Mono (labels)
   ========================================================================== */

:root {
    --ink: #14181d;
    --ink-soft: #1d232b;
    --paper: #f6f7f5;
    --white: #ffffff;
    --blue: #00558a;
    --blue-deep: #003a5f;
    --blue-wash: #e7eff5;
    --slate: #5c6b78;
    --hairline: #d9dee2;
    --hairline-dark: rgba(255, 255, 255, 0.14);

    --font-display: 'Marcellus', 'Georgia', serif;
    --font-body: 'Archivo', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

    --container: 1140px;
    --radius: 3px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--blue);
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- shared section furniture ------------------------------------------ */

.band {
    padding: 104px 0;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--blue);
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.eyebrow::before {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--blue);
    flex: none;
}

.band h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(32px, 4.5vw, 46px);
    line-height: 1.15;
    letter-spacing: 0.005em;
    max-width: 18em;
}

.band .lede {
    margin-top: 18px;
    max-width: 44em;
    color: var(--slate);
    font-size: 18px;
}

/* --- navigation --------------------------------------------------------- */

.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(246, 247, 245, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hairline);
    transition: box-shadow 0.25s ease;
}

.site-nav.is-scrolled {
    box-shadow: 0 6px 24px rgba(20, 24, 29, 0.08);
}

.site-nav .container {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 76px;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex: none;
}

.nav-logo img {
    height: 60px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-decoration: none;
    border-radius: var(--radius);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
    color: var(--blue);
    background: var(--blue-wash);
}

.nav-links a.nav-cta {
    margin-left: 12px;
    background: var(--blue);
    color: var(--white);
    padding: 11px 22px;
}

.nav-links a.nav-cta:hover {
    background: var(--blue-deep);
    color: var(--white);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 10px 12px;
    cursor: pointer;
}

.nav-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    margin: 4px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
    position: relative;
    background: var(--ink);
    color: var(--white);
    padding: 208px 0 120px;
    overflow: hidden;
}

.hero-threads {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero .container {
    position: relative;
}

.hero .eyebrow {
    color: #7fb3d3;
}

.hero .eyebrow::before {
    background: #7fb3d3;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(46px, 7.5vw, 88px);
    line-height: 1.05;
    letter-spacing: 0.01em;
    max-width: 10.5em;
}

.hero .hero-sub {
    margin-top: 28px;
    max-width: 36em;
    font-size: 19px;
    color: rgba(255, 255, 255, 0.78);
}

.hero-actions {
    margin-top: 44px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: var(--radius);
    padding: 15px 30px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

.btn-solid:hover {
    background: var(--blue-deep);
}

.btn-ghost {
    border-color: rgba(255, 255, 255, 0.35);
    color: var(--white);
}

.btn-ghost:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.hero-foot {
    margin-top: 84px;
    padding-top: 26px;
    border-top: 1px solid var(--hairline-dark);
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 34px;
}

/* --- AI practice band ----------------------------------------------------- */

.ai-band {
    background: var(--paper);
}

.thread-row {
    position: relative;
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* the connecting thread: one line through all three nodes */
.thread-row::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 4%;
    right: 4%;
    height: 1px;
    background: var(--blue);
    opacity: 0.35;
}

.node-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 68px 30px 34px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.node-card:hover {
    border-color: var(--blue);
    transform: translateY(-4px);
}

/* the node itself, sitting on the thread */
.node-dot {
    position: absolute;
    top: 15px;
    left: 30px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--paper);
    border: 1.5px solid var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
}

.node-card .icon {
    color: var(--blue);
    margin-bottom: 18px;
}

.node-card h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.node-card p {
    font-size: 15.5px;
    color: var(--slate);
}

.node-card .node-label {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--slate);
    opacity: 0.7;
}

/* --- services grid --------------------------------------------------------- */

.services-band {
    background: var(--white);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.svc-grid {
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--hairline);
    border-left: 1px solid var(--hairline);
}

.svc {
    padding: 40px 34px 44px;
    border-right: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    transition: background 0.25s ease;
}

.svc:hover {
    background: var(--blue-wash);
}

.svc .icon {
    color: var(--blue);
    margin-bottom: 20px;
}

.svc h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.svc p {
    font-size: 15px;
    color: var(--slate);
}

/* --- about ---------------------------------------------------------------- */

.about-band {
    background: var(--paper);
}

.about-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 72px;
    align-items: center;
}

.about-copy p {
    margin-top: 20px;
    color: #3c4650;
}

.about-pull {
    margin-top: 30px;
    padding: 26px 30px;
    border-left: 2px solid var(--blue);
    background: var(--white);
    font-family: var(--font-display);
    font-size: 21px;
    line-height: 1.45;
    color: var(--ink);
}

.about-art {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    overflow: hidden;
}

.about-art img {
    width: 100%;
    display: block;
}

/* --- why band (dark, legacy cube texture) --------------------------------- */

.why-band {
    background: var(--ink) url('../images/background.png') repeat;
    color: var(--white);
}

.why-band .eyebrow {
    color: #7fb3d3;
}

.why-band .eyebrow::before {
    background: #7fb3d3;
}

.why-grid {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.why-item {
    padding: 32px 30px;
    border: 1px solid var(--hairline-dark);
    border-radius: var(--radius);
    background: rgba(20, 24, 29, 0.55);
}

.why-item .icon {
    color: #7fb3d3;
    margin-bottom: 16px;
}

.why-item h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    margin-bottom: 8px;
}

.why-item p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.68);
}

/* --- contact ---------------------------------------------------------------- */

.contact-band {
    background: var(--paper);
}

.contact-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 72px;
    align-items: start;
    margin-top: 12px;
}

.contact-meta {
    font-size: 16px;
    color: var(--slate);
}

.contact-meta .contact-line {
    margin-top: 34px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.04em;
}

.contact-meta .contact-line span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 6px;
}

.contact-meta a {
    color: var(--blue);
    text-decoration: none;
    border-bottom: 1px solid var(--blue-wash);
}

.contact-meta a:hover {
    border-bottom-color: var(--blue);
}

.contact-form {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-top: 2px solid var(--blue);
    border-radius: var(--radius);
    padding: 44px;
}

.field {
    margin-bottom: 24px;
}

.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 8px;
}

.field input,
.field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 13px 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--blue-wash);
}

.field textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    width: 100%;
}

.form-status {
    margin-top: 20px;
    font-size: 15px;
}

.form-status .alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid;
}

.form-status .alert-info {
    background: var(--blue-wash);
    border-color: var(--blue);
    color: var(--blue-deep);
}

.form-status .alert-success {
    background: #e9f4ec;
    border-color: #2e7d43;
    color: #235c33;
}

.form-status .alert-danger {
    background: #fbecec;
    border-color: #b3392f;
    color: #8c2d25;
}

/* --- footer ----------------------------------------------------------------- */

.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.6);
    padding: 56px 0 40px;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
}

.site-footer img {
    height: 40px;
    filter: invert(1) brightness(1.4);
    opacity: 0.9;
}

.site-footer .footer-meta {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.08em;
}

.site-footer a {
    color: #7fb3d3;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* --- animation -------------------------------------------------------------- */

.thread-path {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: thread-draw 2.6s ease-out forwards;
}

.thread-path:nth-child(2) { animation-delay: 0.25s; }
.thread-path:nth-child(3) { animation-delay: 0.5s; }
.thread-path:nth-child(4) { animation-delay: 0.75s; }

@keyframes thread-draw {
    to { stroke-dashoffset: 0; }
}

/* Traveling signal pulses — a short bright dash flows continuously along each
   thread. The dash period (dash + gap = 2220) is longer than any path, so at
   most one glint is visible at a time; animating the offset by exactly one
   period loops seamlessly. Pulses start after the initial draw-in completes. */
.thread-pulse {
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 120 2100;
    stroke-dashoffset: 2220;
    animation: thread-flow 7s linear infinite;
}

.thread-pulse.p1 { opacity: 0.9;  animation-duration: 6s;   animation-delay: 2.8s; }
.thread-pulse.p2 { opacity: 0.55; animation-duration: 7.5s; animation-delay: 3.3s; }
.thread-pulse.p3 { opacity: 0.3;  animation-duration: 9s;   animation-delay: 3.0s; }
.thread-pulse.p4 { opacity: 0.6;  animation-duration: 8s;   animation-delay: 3.6s; }

@keyframes thread-flow {
    from { stroke-dashoffset: 2220; }
    to   { stroke-dashoffset: 0; }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    /* The hero threads are a deliberate brand element and intentionally keep
       flowing even when reduced motion is requested; the rest of the page's
       motion (scroll reveals, transitions, smooth scroll) still backs off. */
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    * { transition-duration: 0.01ms !important; }
}

/* --- responsive --------------------------------------------------------------- */

@media (max-width: 991px) {
    .band { padding: 72px 0; }

    .thread-row,
    .why-grid,
    .svc-grid {
        grid-template-columns: 1fr;
    }

    .thread-row::before {
        top: 4%;
        bottom: 4%;
        left: 41px;
        right: auto;
        width: 1px;
        height: auto;
    }

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

    .about-art { display: none; }

    .nav-toggle { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--paper);
        border-bottom: 1px solid var(--hairline);
        padding: 12px 24px 20px;
        gap: 4px;
    }

    .nav-links a { padding: 14px 12px; }

    .nav-links a.nav-cta {
        margin: 10px 0 0;
        text-align: center;
    }

    .site-nav.nav-open .nav-links { display: flex; }

    .site-nav.nav-open .nav-toggle .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .site-nav.nav-open .nav-toggle .bar:nth-child(2) { opacity: 0; }
    .site-nav.nav-open .nav-toggle .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .hero { padding: 156px 0 80px; }
    .hero-foot { margin-top: 56px; }
    .contact-form { padding: 30px 24px; }
}
