/**
 * BBS TECH — responsive pro (mobile · tablet · desktop)
 */
:root {
    --tech-header-h: 72px;
    --tech-touch: 44px;
    --tech-gutter: clamp(16px, 4vw, 40px);
    --tech-section-y: clamp(56px, 8vw, 96px);
}

/* Safe areas (iPhone notch, etc.) */
@supports (padding: max(0px)) {
    header .hx {
        padding-left: max(var(--tech-gutter), env(safe-area-inset-left));
        padding-right: max(var(--tech-gutter), env(safe-area-inset-right));
    }
    .nav-drawer-inner {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.nav-open {
    overflow: hidden;
    touch-action: none;
}

/* ── Header desktop ── */
header .hx {
    max-width: 1480px;
    margin: 0 auto;
    padding: 16px var(--tech-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}

header .brand {
    flex-shrink: 0;
    min-width: 0;
}

header .hright--toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
}

.nav-backdrop {
    display: none;
}

.nav-drawer-footer,
.nav-drawer-cta {
    display: none;
}

header .lbadge {
    display: none;
}

@media (min-width: 1100px) {
    header .lbadge {
        display: flex;
    }
}

nav.tech-platform-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* ── Tablet & mobile header ── */
@media (max-width: 1024px) {
    :root {
        --tech-header-h: 64px;
    }

    .hright--toolbar .hright-cta,
        display: none;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: var(--tech-touch);
        height: var(--tech-touch);
        padding: 0;
        background: rgba(8, 9, 11, 0.6);
        border: 1px solid var(--rule);
        color: var(--gold2);
        font-size: 1.15rem;
        cursor: pointer;
        border-radius: 2px;
        flex-shrink: 0;
        transition: border-color 0.2s, background 0.2s;
    }

    .nav-toggle:hover,
    .nav-toggle:focus-visible {
        border-color: var(--gold);
        outline: none;
    }

    .nav-toggle[aria-expanded="true"] {
        border-color: var(--gold);
        background: rgba(201, 169, 110, 0.12);
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--tech-header-h);
        background: rgba(8, 9, 11, 0.72);
        backdrop-filter: blur(6px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s;
    }

    .nav-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    nav.tech-platform-nav {
        position: fixed;
        top: var(--tech-header-h);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        display: flex;
        flex-direction: column;
        background: rgba(12, 14, 18, 0.97);
        backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--rule);
        padding: 0;
        margin: 0;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease, visibility 0.32s;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    nav.tech-platform-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-drawer-inner {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 8px var(--tech-gutter) 32px;
        min-height: min(100%, calc(100dvh - var(--tech-header-h)));
    }

    nav.tech-platform-nav a {
        display: flex;
        align-items: center;
        min-height: var(--tech-touch);
        padding: 12px 4px;
        font-size: 0.72rem;
        letter-spacing: 0.16em;
        border-bottom: 1px solid var(--rule);
        color: var(--ink2);
    }

    nav.tech-platform-nav a.active {
        color: var(--gold2);
    }

    nav.tech-platform-nav a:last-of-type {
        border-bottom: none;
    }

    .nav-drawer-footer {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: auto;
        padding-top: 28px;
        border-top: 1px solid var(--rule);
    }

    .nav-drawer-footer .lang-switch {
        justify-content: flex-start;
    }

    .nav-drawer-footer .lang-btn {
        min-width: var(--tech-touch);
        min-height: 36px;
        padding: 8px 14px;
        font-size: 0.68rem;
    }

    .nav-drawer-cta {
        display: flex;
        width: 100%;
    }

    .nav-drawer-cta .btn-noble {
        width: 100%;
        min-height: var(--tech-touch);
        justify-content: center;
    }

    .hright--toolbar .lang-switch {
        gap: 2px;
    }

    .hright--toolbar .lang-btn {
        min-width: 36px;
        min-height: 36px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    header .bn {
        display: none;
    }

    header .bm {
        font-size: 1.05rem;
        letter-spacing: 0.22em;
    }

    .hright--toolbar .lang-btn-ar {
        display: none;
    }
}

/* ── Hero & page rhythm ── */
.hero {
    padding-top: calc(var(--tech-header-h) + 12px);
}

@media (max-width: 1024px) {
    .hero {
        display: grid;
        grid-template-columns: 1fr;
        min-height: auto;
        max-width: 100%;
        padding-top: calc(var(--tech-header-h) + 24px);
    }

    .hmain {
        padding: clamp(32px, 6vw, 64px) var(--tech-gutter) clamp(40px, 6vw, 56px);
    }

    .hside {
        border-left: none;
        border-top: 1px solid var(--rule);
        padding: 40px var(--tech-gutter);
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .hside .slabel {
        grid-column: 1 / -1;
    }

    .htagline,
    .hdesc {
        max-width: 100%;
    }

    .tech-hero-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .tech-hero-actions .btn-noble {
        width: 100%;
        min-height: var(--tech-touch);
    }
}

@media (max-width: 640px) {
    .hside {
        grid-template-columns: 1fr;
    }

    .htitle {
        font-size: clamp(2rem, 9vw, 2.75rem);
    }
}

@media (min-width: 1025px) {
    .hero {
        display: grid;
        grid-template-columns: 1fr 360px;
        min-height: 100vh;
        max-width: 1480px;
        margin: 0 auto;
    }

    .hmain {
        padding: 88px 64px 72px;
    }

    .hside {
        display: flex;
        flex-direction: column;
        gap: 22px;
    }
}

/* ── Sections & typography ── */
.s {
    padding: var(--tech-section-y) var(--tech-gutter);
    max-width: 1480px;
    margin: 0 auto;
}

.stitle {
    font-size: clamp(1.65rem, 4.5vw, 2.35rem);
    line-height: 1.2;
    margin-bottom: clamp(24px, 4vw, 44px);
}

.tech-section-intro {
    font-size: clamp(0.88rem, 2vw, 1rem);
    line-height: 1.7;
    max-width: 42rem;
}

/* Stats & trust */
.tech-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin: 0 auto clamp(32px, 5vw, 48px);
    max-width: 1480px;
    padding: 0 var(--tech-gutter);
}

@media (max-width: 900px) {
    .tech-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .tech-stats-bar {
        grid-template-columns: 1fr;
    }
}

.tech-trust-bar {
    padding: 16px var(--tech-gutter);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tech-trust-items {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    min-width: min-content;
}

@media (min-width: 900px) {
    .tech-trust-items {
        flex-wrap: wrap;
    }
}

/* Grids pro */
.tech-create-grid,
.tech-work-grid,
.tech-offer-grid,
.tech-steps,
.tech-module-grid {
    gap: clamp(14px, 2vw, 20px);
}

.tech-offer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
}

@media (max-width: 1100px) {
    .tech-offer-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .tech-offer-featured {
        order: -1;
    }
}

@media (min-width: 1101px) {
    .tech-offer-featured {
        transform: scale(1.02);
        z-index: 1;
    }
}

.tech-create-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.tech-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.tech-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1024px) {
    .tech-create-grid,
    .tech-work-grid {
        grid-template-columns: 1fr;
    }

    .tech-steps {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .tech-create-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-work-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Case study */
.tech-case-spotlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 899px) {
    .tech-case-spotlight {
        grid-template-columns: 1fr;
    }
}

/* Forms brief */
.rel-form-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: clamp(20px, 3vw, 32px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 var(--tech-gutter) clamp(64px, 10vw, 96px);
}

.rel-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .rel-form-wrap,
    .rel-form-grid {
        grid-template-columns: 1fr;
    }
}

.rel-field input,
.rel-field select,
.rel-field textarea {
    min-height: var(--tech-touch);
    font-size: 16px;
}

.rel-submit {
    width: 100%;
    min-height: var(--tech-touch);
}

@media (min-width: 641px) {
    .rel-submit {
        width: auto;
    }
}

/* CTA bands */
.tech-cta-band,
.cta-band .cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 768px) {
    .tech-cta-band,
    .cta-band {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .tech-cta-band .btn-noble,
    .cta-band .btn-noble {
        width: 100%;
        min-height: var(--tech-touch);
        justify-content: center;
    }
}

.cta-band {
    padding: 0 var(--tech-gutter) var(--tech-section-y);
}

/* Marquee mobile */
@media (max-width: 768px) {
    .marquee-wrap {
        padding: 10px 0;
    }

    .marquee-item {
        font-size: 9px;
        padding: 0 18px;
        gap: 18px;
    }

    .marquee-track {
        animation-duration: 60s;
    }
}

/* Footer */
footer {
    padding: clamp(40px, 6vw, 56px) var(--tech-gutter);
}

.footer-legal {
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

@media (min-width: 640px) {
    .footer-legal {
        flex-direction: row;
        gap: 24px;
    }
}

/* Touch: no custom cursor */
@media (hover: none), (pointer: coarse) {
    #bbs-cdot,
    #bbs-cring {
        display: none !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }

    nav.tech-platform-nav,
    .nav-backdrop {
        transition: none;
    }
}


/* ── Desktop nav (inline Nexus) ── */
@media (min-width: 1025px) {
    header .hx {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    nav.tech-platform-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: clamp(20px, 2.5vw, 32px);
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: transparent;
        backdrop-filter: none;
        border: none;
        padding: 0;
        overflow: visible;
        flex: 1;
        justify-content: center;
    }

    .nav-drawer-inner {
        display: contents;
    }

    nav.tech-platform-nav a {
        min-height: auto;
        padding: 0;
        border: none;
        white-space: nowrap;
    }

    .nav-drawer-footer {
        display: none !important;
    }

    .nav-backdrop {
        display: none !important;
    }

    .nav-toggle {
        display: none !important;
    }
}

/* ── Maison BBS architecture map ── */
.tech-maison-section {
    padding-top: var(--tech-section-y);
}

.tech-maison-map {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (min-width: 900px) {
    .tech-maison-map {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.85fr);
        gap: 20px 28px;
        align-items: start;
    }

    .tech-maison-col--flows {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 14px;
        padding-top: 48px;
    }
}

.tech-maison-col-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold, #c9a962);
    margin-bottom: 14px;
    opacity: 0.9;
}

.tech-maison-pillar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 169, 98, 0.22);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
}

.tech-maison-pillar--tech {
    border-color: rgba(201, 169, 98, 0.45);
    box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.08);
}

.tech-maison-pillar h3 {
    font-size: 1.05rem;
    margin: 0 0 6px;
}

.tech-maison-role {
    font-size: 0.88rem;
    color: var(--gold, #c9a962);
    margin: 0 0 8px;
}

.tech-maison-detail {
    font-size: 0.86rem;
    line-height: 1.55;
    opacity: 0.88;
    margin: 0 0 10px;
}

.tech-maison-link {
    font-size: 0.82rem;
    color: var(--gold, #c9a962);
    text-decoration: none;
}

.tech-maison-link.is-here {
    opacity: 0.75;
    font-style: italic;
}

.tech-maison-flow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    line-height: 1.45;
    opacity: 0.85;
    padding: 8px 10px;
    border-left: 2px solid rgba(201, 169, 98, 0.35);
}

.tech-maison-flow.is-dashed {
    opacity: 0.65;
    border-left-style: dashed;
}

.tech-maison-flow-arrow {
    color: var(--gold, #c9a962);
    flex-shrink: 0;
}

.tech-maison-client-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.tech-maison-client-row {
    padding: 16px 18px;
}

.tech-maison-client-row--in {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tech-maison-client-row--out {
    background: rgba(201, 169, 98, 0.06);
}

.tech-maison-client-key {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: 0.7;
}

.tech-maison-client-row p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Experience block ── */
.tech-experience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
}

@media (min-width: 768px) {
    .tech-experience-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tech-experience-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px 20px;
}

.tech-experience-card h3 {
    font-size: 1rem;
    margin: 0 0 10px;
    color: var(--gold, #c9a962);
}

.tech-experience-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    opacity: 0.9;
}

/* ── Mandate segments block ── */
.tech-segments-section {
    scroll-margin-top: 80px;
}

.tech-segments-profiles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 28px;
}

@media (min-width: 768px) {
    .tech-segments-profiles {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tech-segments-profile {
    background: rgba(201, 169, 98, 0.06);
    border: 1px solid rgba(201, 169, 98, 0.18);
    border-radius: 12px;
    padding: 20px 18px;
}

.tech-segments-profile h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--gold, #c9a962);
}

.tech-segments-profile p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    opacity: 0.92;
}

.tech-segments-pillars {
    margin-top: 28px;
}

@media (min-width: 1024px) {
    .tech-segments-pillars {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tech-segments-scope {
    margin-top: 36px;
}

.tech-segments-quote {
    margin: 32px 0 0;
    padding: 20px 22px;
    border-left: 3px solid var(--gold, #c9a962);
    background: rgba(201, 169, 98, 0.06);
    border-radius: 0 10px 10px 0;
}

.tech-segments-quote p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    font-style: italic;
    opacity: 0.95;
}

.tech-segments-cta {
    margin-top: 28px;
}

/* ── Offer scope block ── */
.tech-offer-scope {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.tech-offer-scope h3 {
    margin: 0 0 20px;
    font-size: 1.1rem;
}

.tech-offer-scope-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .tech-offer-scope-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.tech-offer-scope-col h4 {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.tech-offer-scope-col--yes h4 {
    color: var(--gold, #c9a962);
}

.tech-offer-scope-col ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    line-height: 1.6;
}

.tech-offer-scope-col li {
    margin-bottom: 6px;
}

.tech-create-card--muted {
    opacity: 0.88;
}

.tech-create-nexus {
    margin: 12px 0 0;
    font-size: 0.82rem;
}

.tech-create-nexus a {
    color: var(--gold, #c9a962);
}

.tech-cta-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
}

.tech-cta-band .btn-noble {
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .tech-create-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tech-create-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Brief qualification */
.tech-qual-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 28px 0 36px;
}

@media (min-width: 768px) {
    .tech-qual-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.tech-qual-card {
    padding: 24px;
    border-radius: 14px;
    border: 1px solid rgba(201, 169, 98, 0.18);
    background: rgba(255, 255, 255, 0.02);
}

.tech-qual-card h3 {
    margin: 0 0 14px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.06em;
}

.tech-qual-card--yes h3 {
    color: var(--gold, #c9a962);
}

.tech-qual-card--no h3 {
    color: var(--ink2, #b8b5b0);
}

.tech-qual-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--ink3, #9a9690);
}

.tech-qual-list li {
    margin-bottom: 8px;
}

.tech-qual-fieldset {
    border: 1px solid rgba(201, 169, 98, 0.15);
    border-radius: 12px;
    padding: 20px 18px 18px;
    margin: 0 0 20px;
}

.tech-qual-fieldset legend {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold, #c9a962);
    padding: 0 8px;
}

.tech-qual-notice {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.55;
}

.tech-qual-notice--warn {
    background: rgba(226, 201, 138, 0.08);
    border: 1px solid rgba(226, 201, 138, 0.25);
    color: #e2c98a;
}

.tech-qual-notice--out {
    background: rgba(229, 115, 115, 0.06);
    border: 1px solid rgba(229, 115, 115, 0.22);
    color: #e8a0a0;
}

.tech-qual-fit {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.tech-qual-fit--premium {
    background: rgba(91, 191, 138, 0.08);
    border: 1px solid rgba(91, 191, 138, 0.28);
    color: #5bbf8a;
}

.tech-qual-fit--review {
    background: rgba(201, 169, 98, 0.08);
    border: 1px solid rgba(201, 169, 98, 0.25);
    color: var(--gold, #c9a962);
}

.tech-qual-fit--low {
    background: rgba(226, 201, 138, 0.06);
    border: 1px solid rgba(226, 201, 138, 0.2);
    color: #c9b07a;
}

.tech-qual-fit--out {
    background: rgba(229, 115, 115, 0.06);
    border: 1px solid rgba(229, 115, 115, 0.2);
    color: #d89090;
}

.rel-field-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--ink3, #9a9690);
}

.rel-field-check input {
    margin-top: 4px;
    flex-shrink: 0;
}
