/* Altalus Design System — patterns for multi-page corporate sites. Load after components.css. */

/* ---------- Header: brand lockup, mega-menu, language switch ---------- */
.brand-mark img { height: 2.35rem; width: auto; }
.brand-mark .wordmark { font-weight: 300; letter-spacing: 0.26em; font-size: 1.05rem; color: var(--steel); text-transform: uppercase; }
.nav__list { display: flex; align-items: center; gap: var(--space-1); }
.nav__item { position: relative; }
.nav__link { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; background: none; border: 0; font: inherit; cursor: pointer;
  color: var(--fg); text-decoration: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill); font-weight: 560; font-size: 0.97rem; }
.nav__link:hover, .nav__link[aria-expanded="true"], .nav__link[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }
.nav__link svg { width: 0.8rem; height: 0.8rem; transition: transform var(--dur-fast) var(--ease-out); }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__end { display: flex; align-items: center; gap: var(--space-3); margin-left: var(--space-2); }
.nav__end .btn { white-space: nowrap; padding: 0.65rem 1.2rem; min-height: 2.6rem; font-size: 0.95rem; }
.lang { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); overflow: hidden; font-size: 0.82rem; font-weight: 650; }
.lang a, .lang span { padding: 0.3rem 0.7rem; text-decoration: none; color: var(--fg-muted); }
.lang [aria-current] { background: var(--brand); color: var(--brand-contrast); }
.lang a:hover { background: var(--brand-soft); color: var(--brand-strong); }

.mega { display: none; position: absolute; top: calc(100% + 0.6rem); left: 50%; transform: translateX(-50%); width: min(44rem, 92vw);
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-4); gap: var(--space-2); grid-template-columns: repeat(2, 1fr); z-index: 60; }
.nav__item[data-open="true"] .mega { display: grid; animation: mega-in var(--dur) var(--ease-out); }
@keyframes mega-in { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.mega a { display: block; padding: var(--space-4); border-radius: var(--radius-md); text-decoration: none; color: var(--fg); }
.mega a:hover { background: var(--brand-soft); }
.mega a strong { display: block; margin-bottom: 0.15rem; }
.mega a span { display: block; color: var(--fg-muted); font-size: var(--step--1); line-height: 1.45; }
.mega__foot { grid-column: 1 / -1; border-top: 1px solid var(--border); margin-top: var(--space-2); padding-top: var(--space-2); }

@media (max-width: 72rem) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); cursor: pointer; }
  .nav { position: absolute; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; padding: var(--space-4) var(--gutter) var(--space-5);
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); display: none; max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .nav[data-open="true"] { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__link { width: 100%; justify-content: space-between; padding: var(--space-3) var(--space-4); }
  .mega { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: 0 0 var(--space-3) var(--space-3); grid-template-columns: 1fr; }
  .nav__item[data-open="true"] .mega { animation: none; }
  .nav__end { margin: var(--space-3) 0 0; justify-content: space-between; }
}
@media (min-width: 72.01rem) { .nav-toggle { display: none; } .nav { position: static; display: flex; } }

/* ---------- Inner page header ---------- */
.page-hero { position: relative; padding-block: clamp(var(--space-7), 8vw, var(--space-8)) var(--space-7); background: var(--bg-alt); border-bottom: 1px solid var(--border); overflow: hidden; isolation: isolate; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px;
  mask-image: linear-gradient(to left, #000, transparent 70%); }
.page-hero h1 { font-size: var(--step-3); max-width: 22ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--step--1); color: var(--fg-muted); margin-bottom: var(--space-4); }
.crumbs a { color: var(--fg-muted); text-decoration: none; } .crumbs a:hover { color: var(--brand); }
.crumbs li + li::before { content: "/"; margin-right: var(--space-2); opacity: 0.5; }
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.subnav .container { display: flex; gap: var(--space-2); overflow-x: auto; padding-block: var(--space-3); scrollbar-width: none; }
.subnav a { white-space: nowrap; padding: 0.4rem 1rem; border-radius: var(--radius-pill); text-decoration: none; color: var(--fg); font-weight: 600; font-size: 0.93rem; border: 1px solid var(--border); }
.subnav a:hover { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }

/* ---------- Home hero (industrial) ---------- */
.hero--industrial { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.hero--industrial h1 { max-width: 18ch; }
.hero--industrial .hero__art { color: var(--brand); opacity: 0.1; }

/* ---------- Inspection → decision → workflow flow diagram ---------- */
.flow { --gap: 2.2rem; display: grid; gap: var(--gap); position: relative; }
.flow__node { position: relative; display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.flow__node b { font-size: 0.98rem; }
.flow__node span { color: var(--fg-muted); font-size: var(--step--1); line-height: 1.4; }
.flow__node i { width: 2rem; height: 2rem; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-style: normal; font-weight: 750; font-size: 0.85rem; }
.flow__node:not(:last-child)::before { content: ""; position: absolute; left: 1.9rem; top: 100%; width: 2px; height: var(--gap); background: var(--border-strong); }
.flow__node:not(:last-child)::after { content: ""; position: absolute; left: calc(1.9rem - 3px); top: 100%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0; animation: flow-v 3.6s var(--ease-in-out) infinite; animation-delay: calc(var(--i) * 0.6s); }
@keyframes flow-v { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--gap)); } }
.flow-caption { margin-top: var(--space-4); font-size: var(--step--1); color: var(--fg-muted); }
@media (min-width: 62rem) { .flow--wide { grid-template-columns: repeat(5, 1fr); gap: 0; } }
@media (min-width: 62rem) {
  .flow--wide { --gap: 1.6rem; column-gap: var(--gap); }
  .flow--wide .flow__node:not(:last-child)::before { left: 100%; top: 2.3rem; width: var(--gap); height: 2px; }
  .flow--wide .flow__node:not(:last-child)::after { left: 100%; top: calc(2.3rem - 3px); animation-name: flow-h; }
}
@keyframes flow-h { 0% { opacity: 0; transform: translateX(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateX(var(--gap)); } }
@media (prefers-reduced-motion: reduce) { .flow__node::after { animation: none !important; opacity: 0 !important; } }

/* ---------- Status / maturity labels ---------- */
.status { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0.75rem; border-radius: var(--radius-pill); font-size: var(--step--1); font-weight: 650; border: 1px solid transparent; white-space: nowrap; }
.status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.status[data-status="deployed"] { color: var(--brand-strong); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.status[data-status="installed"] { color: var(--accent-600); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.status[data-status="development"] { color: var(--ink-700); background: var(--bg-alt); border: 1px dashed var(--steel); }
.status[data-status="demonstrator"] { color: var(--navy-900); background: transparent; border-color: var(--navy-900); }

/* ---------- Application / capability cards ---------- */
.app-card { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.app-card h3 { margin: 0; }
.app-card .card__more { margin-top: auto; }
.app-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.tag { font-size: var(--step--1); color: var(--fg-muted); padding: 0.2rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.prose .chips, .prose .app-card__meta { list-style: none; padding-left: 0; }
@media (min-width: 40rem) { .facts { grid-template-columns: 1fr 1fr; } }
.facts > div { padding: var(--space-5); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: -0.5px; }
.facts dt { font-size: var(--step--1); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: var(--space-2); }
.facts dd { margin: 0; }

/* ---------- Capability sections ---------- */
.cap { display: grid; gap: var(--space-6); padding-block: var(--space-8); border-top: 1px solid var(--border); }
.cap:first-of-type { border-top: 0; }
@media (min-width: 62rem) { .cap { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-8); } .cap__head { position: sticky; top: calc(var(--header-h) + 5rem); align-self: start; } }
.cap__num { font-size: var(--step-3); font-weight: 760; color: var(--brand-300); letter-spacing: -0.04em; line-height: 1; margin-bottom: var(--space-3); display: block; }
.chain { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-5) 0; }
.chain li { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0.4rem 0.9rem; background: var(--brand-soft); color: var(--brand-strong); border-radius: var(--radius-pill); font-weight: 600; font-size: 0.92rem; }
.chain li + li::before { content: "→"; margin-right: var(--space-1); opacity: 0.6; }
.note { padding: var(--space-5); border-left: 3px solid var(--accent); background: var(--bg-alt); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.note strong { display: block; margin-bottom: var(--space-1); }

/* ---------- Timeline (engineering approach) ---------- */
.timeline { position: relative; display: grid; gap: var(--space-6); counter-reset: t; }
.timeline li { position: relative; padding-left: 4.2rem; counter-increment: t; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-contrast); font-weight: 750; }
.timeline li::after { content: ""; position: absolute; left: 1.4rem; top: 3.2rem; bottom: -1.9rem; width: 2px; background: var(--border-strong); }
.timeline li:last-child::after { display: none; }
.timeline h3 { margin-bottom: var(--space-2); } .timeline p { color: var(--fg-muted); margin: 0; }

/* ---------- Evaluation criteria grid ---------- */
.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--space-4); }
.criteria > div { padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.criteria h4 { color: var(--brand); margin-bottom: var(--space-2); } .criteria p { margin: 0; color: var(--fg-muted); font-size: 0.97rem; }
.layers { display: grid; gap: var(--space-4); }
@media (min-width: 52rem) { .layers { grid-template-columns: repeat(3, 1fr); } }
.layers > div { padding: var(--space-5); border-radius: var(--radius-lg); background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.12); }
.layers h3 { color: #fff; font-size: var(--step-0); } .layers p { color: #b8c9d8; margin: 0; font-size: 0.97rem; }
.layers .n { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 750; margin-bottom: var(--space-3); font-size: 0.9rem; }

/* ---------- Two-column prose ---------- */
.split { display: grid; gap: var(--space-7); align-items: start; }
@media (min-width: 62rem) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.prose { max-width: 44rem; } .prose h2 { font-size: var(--step-2); margin-top: var(--space-7); } .prose h3 { margin-top: var(--space-6); } .prose p, .prose li { color: var(--fg); }
.prose ul { list-style: disc; padding-left: 1.3rem; } .prose li { margin-bottom: var(--space-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips li { padding: 0.45rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); font-weight: 600; background: var(--surface); }
.chips li small { color: var(--fg-muted); font-weight: 500; margin-left: 0.35rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-5); padding: clamp(var(--space-5), 4vw, var(--space-7)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.form__row { display: grid; gap: var(--space-5); } @media (min-width: 40rem) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--space-2); } .field label { font-weight: 650; font-size: 0.95rem; } .field label small { font-weight: 500; color: var(--fg-muted); display: block; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0.8rem 0.95rem; min-height: 2.9rem; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 0.95rem; } .check input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.form-note { font-size: var(--step--1); color: var(--fg-muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); border: 1px solid; font-weight: 600; }
.alert--ok { color: var(--accent-600); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.alert--err { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.contact-list li { display: flex; gap: var(--space-4); padding-block: var(--space-4); border-bottom: 1px solid var(--border); } .contact-list b { min-width: 6.5rem; color: var(--fg-muted); font-weight: 600; }

/* ---------- Light footer (keeps the original logo legible) ---------- */
.site-footer--light { background: var(--bg-alt); color: var(--fg); border-top: 1px solid var(--border); }
.site-footer--light a { color: var(--fg); } .site-footer--light a:hover { color: var(--brand); }
.site-footer--light .footer-grid h4 { color: var(--fg-muted); }
.site-footer--light .footer-note { border-top-color: var(--border-strong); color: var(--fg-muted); }
.footer-logo { width: 9rem; height: auto; margin-bottom: var(--space-4); }
.section--navy { background: var(--navy-900); color: #e6eef5; --fg-muted: #9fb6c9; --border: #1f3b57; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .eyebrow { color: #7fd0cb; }

/* Contact form: fields the server flagged */
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.check.is-invalid span { color: var(--danger); }
