:root {
    --background: #f6ebde;
    --foreground: #645a51;
    --card: #ffffff;
    --card-foreground: #645a51;
    --popover: #ffffff;
    --popover-foreground: #645a51;
    --primary: #c75d3a;
    --primary-foreground: #fff9f3;
    --secondary: #af6d58;
    --secondary-foreground: #fff9f3;
    --muted: #eae6e1;
    --muted-foreground: #8b7f75;
    --accent: #c75d3a;
    --accent-foreground: #fff9f3;
    --destructive: #b5403a;
    --destructive-foreground: #fff9f3;

    --line: rgba(100, 90, 81, 0.16);
    --line-strong: rgba(100, 90, 81, 0.28);
    --display: "Manrope", system-ui, sans-serif;
    --mono: "DM Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    background: var(--background);
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--display);
    overflow-x: hidden;
}

html.custom-cursor-active,
html.custom-cursor-active body,
html.custom-cursor-active a,
html.custom-cursor-active button {
    cursor: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    color: var(--primary-foreground);
    background: var(--primary);
}

h2 {
    text-align: center;
    margin-bottom: 30px;
}

.shell {
    width: min(900px, calc(100% - 64px));
    margin-inline: auto;
}

.section {
    padding-block: 90px;
    position: relative;
}

.mono {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.site-noise {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

#binaryCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Cursor */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    border-radius: 50%;
    transform: translate3d(-100px, -100px, 0);
    opacity: 0;
    will-change: transform;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    margin: -4px;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(199, 93, 58, 0.7);
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.cursor-ring {
    width: 36px;
    height: 36px;
    margin: -18px;
    border: 1.5px solid rgba(199, 93, 58, 0.75);
    box-shadow: 0 0 10px rgba(199, 93, 58, 0.15);
    transition: width 0.22s ease, height 0.22s ease, margin 0.22s ease, background 0.22s ease, border-color 0.22s ease, opacity 0.2s ease;
}

.cursor-active .cursor-ring {
    width: 56px;
    height: 56px;
    margin: -28px;
    border-color: var(--primary);
    background: rgba(199, 93, 58, 0.08);
}

.cursor-active .cursor-dot {
    transform: scale(1.35);
}

/* Navigation Header - Box Table Grid Style */

.header {
    width: min(980px, calc(100% - 40px));
    margin: 24px auto 0;
    display: flex;
    align-items: stretch;
    min-height: 60px;
    border: 1px solid var(--line-strong);
    box-shadow: 5px 4px 0px 0px var(--line-strong);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Base header column: each item in a column with border-left, border-right, and minimum height */
.header-col {
    display: inline-flex;
    align-items: center;
    min-height: 60px;
    border-left: 1px solid var(--line-strong);
    border-right: 1px solid var(--line-strong);
    margin-left: -1px;
    /* Collapses adjacent borders into clean 1px table grid lines */
    background: transparent;
    color: var(--foreground);
    text-decoration: none;
    box-sizing: border-box;
    position: relative;
    transition: background 0.22s ease, color 0.22s ease;
}

/* Brand column */
.brand-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-left: none;
    /* Outer box border acts as leftmost boundary */
    margin-left: 0;
}

.logo {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--accent);
    white-space: nowrap;
}


/* Navigation links container */
.nav-links {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
}

/* Nav item columns */
.nav-col {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}



.nav-col .col-arrow {
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Interactive Hover States */
.brand-col:hover {
    background: rgba(199, 93, 58, 0.03);
}

.nav-col:hover {
    background: rgba(199, 93, 58, 0.06);
    color: var(--primary);
}

.nav-col:hover .col-arrow {
    transform: translate(2px, -2px);
    opacity: 1;
}

/* GitHub special CTA column */
.nav-cta {
    background: rgba(199, 93, 58, 0.03);
}

.nav-cta:hover {
    background: var(--primary);
    color: var(--primary-foreground);
}

.nav-cta:hover .col-num {
    color: var(--primary-foreground);
}




/* Hero */
.hero {
    padding-top: 130px;
    align-items: center;
    position: relative;
}


.hero-title {
    margin: 0;
    font-size: clamp(56px, 6.2vw, 102px);
    line-height: 0.96;
    letter-spacing: -0.065em;
    font-weight: 700;
    color: var(--foreground);
    text-align: center;
}

.hero-title span {
    color: var(--primary);
    display: block;
}

.hero-description {
    margin: 38px 0 0;
    font-size: 17px;
    line-height: 1.75;
    color: var(--muted-foreground);
    text-align: justify;
}


.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid var(--line-strong);
    padding: 0 18px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.button-primary {
    color: var(--primary-foreground);
    background: var(--primary);
    border-color: var(--primary);
}

.button-primary:hover {
    background: var(--foreground);
    border-color: var(--foreground);
}

.button-text {
    border-color: transparent;
    color: var(--muted-foreground);
}

.button-text:hover {
    color: var(--primary);
}



.section-heading-row h2,
.lab h2 {
    margin: 14px 0 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.055em;
    font-weight: 650;
}

h2 em {
    color: var(--primary);
    font-style: normal;
}

.section-intro p {
    max-width: 520px;
    justify-self: end;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 15px;
    line-height: 1.8;
}

/* Pipeline */
.pipeline {
    height: 430px;
    position: relative;
    border: 1px solid var(--line-strong);
    overflow: hidden;
    box-shadow: 10px 10px 0px 0px var(--line-strong);
}

.pipeline-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(100, 90, 81, 0.065) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(100, 90, 81, 0.075) 1px, transparent 1px);
    background-size: 60px 60px;
}

.pipeline-header {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.09em;
    color: var(--primary);
    text-align: center;
    margin-top: 1rem;
}


.pipeline-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.flow-path {
    fill: none;
    stroke: rgba(160, 109, 93, 0.795);
    stroke-width: 1;
    stroke-dasharray: 4 9;
    animation: flow 12s linear infinite;
}

.flow-path-2 {
    opacity: 0.32;
    animation-duration: 17s;
    animation-direction: reverse;
}

@keyframes flow {
    to {
        stroke-dashoffset: -160;
    }
}

.pipeline-stage {
    position: absolute;
    z-index: 3;
    width: 160px;
    padding: 12px 0;
    border-top: 1px solid var(--line-strong);
}

.stage-1 {
    left: 4%;
    top: 215px;
}

.stage-2 {
    left: 24%;
    top: 115px;
}

.stage-3 {
    left: 45%;
    top: 260px;
}

.stage-4 {
    left: 66%;
    top: 125px;
}

.stage-5 {
    left: 88%;
    top: 205px;
    transform: translateX(-100%);
}

.stage-num {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.pipeline-stage strong {
    display: block;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.pipeline-stage small {
    display: block;
    margin-top: 5px;
    font-family: var(--mono);
    font-size: 8px;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.packet {
    position: absolute;
    z-index: 5;
    font-family: var(--mono);
    font-size: 8px;
    color: var(--primary);
    border: 1px solid rgba(199, 93, 58, 0.28);
    padding: 5px 7px;
    background: var(--background);
}

.packet-1 {
    left: 17%;
    top: 210px;
}

.packet-2 {
    left: 43%;
    top: 220px;
}

.packet-3 {
    left: 63%;
    top: 235px;
}

/* Manifesto */
.manifesto {
    padding-block: 85px 30px;
    display: grid;
    gap: 30px;
}

.manifesto p {
    margin: 0;
    font-size: clamp(25px, 3vw, 42px);
    line-height: 1.25;
    letter-spacing: -0.04em;
}

.manifesto p span {
    color: var(--primary);
}

/* Production */
.section-heading-row {
    margin-bottom: 20px;
    text-align: center;
}

.production-count {
    color: var(--muted-foreground);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

}

.product-card {
    min-height: 570px;
    position: relative;
    background: var(--background);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, background 0.35s ease;
    will-change: transform;
    transform-style: preserve-3d;
    margin: 4px;
    border: 1px solid var(--line-strong);
}

.product-card:hover {
    background: #fffdf9;
}




.product-visual {
    flex: 1;
    min-height: 330px;
    position: relative;
    overflow: hidden;
}

.product-img{
    max-width: 500px;
    display: flex;
    border: 1px solid var(--line-strong);
}



.product-info {
    padding: 20px;
}

.product-info h3 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.product-info p {
    max-width: 530px;
    margin: 10px 0 16px;
    color: var(--muted-foreground);
    font-size: 1.1rem;
    line-height: 1.65;
}

.product-info h3 i{
    color: #817c78;
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: normal;
}

.product-link {
    font-family: var(--mono);
    font-size: 0.79rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: white;
    background-color: var(--accent);
    padding: 0.3rem 0.45rem;
    cursor: pointer;
}

/* Lab */



.lab-terminal {
    border: 1px solid var(--line-strong);
    min-height: 390px;
    position: relative;
    background: #2c1c16;
    overflow: hidden;
}

.terminal-head {
    height: 47px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: white;
}

.terminal-head .mono {
    color: var(--primary);
}

.terminal-body {
    padding: 34px 28px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 2.5;
    color: #c7b2a1;
    position: relative;
    z-index: 2;
}

.terminal-muted {
    color: #c7b2a1;
    display: inline-block;
    width: 26px;
}

.terminal-body b {
    color: #c7b2a1;
}

.terminal-body strong {
    color: var(--primary);
    font-weight: 500;
}

.terminal-cursor {
    display: inline-block;
    width: 6px;
    height: 12px;
    background: var(--primary);
    margin-left: 7px;
    vertical-align: -2px;
    animation: blink 1s steps(2) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.terminal-matrix {
    position: absolute;
    right: -30px;
    bottom: -5px;
    font-family: var(--mono);
    font-size: 11px;
    line-height: 2;
    color: rgba(199, 93, 58, 0.411);
    transform: rotate(-10deg);
    white-space: nowrap;
}

/* Footer */
.footer {
    padding-top: 15px;
    padding-bottom: 10px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-align: center;
}


/* Responsive */
@media (max-width: 1050px) {
    .shell {
        width: min(100% - 40px, 1400px);
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: 150px;
    }

    .hero-copy {
        padding-bottom: 0;
    }

    .hero-visual {
        height: 580px;
    }

    .section-intro,
    .lab {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .section-intro p {
        justify-self: start;
    }

    .header {
        width: min(100% - 40px, 1000px);
    }

    .nav-col {
        padding: 0 14px;
        gap: 6px;
    }

    .lab {
        gap: 55px;
    }
}

@media (max-width: 720px) {
    body {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-ring {
        display: none;
    }

    .shell {
        width: calc(100% - 30px);
    }

    .header {
        width: calc(100% - 24px);
        margin-top: 14px;
        top: 10px;
        min-height: 52px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .header::-webkit-scrollbar {
        display: none;
    }

    .header-col {
        min-height: 52px;
    }

    .brand-col {
        padding: 0 14px;
        gap: 8px;
    }

    .brand-name {
        font-size: 13px;
    }

    .brand-badge {
        display: none;
    }

    .nav-col {
        padding: 0 12px;
        font-size: 10px;
        gap: 5px;
    }

    .hero {
        min-height: auto;
        padding-top: 125px;
        padding-bottom: 70px;
    }

    .hero-title {
        font-size: clamp(49px, 14vw, 78px);
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-meta {
        margin-top: 55px;
        gap: 12px;
    }

    .hero-visual {
        height: 450px;
    }

    .visual-label {
        top: 20px;
        left: 10px;
        right: 10px;
    }

    .signal-a {
        left: 0;
        bottom: 80px;
    }

    .signal-b {
        right: 0;
        top: 160px;
    }

    .section {
        padding-block: 100px;
    }

    .section-intro h2,
    .section-heading-row h2,
    .lab h2 {
        font-size: 45px;
    }

    .pipeline {
        height: 570px;
    }

    .pipeline-stage {
        width: 125px;
    }

    .stage-1 {
        left: 3%;
        top: 150px;
    }

    .stage-2 {
        left: 52%;
        top: 120px;
    }

    .stage-3 {
        left: 8%;
        top: 285px;
    }

    .stage-4 {
        left: 55%;
        top: 320px;
    }

    .stage-5 {
        left: 52%;
        top: 470px;
    }

    .pipeline-lines {
        display: none;
    }

    .manifesto {

        padding-top: 60px;
    }

    .manifesto p {
        font-size: 25px;
    }

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

    .product-card {
        min-height: 520px;
    }

    .section-heading-row {
        display: block;
    }

    .production-count {
        margin-top: 25px;
    }

    .lab-terminal {
        min-height: 350px;
    }

    .terminal-body {
        font-size: 9px;
        padding-inline: 16px;
    }


}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}