/*
 * Shared by all sites. Palette is taken from the DNX Network logo; the hexagon motif comes from its mark.
 * Font: IBM Plex Sans (variable weight 100–700, width 75–100%), self-hosted, SIL OFL (see /fonts/OFL.txt).
 */
@font-face {
    font-family: "Plex";
    src: url("/fonts/ibm-plex-sans.woff2") format("woff2");
    font-weight: 100 700;
    font-stretch: 75% 100%;
    font-display: swap;
}

:root {
    --navy: #08355c;
    --navy-deep: #062743;
    --blue: #0b6eac;
    --sky: #4fb3e6;
    --sky-soft: #cfe8f6;
    --mist: #eef4f9;
    --ink: #14283d;
    --muted: #4f6275;
    --line: #d6e1eb;
    --white: #fff;
    --error: #b3261e;
    --success: #1e6b3a;

    --display: 82%; /* font-stretch for headings: condensed, from the same family */
    --radius-s: 4px;
    --radius-m: 8px;
    --header-h: 76px;

    font-family: "Plex", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 106.25%; /* 17px */
    color: var(--ink);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 1rem); }
body { margin: 0; background: var(--white); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-stretch: var(--display); text-wrap: balance; }
p { text-wrap: pretty; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: .6rem 1rem; background: var(--navy); color: var(--white); border-radius: var(--radius-s); }
.skip-link:focus { top: 1rem; color: var(--white); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; text-decoration: none; }
.brand img { display: block; width: 140px; }
.wordmark { font-size: 1.7rem; font-weight: 700; font-stretch: var(--display); letter-spacing: -.01em; color: var(--navy); }
.wordmark-light { color: var(--white); }
.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav > a { padding: .45rem .8rem; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.main-nav > a:hover { color: var(--blue); background: var(--mist); }
.main-nav > .nav-cta { margin-left: .4rem; background: var(--navy); color: var(--white); }
.main-nav > .nav-cta:hover { background: var(--blue); color: var(--white); }

.lang { position: relative; margin-left: .4rem; }
.lang summary { cursor: pointer; list-style: none; padding: .4rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-s); font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.lang summary:hover { border-color: var(--sky); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; width: .4em; height: .4em; margin: 0 0 .2em .5em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.lang ul { position: absolute; right: 0; top: calc(100% + .5rem); margin: 0; padding: .4rem; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 18px 40px -12px rgba(8, 53, 92, .25); min-width: 11rem; }
.lang li a { display: block; padding: .45rem .75rem; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.lang li a:hover { background: var(--mist); }
.lang li a[aria-current] { font-weight: 600; color: var(--blue); }

/* ---------- Buttons & links ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.5rem; border: 1.5px solid transparent; border-radius: var(--radius-s); background: var(--blue); color: var(--white); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.button:hover { background: var(--navy); color: var(--white); }
.button-light { background: var(--white); color: var(--navy); }
.button-light:hover { background: var(--sky-soft); color: var(--navy); }
.button-ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: var(--white); }
.button-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }
.text-link { font-weight: 600; }

/* ---------- Hero: the one bold moment ---------- */
.hero { position: relative; overflow: hidden; color: var(--white); background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 70%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--sky), transparent); opacity: .5; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 2rem; min-height: min(640px, calc(100vh - var(--header-h))); padding-block: clamp(3.5rem, 8vw, 6rem); }
.hero h1 { margin: 0 0 1.5rem; font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 600; font-stretch: 78%; line-height: 1.02; letter-spacing: -.015em; max-width: 13ch; }
.hero .lead { margin: 0 0 2.25rem; max-width: 46ch; font-size: clamp(1.08rem, 1.8vw, 1.25rem); line-height: 1.55; color: #d5e6f3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-art { width: 100%; height: auto; max-height: 520px; justify-self: end; -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent); mask-image: radial-gradient(closest-side, #000 62%, transparent); }
.ha-grid { fill: none; stroke: rgba(79, 179, 230, .16); stroke-width: 1; }
.ha-cell { stroke: none; }
.ha-cell-b { fill: rgba(11, 110, 172, .55); }
.ha-cell-s { fill: rgba(79, 179, 230, .28); }
.ha-cell-f { fill: none; stroke: var(--sky); stroke-width: 1.5; }
.ha-route { fill: none; stroke: var(--sky); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ha-branch { stroke-width: 1.5; stroke: rgba(79, 179, 230, .7); }
.ha-node { fill: var(--navy-deep); stroke: var(--sky); stroke-width: 2; }
.ha-node-hub { fill: var(--sky); stroke: var(--white); stroke-width: 2.5; }

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .ha-route { stroke-dashoffset: 1; animation: ha-draw 1.6s cubic-bezier(.6, 0, .2, 1) .3s forwards; }
    .ha-branch { animation-delay: 1.1s; animation-duration: 1s; }
    .ha-node { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ha-pop .4s ease-out forwards; animation-delay: calc(.4s + var(--i) * 80ms); }
    @keyframes ha-draw { to { stroke-dashoffset: 0; } }
    @keyframes ha-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-alt { background: var(--mist); }
.section-title { margin: 0 0 1rem; font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 600; line-height: 1.08; letter-spacing: -.01em; color: var(--navy); }
.section-intro { margin: 0 0 2.5rem; max-width: 58ch; color: var(--muted); font-size: 1.12rem; }

/* About: a large statement beside the explanation */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.statement { margin: 0; font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 500; line-height: 1.12; color: var(--navy); }
.prose p { margin: 0 0 1.1rem; max-width: 62ch; font-size: 1.1rem; color: var(--ink); }
.prose p:first-child { padding-top: .35rem; }
.prose p:last-child { margin-bottom: 0; color: var(--muted); }

/* Expertise: sticky heading on the left, disciplines as rows on the right */
.expertise { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.section-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.section-head .section-intro { margin-bottom: 1.5rem; }
.disciplines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.discipline { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1.5rem; padding-block: 2.25rem; border-bottom: 1px solid var(--line); }
.discipline h3 { margin: .35rem 0 .6rem; font-size: 1.55rem; font-weight: 600; line-height: 1.2; color: var(--navy); }
.discipline p { margin: 0 0 1rem; color: var(--ink); }
.icon { width: 56px; height: 56px; }
.icon-hex { fill: var(--white); stroke: var(--sky); stroke-width: 1.5; }
.icon-glyph { fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.points { margin: 0; padding: 0; list-style: none; }
.points li { position: relative; padding-left: 1.4rem; margin-bottom: .35rem; color: var(--muted); font-size: .97rem; }
.points li::before { content: ""; position: absolute; left: 0; top: .62em; width: .55rem; height: .6rem; background: var(--sky); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

/* Approach: three principles under one rule each */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); margin: 0; padding: 0; list-style: none; }
.principles li { padding-top: 1.25rem; border-top: 2px solid var(--navy); }
.principles h3 { margin: 0 0 .5rem; font-size: 1.4rem; font-weight: 600; color: var(--navy); }
.principles p { margin: 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { background: var(--mist); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.contact-copy .section-intro { margin-bottom: 1.25rem; }
.contact-tip { margin: 0 0 2rem; max-width: 52ch; color: var(--muted); }
.contact-office { padding-left: 1rem; border-left: 2px solid var(--sky); font-style: normal; color: var(--muted); line-height: 1.55; }
.contact-office strong { color: var(--ink); font-weight: 600; }
.contact-form { padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--white); box-shadow: 0 30px 60px -30px rgba(8, 53, 92, .28); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.field-message { grid-column: 1 / -1; }
.field-name { grid-column: 1 / -1; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: .75rem .9rem; border: 1px solid #b9c7d4; border-radius: var(--radius-s); font: inherit; color: inherit; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.field textarea::placeholder { color: #8495a6; }
.field input:hover, .field textarea:hover { border-color: #8fa3b6; }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79, 179, 230, .35); outline: none; }
.field textarea { resize: vertical; min-height: 9rem; }
.has-error input, .has-error textarea { border-color: var(--error); }
.field-error { margin: .4rem 0 0; color: var(--error); font-size: .9rem; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .5rem; }
.form-privacy { flex: 1 1 16rem; margin: 0; font-size: .87rem; color: var(--muted); }
.notice { margin: 0 0 1.25rem; padding: 1rem 1.25rem; border-radius: var(--radius-s); background: var(--mist); border-left: 4px solid var(--blue); }
.notice-success { background: #e7f4ec; border-color: var(--success); color: var(--success); font-weight: 600; }
.notice-error { background: #fbeaea; border-color: var(--error); color: var(--error); }
/* Honeypot: off-screen rather than display:none, which some bots detect. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Inner page header (brands, legal) ---------- */
.page-head { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 5.5rem); color: var(--white); background: linear-gradient(160deg, var(--navy), var(--navy-deep) 75%); }
.page-head::before { content: ""; position: absolute; right: -60px; top: 50%; width: 360px; height: 410px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 114'%3E%3Cpath d='M50 2 98 29.5v55L50 112 2 84.5v-55Z' fill='none' stroke='%234fb3e6' stroke-opacity='.35' stroke-width='1'/%3E%3Cpath d='M50 22 80 39.25v34.5L50 91 20 73.75v-34.5Z' fill='none' stroke='%234fb3e6' stroke-opacity='.2' stroke-width='1'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.page-head h1 { position: relative; margin: 0 0 1rem; font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 600; font-stretch: 78%; line-height: 1.05; }
.page-head .lead { position: relative; margin: 0; max-width: 60ch; font-size: 1.15rem; color: #d5e6f3; }
.page-head-compact { padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-head-compact h1 { margin-bottom: .4rem; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-head-meta { position: relative; margin: 0; color: #a9c6dd; }

/* ---------- Brands page ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.brand-grid-large { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.brand-tile { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .2s; }
.brand-tile:hover { border-color: var(--sky); box-shadow: 0 20px 40px -24px rgba(8, 53, 92, .45); color: var(--ink); }
.brand-tile-logo { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7; padding: 1.25rem 1.75rem; box-shadow: inset 0 -1px 0 rgba(8, 53, 92, .1); }
.brand-grid-large .brand-tile-logo { aspect-ratio: 16 / 6; padding: 1.75rem 2.5rem; }
.brand-tile-logo img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s; }
.brand-tile:hover .brand-tile-logo img { transform: scale(1.04); }
.brand-tile-text { display: flex; flex-direction: column; gap: .1rem; padding: .9rem 1.1rem 1rem; }
.brand-tile-name { font-weight: 600; font-stretch: var(--display); font-size: 1.1rem; }
.brand-tile-host { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.brand-tile:hover .brand-tile-host { color: var(--blue); }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius-m); color: var(--white); background: linear-gradient(135deg, var(--blue), var(--navy)); }
.cta-band h2 { margin: 0 0 .5rem; font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; line-height: 1.1; }
.cta-band p { margin: 0; max-width: 56ch; color: #d5e6f3; }

/* ---------- Legal pages ---------- */
.legal { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.legal h2 { margin: 2.5rem 0 .6rem; font-size: 1.45rem; font-weight: 600; color: var(--navy); }
.legal p, .legal li { max-width: 70ch; }
.legal li { margin-bottom: .5rem; }
.legal address { font-style: normal; margin: 1rem 0; }

/* ---------- Footer ---------- */
.site-footer { padding: 4rem 0 2rem; background: var(--navy-deep); color: #b5c8d9; font-size: .95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current] { color: var(--sky); text-decoration: underline; }
.site-footer h2 { margin: 0 0 1rem; font-size: 1rem; font-weight: 600; font-stretch: var(--display); color: var(--white); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: .45rem; }
.site-footer address { font-style: normal; margin-bottom: .9rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.footer-logo { display: block; width: 132px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-company .wordmark { display: block; margin-bottom: 1rem; font-size: 1.5rem; }
.footer-about { margin: 0; max-width: 34ch; }
.footer-ids li { font-size: .9rem; }
.copyright { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: #8ea6bb; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; min-height: 0; }
    .hero-art { position: absolute; right: -140px; top: 50%; width: 520px; transform: translateY(-50%); opacity: .22; pointer-events: none; }
    .hero-copy { position: relative; }
    .expertise, .contact-grid, .split { grid-template-columns: 1fr; }
    .section-head { position: static; }
    .principles { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-company { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    :root { --header-h: 64px; font-size: 100%; }
    .main-nav > a:not(.nav-cta) { display: none; } /* header keeps logo, contact and language */
    .brand img { width: 116px; }
    .field-row { grid-template-columns: 1fr; }
    .discipline { grid-template-columns: 1fr; gap: .5rem; }
    .icon { width: 48px; height: 48px; }
    .footer-grid { grid-template-columns: 1fr; }
    .brand-grid-large { grid-template-columns: 1fr; }
    .hero-actions .button { flex: 1 1 auto; }
}
@media print {
    .site-header, .hero-art, .contact-form, .site-footer { display: none; }
    .hero, .page-head { color: var(--ink); background: none; }
}
