/* ═══════════════════════════════════════
   Paapst Group B.V. — Corporate stylesheet
   Ivory and navy, with gold kept for accents.
   ═══════════════════════════════════════ */

:root {
    /* Surfaces */
    --paper: #F7F5F0;
    --surface: #FFFFFF;
    --navy: #0F1B2D;
    --navy-raised: #1B2A40;

    /* Text (every value passes WCAG AA on --paper and --surface) */
    --ink: #0F1B2D;
    --text: #27313F;
    --text-2: #4A5563;
    --text-3: #5F6976;
    --on-navy: #FFFFFF;
    --on-navy-2: #B4BBC5;

    /* Lines */
    --line: #E3DED3;
    --line-strong: #CBC3B1;
    --line-on-navy: rgba(255, 255, 255, 0.12);

    /* Accents: --gold for rules and dots, --gold-text when it has to be read */
    --gold: #9C7A2B;
    --gold-text: #7E6220;
    --gold-on-navy: #D9C38A;

    /* Type */
    --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --header-h: 72px;
    --max: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--gold-text);
    outline-offset: 3px;
}

::selection {
    background: rgba(156, 122, 43, 0.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 200;
    padding: 0.75rem 1.1rem;
    background: var(--navy);
    color: var(--on-navy);
    font-weight: 500;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

/* ─── Layout & type primitives ─── */
.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn-primary {
    background: var(--navy);
    color: var(--on-navy);
}

.btn-primary:hover {
    background: var(--navy-raised);
}

.btn-secondary {
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    border-color: var(--ink);
}

.ext-icon {
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    margin-left: 0.3em;
    vertical-align: 0.05em;
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(247, 245, 240, 0.92);
    -webkit-backdrop-filter: saturate(1.2) blur(12px);
    backdrop-filter: saturate(1.2) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px -24px rgba(15, 27, 45, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    width: auto;
    height: 40px;
}

.brand-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.site-nav {
    margin-left: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-list a {
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.2rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.nav-list a:hover {
    color: var(--ink);
}

.nav-list a:hover::after {
    transform: scaleX(1);
}

.nav-list a.lang-link {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    border: 1px solid var(--line-strong);
}

.nav-list a.lang-link::after {
    display: none;
}

.nav-list a.lang-link:hover {
    border-color: var(--ink);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
    padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(4rem, 8vw, 6.5rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: clamp(3rem, 7vw, 6rem);
    align-items: end;
}

.hero h1 {
    margin-top: 1.25rem;
    max-width: 18ch;
    font-size: clamp(2.3rem, 5.2vw, 4.25rem);
    line-height: 1.07;
    letter-spacing: -0.015em;
}

.lead {
    margin-top: 1.5rem;
    max-width: 54ch;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.65;
    color: var(--text-2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.glance {
    border-top: 1px solid var(--ink);
}

.glance-title {
    padding: 0.9rem 0 0.4rem;
    color: var(--text-3);
}

.glance-list > div {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    align-items: baseline;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
}

.glance-list dd {
    order: -1;
    font-family: var(--font-serif);
    font-size: 1.85rem;
    line-height: 1;
    color: var(--ink);
}

.glance-list dt {
    font-size: 0.92rem;
    color: var(--text-2);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-copy,
    .glance {
        animation: rise 0.8s var(--ease) both;
    }

    .glance {
        animation-delay: 0.15s;
    }
}

/* ═══════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════ */
.section {
    padding-block: clamp(4rem, 9vw, 7rem);
    border-top: 1px solid var(--line);
    scroll-margin-top: var(--header-h);
}

.section-alt {
    background: var(--surface);
}

.section-head {
    max-width: 660px;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head h2,
.about-body h2 {
    margin-top: 1rem;
    font-size: clamp(1.9rem, 3.4vw, 2.75rem);
}

.section-head > p:last-child {
    margin-top: 1rem;
    font-size: 1.05rem;
    color: var(--text-2);
}

/* ═══════════════════════════════════════
   PORTFOLIO
   ═══════════════════════════════════════ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.company {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 2px solid var(--gold);
}

.company-sector {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-text);
}

.company h3 {
    margin-top: 0.75rem;
    font-size: 1.6rem;
}

.company-desc {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-2);
}

.company-meta {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
}

.company-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}

.company-meta dt {
    color: var(--text-3);
}

.company-meta dd {
    font-weight: 500;
    color: var(--ink);
    text-align: right;
}

.company-meta a {
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}

.company-meta a:hover {
    color: var(--gold-text);
    text-decoration-color: currentColor;
}

.products {
    margin-top: auto;
    padding-top: 1.75rem;
}

.products-label {
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.product {
    padding: 1.1rem 1.25rem;
    background: var(--paper);
    border: 1px solid var(--line);
}

.product-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.product-name {
    font-size: 1.15rem;
    font-weight: 600;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
}

.status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

.product-desc {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-2);
}

.product-domain {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-3);
}

/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: start;
}

.about-crest {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 3.5rem) 2rem;
    background: var(--paper);
    border: 1px solid var(--line);
}

.about-crest img {
    width: min(100%, 250px);
}

.about-body > p:not(.eyebrow) {
    margin-top: 1.1rem;
    max-width: 62ch;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text-2);
}

.about-body h3 {
    margin-top: 2.75rem;
    font-size: 1.35rem;
}

.about-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
}

.about-facts > div {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.about-facts dt {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

.about-facts dd {
    margin-top: 0.3rem;
    color: var(--ink);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
    padding: clamp(3.5rem, 7vw, 4.5rem) 0 2rem;
    background: var(--navy);
    color: var(--on-navy-2);
    font-size: 0.9rem;
}

.site-footer :focus-visible {
    outline-color: var(--gold-on-navy);
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.footer-brand img {
    width: auto;
    height: 56px;
}

.footer-name {
    margin-bottom: 0.35rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--on-navy);
}

.footer-heading {
    margin-bottom: 1rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-navy);
}

.footer-col li + li {
    margin-top: 0.6rem;
}

.footer-col a {
    color: var(--on-navy-2);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

.footer-col a:hover {
    color: var(--on-navy);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line-on-navy);
    font-size: 0.8rem;
}

/* ═══════════════════════════════════════
   LANGUAGE GATE (site root)
   ═══════════════════════════════════════ */
.gate {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem var(--gutter) 2rem;
    text-align: center;
}

.gate-crest {
    width: auto;
    height: clamp(140px, 24vh, 220px);
}

.gate h1 {
    margin-top: 2rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.gate-rule {
    display: block;
    width: 56px;
    height: 1px;
    margin: 1.25rem auto;
    background: var(--gold);
}

.gate-sub {
    color: var(--text-3);
}

.gate-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 440px;
    margin-top: 2.5rem;
}

.gate-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.4rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.gate-option:hover {
    border-color: var(--ink);
    box-shadow: 0 12px 30px -20px rgba(15, 27, 45, 0.45);
}

.gate-code {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--gold-text);
}

.gate-label {
    font-family: var(--font-serif);
    font-size: 1.2rem;
}

.gate-footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: var(--text-3);
}

/* ═══════════════════════════════════════
   SCROLL REVEAL
   Only hidden when JS is running (html.js); shown at once for reduced motion.
   ═══════════════════════════════════════ */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.js .reveal[data-delay="1"] {
    transition-delay: 0.08s;
}

.js .reveal[data-delay="2"] {
    transition-delay: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1080px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .company {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        column-gap: 2.5rem;
    }

    .products {
        padding-top: 0;
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-crest {
        position: static;
        justify-self: start;
        padding: 1.5rem 2rem;
    }

    .about-crest img {
        width: 120px;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        margin: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px -24px rgba(15, 27, 45, 0.4);
    }

    .site-nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--gutter) 1.25rem;
    }

    .nav-list li + li {
        border-top: 1px solid var(--line);
    }

    .nav-list a {
        display: block;
        padding: 0.95rem 0;
        font-size: 1rem;
    }

    .nav-list a::after {
        display: none;
    }

    .nav-list li:last-child {
        padding-top: 1rem;
    }

    .nav-list a.lang-link {
        display: inline-block;
    }

    .company {
        display: flex;
        padding: 1.6rem 1.4rem;
    }

    .products {
        padding-top: 1.75rem;
    }
}

@media (max-width: 520px) {
    .about-facts {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }
}
