/* Agolytics — v2
   Quiet confidence. Clear thinking. Practical technology. */

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

:root {
    --paper: #f6f4ef;
    --paper-2: #efece4;
    --ink: #16181b;
    --ink-2: #4b5058;
    --ink-3: #5d626a;
    --rule: #d8d3c8;
    --accent: #1e4f5c;
    --accent-ink: #143942;
    --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
    --wrap: 1120px;
    --gutter: 24px;
}

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

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--ink);
    color: var(--paper);
    padding: 8px 14px;
    z-index: 10;
}

.skip:focus { left: 16px; }

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

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding-top: 22px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.wordmark {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.16em;
    text-decoration: none;
    color: var(--ink);
}

.wordmark span { color: var(--accent); }

.site-nav {
    display: flex;
    align-items: baseline;
    gap: 28px;
    font-size: 15px;
}

.site-nav a {
    text-decoration: none;
    color: var(--ink-2);
    padding: 4px 0;
}

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

.site-nav a[aria-current="page"] {
    color: var(--ink);
    box-shadow: inset 0 -1px 0 var(--ink);
}

.site-nav .lang {
    color: var(--ink-3);
    padding-left: 20px;
    border-left: 1px solid var(--rule);
    font-size: 14px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.012em;
    line-height: 1.15;
    color: var(--ink);
}

h1 { font-size: clamp(36px, 5.4vw, 64px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: clamp(22px, 2.2vw, 27px); line-height: 1.25; }

p { max-width: 38em; }

.lead {
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.6;
    color: var(--ink-2);
}

.label {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-3);
}

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

.text-link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.text-link:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }

/* ---------- Sections ---------- */
.section {
    padding: 96px 0;
    border-top: 1px solid var(--rule);
}

.section:first-of-type { border-top: none; }

.section.tint { background: var(--paper-2); }

.split {
    display: grid;
    grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
    gap: 32px 64px;
    align-items: start;
}

.split > .label { padding-top: 10px; }

.stack > * + * { margin-top: 20px; }

/* ---------- Hero ---------- */
.hero { padding: 112px 0 104px; }

.hero h1 { max-width: 15em; }

.hero .lead { margin-top: 28px; max-width: 34em; }

.hero .actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 32px;
    align-items: baseline;
}

.button {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 13px 22px;
    border-radius: 2px;
}

.button:hover { background: var(--accent-ink); }

/* ---------- Problem list ---------- */
.problems { list-style: none; border-top: 1px solid var(--rule); max-width: 760px; }

.problems li {
    font-family: var(--serif);
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.4;
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}

/* ---------- Solution families ---------- */
.families { border-top: 1px solid var(--rule); }

.family {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 20px 56px;
    padding: 40px 0;
    border-bottom: 1px solid var(--rule);
}

.family h3 a { text-decoration: none; }
.family h3 a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

.family .includes {
    margin-top: 14px;
    font-size: 15px;
    color: var(--ink-3);
}

/* ---------- Principles ---------- */
.principles {
    list-style: none;
    counter-reset: p;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 56px;
}

.principles li { counter-increment: p; }

.principles li::before {
    content: counter(p, decimal-leading-zero);
    display: block;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--ink-3);
    margin-bottom: 8px;
}

.principles h3 { font-size: 22px; margin-bottom: 8px; }
.principles p { color: var(--ink-2); font-size: 16px; }

/* ---------- Page head ---------- */
.page-head { padding: 96px 0 72px; }
.page-head .label { margin-bottom: 18px; }
.page-head h1 { font-size: clamp(36px, 4.6vw, 56px); max-width: 14em; }
.page-head .lead { margin-top: 24px; }

/* ---------- Solution detail ---------- */
.detail h2 { margin-bottom: 24px; }

.detail h4 {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 36px 0 12px;
}

.detail ul {
    list-style: none;
    max-width: 38em;
}

.detail ul li {
    padding: 10px 0 10px 22px;
    position: relative;
    border-bottom: 1px solid var(--rule);
}

.detail ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 21px;
    width: 10px;
    height: 1px;
    background: var(--ink-3);
}

.systems {
    margin-top: 28px;
    font-size: 15px;
    color: var(--ink-3);
}

/* ---------- Founder ---------- */
.founder {
    border-left: 2px solid var(--ink);
    padding-left: 24px;
}

/* ---------- Contact ---------- */
.contact-line {
    font-family: var(--serif);
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.2;
}

.page-head .contact-line { margin-top: 36px; overflow-wrap: anywhere; }

.contact-line a { text-decoration: none; box-shadow: inset 0 -1px 0 var(--ink); }
.contact-line a:hover { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

.facts { list-style: none; }

.facts li {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}

.facts li:first-child { border-top: 1px solid var(--rule); }

/* ---------- Closing CTA ---------- */
.closing h2 { max-width: 16em; }
.closing p { margin-top: 18px; }
.closing .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--rule);
    padding: 48px 0 56px;
    font-size: 15px;
    color: var(--ink-2);
}

.site-footer .wrap {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer .wordmark { display: inline-block; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    :root { --gutter: 20px; }
    body { font-size: 16.5px; }
    .site-header .wrap { padding-top: 18px; padding-bottom: 14px; row-gap: 10px; }
    .site-nav { gap: 18px; width: 100%; }
    .site-nav .lang { margin-left: auto; padding-left: 14px; }
    .hero { padding: 64px 0 64px; }
    .page-head { padding: 64px 0 48px; }
    .section { padding: 64px 0; }
    .split { grid-template-columns: 1fr; gap: 16px; }
    .split > .label { padding-top: 0; }
    .family { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; }
    .principles { grid-template-columns: 1fr; gap: 32px; }
    .facts li { grid-template-columns: 1fr; gap: 2px; }
    .site-footer .wrap { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 380px) {
    .site-nav { gap: 14px; font-size: 14.5px; }
}
