/* Taylor Consulting — site styles */

@font-face {
    font-family: "Saira";
    src: url("../fonts/saira-var.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 50% 125%;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("../fonts/plex-sans-var.woff2") format("woff2");
    font-weight: 100 700;
    font-display: swap;
}

:root {
    --paper: #f2f4fa;
    --surface: #ffffff;
    --ink: #10163a;
    --ink-soft: #454c6e;
    --blue: #2a3795;
    --blue-tint: #e1e5f6;
    --red: #d81f27;
    --red-dark: #b3151c;
    --line: #cbd2e6;
    --on-ink: #eef0f9;
    --on-ink-soft: #b3bad8;

    --display: "Saira", "Arial Narrow", sans-serif;
    --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

    --wrap: 73rem;
    --gutter: clamp(1.1rem, 4vw, 2.5rem);
    --section: clamp(4rem, 9vw, 7.5rem);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

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

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--red-dark); }

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
    border-radius: 2px;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-stretch: 78%;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.01em;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: clamp(2.9rem, 7.4vw, 5.9rem); line-height: 0.94; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-stretch: 86%; font-weight: 600; line-height: 1.12; }
h4 { font-size: 1.15rem; font-stretch: 92%; font-weight: 600; line-height: 1.25; letter-spacing: 0; }

p { margin: 0 0 1.1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }

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

.lede {
    font-size: clamp(1.15rem, 1.7vw, 1.35rem);
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 56ch;
}

.skip {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    background: var(--ink);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 100;
}
.skip:focus { left: 0.5rem; color: #fff; }

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

.btn {
    display: inline-block;
    font-family: var(--display);
    font-stretch: 92%;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.2;
    padding: 0.85rem 1.5rem;
    border: 2px solid var(--red);
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn.quiet {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
}
.btn.quiet:hover { background: var(--ink); color: #fff; }

.on-ink .btn.quiet { border-color: var(--on-ink); color: var(--on-ink); }
.on-ink .btn.quiet:hover { background: var(--on-ink); color: var(--ink); }

.btn.small { font-size: 0.95rem; padding: 0.55rem 1.1rem; }

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

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

.site-head {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(242, 244, 250, 0.93);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-head .wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--display);
    font-stretch: 86%;
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1;
    margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand img { width: 46px; height: 46px; border-radius: 50%; }

.site-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 2vw, 1.75rem);
}
.site-nav a:not(.btn) {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }

.nav-toggle {
    display: none;
    font: inherit;
    font-weight: 600;
    background: none;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    padding: 0.4rem 1rem;
    cursor: pointer;
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem var(--gutter) 1.5rem;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a:not(.btn) { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
    .site-nav .btn { margin-top: 1rem; text-align: center; display: block; }
}

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

.section { padding-block: var(--section); }
.section > .wrap > h2 + .lede { margin-top: 1.25rem; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head .lede { margin-top: 1.25rem; }

.on-ink {
    background: var(--ink);
    color: var(--on-ink);
}
.on-ink .lede, .on-ink .soft { color: var(--on-ink-soft); }
.on-ink a:not(.btn) { color: #fff; }

.on-white { background: var(--surface); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem); }

.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.hero h1 { font-size: clamp(2.7rem, 5.3vw, 4.4rem); }
.hero h1 span { display: block; }
.hero .lede { margin-top: 1.75rem; }

/* Triage: the visitor picks their situation, we say what happens first */
.triage {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 6px;
    box-shadow: 10px 10px 0 var(--blue-tint);
}

.triage fieldset { border: 0; margin: 0; padding: 1.4rem 1.4rem 0.6rem; }

.triage legend {
    font-family: var(--display);
    font-stretch: 86%;
    font-weight: 600;
    font-size: 1.35rem;
    line-height: 1.15;
    padding: 0;
    margin-bottom: 0.9rem;
    float: left;
    width: 100%;
}

.triage label {
    clear: both;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line);
    cursor: pointer;
    line-height: 1.35;
}

.triage input {
    appearance: none;
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.05rem 0 0;
    border: 2px solid var(--ink-soft);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
}
/* the selected marker borrows the red ring from the logo */
.triage input:checked { border: 5px solid var(--red); }
.triage label:has(input:checked) { font-weight: 600; }

.triage-answer {
    background: var(--ink);
    color: var(--on-ink);
    padding: 1.3rem 1.4rem 1.5rem;
    border-radius: 0 0 3px 3px;
}
.triage-answer h3 {
    font-size: 1rem;
    font-family: var(--body);
    font-stretch: 100%;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--on-ink-soft);
    margin-bottom: 0.4rem;
}
.triage-answer p { font-size: 1.02rem; line-height: 1.5; }
.triage-answer .btn { margin-top: 1.1rem; }

@media (prefers-reduced-motion: no-preference) {
    .triage-answer p.swap { animation: swap 0.28s ease-out; }
    @keyframes swap {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: none; }
    }
}

@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .triage { box-shadow: 6px 6px 0 var(--blue-tint); }
}

/* ---------- Clients strip ---------- */

.clients { border-block: 1px solid var(--line); background: var(--surface); padding-block: 1.75rem; }
.clients .wrap { display: flex; align-items: center; gap: 1.5rem 2.5rem; flex-wrap: wrap; }
.clients p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; max-width: 13rem; line-height: 1.35; }
.clients ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.5rem; flex: 1; }
.clients img { height: 56px; width: auto; max-width: 150px; object-fit: contain; }

/* ---------- Rescue ---------- */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.steps { list-style: none; counter-reset: step; }
.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 3.6rem 1fr;
    gap: 0.4rem 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    content: counter(step);
    grid-row: 1 / span 2;
    font-family: var(--display);
    font-stretch: 62%;
    font-weight: 700;
    font-size: 4rem;
    line-height: 0.85;
    color: var(--red);
}
.steps h3, .steps p { grid-column: 2; }
.steps p { color: var(--on-ink-soft); }

.section:not(.on-ink) .steps li { border-top-color: var(--line); }
.section:not(.on-ink) .steps p { color: var(--ink-soft); }

.ticks { list-style: none; }
.ticks li {
    position: relative;
    padding: 0.7rem 0 0.7rem 2rem;
    border-top: 1px solid var(--line);
    max-width: 62ch;
}
.ticks li::before {
    content: "";
    position: absolute;
    left: 0.1rem;
    top: 1.15rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 3px solid var(--red);
    border-radius: 50%;
}
.on-ink .ticks li { border-top-color: rgba(255, 255, 255, 0.2); }

/* ---------- Product index (home) ---------- */

.product-index { list-style: none; border-bottom: 2px solid var(--ink); }
.product-index li { border-top: 2px solid var(--ink); }
.product-index a {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 3fr);
    gap: 0.75rem 2.5rem;
    align-items: baseline;
    padding: 1.6rem 0;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 0.15s, padding 0.15s;
}
.product-index a:hover { background: var(--surface); padding-inline: 1rem; }
.product-index h3 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-stretch: 78%; font-weight: 700; }
.product-index p { color: var(--ink-soft); margin: 0; }
.product-index .used { font-size: 0.95rem; color: var(--blue); font-weight: 500; }
@media (max-width: 860px) {
    .product-index a { grid-template-columns: 1fr; padding: 1.3rem 0; }
}

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

.services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 2.5rem;
}
.services > div { border-top: 1px solid var(--line); padding: 1.4rem 0 1.6rem; }
.services h3 { margin-bottom: 0.5rem; font-size: 1.3rem; }
.services p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 860px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* ---------- Work ---------- */

.work {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
}
.work figure { margin: 0; }
.work .shot {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}
.work .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work figcaption { padding-top: 0.9rem; }
.work h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.work p { color: var(--ink-soft); font-size: 0.98rem; }
.work .more { display: inline-block; margin-top: 0.4rem; font-weight: 500; font-size: 0.98rem; }
@media (max-width: 860px) { .work { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .work { grid-template-columns: 1fr; } }

/* ---------- About ---------- */

.timeline { list-style: none; }
.timeline li {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}
.timeline time {
    font-family: var(--display);
    font-stretch: 70%;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--blue);
}
.timeline p { color: var(--ink-soft); font-size: 1rem; }
.signature { width: 170px; margin-top: 1.5rem; }

/* ---------- Product pages ---------- */

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.6rem, 6.2vw, 4.8rem); max-width: 16ch; }
.page-head .lede { margin-top: 1.5rem; }

.jump { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.jump a {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.98rem;
}
.jump a:hover { background: var(--ink); color: #fff; }

.product { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 2px solid var(--ink); }
.product-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.product-top .lede { margin-top: 1.25rem; }
.product-top .shot {
    border: 2px solid var(--ink);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 10px 10px 0 var(--blue-tint);
    background: var(--surface);
}
.proof {
    border-left: 4px solid var(--red);
    padding: 0.2rem 0 0.2rem 1.25rem;
    margin-top: 1.75rem;
}
.proof h4 { margin-bottom: 0.3rem; }
.proof p { color: var(--ink-soft); font-size: 1rem; }

.modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 2.5rem;
}
.modules > div { border-top: 1px solid var(--line); padding: 1.2rem 0 1.4rem; }
.modules h4 { margin-bottom: 0.4rem; }
.modules p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }
@media (max-width: 860px) {
    .product-top { grid-template-columns: 1fr; }
    .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .modules { grid-template-columns: 1fr; } }

.phones { display: flex; gap: 1rem; align-items: flex-start; }
.phones img {
    width: calc((100% - 2rem) / 3);
    border: 2px solid var(--ink);
    border-radius: 10px;
}

/* ---------- Rescue page ---------- */

.symptoms {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 3rem;
}
.symptoms li { border-top: 1px solid var(--line); padding: 1.3rem 0 1.5rem; }
.symptoms h3 { font-size: 1.3rem; margin-bottom: 0.45rem; }
.symptoms p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 700px) { .symptoms { grid-template-columns: 1fr; } }

.outcomes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.outcomes > div {
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 6px;
    padding: 1.5rem;
}
.outcomes h3 { margin-bottom: 0.6rem; }
.outcomes p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 860px) { .outcomes { grid-template-columns: 1fr; } }

.faq details { border-top: 1px solid var(--line); padding: 1.1rem 0; max-width: 50rem; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
    font-family: var(--display);
    font-stretch: 90%;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    list-style-position: outside;
    margin-left: 1.3rem;
    padding-left: 0.3rem;
}
.faq details p { margin: 0.8rem 0 0 1.6rem; color: var(--ink-soft); }

/* ---------- Case study ---------- */

.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 3rem 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1.2em; }
.prose li { margin-bottom: 0.55em; max-width: 66ch; }
.prose figure { margin: 2rem 0; }
.prose figcaption { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.6rem; }
.prose figure img { border-radius: 6px; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.pair figure { margin: 0; }
.pair img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 6px; }
.quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.quad figure { margin: 0; }
.quad img { border: 2px solid var(--ink); border-radius: 10px; width: 100%; }
@media (max-width: 640px) {
    .pair { grid-template-columns: 1fr; }
    .quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin-top: 2rem; }
.facts li { font-size: 1rem; }
.facts b { display: block; font-weight: 500; color: var(--ink-soft); font-size: 0.92rem; }

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

.contact .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
@media (max-width: 860px) { .contact .split { grid-template-columns: 1fr; } }

.contact address { font-style: normal; margin-top: 2rem; }
.contact address p { margin-bottom: 0.9rem; }
.contact address b { display: block; font-weight: 500; color: var(--on-ink-soft); font-size: 0.92rem; }
.contact address a { font-size: 1.15rem; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 500; font-size: 0.98rem; margin-bottom: 0.35rem; }
.form input, .form select, .form textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 0.75rem 0.9rem;
}
.form textarea { min-height: 9.5rem; resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}
.form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.6em; font-weight: 500; }
.form-status.ok { color: #9be7b4; }
.form-status.bad { color: #ffb4b7; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

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

.site-foot {
    background: var(--ink);
    color: var(--on-ink-soft);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-block: 1.75rem;
    font-size: 0.95rem;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.site-foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-foot a { color: var(--on-ink); }
.site-foot p { margin: 0; }
