/* ==========================================================
   Clarity® Software — site styles
   ========================================================== */

:root {
    --brand: #6A5FB0;          /* accent — violet lifted from the logo colour #69729B */
    --brand-dark: #52479A;
    --brand-soft: #ECEAF8;
    --ink: #3A2F7D;            /* headings — deep Clarity purple */
    --text: #4B4A68;           /* body */
    --muted: #78779A;
    --line: #E3E1F1;
    --bg: #FFFFFF;
    --bg-tint: #F6F5FC;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(40, 32, 90, 0.04), 0 8px 24px rgba(40, 32, 90, 0.06);
    --max: 1140px;
}

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

* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-dark); }

h1, h2, h3 {
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--ink); }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: var(--brand-soft); }

.btn-sm { padding: 9px 18px; font-size: 14px; }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo img { height: 52px; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.nav-links a:not(.btn):hover { color: var(--brand-dark); }

/* Hamburger button — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s, opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Keyboard focus ---------- */

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

.cta a:focus-visible { outline-color: #fff; }

/* ---------- Anchor offset for sticky header ---------- */

section[id] { scroll-margin-top: 76px; }

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

.hero {
    padding: 80px 0 88px;
    background:
        radial-gradient(800px 420px at 88% 8%, #E2DDF5, transparent 70%),
        radial-gradient(600px 360px at 0% 100%, #F2EEFA, transparent 70%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 64px;
    align-items: start;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.hero h1 + .subhead { margin-top: -6px; }

.subhead {
    font-size: clamp(20px, 2.2vw, 24px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--brand);
    margin-bottom: 16px;
}

.lead {
    font-size: 19px;
    max-width: 560px;
    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.facts {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.facts li { display: flex; flex-direction: column; }
.facts strong { color: var(--ink); font-size: 18px; }
.facts span { color: var(--muted); font-size: 14px; }

.hero-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.panel-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 22px;
}

.panel-steps { list-style: none; position: relative; }

.panel-steps::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--line);
}

.panel-steps li {
    position: relative;
    display: flex;
    gap: 18px;
    padding: 10px 0;
}

.panel-steps .dot {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--brand);
}

.panel-steps strong { display: block; color: var(--ink); font-size: 16px; }
.panel-steps span:not(.dot) { font-size: 14px; color: var(--muted); }

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

.section { padding: 80px 0; }
.section-tint { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
    max-width: 680px;
    margin-bottom: 56px;
}

.section h2 {
    font-size: clamp(28px, 3.4vw, 38px);
    margin-bottom: 16px;
}

.section-head p:not(.eyebrow) { font-size: 17px; }
.section-head p:not(.eyebrow) + p { margin-top: 14px; }

.section-divided { border-top: 1px solid var(--line); }

/* Two-column intro: text left, image right */

.split {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: start;
    margin-bottom: 56px;
}

.split .section-head { margin-bottom: 0; }

.screenshot {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(40, 32, 90, 0.05), 0 20px 48px rgba(40, 32, 90, 0.14);
}

.screenshot-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: var(--brand-soft);
    border-bottom: 1px solid var(--line);
}

.screenshot-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #CCC6E6;
}

.screenshot img {
    width: 100%;
    height: auto;
    aspect-ratio: 1063 / 606;     /* trims the taskbar strip at the bottom of the capture */
    object-fit: cover;
    object-position: top;
}

/* Research lifecycle infographic */

.lifecycle { list-style: none; position: relative; }

.lifecycle::before {               /* connector running through the stage numbers */
    content: "";
    position: absolute;
    left: 17px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(var(--brand), var(--ink));
    opacity: 0.35;
}

.lifecycle li {
    position: relative;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 7px 0;
}

.split .hero-panel { padding: 26px 30px; }
.split .panel-title { margin-bottom: 14px; }

.stage-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 0 0 4px #fff;
}

.lifecycle li:nth-child(1) .stage-num { background: #6A5FB0; }
.lifecycle li:nth-child(2) .stage-num { background: #5A4FA0; }
.lifecycle li:nth-child(3) .stage-num { background: #4A3F8E; }
.lifecycle li:nth-child(4) .stage-num { background: #3A2F7D; }

.lifecycle strong { display: block; color: var(--ink); font-size: 16px; padding-top: 1px; }
.lifecycle div span { display: block; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* "Clarity before code" specification graphic */

.spec {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.spec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 26px;
    background: var(--brand-soft);
    border-bottom: 1px solid var(--line);
}

.spec-title { font-weight: 700; color: var(--ink); }

.spec-tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--brand);
    padding: 3px 10px;
    border-radius: 999px;
}

.spec-list { list-style: none; padding: 10px 26px; }

.spec-list li {
    display: grid;
    grid-template-columns: 20px 150px 1fr;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    font-size: 14px;
}

.spec-list li + li { border-top: 1px solid var(--line); }

.spec-list li::before {            /* tick */
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.spec-label { font-weight: 600; color: var(--ink); }

.spec-bar {                        /* placeholder "text" line */
    display: block;
    height: 8px;
    width: var(--w, 70%);
    border-radius: 4px;
    background: var(--brand-soft);
}

.spec-foot {
    padding: 14px 26px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-dark);
    border-top: 1px solid var(--line);
    background: var(--bg-tint);
}

@media (max-width: 540px) {
    .spec-list li { grid-template-columns: 20px 1fr; }
    .spec-bar { display: none; }
}

.photo {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(40, 32, 90, 0.05), 0 20px 48px rgba(40, 32, 90, 0.14);
}

.photo img { width: 100%; height: auto; }

.screenshot figcaption {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

/* Research: selected platforms */

.refs-label { margin-top: 56px; }

.refs {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.refs a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 10px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.refs a:hover {
    border-color: #CCC6E6;
    border-left-color: var(--ink);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.ref-arrow { color: var(--brand); font-size: 18px; }

.ref-name small {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    margin-top: 2px;
}

/* Services */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}

.card:hover {
    border-color: #CCC6E6;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--brand-soft);
    display: grid;
    place-items: center;
    margin-bottom: 22px;
}

.icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { font-size: 15px; }

/* Approach */

.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.steps li { border-top: 2px solid var(--brand); padding-top: 22px; }

.step-num {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { font-size: 15px; }

/* About */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}

.about-grid > div p + p { margin-top: 16px; }
.about-grid > div p:not(.eyebrow) { font-size: 17px; }

.checks {
    list-style: none;
    background: var(--bg-tint);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 32px;
}

.checks li {
    position: relative;
    padding: 18px 0 18px 36px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.checks li:last-child { border-bottom: 0; }

.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 21px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.checks strong { color: var(--ink); }

/* CTA */

.cta-section { padding-top: 0; }

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 56px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 100%);
    color: #E9E6F6;
}

.cta h2 { color: #fff; margin-bottom: 10px; }
.cta p { max-width: 560px; font-size: 17px; }
.cta .btn { flex: none; padding: 15px 28px; font-size: 16px; }

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

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-tint);
    padding: 64px 0 32px;
    font-size: 14px;
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    height: 44px;
    width: auto;
    margin-bottom: 16px;
    mix-blend-mode: multiply;   /* blends the logo's white background into the tint */
}

.footer-head {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
}

.site-footer nav a,
.site-footer div > a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    padding: 3px 0;
}

.site-footer a:hover { color: var(--brand-dark); }

.footer-legal {
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
}

.footer-legal p { max-width: 760px; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .cards, .steps { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .split { grid-template-columns: 1fr; gap: 40px; }
    .screenshot, .photo, .spec, .split .hero-panel { max-width: 640px; }
    .hero-panel { max-width: 520px; }
}

@media (max-width: 760px) {
    .nav { height: 68px; }
    .logo img { height: 44px; }
    section[id] { scroll-margin-top: 68px; }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 24px 24px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(40, 32, 90, 0.08);
    }

    .nav-links.is-open { display: flex; }

    .nav-links a:not(.btn) {
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        font-size: 16px;
    }

    .nav-links .btn { margin-top: 16px; padding: 13px 24px; font-size: 15px; }
}

@media (max-width: 760px) {
    .refs { grid-template-columns: 1fr; }

    .hero { padding: 56px 0 72px; }
    .lead { font-size: 17px; }
    .facts { gap: 24px; }

    .section { padding: 72px 0; }
    .section-head { margin-bottom: 40px; }

    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .checks { padding: 4px 22px; }

    .cta { flex-direction: column; align-items: flex-start; padding: 40px 28px; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
    .cards, .steps { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .card { transition: none; }
}
