/* =====================================================================
   Coventara — site stylesheet
   One file for every page. Tokens first; components reference tokens
   only. Colours and type are the Covalence app's own (apps/crm
   css/style.css), so the company site and the product read as one brand.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
    /* Brand — shared with the Covalence app */
    --brand:          #2563EB;
    --brand-deep:     #1E3A8A;
    --brand-soft:     #EEF4FF;
    --brand-tint:     #DBE6FE;
    --accent:         #7C3AED;
    --accent-deep:    #5B21B6;
    --accent-soft:    #F3EDFE;

    /* The mark's own two colours — used for the mark only */
    --mark-blue:      #137DFA;
    --mark-purple:    #8A0AF5;

    /* Neutrals */
    --bg:             #F5F7FB;
    --surface:        #FFFFFF;
    --surface-2:      #F9FBFF;
    --border:         #E3E8F0;
    --border-strong:  #D3DBE7;
    --text:           #1A2233;
    --text-muted:     #5B6B82;

    /* On the navy band */
    --on-dark:        #FFFFFF;
    --on-dark-muted:  #C7D2FE;   /* 7.1:1 on --brand-deep */
    --on-dark-line:   rgba(255, 255, 255, 0.28);
    --on-dark-hover:  rgba(255, 255, 255, 0.10);

    /* Type */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --fs-xs:   0.8125rem;
    --fs-sm:   0.9375rem;
    --fs-base: 1.0625rem;
    --fs-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
    --fs-xl:   clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
    --fs-2xl:  clamp(1.875rem, 1.45rem + 1.9vw, 2.75rem);
    --fs-3xl:  clamp(2.5rem, 1.7rem + 3.6vw, 4.5rem);

    /* Spacing — one scale, used everywhere */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;

    /* Shape — same radii and navy-tinted shadows as the app */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(30, 58, 138, 0.06);
    --shadow-md: 0 6px 22px rgba(30, 58, 138, 0.12);

    /* Layout */
    --container: 72rem;
    --measure:   38rem;
    --gutter:    clamp(1.25rem, 4vw, 2rem);
    --header-h:  4.25rem;
    --tap:       44px;

    --ease: 150ms ease;
}

/* ---------------------------------------------------------------------
   2. Reset + base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + var(--space-4));
    color-scheme: light;
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1, h2 {
    font-family: var(--font-display);
    color: var(--brand-deep);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.35;
    color: var(--text);
}
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--space-4); }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--ease);
}
a:hover { color: var(--brand-deep); text-decoration-thickness: 2px; }

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

::selection { background: var(--brand-tint); color: var(--brand-deep); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------------
   3. Utilities
   --------------------------------------------------------------------- */
.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}
.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;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--brand-deep);
    color: var(--on-dark);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--on-dark); }

.eyebrow {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-4);
}
.lede {
    font-size: var(--fs-lg);
    line-height: 1.55;
    color: var(--text-muted);
    max-width: var(--measure);
}
.muted { color: var(--text-muted); }

/* ---------------------------------------------------------------------
   4. Buttons
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 48px;
    padding: 0 var(--space-5);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--fs-sm); }

.btn--primary { background: var(--brand); color: var(--on-dark); }
.btn--primary:hover { background: var(--brand-deep); color: var(--on-dark); }

.btn--secondary {
    background: var(--surface);
    color: var(--brand-deep);
    border-color: var(--border-strong);
}
.btn--secondary:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }

.btn--light { background: var(--surface); color: var(--brand-deep); }
.btn--light:hover { background: var(--brand-tint); color: var(--brand-deep); }

.btn--outline-light { background: transparent; color: var(--on-dark); border-color: var(--on-dark-line); }
.btn--outline-light:hover { background: var(--on-dark-hover); border-color: var(--on-dark); color: var(--on-dark); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

/* ---------------------------------------------------------------------
   5. Header
   --------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--tap);
    color: var(--brand-deep);
    text-decoration: none;
    border-radius: var(--radius-sm);
}
.brand:hover { color: var(--brand-deep); text-decoration: none; }
.brand__mark { width: 26px; height: auto; flex-shrink: 0; }
.brand__name {
    font-family: var(--font-display);
    font-size: 1.1875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}
.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--ease), background-color var(--ease);
}
.site-nav__link:hover { color: var(--brand-deep); background: var(--brand-soft); text-decoration: none; }
.site-nav__link[aria-current="page"] { color: var(--brand-deep); font-weight: 600; }
.site-nav__link[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: var(--space-3);
    right: var(--space-3);
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}
.site-nav__cta { margin-left: var(--space-2); }

/* Phones: the logo is the way home, so the Home link goes, and Contact
   becomes a blue text link instead of a button. That keeps the bar, with
   the wordmark, on one line down to 320px. */
@media (max-width: 479px) {
    .site-header__inner { gap: var(--space-2); }
    .site-nav__home { display: none; }
    .brand__name { font-size: 1rem; }
    .site-nav__link { padding: 0 var(--space-2); }
    .site-nav__cta { margin-left: 0; }
    .site-nav__cta .btn {
        min-height: var(--tap);
        padding: 0 var(--space-2);
        background: transparent;
        border-color: transparent;
        color: var(--brand);
    }
    .site-nav__cta .btn:hover { background: var(--brand-soft); color: var(--brand-deep); }
}

/* ---------------------------------------------------------------------
   6. Sections
   --------------------------------------------------------------------- */
.section { padding-block: var(--space-9); }
.section--surface {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.section__head { max-width: 44rem; margin-bottom: var(--space-7); }
.section__head h2 { font-size: var(--fs-2xl); }
.section__head .lede { margin-top: var(--space-4); }

@media (max-width: 699px) {
    .section { padding-block: var(--space-8); }
    .section__head { margin-bottom: var(--space-6); }
}

.split {
    display: grid;
    gap: var(--space-7);
}
@media (min-width: 880px) {
    .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
}
.split h2 { font-size: var(--fs-2xl); }
.prose { max-width: var(--measure); }
.prose p:not(.eyebrow) { color: var(--text-muted); }
.prose h2 + p { margin-top: var(--space-5); }

/* ---------------------------------------------------------------------
   7. Home — hero and the bond diagram (the signature element)
   --------------------------------------------------------------------- */
.hero { padding-block: var(--space-8) var(--space-9); }
.hero__grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) {
    .hero { padding-block: var(--space-9); }
    .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-8); }
}
.hero h1 {
    font-size: var(--fs-3xl);
    line-height: 1.04;
    letter-spacing: -0.03em;
}
.hero .lede { margin-top: var(--space-5); }

.bond { margin: 0; width: 100%; max-width: 26rem; justify-self: center; }
.bond__art { width: 100%; height: auto; max-width: 21rem; margin-inline: auto; }
@media (max-width: 899px) { .bond__art { max-width: 15rem; } }

/* The mark's two triangles, wherever the mark is drawn (logo, footer, hero) */
.mark-purple { fill: var(--mark-purple); }
.mark-blue   { fill: var(--mark-blue); }

.bond__pin    { fill: var(--surface); stroke-width: 6; }
.bond__pin--you  { stroke: var(--mark-purple); }
.bond__pin--us   { stroke: var(--brand); }
.bond__pin--link { stroke: var(--brand-deep); }
.bond__num {
    font-family: var(--font-body);
    font-size: 38px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
}
.bond__num--you  { fill: var(--mark-purple); }
.bond__num--us   { fill: var(--brand); }
.bond__num--link { fill: var(--brand-deep); }

.bond__key {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-6);
    padding: var(--space-5);
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.bond__key li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    font-size: var(--fs-sm);
    line-height: 1.45;
}
.bond__key strong { display: block; color: var(--text); font-weight: 600; }
.bond__key p span { color: var(--text-muted); }

.marker {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: var(--surface);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
}
.marker--you  { color: var(--mark-purple); }
.marker--us   { color: var(--brand); }
.marker--link { color: var(--brand-deep); }

/* ---------------------------------------------------------------------
   8. Cards, lists and grids
   --------------------------------------------------------------------- */
.grid {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.section--surface .card { background: var(--surface-2); }
.card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.6; }
.card .card__kicker {
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
}

/* "The gap" list */
.gap-list {
    display: grid;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.gap-list__title {
    padding: var(--space-5) var(--space-5) var(--space-3);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.gap-list li {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border);
}
.gap-list li::before {
    content: '';
    width: 0.875rem;
    height: 2px;
    margin-top: 0.8em;
    background: var(--accent);
    border-radius: 2px;
}

/* Audiences */
.audiences { display: grid; gap: var(--space-6); list-style: none; }
@media (min-width: 820px) { .audiences { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.audience { position: relative; padding-top: var(--space-5); border-top: 2px solid var(--border-strong); }
.audience--primary { border-top-color: var(--accent); }
/* The tag sits on the column's rule, so all three headings stay aligned. */
.audience .tag { position: absolute; top: -1px; left: 0; margin: 0; transform: translateY(-50%); }
.audience h3 { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--brand-deep); letter-spacing: -0.01em; }
.audience p { margin-top: var(--space-3); color: var(--text-muted); }
.tag {
    display: inline-block;
    margin-bottom: var(--space-3);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Steps */
.steps {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    list-style: none;
    counter-reset: step;
}
.step { counter-increment: step; padding-top: var(--space-5); border-top: 1px solid var(--border-strong); }
.step::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    margin-bottom: var(--space-3);
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: 500;
    line-height: 1;
    color: var(--brand);
}
.step p { margin-top: var(--space-2); color: var(--text-muted); font-size: var(--fs-sm); }

/* Checklist */
.checklist { display: grid; gap: var(--space-4); list-style: none; }
.checklist li {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
}
.checklist__icon { width: 1.5rem; height: 1.5rem; color: var(--brand); margin-top: 0.1em; }
.checklist strong { display: block; color: var(--text); }
.checklist span { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------------
   9. Navy call-to-action band
   --------------------------------------------------------------------- */
.cta { background: var(--brand-deep); color: var(--on-dark); }
.cta h2 { color: var(--on-dark); font-size: var(--fs-2xl); }
.cta p { color: var(--on-dark-muted); }
.cta .lede { color: var(--on-dark-muted); margin-top: var(--space-4); }
.cta a:not(.btn) { color: var(--on-dark); }
.cta a:not(.btn):hover { color: var(--on-dark-muted); }
.cta :focus-visible { outline-color: var(--on-dark); }
.cta__inner { max-width: 46rem; }

.routes { display: grid; gap: var(--space-4); margin-top: var(--space-7); list-style: none; }
@media (min-width: 760px) { .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.route {
    padding: var(--space-5);
    border: 1px solid var(--on-dark-line);
    border-radius: var(--radius);
}
.route__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-muted); }
.cta .route__name { margin-top: var(--space-2); font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; color: var(--on-dark); }
.route__email { display: inline-block; margin-top: var(--space-2); font-weight: 600; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------
   10. About — page header and founders
   --------------------------------------------------------------------- */
.page-hero { padding-block: var(--space-8); }
@media (min-width: 900px) { .page-hero { padding-block: var(--space-9) var(--space-8); } }
.page-hero h1 { font-size: var(--fs-3xl); line-height: 1.04; letter-spacing: -0.03em; max-width: 18ch; }
.page-hero .lede { margin-top: var(--space-5); }

.people { display: grid; gap: var(--space-5); list-style: none; }
@media (min-width: 760px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.person {
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.person__top { display: flex; align-items: center; gap: var(--space-4); }
.person__monogram {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
}
.person__monogram--violet { background: var(--accent-soft); color: var(--accent-deep); }
.person__monogram--blue   { background: var(--brand-soft); color: var(--brand-deep); }
.person__name { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--brand-deep); letter-spacing: -0.01em; }
.person__role { margin-top: var(--space-1); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 500; }
.person__bio { margin-top: var(--space-5); color: var(--text-muted); }

.contact-list {
    display: grid;
    gap: var(--space-3);
    margin: var(--space-5) 0 0;
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}
.contact-list div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.contact-list dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list a { font-weight: 600; }

/* ---------------------------------------------------------------------
   11. 404
   --------------------------------------------------------------------- */
.notfound { padding-block: var(--space-9); }
.notfound__code {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 3rem + 7vw, 8rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--brand-tint);
}
.notfound h1 { margin-top: var(--space-4); font-size: var(--fs-2xl); }
.notfound .lede { margin-top: var(--space-4); }

/* ---------------------------------------------------------------------
   12. Footer
   --------------------------------------------------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-block: var(--space-7) var(--space-6);
    font-size: var(--fs-sm);
}
.site-footer__grid { display: grid; gap: var(--space-6); }
@media (min-width: 760px) {
    .site-footer__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr); }
}
.site-footer__tagline { margin-top: var(--space-3); color: var(--text-muted); max-width: 22rem; }
.site-footer h2 {
    margin-bottom: var(--space-3);
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.footer-links { display: grid; gap: var(--space-1); list-style: none; }
.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--text);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.footer-links a:hover { color: var(--brand); text-decoration: underline; }
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}
.site-footer__legal p + p { margin-top: 0; }
