/* ==========================================================================
   boxedCode Labs — design tokens
   ========================================================================== */
:root {
    --dark: #1b1d22;
    --dark-2: #24262d;
    --dark-3: #383b41;
    --cyan: #00b7ff;
    --cyan-dim: #0090cc;
    --green: #92d51d;
    --orange: #ff812b;
    --amber: #ffae2b;
    --red: #ff4545;
    --white: #ffffff;
    --off-white: #f6f8fb;
    --ink: #14161a;
    --muted: #6b7280;
    --border: #e6e9ef;

    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;

    --shadow-soft: 0 20px 50px -20px rgba(20, 22, 26, 0.25);
    --shadow-glow: 0 0 0 1px rgba(0, 183, 255, 0.15), 0 20px 60px -25px rgba(0, 183, 255, 0.45);

    --container: 1180px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
p { line-height: 1.65; color: var(--muted); margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

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

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-primary {
    background: var(--cyan);
    color: var(--ink);
    box-shadow: 0 12px 30px -10px rgba(0, 183, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(0, 183, 255, 0.7); }
.btn-dark {
    background: var(--dark);
    color: var(--white);
}
.btn-dark:hover { transform: translateY(-2px); background: var(--ink); }
.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.25);
    color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-outline-dark {
    background: transparent;
    border-color: var(--dark-3);
    color: var(--ink);
}
.btn-outline-dark:hover { background: var(--ink); color: var(--white); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    padding: 18px 0;
    transition: all 0.3s ease;
}
.site-header.scrolled {
    padding: 10px 0;
    background: rgba(246, 248, 251, 0.75);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink);
}
.brand em { font-style: normal; color: var(--cyan-dim); }
.brand img { border-radius: 8px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--muted);
    position: relative;
    padding: 6px 0;
    transition: color 0.2s ease;
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--cyan);
    transition: width 0.25s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); margin: 0 auto; transition: all 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    background: var(--dark);
    color: var(--white);
    padding: 90px 0 120px;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    z-index: 0;
    animation: float 14s ease-in-out infinite;
}
.blob-cyan { width: 420px; height: 420px; background: var(--cyan); top: -140px; right: -100px; }
.blob-green { width: 280px; height: 280px; background: var(--green); bottom: -80px; left: -60px; animation-delay: -4s; }
.blob-orange { width: 220px; height: 220px; background: var(--orange); top: 40%; right: 15%; opacity: 0.35; animation-delay: -8s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(1.08); }
}

.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 24px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(146,213,29,0.2); }

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}
.hero h1 .grad {
    background: linear-gradient(90deg, var(--cyan), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead {
    color: rgba(255,255,255,0.7);
    font-size: 1.15rem;
    max-width: 520px;
    margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-visual { position: relative; z-index: 2; }
.orbit-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-glow);
}
.orbit-card img { width: 100%; border-radius: 14px; }
.floating-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--ink);
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    animation: bob 5s ease-in-out infinite;
}
.chip-1 { top: -18px; left: -24px; }
.chip-2 { bottom: -16px; right: -18px; animation-delay: -2.5s; }
.floating-chip .swatch { width: 10px; height: 10px; border-radius: 50%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee-strip {
    background: var(--ink);
    color: var(--white);
    padding: 16px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}
.marquee-track {
    display: inline-flex;
    gap: 48px;
    animation: scroll-left 24s linear infinite;
}
.marquee-track span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,0.7);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.marquee-track span::after { content: '◆'; color: var(--cyan); font-size: 0.6rem; }
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
section { padding: 110px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cyan-dim);
    background: rgba(0,183,255,0.1);
    border: 1px solid rgba(0,183,255,0.35);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 18px; letter-spacing: -0.01em; }
.section-head p { font-size: 1.05rem; }

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

/* Service / product grid */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); border-color: transparent; }
.card-icon {
    width: 54px; height: 54px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 22px;
    color: var(--white);
}
.card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.card p { font-size: 0.95rem; margin-bottom: 18px; }
.card .card-link { font-weight: 600; font-size: 0.9rem; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.card .card-link .arrow { transition: transform 0.25s ease; }
.card:hover .card-link .arrow { transform: translateX(4px); }

.bg-cyan { background: var(--cyan); }
.bg-green { background: var(--green); }
.bg-orange { background: var(--orange); }
.bg-amber { background: var(--amber); }
.bg-red { background: var(--red); }
.bg-dark { background: var(--dark); }

.text-cyan { color: var(--cyan-dim); }
.text-green { color: #6ba310; }
.text-orange { color: #d9650e; }

/* Dark band section */
.band-dark {
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin: 0 24px;
}
.band-dark .section-head p, .band-dark p { color: rgba(255,255,255,0.6); }
.band-dark .tag { color: var(--cyan); background: rgba(255,255,255,0.08); border-color: rgba(0,183,255,0.5); }
.band-dark .product-kicker { filter: none; }
.band-dark .container { max-width: calc(var(--container) - 0px); }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.25);
    display: block;
    margin-bottom: 16px;
}
.step h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 10px; }
.step p { font-size: 0.9rem; }

/* Product spotlight rows */
.product-row {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
    align-items: center;
    padding: 56px 0;
    border-bottom: 1px solid var(--border);
}
.product-row:last-child { border-bottom: none; }
.product-row:nth-child(even) { direction: rtl; }
.product-row:nth-child(even) > * { direction: ltr; }
.product-visual {
    border-radius: var(--radius-md);
    padding: 40px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-visual .mono-badge {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.6rem;
    color: var(--white);
    text-align: center;
    position: relative;
    z-index: 1;
}
.product-visual::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%), rgba(0,0,0,0.4);
}
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.pill-list span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    background: var(--off-white);
    border: 1px solid rgba(20,22,26,0.15);
    padding: 7px 14px;
    border-radius: 999px;
}
.product-kicker { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; filter: brightness(0.55); }
.product-row h3 { font-size: 1.9rem; margin-bottom: 14px; }

/* CTA band */
.cta-band {
    background: linear-gradient(120deg, var(--dark) 0%, #101216 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin: 0 24px;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 20px; }
.cta-band p { color: rgba(255,255,255,0.65); max-width: 520px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */
.page-hero {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 90px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: 18px; max-width: 700px; }
.page-hero p { color: rgba(255,255,255,0.65); max-width: 560px; font-size: 1.05rem; }

/* Team / about */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value-card { padding: 26px; border-radius: var(--radius-md); background: var(--off-white); color: var(--ink); }
.value-card b { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 8px; color: var(--ink); }
.value-card p { font-size: 0.9rem; color: var(--muted); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-info-card {
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-md);
    padding: 36px;
}
.contact-info-card h3 { margin-bottom: 16px; font-size: 1.3rem; }
.contact-info-card p { color: rgba(255,255,255,0.6); margin-bottom: 28px; }
.contact-detail { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-detail .ic {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.contact-detail b { display: block; font-size: 0.95rem; }
.contact-detail span { font-size: 0.85rem; color: rgba(255,255,255,0.55); }

.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field select, .field textarea {
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--off-white);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.92rem;
    font-weight: 500;
}
.alert-success { background: rgba(146,213,29,0.14); color: #4c7a0b; border: 1px solid rgba(146,213,29,0.4); }
.alert-error { background: rgba(255,69,69,0.1); color: #b62a2a; border: 1px solid rgba(255,69,69,0.35); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 70px 0 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand p { color: rgba(255,255,255,0.5); margin: 16px 0 20px; font-size: 0.9rem; max-width: 260px; }
.footer-brand .brand { color: var(--white); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    transition: background 0.2s ease;
}
.footer-socials a:hover { background: var(--cyan); color: var(--ink); }
.footer-col h4 { color: var(--white); font-size: 0.9rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; font-size: 0.9rem; margin-bottom: 12px; color: rgba(255,255,255,0.55); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; padding: 24px 0; font-size: 0.82rem; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .grid-3, .value-grid, .steps { grid-template-columns: repeat(2, 1fr); }
    .product-row, .product-row:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
    .contact-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { gap: 32px; }
}

@media (max-width: 760px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 68px; left: 16px; right: 16px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 20px;
        gap: 4px;
        box-shadow: var(--shadow-soft);
    }
    section { padding: 70px 0; }
    .grid-3, .grid-2, .value-grid, .steps { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .band-dark, .cta-band { margin: 0 12px; padding: 50px 24px; }
    .header-actions .btn-sm { display: none; }
}
