/* ============================================
   DESIGN V2 — typography, layouts, motion
   ============================================ */

:root {
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --ink: #e8e6e3;
    --muted: rgba(232, 230, 227, 0.62);
    --surface: rgba(255, 255, 255, 0.035);
    --line: rgba(255, 255, 255, 0.08);
    --accent: #FF7A18;
    --accent-2: #FFC837;
    --bg: #0B0B0F;
    --section-pad: clamp(88px, 12vw, 140px);
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    letter-spacing: 0.01em;
}

h1, h2, h3, h4,
.hero-title,
.nav-cta,
.btn,
.stat-number,
.preloader-text {
    font-family: var(--font-display);
}

.btn {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

.section-title {
    font-family: var(--font-body);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-tag {
    border-radius: 4px;
    letter-spacing: 0.18em;
    font-family: var(--font-body);
}

.web-services-intro,
.showreel-subtitle {
    max-width: 540px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 40px;
}

.section-room {
    padding-block: var(--section-pad);
}

.section-anchor + .section-anchor,
#work + #about,
#about + #animation {
    border-top: 1px solid transparent;
}

#web-services,
#industries,
#work,
#about,
#animation,
#portfolio,
#process,
#faq,
#contact,
#testimonials {
    padding-block: var(--section-pad);
}

#about.section-room,
#animation.section-room {
    position: relative;
}

#about.section-room::before,
#animation.section-room::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: min(720px, 70%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 122, 24, 0.35), transparent);
}

/* ---------- Services bento ---------- */
.services-bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-top: 8px;
}

.service-bento-item {
    position: relative;
    grid-column: span 2;
    padding: 28px 24px 26px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: border-color 0.35s ease, transform 0.35s ease;
}

.service-bento-item.is-featured {
    grid-column: span 3;
    grid-row: span 2;
    padding: 36px 32px;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 122, 24, 0.16), transparent 55%),
        var(--surface);
}

.service-bento-item:nth-child(2) {
    grid-column: span 3;
}

.service-bento-item .card-index {
    position: absolute;
    top: 18px;
    right: 18px;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.28);
}

.service-bento-item h3 {
    font-size: 22px;
    margin: 14px 0 10px;
    letter-spacing: -0.02em;
}

.service-bento-item.is-featured h3 {
    font-size: clamp(26px, 3vw, 34px);
}

.service-bento-item p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.service-bento-item:hover {
    border-color: rgba(255, 122, 24, 0.35);
    transform: translateY(-4px);
}

/* ---------- Horizontal rails ---------- */
.rail-wrap {
    overflow: hidden;
    margin-top: 8px;
}

.industry-rail,
.work-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px max(24px, calc((100vw - 1200px) / 2 + 24px)) 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 122, 24, 0.45) transparent;
    -webkit-overflow-scrolling: touch;
}

.industry-rail::-webkit-scrollbar,
.work-rail::-webkit-scrollbar {
    height: 6px;
}

.industry-rail::-webkit-scrollbar-thumb,
.work-rail::-webkit-scrollbar-thumb {
    background: rgba(255, 122, 24, 0.4);
    border-radius: 99px;
}

.industry-rail-card,
.work-rail-card {
    flex: 0 0 min(300px, 78vw);
    scroll-snap-align: start;
}

.industry-rail-card {
    padding: 28px 24px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.industry-rail-card:hover {
    border-color: rgba(255, 122, 24, 0.35);
    transform: translateY(-4px);
}

.industry-rail-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 122, 24, 0.12);
    color: var(--accent);
    font-size: 18px;
}

.industry-rail-card h3 {
    font-size: 22px;
    letter-spacing: -0.02em;
    margin: 4px 0 0;
}

.industry-rail-card p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.55;
    flex: 1;
}

.industry-rail-count {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Work rail + product UI mock ---------- */
.work-rail-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.work-rail-card h3 {
    font-size: 22px;
    letter-spacing: -0.02em;
    margin: 0;
}

.work-ui-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--from) 35%, #111), color-mix(in srgb, var(--to) 25%, #0B0B0F));
    aspect-ratio: 16 / 11;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

.work-rail-card:hover .work-ui-frame {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 30px 60px rgba(255, 122, 24, 0.12);
}

.work-ui-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.work-ui-chrome span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.work-ui-chrome span:nth-child(1) { background: #ff5f57; }
.work-ui-chrome span:nth-child(2) { background: #febc2e; }
.work-ui-chrome span:nth-child(3) { background: #28c840; }

.work-ui-chrome em {
    margin-left: 8px;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.45);
}

.work-ui-body {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    padding: 12px;
    height: calc(100% - 36px);
}

.work-ui-sidebar {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.work-ui-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.work-ui-bar {
    height: 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    width: 62%;
}

.work-ui-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.work-ui-grid i {
    display: block;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-ui-emoji {
    position: absolute;
    right: 14px;
    bottom: 12px;
    font-size: 28px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.work-cta {
    margin-top: 36px;
}

/* ---------- About product stage ---------- */
.about-grid-v2 {
    align-items: center;
    gap: clamp(36px, 6vw, 72px);
    margin-top: 28px;
}

.about-grid-v2 .about-text h2 {
    font-size: clamp(32px, 4vw, 46px);
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.product-stage {
    position: relative;
    min-height: 380px;
    display: grid;
    place-items: center;
}

.product-glow {
    position: absolute;
    inset: 18% 12%;
    background: radial-gradient(circle, rgba(255, 122, 24, 0.28), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

.product-screen {
    position: relative;
    width: min(100%, 460px);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(160deg, #16161c, #0e0e13);
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 122, 24, 0.08);
    transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-stage:hover .product-screen {
    transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
}

.product-topbar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.product-topbar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.product-topbar .dot:nth-child(1) { background: #ff5f57; }
.product-topbar .dot:nth-child(2) { background: #febc2e; }
.product-topbar .dot:nth-child(3) { background: #28c840; }

.product-topbar em {
    margin-left: auto;
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.product-layout {
    display: grid;
    grid-template-columns: 56px 1fr;
    min-height: 260px;
}

.product-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.product-nav b {
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

.product-nav b:first-child {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.product-canvas {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-kpi {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.product-kpi i {
    display: block;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-chart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 122, 24, 0.06);
    border: 1px solid rgba(255, 122, 24, 0.1);
    min-height: 110px;
}

.product-chart span {
    flex: 1;
    height: var(--h);
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    opacity: 0.85;
    animation: chartRise 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--h) * 0.01s);
}

@keyframes chartRise {
    from { transform: scaleY(0.2); opacity: 0; }
    to { transform: scaleY(1); opacity: 0.85; }
}

.product-table {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.product-table i {
    display: block;
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
}

.product-table i:nth-child(1) { width: 92%; }
.product-table i:nth-child(2) { width: 78%; }
.product-table i:nth-child(3) { width: 64%; }

.product-float {
    position: absolute;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(18, 18, 24, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    display: grid;
    gap: 2px;
}

.product-float strong {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.product-float span {
    font-size: 12px;
    color: var(--muted);
}

.product-float-a {
    left: 0;
    top: 18%;
    animation: floatCard 5s ease-in-out infinite;
}

.product-float-b {
    right: 0;
    bottom: 16%;
    animation: floatCard 5.8s ease-in-out infinite reverse;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---------- Animation split + stills ---------- */
.animation-split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(32px, 6vw, 72px);
    align-items: center;
}

.animation-split .section-title {
    margin-bottom: 12px;
}

.animation-list {
    list-style: none;
    display: grid;
    gap: 14px;
    margin-top: 8px;
}

.animation-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.animation-list li > i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 122, 24, 0.12);
    color: var(--accent);
}

.animation-list strong {
    display: block;
    font-family: var(--font-display);
    font-size: 17px;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.animation-list span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.animation-stills {
    position: relative;
    min-height: 420px;
}

.still-frame {
    position: absolute;
    width: min(58%, 280px);
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
    filter: saturate(1.05) contrast(1.05);
}

.still-frame img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.still-frame:nth-child(1) { top: 0; left: 8%; transform: rotate(-4deg); z-index: 2; }
.still-frame:nth-child(2) { top: 18%; right: 0; transform: rotate(5deg); z-index: 3; }
.still-frame:nth-child(3) { bottom: 12%; left: 0; transform: rotate(3deg); z-index: 1; }
.still-frame:nth-child(4) { bottom: 0; right: 10%; transform: rotate(-6deg); z-index: 4; }

.still-frame:hover {
    z-index: 5;
    transform: rotate(0deg) scale(1.04);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Full-bleed showreel ---------- */
.showreel-bleed {
    padding-inline: 0;
}

.showreel-bleed-inner {
    width: 100%;
}

.showreel-copy {
    text-align: center;
    margin-bottom: 28px;
}

.showreel-copy .web-services-intro,
.showreel-copy .showreel-subtitle {
    margin-inline: auto;
}

.showreel-full {
    width: 100%;
    padding: 0;
}

.showreel-full .showreel-container {
    max-width: none;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    aspect-ratio: 21 / 9;
    min-height: 360px;
}

.showreel-full .showreel-play-btn {
    transform: scale(1.05);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.showreel-full .showreel-play-btn:hover {
    transform: scale(1.12);
}

/* ---------- Process stacked timeline ---------- */
.process-stack {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    position: relative;
    max-width: 820px;
}

.process-stack::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(255, 122, 24, 0.05));
}

.process-stack-step {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    padding: 18px 0 28px;
}

.process-stack-num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: #0B0B0F;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 6px rgba(11, 11, 15, 1), 0 0 28px rgba(255, 122, 24, 0.35);
    z-index: 1;
}

.process-stack-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 22px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.process-stack-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 122, 24, 0.12);
    color: var(--accent);
}

.process-stack-body h4 {
    font-size: 20px;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.process-stack-body p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Hide legacy process card grid styles when stack is present */
#process .process-timeline {
    display: none;
}

/* ---------- Motion: calm mobile ---------- */
@media (max-width: 860px) {
    .services-bento {
        grid-template-columns: 1fr;
    }

    .service-bento-item,
    .service-bento-item.is-featured,
    .service-bento-item:nth-child(2) {
        grid-column: auto;
        grid-row: auto;
    }

    .animation-split {
        grid-template-columns: 1fr;
    }

    .animation-stills {
        min-height: 320px;
        order: -1;
    }

    .still-frame img {
        height: 130px;
    }

    .product-screen {
        transform: none;
    }

    .product-float-a { left: -4px; }
    .product-float-b { right: -4px; }

    .showreel-full .showreel-container {
        aspect-ratio: 16 / 9;
        min-height: 220px;
    }

    #hero .glow-orb,
    #hero .hero-spark,
    #hero .hero-scan {
        display: none !important;
    }

    #particleCanvas {
        opacity: 0.25;
    }
}

@media (max-width: 640px) {
    :root {
        --section-pad: 72px;
    }

    #particleCanvas,
    #hero .glow-orb {
        display: none !important;
    }

    .hero-title {
        font-size: clamp(36px, 11vw, 52px);
    }

    .process-stack::before {
        left: 23px;
    }

    .process-stack-step {
        grid-template-columns: 48px 1fr;
        gap: 14px;
    }

    .process-stack-num {
        width: 48px;
        height: 48px;
        font-size: 12px;
    }

    .process-stack-body {
        flex-direction: column;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-ui-frame,
    .product-screen,
    .still-frame,
    .product-float,
    .product-chart span {
        animation: none !important;
        transition: none !important;
    }
}
