/* More Input: site styles. No framework; tokens on :root, dark mode via prefers-color-scheme. */

:root {
    --ink: #14213d;
    --ink-soft: #3d4a66;
    --muted: #5b6475;
    --bg: #ffffff;
    --bg-alt: #f4f6fa;
    --surface: #ffffff;
    --line: #dde2ec;
    --brand: #14213d;
    --brand-contrast: #ffffff;
    --accent: #c2410c;
    --accent-strong: #9a3412;
    --accent-soft: #fff1e8;
    --link: #1d4ed8;
    --focus: #2563eb;
    --error: #b42318;
    --error-bg: #fef3f2;
    --radius: 10px;
    --shadow: 0 1px 2px rgb(20 33 61 / 6%), 0 4px 16px rgb(20 33 61 / 6%);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --measure: 68ch;
    --gutter: 16px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e7ebf3;
        --ink-soft: #c3cad8;
        --muted: #9aa3b5;
        --bg: #0e1526;
        --bg-alt: #141d33;
        --surface: #172139;
        --line: #2a3654;
        --brand: #0a1020;
        --brand-contrast: #ffffff;
        --accent: #fb923c;
        --accent-strong: #fdba74;
        --accent-soft: #2b1d14;
        --link: #93b4ff;
        --focus: #93b4ff;
        --error: #ff8a80;
        --error-bg: #2a1414;
        --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 25%);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: var(--gutter); top: -100px; z-index: 100;
    background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; border-radius: var(--radius);
    box-shadow: var(--shadow); font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* Header & navigation */
.site-header { background: var(--brand); color: var(--brand-contrast); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 2.5rem; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; }
.site-nav a { color: #e6eaf2; text-decoration: none; font-weight: 500; padding: 0.35rem 0; display: inline-block; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
.site-nav a[aria-current="page"]:not(.button) { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .button { color: #fff; padding: 0.45rem 1.1rem; line-height: 1.2; }
.site-nav .button:hover { text-decoration: none; }

.nav-toggle {
    background: transparent; border: 1px solid rgb(255 255 255 / 35%); border-radius: 8px;
    width: 2.75rem; height: 2.75rem; color: #fff; cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    position: absolute; left: 50%; width: 1.2rem; height: 2px; background: currentColor; transform: translateX(-50%); content: "";
}
.nav-toggle-bar { top: 50%; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* Collapsible menu on small screens, only once JavaScript has taken over the toggle. */
@media (max-width: 759px) {
    .site-header.nav-ready .site-nav { display: none; width: 100%; padding-bottom: 1rem; }
    .site-header.nav-ready.nav-open .site-nav { display: block; }
    .site-header.nav-ready .site-nav ul { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .site-header.nav-ready .site-nav a { padding: 0.5rem 0; }
    .site-header.nav-ready .site-nav .button { padding: 0.5rem 1.25rem; margin-top: 0.5rem; }
}
@media (min-width: 760px) { .nav-toggle { display: none; } }

/* Buttons */
.button {
    display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
    padding: 0.75rem 1.35rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
    font: inherit; font-weight: 600; line-height: 1.2;
}
.button:hover { background: var(--accent-strong); text-decoration: none; }
@media (prefers-color-scheme: dark) {
    .button { color: #1a1206; }
    .button:hover { color: #1a1206; }
    .site-nav .button { color: #1a1206; }
}
.button-small { padding: 0.45rem 1rem; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button-ghost:hover { background: var(--bg-alt); color: var(--ink); }
.button-light { background: #fff; color: var(--brand); }
.button-light:hover { background: var(--accent-soft); color: var(--brand); }
@media (prefers-color-scheme: dark) {
    .button-ghost, .button-ghost:hover { color: var(--ink); }
    .button-light, .button-light:hover { color: #14213d; }
}

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); padding: clamp(3rem, 6vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-inner { max-width: 1120px; }
.hero h1 { max-width: 22ch; }
.lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--ink-soft); max-width: var(--measure); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--accent-strong); margin-bottom: 0.75rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* Stats */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stat-list { list-style: none; margin: 0; padding: 1.5rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.25rem; }
.stat-list li { display: flex; flex-direction: column; }
.stat-value { font-size: 1.6rem; font-weight: 750; color: var(--ink); line-height: 1.2; }
.stat-label { color: var(--muted); font-size: 0.95rem; }

/* Sections */
.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.subsection-heading { margin-top: 3rem; }
.page-head { background: var(--bg-alt); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 26ch; }
.intro { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); color: var(--ink-soft); max-width: 60ch; margin: 0; }
.prose { max-width: var(--measure); }
/* A container that is also prose keeps the page's left edge; only its text is narrowed. */
.container.prose { max-width: 1120px; }
.container.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* Grids & cards */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.card {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card p:last-child { margin-bottom: 0; }
.card-title { font-size: 1.25rem; }
.card-title a { color: var(--ink); text-decoration: none; }
/* Whole card is clickable via the title link. */
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:has(.card-title a:hover) { border-color: var(--accent); }
.card-title a:focus-visible { outline: none; }
.card:has(.card-title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-meta { font-size: 0.85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.card-series { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.card-more { margin-top: auto; padding-top: 0.5rem; color: var(--accent-strong); font-weight: 600; }
.card-small { box-shadow: none; }
.card-small .card-title { font-size: 1.1rem; }

.feature h3 { margin-bottom: 0.35rem; }
.feature p { color: var(--ink-soft); margin: 0; }
.feature { padding: 1.25rem 0; border-top: 3px solid var(--accent); }

.chip-list { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-block; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Work filters */
.filters { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.filter-group .chip-list { margin-bottom: 0; }
.filter-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.4rem; }
.filter-summary { color: var(--muted); margin-bottom: 1.5rem; }

/* Work-type tags on a case study */
.worktype-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.worktype-list a { display: inline-block; font-size: 0.85rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; font-weight: 600; }
.worktype-list a:hover { text-decoration: underline; }

/* Result callout */
.result { margin-top: 2rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.result h2 { margin-top: 0; font-size: 1.25rem; }
.result p { margin: 0; font-size: 1.1rem; color: var(--ink); }

/* Services */
.service-list { display: grid; gap: 2.5rem; }
.service { display: grid; gap: 0.5rem 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.service:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 860px) { .service { grid-template-columns: 1fr 2fr; } }
.service-body p { color: var(--ink-soft); max-width: var(--measure); }
.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.tick-list li { padding-left: 1.6rem; position: relative; }
.tick-list li::before { content: ""; position: absolute; left: 0.2rem; top: 0.55em; width: 0.55rem; height: 0.3rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Case study index */
.index-group + .index-group { margin-top: 2.5rem; }
.case-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.case-index li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.case-index a { font-weight: 600; font-size: 1.1rem; }
.case-index-meta { display: inline-block; margin-left: 0.6rem; color: var(--muted); font-size: 0.9rem; }
.case-index p { margin: 0.3rem 0 0; color: var(--ink-soft); max-width: var(--measure); }

/* Process steps */
.steps-gap { padding-bottom: 2.5rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.step::before {
    content: counter(step); display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent-strong); font-weight: 750; margin-bottom: 0.75rem;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* Case study */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.95rem; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.4rem 0 0.15rem; color: var(--muted); }
.case-layout { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .case-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.case-aside { align-self: start; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
@media (min-width: 900px) { .case-aside { position: sticky; top: 5.5rem; } }
.aside-heading { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.55rem; font-size: 0.9rem; }

.tech-details { margin-top: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.tech-details summary {
    cursor: pointer; padding: 0.9rem 1.25rem; font-weight: 600; list-style: none;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.tech-details summary::-webkit-details-marker { display: none; }
.tech-details summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent-strong); }
.tech-details[open] summary::after { content: "\2212"; }
.tech-details summary:hover { color: var(--accent-strong); }
.tech-details-body { padding: 0 1.25rem 1.25rem; color: var(--ink-soft); font-size: 0.97rem; }
.prose .tag-list { padding-left: 0; }
.prose .tag-list li { margin-bottom: 0; }

/* Client quote */
.testimonial { margin: 2rem 0 0; padding: 1.5rem 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { font-size: 1.2rem; line-height: 1.5; margin: 0; color: var(--ink); }
.testimonial blockquote p::before { content: "\201C"; color: var(--accent); font-size: 2rem; line-height: 0; vertical-align: -0.35em; margin-right: 0.15rem; }
.testimonial figcaption { margin-top: 0.75rem; color: var(--muted); font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.85rem; font-size: 1.4rem; line-height: 1; color: var(--accent-strong); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent-strong); }
.faq details p { margin: 0 0 1.25rem; color: var(--ink-soft); }

/* About */
.about-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.story-lead { margin-bottom: 2rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 860px; }
.timeline::before { content: ""; position: absolute; left: 0.45rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 2rem 2.25rem; display: grid; gap: 0.25rem; }
.timeline-item::before { content: ""; position: absolute; left: 0; top: 0.4rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
@media (min-width: 720px) {
    .timeline-item { grid-template-columns: 9rem 1fr; gap: 1.5rem; }
}
.timeline-when { font-weight: 700; color: var(--accent-strong); margin: 0; }
.timeline-title { font-size: 1.2rem; margin-bottom: 0.3rem; }
.timeline-body p { margin: 0; color: var(--ink-soft); }

/* Product */
.product { display: grid; }

/* Forms */
.contact-layout { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.form { display: grid; gap: 1.25rem; max-width: 640px; }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; }
.field input, .field textarea {
    font: inherit; color: var(--ink); background: var(--surface); width: 100%;
    border: 1px solid #8a93a6; border-radius: 8px; padding: 0.7rem 0.8rem; min-height: 2.9rem;
}
.field textarea { resize: vertical; min-height: 10rem; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.field-hint { color: var(--muted); font-size: 0.95rem; margin: 0; }
.field-error { color: var(--error); font-weight: 600; font-size: 0.95rem; }
.field-error:empty { display: none; }
.form-note { color: var(--muted); font-size: 0.95rem; margin: 0; }
.form .button { justify-self: start; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-error { background: var(--error-bg); border: 1px solid var(--error); color: var(--ink); }
.alert .validation-summary-valid { display: none; }
.alert ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.contact-aside { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; align-self: start; }

/* Call to action */
.cta { background: var(--brand); color: var(--brand-contrast); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.cta-inner { text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #d6dcea; font-size: 1.1rem; }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 2.5rem 0 1.5rem; color: var(--ink-soft); font-size: 0.95rem; }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-brand { font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-bottom: 0.4rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-links a, .footer-contact a { color: var(--ink-soft); }
.footer-legal { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.footer-legal p { margin: 0; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

@media print {
    .site-header, .site-footer, .cta, .skip-link, .nav-toggle { display: none !important; }
    body { color: #000; background: #fff; }
}
