/* ===========================================================
   GeoMonix — site stylesheet
   A light, editorial design for an engineering consultancy.
   =========================================================== */

:root {
    --paper:        #ffffff;
    --paper-warm:   #f5f5f3;   /* near-white section band */
    --paper-deep:   #1b1b1a;   /* near-black band         */
    --ink:          #1b1b1a;   /* headings                */
    --ink-soft:     #474745;   /* body text               */
    --ink-mute:     #76766f;   /* captions, meta          */
    --line:         #e6e5e1;   /* hairline borders        */
    --line-soft:    #f0efec;
    --accent:       #1b1b1a;   /* monochrome — near-black */
    --accent-dark:  #000000;
    --accent-wash:  #eeeeec;

    --serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    --sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --wrap: 1140px;
    --header-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-soft);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-dark); }

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

strong { color: var(--ink); font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.skip-link {
    position: absolute; left: 16px; top: -100%;
    z-index: 200; padding: 10px 20px;
    background: var(--accent); color: #fff; font-weight: 600;
    border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* ── header ── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap {
    height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.brand {
    font-family: var(--serif);
    font-size: 1.5rem; font-weight: 600;
    letter-spacing: -0.02em; color: var(--ink);
}
.brand .brand-mark { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav a {
    display: block; padding: 9px 14px;
    font-size: 0.95rem; font-weight: 500; color: var(--ink-soft);
    border-radius: 6px;
}
.nav a:hover { color: var(--ink); background: var(--line-soft); }
.nav a.current { color: var(--accent); }
.nav .nav-cta {
    margin-left: 8px; padding: 9px 20px;
    background: var(--ink); color: #fff; border-radius: 6px;
}
.nav .nav-cta:hover { background: var(--accent); color: #fff; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span {
    width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: all .25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; font-family: var(--sans);
    font-size: 0.96rem; font-weight: 600; border-radius: 7px;
    cursor: pointer; border: 1px solid transparent;
    transition: all .2s ease;
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--accent); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-full { width: 100%; justify-content: center; }

/* ── generic section ── */
.section { padding: 96px 0; }
.section-warm { background: var(--paper-warm); }
.section + .section { border-top: 1px solid var(--line); }
.section-warm + .section,
.section + .section-warm { border-top: none; }

.eyebrow {
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.section-head p { font-size: 1.08rem; }
.lead { font-size: 1.18rem; line-height: 1.65; color: var(--ink-soft); }

/* justified body text */
.lead,
.hero-sub,
.section-head p,
.prose p,
.card p,
.faq details p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* ── hero ── */
.hero { padding: 84px 0 76px; }
.hero-grid {
    display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.08; margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: 1.16rem; max-width: 33ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-note {
    font-size: 0.92rem; color: var(--ink-mute);
    padding-top: 22px; border-top: 1px solid var(--line);
}
.hero-portrait {
    border-radius: 10px; border: 1px solid var(--line);
    width: 100%; height: 100%; object-fit: cover;
    aspect-ratio: 4 / 5;
}

/* ── facts strip ── */
.facts {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    background: var(--paper);
}
.fact { padding: 28px 26px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact-num {
    font-family: var(--serif); font-size: 2rem; font-weight: 600;
    color: var(--ink); line-height: 1;
}
.fact-label { font-size: 0.9rem; color: var(--ink-mute); margin-top: 8px; }

/* ── service / content cards ── */
.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: 10px; padding: 32px 28px;
    transition: border-color .2s ease, transform .2s ease;
}
.section-warm .card { background: #fff; }
.card:hover { border-color: var(--ink); }
a.card:hover { transform: translateY(-3px); }
.card-icon { color: var(--accent); margin-bottom: 18px; }
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { font-size: 0.98rem; }
.card-list { list-style: none; margin-top: 16px; }
.card-list li {
    position: relative; padding-left: 18px; font-size: 0.93rem;
    color: var(--ink-mute); margin-top: 7px;
}
.card-list li::before {
    content: ""; position: absolute; left: 0; top: 10px;
    width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.card-more {
    display: inline-block; margin-top: 18px;
    font-size: 0.92rem; font-weight: 600; color: var(--accent);
}
a.card:hover .card-more { color: var(--accent-dark); }

/* ── split text + aside ── */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.prose p { margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }

/* ── publications list ── */
.pub-list { border-top: 1px solid var(--line); }
.pub {
    display: grid; grid-template-columns: 88px 1fr; gap: 24px;
    padding: 26px 4px; border-bottom: 1px solid var(--line);
}
.pub-year { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-mute); }
.pub-tag {
    display: inline-block; font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 4px; margin-bottom: 8px;
}
.pub-tag.published { background: var(--accent-wash); color: var(--accent-dark); }
.pub-tag.review    { background: #fbf0d9; color: #8a6300; }
.pub h4 { font-size: 1.08rem; margin-bottom: 6px; }
.pub-meta { font-size: 0.92rem; color: var(--ink-mute); }
.pub-meta em { color: var(--ink-soft); }

/* ── faq ── */
.faq { max-width: 760px; }
.faq details {
    border-bottom: 1px solid var(--line); padding: 6px 0;
}
.faq summary {
    list-style: none; cursor: pointer; padding: 16px 4px;
    font-family: var(--serif); font-size: 1.1rem; color: var(--ink);
    display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 4px 18px; font-size: 0.98rem; }

/* ── contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-line:first-child { border-top: 1px solid var(--line); }
.contact-line .ic { color: var(--accent); flex-shrink: 0; padding-top: 3px; }
.contact-line strong { display: block; font-size: 0.9rem; }
.contact-line span, .contact-line a { font-size: 0.96rem; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%; padding: 12px 14px; font-family: var(--sans); font-size: 0.96rem;
    color: var(--ink); background: var(--paper);
    border: 1px solid var(--line); border-radius: 7px; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash);
}
.form-field textarea { resize: vertical; min-height: 130px; }

/* ── CTA band ── */
.cta-band { background: var(--paper-deep); color: #cfcfca; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.cta-band p { margin: 14px 0 28px; font-size: 1.08rem; }
.cta-band .btn-solid { background: var(--accent); }
.cta-band .btn-solid:hover { background: #fff; color: var(--ink); }
.cta-band .btn-line { color: #fff; border-color: rgba(255,255,255,0.3); }
.cta-band .btn-line:hover { border-color: #fff; }

/* ── footer ── */
.site-footer { background: var(--paper-deep); color: #a3a39c; padding: 60px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.site-footer .brand { color: #fff; }
.site-footer .brand .brand-mark { color: #fff; }
.footer-tag { margin-top: 12px; font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col a { display: block; color: #a3a39c; font-size: 0.93rem; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 0.82rem; color: #7a7a73;
}

/* ── responsive ── */
@media (max-width: 940px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-portrait { max-width: 340px; }
    .hero-sub { max-width: none; }
    .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
    .cards-3 { grid-template-columns: repeat(2, 1fr); }
    .facts { grid-template-columns: repeat(2, 1fr); }
    .fact:nth-child(3) { border-left: none; }
    .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }
    .section { padding: 64px 0; }
    .hero { padding: 52px 0 56px; }
    .nav-toggle { display: flex; }
    .nav {
        position: fixed; inset: var(--header-h) 0 auto 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line);
        padding: 12px 20px 20px;
        transform: translateY(-130%); transition: transform .25s ease;
    }
    .nav.open { transform: translateY(0); }
    .nav a { padding: 13px 8px; font-size: 1.02rem; }
    .nav .nav-cta { margin: 8px 0 0; text-align: center; }
    .cards-3, .cards-2 { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .fact + .fact { border-left: none; border-top: 1px solid var(--line); }
    .pub { grid-template-columns: 1fr; gap: 6px; }
    .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
