/* Techno-Merce — shared premium layer (loaded after each page's own styles) */

/* ---------- Type ---------- */
h1 { letter-spacing: -0.035em; }
h2 {
    font-size: clamp(2rem, 3.6vw, 3.05rem);
    letter-spacing: -0.03em;
    line-height: 1.08;
}
.section-description { color: #475569; }
.on-dark .section-description { color: rgba(255, 255, 255, 0.72); }
section { padding-top: 104px; padding-bottom: 104px; }
@media (max-width: 768px) { section { padding-top: 68px; padding-bottom: 68px; } }
.section-header { margin-bottom: 3.75rem; }

/* ---------- Eyebrow labels (replace boxed badges) ---------- */
.section-badge, .section-badge.on-dark {
    background: none;
    border: 0;
    padding: 0;
    border-radius: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 500;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.section-badge::before {
    content: '';
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.55;
}
.section-badge svg { display: none; }

/* ---------- Navigation: dark glass, matches the dark heroes ---------- */
nav {
    background: rgba(0, 16, 34, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
nav.scrolled {
    background: rgba(0, 16, 34, 0.94);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.logo-img { filter: brightness(1.18) saturate(1.05); }
.nav-links a { color: rgba(255, 255, 255, 0.78); font-weight: 500; }
.nav-links a:hover { color: #fff; }
.nav-links a:not(.cta-button)::after { background: var(--primary-light, #5fcffb); }
.lang-switch {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}
.lang-switch a { color: rgba(255, 255, 255, 0.55); }
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.lang-switch a:not(.active):hover { background: rgba(255, 255, 255, 0.08); }
.cta-button {
    background: #fff;
    color: var(--navy, #001F3F) !important;
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
}
.cta-button:hover { background: var(--primary, #00A3E0); color: #fff !important; }
.menu-toggle span { background: #fff; }
@media (max-width: 880px) {
    .nav-links { background: #00152B; box-shadow: none; border-top: 1px solid rgba(255, 255, 255, 0.07); }
    .nav-links a { color: rgba(255, 255, 255, 0.85); }
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost { border-radius: 999px; }
.btn-primary { box-shadow: none; }
.btn-primary:hover { box-shadow: 0 12px 30px -12px rgba(0, 163, 224, 0.7); }

/* ---------- Cards: hairline borders, soft lift ---------- */
.service-card, .work-card, .project-card, .approach-card, .impact-card, .partner-card {
    border-color: rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.service-card:hover, .work-card:hover, .project-card:hover {
    border-color: rgba(0, 163, 224, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 28px 50px -24px rgba(0, 31, 63, 0.28);
}
.service-card::before, .project-card::before { display: none; }

/* ---------- Hero visual: drop the fake window dots ---------- */
.hero-scan-bar .dot { display: none; }
.hero-scan-bar .title { margin-left: 0; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* ---------- Shared page blocks used by project subpages ---------- */
.tm-photo-band { padding: 0; background: #00152B; }
.tm-photo-band figure { margin: 0; position: relative; }
.tm-photo-band img { width: 100%; height: clamp(260px, 42vw, 560px); object-fit: cover; display: block; }
.tm-photo-band figcaption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 2.5rem 2rem 1.4rem;
    background: linear-gradient(180deg, transparent, rgba(0, 16, 34, 0.85));
    color: rgba(255, 255, 255, 0.82); font-size: 0.9rem;
}
.tm-photo-band figcaption span { max-width: 1320px; margin: 0 auto; display: block; }

.tm-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: center; }
.tm-split.reverse > :first-child { order: 2; }
@media (max-width: 960px) { .tm-split { grid-template-columns: 1fr; gap: 2rem; } .tm-split.reverse > :first-child { order: 0; } }
.tm-split .section-header { text-align: left; margin: 0; }
.tm-split .section-description { margin: 0; }
.tm-split img { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: 0 30px 60px -28px rgba(0, 31, 63, 0.4); }
.tm-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.85rem; }
.tm-list li { position: relative; padding-left: 1.6rem; color: #334155; line-height: 1.6; }
.tm-list li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--primary, #00A3E0); }

.tm-figure { margin: 0 auto; max-width: 1040px; background: #fff; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 18px; padding: 1.5rem; }
.tm-figure img { width: 100%; height: auto; display: block; }
.tm-figure figcaption { text-align: center; color: #64748b; font-size: 0.86rem; margin-top: 0.75rem; }

.tm-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .tm-gallery { grid-template-columns: 1fr; } }
.tm-gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid rgba(15, 23, 42, 0.08); }
.tm-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.tm-gallery figcaption { padding: 1rem 1.2rem 1.2rem; }
.tm-gallery figcaption strong { display: block; color: var(--navy, #001F3F); font-size: 1rem; margin-bottom: 0.3rem; }
.tm-gallery figcaption span { color: #475569; font-size: 0.9rem; line-height: 1.55; }

.tm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(15, 23, 42, 0.08); border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 18px; overflow: hidden; }
@media (max-width: 760px) { .tm-stats { grid-template-columns: 1fr; } }
.tm-stats div { background: #fff; padding: 2rem 1.75rem; }
.tm-stats strong { display: block; font-size: clamp(2rem, 3.4vw, 2.75rem); letter-spacing: -0.03em; color: var(--navy, #001F3F); line-height: 1.1; }
.tm-stats span { display: block; margin-top: 0.4rem; color: #475569; font-size: 0.92rem; }
.tm-alt { background: #f6f9fc; }
.approach-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .approach-grid.three { grid-template-columns: 1fr; } }

/* ---------- Mobile safety: wrap hero chips, never clip long (German) words ---------- */
.hero-partners { flex-wrap: wrap; row-gap: 0.75rem; }
@media (max-width: 600px) {
    .hero-partners { gap: 0.6rem 1.25rem; }
    .hero-partners-label { text-align: center; }
    h1, h2 { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
}
.approach-card > div, .impact-stat { min-width: 0; }
@media (max-width: 600px) {
    h3, .approach-card p, .impact-stat, .tm-stats span { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
    .work-foot { flex-wrap: wrap; }
}

/* ---------- Typography polish: balanced headings, no orphan words ---------- */
h1, h2, h3, .section-description, .hero-description, .cta-content p { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }

/* Project cards: equal footer height, so the links line up across a row */
.project-footer { min-height: 75px; box-sizing: border-box; }

/* Card footers wrap instead of clipping when labels are long (DE/FR) */
.work-foot { flex-wrap: wrap; row-gap: 0.6rem; }

/* Two-column tablet layouts: centre a lone third card instead of leaving it on the left */
@media (min-width: 601px) and (max-width: 900px) {
    .services-grid > :nth-child(3):last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 0.625rem); }
}
@media (min-width: 641px) and (max-width: 960px) {
    .work-grid > :nth-child(3):last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 0.625rem); }
}

/* Hero image label bar: wrap rather than truncate on small phones */
@media (max-width: 480px) {
    .hero-scan-bar .title { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* Narrow 3-column project cards: slightly smaller partner logos keep each footer on one line */
@media (min-width: 961px) and (max-width: 1180px) {
    .work-partners { gap: 0.35rem; }
    .work-partners img { height: 26px; max-width: 72px; padding: 3px 5px; }
    .work-foot { gap: 0.5rem; }
}

/* ================= Brief-based project pages (2026-11-09) ================= */
/* Detection strip: label row + three-panel image */
.tm-strips { display: grid; gap: 1.25rem; max-width: 1180px; margin: 0 auto; }
.tm-strip { margin: 0; border-radius: 14px; overflow: hidden; background: #0a1626; box-shadow: 0 24px 50px -28px rgba(0, 31, 63, 0.45); }
.tm-strip-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0.7rem 1rem; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255, 255, 255, 0.82); }
.tm-strip img { width: 100%; height: auto; display: block; }
@media (max-width: 640px) { .tm-strip-labels { font-size: 0.54rem; letter-spacing: 0; padding: 0.5rem 0.55rem; } }

/* Statement band */
.tm-statement { background: radial-gradient(ellipse at 15% 0%, #003a6b 0%, #00152B 62%); color: #fff; }
.tm-statement .container { max-width: 980px; }
.tm-statement p { color: rgba(255, 255, 255, 0.74); font-size: 1.08rem; line-height: 1.7; max-width: 780px; margin: 0; }
.tm-statement p.big { color: #fff; font-size: clamp(1.55rem, 3vw, 2.35rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 1.1rem; max-width: none; }

/* Heading left, definition rows right */
.tm-rows { display: grid; grid-template-columns: 1fr 1.7fr; gap: 3.5rem; align-items: start; }
.tm-rows .section-header { text-align: left; margin: 0; max-width: none; }
.tm-rows dl { margin: 0; }
.tm-rows dl > div { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 1.5rem; padding: 1.2rem 0; border-top: 1px solid rgba(15, 23, 42, 0.1); }
.tm-rows dl > div:last-child { border-bottom: 1px solid rgba(15, 23, 42, 0.1); }
.tm-rows dt { font-weight: 700; color: var(--navy, #001F3F); line-height: 1.4; }
.tm-rows dd { margin: 0; color: #475569; line-height: 1.6; }
@media (max-width: 900px) {
    .tm-rows { grid-template-columns: 1fr; gap: 1.75rem; }
    .tm-rows dl > div { grid-template-columns: 1fr; gap: 0.3rem; }
}
.approach-grid.fill > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Case-study charts */
.tm-stats.four { grid-template-columns: repeat(4, 1fr); margin-bottom: 1.25rem; }
@media (max-width: 900px) { .tm-stats.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tm-stats.four { grid-template-columns: 1fr; } }
.tm-chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 960px) { .tm-chart-grid { grid-template-columns: 1fr; } }
.tm-chart { background: #fff; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 18px; padding: 1.6rem 1.7rem; min-width: 0; }
.tm-chart h3 { font-size: 1.05rem; color: var(--navy, #001F3F); margin: 0 0 0.15rem; }
.tm-chart .unit { font-size: 0.8rem; color: #64748b; margin: 0 0 1.2rem; }
.tm-bars { display: grid; gap: 0.6rem; }
.tm-bar { display: grid; grid-template-columns: minmax(0, 11.5rem) minmax(40px, 1fr) 3.4rem 3.6rem; gap: 0.7rem; align-items: center; font-size: 0.86rem; }
.tm-bar .lab { color: #334155; text-align: right; line-height: 1.3; }
.tm-bar .track { display: block; height: 14px; }
.tm-bar .track i { display: block; height: 100%; border-radius: 3px; background: #2d7dd2; }
.tm-bar b { text-align: right; color: var(--navy, #001F3F); font-variant-numeric: tabular-nums; }
.tm-bar em { text-align: right; font-style: normal; color: #64748b; font-variant-numeric: tabular-nums; }
.tm-bar.head b, .tm-bar.head em { font-size: 0.72rem; font-weight: 600; color: #64748b; }
@media (max-width: 520px) { .tm-bar { grid-template-columns: minmax(0, 7rem) minmax(24px, 1fr) 2.9rem 3rem; gap: 0.45rem; font-size: 0.78rem; } }
.tm-chart-note { margin: 1.1rem 0 0; font-size: 0.93rem; color: #475569; line-height: 1.6; }
.tm-chart-note b { color: var(--navy, #001F3F); }

.tm-region { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2.5rem; align-items: center; }
.tm-region img { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.tm-region ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.tm-region li { display: grid; grid-template-columns: 24px 1fr auto; gap: 0.6rem; align-items: center; padding: 0.32rem 0; font-size: 0.88rem; border-bottom: 1px solid rgba(15, 23, 42, 0.06); break-inside: avoid; }
.tm-region li .n { width: 24px; height: 22px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; }
.tm-region li b { color: var(--navy, #001F3F); font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .tm-region { grid-template-columns: 1fr; gap: 1.5rem; } }
@media (max-width: 480px) { .tm-region ol { columns: 1; } }

.tm-scen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (max-width: 900px) { .tm-scen { grid-template-columns: 1fr; gap: 1.5rem; } }
.tm-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; height: 230px; border-bottom: 1px solid rgba(15, 23, 42, 0.18); padding: 0 0.25rem; }
.tm-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.tm-col .v { font-weight: 700; font-size: 0.9rem; color: var(--navy, #001F3F); margin-bottom: 0.35rem; font-variant-numeric: tabular-nums; }
.tm-col i { display: block; width: 68%; border-radius: 4px 4px 0 0; }
.tm-cols-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 0.6rem 0.25rem 0; text-align: center; font-size: 0.76rem; color: #334155; line-height: 1.35; }
.tm-cols-labels b { display: block; color: var(--navy, #001F3F); }
.tm-cols-labels small { display: block; color: #64748b; font-size: 0.7rem; margin-top: 0.15rem; }
@media (max-width: 520px) { .tm-cols, .tm-cols-labels { gap: 0.4rem; } .tm-cols-labels { font-size: 0.64rem; } .tm-col .v { font-size: 0.76rem; } }
.tm-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.tm-legend li { display: grid; grid-template-columns: 12px 1fr; gap: 0.7rem; font-size: 0.9rem; color: #475569; line-height: 1.55; }
.tm-legend li i { width: 12px; height: 12px; border-radius: 3px; margin-top: 0.3rem; }
.tm-legend li b { color: var(--navy, #001F3F); }
.tm-source { margin: 1.5rem 0 0; font-size: 0.82rem; color: #64748b; line-height: 1.6; max-width: 900px; }

/* GHG page: results card in the hero */
.tm-hero-results { margin: 48px auto 0; max-width: 1060px; width: 100%; background: #fff; color: #0f172a; border-radius: 20px; padding: 1.6rem 1.7rem 1.5rem; text-align: left; line-height: 1.6; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5); }
.tm-hr-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.35rem 1.25rem; margin-bottom: 1.1rem; }
.tm-hr-title span { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: #0a85c0; }
.tm-hr-title em { font-style: normal; font-size: 0.8rem; color: #64748b; }
.tm-hero-results .tm-stats { margin-bottom: 1.6rem; }
.tm-hero-results .tm-stats div { padding: 1.25rem 1.3rem; }
.tm-hero-results .tm-stats strong { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
@media (max-width: 600px) { .tm-hero-results { padding: 1.1rem 1rem 1rem; border-radius: 16px; } }
/* let the results card run wider than the hero text column */
.tm-hero-results { width: min(1060px, calc(100vw - 4rem)); max-width: none; position: relative; left: 50%; transform: translateX(-50%); margin-left: 0; margin-right: 0; }
.tm-hero-results .tm-stats strong { white-space: nowrap; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
@media (max-width: 768px) { .tm-hero-results { width: calc(100vw - 2.5rem); } }

/* Menu links: land with the section top tucked under the menu bar (no light sliver above it),
   heading ~34px below the bar instead of ~106px */
html { scroll-padding-top: 0; }
@media (max-width: 768px) { html { scroll-padding-top: 34px; } }

/* Homepage hero: faint satellite basemap behind the headline (high-resolution image, Rivercess County, Liberia) */
#home.hero::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: url("/assets/hero/hero-bg.webp") center 40% / cover no-repeat;
    opacity: 0.3; filter: saturate(0.75) brightness(0.85);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.7) 50%, rgba(0,0,0,.25) 100%), linear-gradient(180deg, #000 70%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.7) 50%, rgba(0,0,0,.25) 100%);
}

/* ---------- "Solutions" dropdown in the menu ---------- */
.nav-drop { position: relative; }
.nav-drop > .nav-drop-toggle { padding-right: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffffb3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right center / 10px 6px no-repeat; }
.nav-drop::before { content: ""; position: absolute; left: -10px; right: -10px; top: 100%; height: 18px; }
.nav-sub { display: none; position: absolute; top: calc(100% + 14px); left: -14px; min-width: 260px; margin: 0; padding: 0.5rem; list-style: none; background: rgba(0, 16, 34, 0.97); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 12px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35); z-index: 1001; }
.nav-drop:hover .nav-sub, .nav-drop:focus-within .nav-sub { display: block; }
.nav-sub li { width: auto; }
.nav-links .nav-sub a { display: block; padding: 0.6rem 0.8rem; border-radius: 8px; white-space: nowrap; font-size: 0.93rem; }
.nav-links .nav-sub a::after { display: none; }
.nav-links .nav-sub a:hover { background: rgba(255, 255, 255, 0.07); }
@media (max-width: 880px) {
    .nav-links { overflow-y: auto; }
    .nav-drop::before { display: none; }
    .nav-sub { display: block; position: static; min-width: 0; padding: 0.25rem 0 0 1rem; background: none; border: 0; border-left: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0; box-shadow: none; margin-top: 0.4rem; }
    .nav-links .nav-sub a { padding: 0.4rem 0; font-size: 0.95rem; white-space: normal; }
    .nav-links .nav-sub a:hover { background: none; }
}

/* Footer: four columns (brand, company, solutions, contact) */
@media (min-width: 1101px) { .footer-grid { grid-template-columns: 1.7fr 1fr 1.4fr 1fr; } }
@media (max-width: 1100px) and (min-width: 769px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1.3fr 1fr; } }
