/*
 * Interlinked Web Solutions
 * Site styles layered on top of Beer CSS.
 * Beer CSS sits in a cascade layer, so every unlayered rule here wins.
 */

@layer beer;
@import url("../vendor/beercss/beer.min.css") layer(beer);

/* Theme ------------------------------------------------------------ */

:root,
body.light {
    --ink: #0e1f3d;          /* slate blue, headings and primary */
    --ink-deep: #0a1730;
    --text: #1d2533;
    --muted: #515c6e;
    --paper: #f5f7fa;        /* warm stationery */
    --band: #e9eef5;
    --card: #fcfdfe;
    --accent: #1f5eff;       /* brick, taken from the photograph */
    --accent-dark: #1748c7;
    --line: #d3dae5;
    --line-strong: #0e1f3d;

    --primary: var(--ink);
    --on-primary: #fbf9f5;
    --primary-container: #dfe5ec;
    --on-primary-container: var(--ink-deep);
    --secondary: var(--accent);
    --on-secondary: #fbf9f5;
    --secondary-container: #dbe5ff;
    --on-secondary-container: #0a1d52;
    --tertiary: #4c6b5c;
    --on-tertiary: #fbf9f5;
    --tertiary-container: #dce8e0;
    --on-tertiary-container: #15261d;
    --error: #a82a20;
    --on-error: #fbf9f5;
    --error-container: #f7dcd8;
    --on-error-container: #410e0b;
    --background: var(--paper);
    --on-background: var(--text);
    --surface: var(--paper);
    --on-surface: var(--text);
    --surface-variant: var(--band);
    --on-surface-variant: var(--muted);
    --surface-dim: var(--band);
    --surface-bright: var(--card);
    --surface-container-lowest: var(--card);
    --surface-container-low: var(--card);
    --surface-container: var(--band);
    --surface-container-high: var(--band);
    --surface-container-highest: #dde4ee;
    --outline: #8a8f98;
    --outline-variant: var(--line);
    --inverse-surface: var(--ink);
    --inverse-on-surface: var(--paper);
    --inverse-primary: #9db8ff;
    --shadow: #1a2738;
    --scrim: #1a2738;

    --font: "Figtree", "Segoe UI", system-ui, sans-serif;
}

/* Base ------------------------------------------------------------- */

*, *::before, *::after { border-radius: 0 !important; }

html { font-size: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
}

h3 { font-family: var(--font); font-weight: 600; font-size: 1.125rem; }

p { margin: 0; }

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-dark); }

:is(a, button, .button, input, textarea, summary):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

::selection { background: var(--ink); color: var(--paper); }

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

.wrap {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

[hidden] { display: none !important; }

.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--ink); color: var(--paper);
    padding: 0.6rem 1rem; font-size: 0.875rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.site-main { padding: 0; overflow: visible; }

.kicker {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 1rem;
}

.display {
    font-size: clamp(2.125rem, 4.4vw, 3.375rem);
    line-height: 1.12;
    max-width: 20ch;
    text-wrap: balance;
}

.lead {
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--muted);
    max-width: 38rem;
    margin-top: 1.25rem;
}

.muted { color: var(--muted); }

/* Buttons ---------------------------------------------------------- */

.button, button {
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0;
    height: 2.75rem;
    padding: 0 1.25rem;
    gap: 0.6rem;
    box-shadow: none;
    text-decoration: none;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.button::after, button::after { display: none; }
.button:hover, button:hover { background: var(--ink-deep); color: var(--paper); }
.button.large { height: 3.125rem; padding: 0 1.5rem; font-size: 1rem; }
.button.small { height: 2.5rem; padding: 0 1rem; font-size: 0.875rem; }
.button.border { background: transparent; color: var(--ink); }
.button.border:hover { background: var(--ink); color: var(--paper); }
.button.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button.light:hover { background: var(--card); color: var(--accent-dark); }
.button[disabled], button[disabled] { cursor: default; opacity: 0.85; }

.text-link { font-weight: 600; }

/* Header ----------------------------------------------------------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    display: block; min-height: 0; padding: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.header-row {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem; height: 4.5rem;
}

.brand {
    display: inline-flex; align-items: center; max-width: 100%;
    color: var(--ink); text-decoration: none;
}
.brand-logo {
    display: block;
    width: 16rem;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.site-nav {
    display: flex; align-items: center; gap: 2rem;
    margin: 0; padding: 0; white-space: nowrap;
}
.nav-link {
    font-size: 0.9375rem; font-weight: 500; color: var(--text);
    text-decoration: none; padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--accent); }

.menu-toggle {
    display: none; align-items: center; gap: 0.4rem;
    height: 2.5rem; padding: 0 0.75rem;
    background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.menu-toggle:hover { background: var(--band); color: var(--ink); }
.menu-toggle i { --_size: 1.25rem; font-size: 1.25rem; }
.menu-toggle .menu-icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline-flex; }

@media (max-width: 992px) {
    .header-row { gap: 1rem; }
    .site-header .brand { min-width: 0; max-width: calc(100% - 6.75rem); }
    .site-header .brand-logo { width: 12rem; }
    .site-nav {
        display: none; position: absolute;
        left: -1.5rem; right: -1.5rem; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 0.5rem 1.5rem 1.5rem;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        white-space: normal;
    }
    .site-nav.open { display: flex; }
    .nav-link { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
    .nav-link.active { border-bottom-color: var(--line); color: var(--accent-dark); }
    .nav-cta { margin-top: 1.25rem; align-self: flex-start; }
    .menu-toggle { display: inline-flex; }
}

/* Sections --------------------------------------------------------- */

.section { padding: 5rem 0; margin: 0; }
.band { background: var(--band); }

.section h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }

.section-head {
    display: block;
    max-width: 44rem;
    margin: 0 0 2.75rem;
    padding: 0;
    background: none;
}
.section-head p { margin-top: 0.85rem; color: var(--muted); }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}
.split > div > p { margin-top: 0.85rem; max-width: 42rem; }

@media (max-width: 992px) {
    .section { padding: 3.5rem 0; }
}

/* Home intro ------------------------------------------------------- */

.home-intro { background: var(--ink); color: #c9d4e5; padding: 5.5rem 0 5rem; }
.home-intro .kicker { color: #8fb0ff; }
.home-intro .display { color: #fff; max-width: 18ch; }
.home-intro .lead { color: #c9d4e5; }
.home-intro .text-link { color: #fff; text-decoration-color: #8fb0ff; }
.home-intro .text-link:hover { color: #8fb0ff; }

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 4rem;
    align-items: end;
}
.intro-copy .display { max-width: none; }

.actions {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 1rem 1.75rem; margin-top: 2rem;
}

.intro-services { display: block; padding: 0; margin: 0; border-left: 1px solid rgba(201, 212, 229, 0.25); padding-left: 2rem; }
.intro-services-title { font-size: 0.875rem; font-weight: 600; color: #8fb0ff; margin-bottom: 0.5rem; }
.intro-services ul { all: unset; display: block; list-style: none; }
.intro-services li { display: block; border-bottom: 1px solid rgba(201, 212, 229, 0.18); }
.intro-services a {
    display: block; padding: 0.6rem 0;
    color: #fff; font-weight: 500; text-decoration: none;
    transition: color 0.15s ease, padding-left 0.15s ease;
}
.intro-services a:hover { color: #8fb0ff; padding-left: 0.4rem; }

@media (max-width: 992px) {
    .home-intro { padding: 3.5rem 0; }
    .intro-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .intro-services { border-left: 0; padding-left: 0; }
}

/* Services --------------------------------------------------------- */

.services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 4rem;
}
.service {
    margin: 0;
    padding: 1.75rem 0;
    background: none;
    box-shadow: none;
    color: var(--text);
    border-top: 1px solid var(--line);
    scroll-margin-top: 5.5rem;
}
.service h3 { font-family: var(--font); font-size: 1.375rem; }
.service-summary { margin-top: 0.5rem; }
.service-uses { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted); }
.service-uses span { font-weight: 600; color: var(--text); }
.service:target { background: var(--card); box-shadow: -1rem 0 0 var(--card), 1rem 0 0 var(--card); }

@media (max-width: 768px) {
    .services { grid-template-columns: minmax(0, 1fr); }
}

/* Process ---------------------------------------------------------- */

.process {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 2.5rem;
}
.process li { display: block; }
.process p { color: var(--muted); margin-top: 0.4rem; }
@media (max-width: 640px) { .process { grid-template-columns: minmax(0, 1fr); } }

/* Reasons and principles ------------------------------------------- */

.reasons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 3rem;
}
.reasons-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reason h3 { padding-left: 0.85rem; border-left: 3px solid var(--accent); }
.reason p { margin-top: 0.5rem; color: var(--muted); }

.reasons-plain { gap: 2rem 2.5rem; }
.reasons-plain .reason h3 { padding-left: 0; border-left: 0; }
.reasons-plain .reason p { margin-top: 0.4rem; }

@media (max-width: 992px) {
    .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .reasons, .reasons-two { grid-template-columns: minmax(0, 1fr); }
}

/* Sectors ---------------------------------------------------------- */

.sectors { margin: 0; }
.sectors div {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: 0.35rem 2rem;
    padding: 1.1rem 0;
    border-top: 1px solid var(--line);
}
.sectors dt { font-weight: 600; color: var(--ink); }
.sectors dd { margin: 0; color: var(--muted); }

@media (max-width: 640px) {
    .sectors div { grid-template-columns: minmax(0, 1fr); }
}

/* Call to action --------------------------------------------------- */

.cta { background: var(--ink); color: var(--paper); padding: 3.5rem 0; }
.cta-row {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 1.5rem 3rem;
}
.cta h2 { color: var(--paper); font-size: clamp(1.625rem, 2.6vw, 2rem); }
.cta p { margin-top: 0.5rem; color: #cfd6df; max-width: 36rem; }

/* Inner page head -------------------------------------------------- */

.page-head {
    padding: 4.5rem 0 3.5rem;
    border-bottom: 1px solid var(--line);
}
.page-head-compact { padding: 3.5rem 0 2.5rem; }
.legal-meta { margin-top: 1rem; color: var(--muted); font-size: 0.9375rem; }

/* legacy hero classes still used by legal templates */
.page-hero { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }

@media (max-width: 992px) {
    .page-head { padding: 3rem 0 2.5rem; }
}

/* Prose and about -------------------------------------------------- */

.prose p { margin: 0 0 1.25rem; line-height: 1.75; max-width: 42rem; }
.prose p:last-child { margin-bottom: 0; }
.company-introduction .prose p { max-width: none; }
.company-introduction .prose p:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.prose li { margin: 0 0 0.5rem; }
.prose li::marker { color: var(--accent); }

.spec-table { width: 100%; border-collapse: collapse; margin: 0; }
.spec-table th, .spec-table td {
    text-align: left; vertical-align: top;
    padding: 0.95rem 1rem 0.95rem 0;
    border-bottom: 1px solid var(--line);
}
.spec-table tr:first-child > * { border-top: 1px solid var(--line); }
.spec-table th { width: 10rem; font-weight: 600; color: var(--ink); font-size: 0.9375rem; }

@media (max-width: 600px) {
    .spec-table th, .spec-table td { display: block; width: auto; padding: 0; border: 0; }
    .spec-table th { padding-top: 0.9rem; }
    .spec-table td { padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
    .spec-table tr:first-child > * { border-top: 0; }
}

/* Contact ---------------------------------------------------------- */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 4rem;
    align-items: start;
}
@media (max-width: 992px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
}

.contact-form .grid { gap: 1.5rem 1.25rem; }
.contact-aside .aside-heading { font-size: 1.125rem; }
.contact-aside a { overflow-wrap: anywhere; }

.field { --_input: 3.25rem; --_start: 1rem; margin: 0; }
.field > input, .field > textarea {
    font-family: var(--font); font-size: 1rem; color: var(--text); background: none;
}
.field.border > input, .field.border > textarea { border-color: #8a8f98; }
.field.border > input:focus, .field.border > textarea:focus { border-color: var(--ink); border-width: 2px; }
.field.label > label { font-family: var(--font); color: var(--muted); }
.field.label.border:not(.fill) > label::after { border-block-start-color: #8a8f98; }
.field.label.border:not(.fill) > :focus + label::after { border-block-start-color: var(--ink); }
.field.invalid.border > input, .field.invalid.border > textarea { border-color: var(--error); }
.field.invalid > label { color: var(--error); }
.message-field > textarea { min-height: 12rem; line-height: 1.55; }
.field > output {
    font-family: var(--font); font-size: 0.875rem; color: var(--error);
    padding: 0.4rem 0 0; line-height: 1.4;
}

.hp-field {
    position: absolute; left: -10000px; top: auto;
    width: 1px; height: 1px; overflow: hidden;
}

.form-actions {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 1.25rem 2rem; margin-top: 0.25rem;
}
.form-note { margin: 0; font-size: 0.875rem; color: var(--muted); max-width: 24rem; }

.button-busy { display: inline-flex; align-items: center; gap: 0.75rem; }
.busy-squares { display: inline-flex; gap: 0.25rem; }
.busy-squares span {
    display: block; width: 0.4rem; height: 0.4rem;
    background: currentColor; opacity: 0.25;
    animation: busy-step 1.05s steps(1, end) infinite;
}
.busy-squares span:nth-child(2) { animation-delay: 0.35s; }
.busy-squares span:nth-child(3) { animation-delay: 0.7s; }
@keyframes busy-step { 0% { opacity: 1; } 34%, 100% { opacity: 0.25; } }

.form-success {
    padding: 2.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 3px solid var(--ink);
}
.success-marker {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem;
    background: var(--ink); color: var(--paper);
    margin-bottom: 1.25rem;
}
.success-title { font-size: 1.75rem; margin: 0 0 0.5rem; }
.form-success p { margin: 0 0 1.5rem; color: var(--muted); }

.contact-aside { background: var(--band); padding: 1.75rem; }
.aside-block { margin-bottom: 1.75rem; }
.aside-block:last-child { margin-bottom: 0; }
.aside-heading { font-family: var(--font); font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0 0 0.4rem; }
.contact-aside address { font-style: normal; line-height: 1.65; }
.plain-list { margin: 0; padding-left: 1.15rem; font-size: 0.9375rem; }
.plain-list li { margin-bottom: 0.4rem; }
.plain-list li::marker { color: var(--accent); }

/* Legal ------------------------------------------------------------ */

.legal-grid {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
}
.legal-toc {
    display: block;
    white-space: normal;
    position: sticky; top: 6rem;
    max-height: calc(100vh - 7rem); overflow-y: auto;
    padding: 0; margin: 0; background: none;
}
.toc-heading { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.75rem; }
.legal-toc ul {
    all: revert;
    display: block;
    position: static;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem; line-height: 1.4;
}
.legal-toc li {
    all: revert;
    display: block;
    list-style: none;
    margin: 0 0 0.5rem;
    color: var(--muted);
}
.legal-toc a { color: var(--text); text-decoration: none; }
.legal-toc a:hover { color: var(--accent-dark); text-decoration: underline; }

.legal-body { padding: 0; margin: 0; background: none; box-shadow: none; max-width: 44rem; }
.legal-intro { font-size: 1.125rem; color: var(--text); }
.legal-body h2 {
    font-size: 1.5rem; margin: 2.75rem 0 0.85rem;
    scroll-margin-top: 5.5rem;
}
.legal-body h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.5rem; }
.legal-body li { margin-bottom: 0.5rem; }

@media (max-width: 992px) {
    .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .legal-toc {
        position: static; max-height: none; overflow: visible;
        background: var(--band); padding: 1.25rem 1.5rem;
    }
}
@media (max-width: 600px) {
    .legal-toc ul { font-size: 0.9375rem; }
    .legal-body h2 { font-size: 1.3125rem; }
}

/* Error page ------------------------------------------------------- */

.error-page { border-bottom: 0; padding-bottom: 6rem; }
.error-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Footer ----------------------------------------------------------- */

.site-footer {
    background: var(--ink-deep);
    color: #c9d0da;
    padding: 3.5rem 0 0;
    margin: 0;
}
.site-footer a { color: #eef1f4; text-decoration-color: rgba(238, 241, 244, 0.4); }
.site-footer a:hover { color: #fff; text-decoration-color: currentColor; }
.site-footer .brand {
    padding: 0.75rem;
    background: var(--paper);
    box-sizing: border-box;
    text-decoration: none;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.6fr) minmax(0, 0.85fr) minmax(18rem, 1.25fr);
    gap: 2rem;
}
.footer-brand p { margin-top: 1rem; max-width: 22rem; font-size: 0.9375rem; }
.footer-heading {
    font-family: var(--font); font-size: 0.875rem; font-weight: 600;
    color: #eef1f4; margin: 0 0 0.75rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.footer-links li { margin-bottom: 0.45rem; }
.footer-address { font-style: normal; font-size: 0.9375rem; line-height: 1.7; overflow-wrap: anywhere; }
.footer-bottom {
    margin-top: 3rem; padding-top: 1.25rem; padding-bottom: 1.5rem;
    border-top: 1px solid rgba(238, 241, 244, 0.15);
    font-size: 0.8125rem; color: #9aa5b3;
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

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