/* New design, used by the pages on layouts/modern.njk (homenew.html, consulting.html).
   Stands alone: does not build on style.css or Bootstrap.
   Light by default, dark when the visitor's system is dark. */

:root {
    --paper: #f7f4ec;
    --surface: rgba(255, 255, 255, 0.72);
    --ink: #0b2a38;
    --muted: #51656f;
    --line: rgba(11, 42, 56, 0.14);
    --teal: #023e59;
    --flame: #fbcb09;
    --candle: rgba(2, 62, 89, 0.07);
    --glow: rgba(255, 255, 255, 1);
    --solid-bg: #023e59;
    --solid-ink: #ffffff;
    --display: "Fraunces", Georgia, serif;
    --text: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #04212e;
        --surface: rgba(255, 255, 255, 0.05);
        --ink: #f3f0e8;
        --muted: #a9bbc3;
        --line: rgba(255, 255, 255, 0.16);
        --candle: rgba(255, 255, 255, 0.06);
        --glow: rgba(255, 255, 255, 0.2);
        --solid-bg: #fbcb09;
        --solid-ink: #04212e;
    }
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
p,
blockquote,
dl,
dd {
    margin: 0;
}

a {
    color: inherit;
}

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

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

.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- candle ---------- */
.candle {
    position: fixed;
    z-index: 0;
    top: -6vh;
    right: -9vw;
    height: 135vh;
    aspect-ratio: 228 / 518;
    pointer-events: none;
}

.candle-shape {
    position: absolute;
    inset: 0;
    background: var(--candle);
    -webkit-mask: url(/assets/img/bg/Candelit_candle_blue_off.svg) center / contain no-repeat;
    mask: url(/assets/img/bg/Candelit_candle_blue_off.svg) center / contain no-repeat;
}

/* warm light around the flame: out when the page loads, fades in, stays lit, fades out completely, repeats */
.candle-glow {
    position: absolute;
    /* centred on the tip of the wick (101, 136 in the 228 x 518 candle drawing) */
    left: 44.3%;
    top: 26.2%;
    width: 150%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
    animation: flame 10.5s ease-in-out infinite;
}

@keyframes flame {
    0%, 47.6% { opacity: 0; }     /* out 5 s */
    75.2%, 80% { opacity: 1; }    /* fades in 2.9 s, lit 0.5 s */
    100% { opacity: 0; }          /* fades out 2.1 s */
}

@media (prefers-reduced-motion: reduce) {
    .candle-glow { animation: none; }
    html { scroll-behavior: auto; }
}

.top,
main,
.foot {
    position: relative;
    z-index: 1;
}

/* ---------- header ---------- */
.top {
    position: sticky;
    top: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

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

.brand img {
    width: 150px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 34px;
    font-size: 15px;
    font-weight: 500;
}

.menu a {
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.menu a:hover {
    border-color: var(--flame);
}

.menu .menu-cta {
    padding: 9px 20px;
    border: 1px solid var(--ink);
    border-radius: 999px;
}

.menu .menu-cta:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.menu-toggle {
    display: none;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
    padding-top: clamp(70px, 13vh, 150px);
    padding-bottom: clamp(70px, 12vh, 140px);
}

.eyebrow,
.label,
.card-kind {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 12px;
    border-radius: 50%;
    background: var(--flame);
}

.hero h1 {
    max-width: 13ch;
    margin-top: 26px;
    font-family: var(--display);
    font-size: clamp(46px, 8.4vw, 108px);
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.hero h1 em {
    font-style: italic;
    background: linear-gradient(transparent 68%, var(--flame) 68%, var(--flame) 90%, transparent 90%);
}

.lead {
    max-width: 34em;
    margin-top: 34px;
    font-size: clamp(18px, 1.6vw, 21px);
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 42px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--ink);
    color: var(--paper);
}

.btn-solid,
.btn-solid:hover {
    border-color: var(--solid-bg);
    background: var(--solid-bg);
    color: var(--solid-ink);
}

/* ---------- sections ---------- */
.section {
    padding-top: clamp(56px, 9vh, 110px);
    padding-bottom: clamp(56px, 9vh, 110px);
    border-top: 1px solid var(--line);
    scroll-margin-top: 76px;
}

.label {
    margin-bottom: 40px;
}

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

.card {
    display: flex;
    flex-direction: column;
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    text-decoration: none;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--flame);
    box-shadow: 0 18px 40px -24px rgba(2, 62, 89, 0.45);
}

.card h3 {
    margin: 14px 0 16px;
    font-family: var(--display);
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.card p {
    color: var(--muted);
}

.card-go {
    margin-top: auto;
    padding-top: 30px;
    font-weight: 600;
}

.card-go span {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.25s;
}

.card:hover .card-go span {
    transform: translateX(6px);
}

/* ---------- about ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(32px, 6vw, 90px);
    align-items: start;
}

.mission {
    font-family: var(--display);
    font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mission footer {
    margin-top: 26px;
    font-family: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-text p {
    color: var(--muted);
}

.about-text p + p {
    margin-top: 20px;
}

/* ---------- contact ---------- */
.mail {
    display: inline-block;
    font-family: var(--display);
    font-size: clamp(32px, 6.4vw, 78px);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-decoration: none;
    background: linear-gradient(var(--flame), var(--flame)) left bottom / 100% 3px no-repeat;
    padding-bottom: 6px;
    transition: background-size 0.3s;
    overflow-wrap: anywhere;
}

.mail:hover {
    background-size: 100% 38%;
}

.facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 64px;
}

.facts dt {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.facts a {
    text-decoration-color: var(--flame);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* ---------- footer ---------- */
.foot {
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}

.foot-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 30px;
    padding-top: 28px;
    padding-bottom: 36px;
}

.foot nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
}

.foot a {
    text-decoration: none;
}

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

/* ---------- small screens ---------- */
@media (max-width: 860px) {
    .cards,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .facts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

    .wrap {
        padding-left: 20px;
        padding-right: 20px;
    }

    .candle {
        right: -34vw;
        height: 110vh;
    }

    .brand img {
        width: 124px;
    }

    .menu-toggle {
        display: block;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 20px 24px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        font-size: 18px;
    }

    .menu.open {
        display: flex;
    }

    .menu .menu-cta {
        margin-top: 8px;
    }

    .card {
        padding: 28px;
        border-radius: 20px;
    }

    .facts {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 44px;
    }
}

/* ---------- menu: current page ---------- */
.menu a.active {
    border-color: var(--flame);
}

/* ---------- consulting page ---------- */
.lead-small {
    margin-top: 14px;
    font-size: 16px;
}

.quote {
    margin: 0;
}

.quote blockquote {
    font-family: var(--display);
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 300;
    line-height: 1.4;
}

.quote blockquote::before {
    content: "”";
    display: block;
    height: 34px;
    font-size: 64px;
    line-height: 1;
    color: var(--flame);
}

.quote figcaption {
    margin-top: auto;
    padding-top: 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.tags li {
    padding: 7px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
}

.features {
    border-bottom: 1px solid var(--line);
}

.feature {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: clamp(20px, 5vw, 70px);
    padding: 44px 0;
    border-top: 1px solid var(--line);
}

.feature h3 {
    font-family: var(--display);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.feature p {
    color: var(--muted);
}

.feature p + p {
    margin-top: 16px;
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

/* the logo files are drawn for a light background */
.partner-logos img {
    width: 170px;
    padding: 6px 14px;
    border-radius: 12px;
    background: #ffffff;
}

.badges {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 14px;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
}

.exams {
    margin-top: 48px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.exams summary {
    padding: 20px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.exams summary::-webkit-details-marker {
    display: none;
}

.exams summary::after {
    content: "+";
    float: right;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.exams[open] summary::after {
    content: "–";
}

.exams ul {
    columns: 2;
    column-gap: 50px;
    margin: 0;
    padding: 4px 0 28px;
    list-style: none;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}

.exams li {
    display: flex;
    gap: 14px;
    padding: 5px 0;
    break-inside: avoid;
}

.exams li span {
    flex: 0 0 56px;
    font-weight: 600;
    color: var(--ink);
}

@media (max-width: 860px) {
    .feature {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 34px 0;
    }

    .badges {
        grid-template-columns: repeat(5, 1fr);
    }

    .exams ul {
        columns: 1;
    }
}

@media (max-width: 680px) {
    .badges {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- shared bits for the Pluslife page and the guide ---------- */
.hero-compact {
    padding-bottom: clamp(30px, 5vh, 60px);
}

.hero-compact h1 {
    max-width: none;
    font-size: clamp(40px, 6.4vw, 80px);
}

.hero-logo {
    width: 190px;
    margin: -30px 0 6px -14px;
}

.eyebrow a {
    text-decoration: none;
}

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

.note {
    margin-top: 24px;
    font-size: 15px;
    color: var(--muted);
}

.note a,
.prose a,
.pager-meta a {
    text-decoration-color: var(--flame);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.checks {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 19px;
}

.checks li {
    position: relative;
    padding: 12px 0 12px 38px;
    border-bottom: 1px solid var(--line);
}

.checks li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 19px;
    width: 14px;
    height: 7px;
    border-left: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(-45deg);
}

/* fold-out questions */
.faq {
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    position: relative;
    padding: 20px 40px 20px 0;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 18px;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "–";
}

.faq p {
    padding-bottom: 18px;
    color: var(--muted);
}

/* ---------- guide: table of contents ---------- */
.toc {
    columns: 3;
    column-gap: 50px;
}

.toc-section {
    break-inside: avoid;
    margin-bottom: 44px;
}

.toc-section .label {
    margin-bottom: 14px;
}

.toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc li {
    padding: 5px 0;
}

.toc li ul {
    padding: 4px 0 0 18px;
    font-size: 15px;
    color: var(--muted);
}

.toc li li {
    padding: 2px 0;
}

.toc a {
    text-decoration: none;
    background: linear-gradient(var(--flame), var(--flame)) left bottom / 0 2px no-repeat;
    transition: background-size 0.25s;
}

.toc a:hover {
    background-size: 100% 2px;
}

/* ---------- guide: article ---------- */
.guide {
    padding-top: clamp(50px, 9vh, 100px);
    padding-bottom: clamp(56px, 9vh, 110px);
}

.guide-head h1 {
    max-width: 18ch;
    margin-top: 22px;
    font-family: var(--display);
    font-size: clamp(36px, 5.2vw, 64px);
    font-weight: 300;
    line-height: 1.06;
    letter-spacing: -0.025em;
}

.guide-date {
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
}

.prose {
    margin-top: 44px;
}

/* text keeps a readable width; screenshot rows and tables may use the full width */
.prose > * {
    max-width: 720px;
}

.prose > .screens,
.prose > table {
    max-width: none;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 18px;
}

.prose h3 {
    margin: 52px 0 16px;
    font-family: var(--display);
    font-size: clamp(26px, 2.8vw, 34px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.02em;
    scroll-margin-top: 96px;
}

.prose h4 {
    margin: 34px 0 10px;
    font-size: 18px;
    font-weight: 600;
    scroll-margin-top: 96px;
}

.prose ul,
.prose ol {
    padding-left: 24px;
}

.prose li {
    padding: 3px 0;
}

.prose li::marker {
    color: var(--muted);
}

.prose img.guide-figure {
    width: auto;
    max-height: 220px;
    margin: 28px 0;
}

.prose table {
    width: 100%;
    margin: 28px 0;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
}

.prose th,
.prose td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* screenshots ({% screens %} in the Markdown) */
.screens {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 24px;
    margin: 30px 0 38px;
}

.screens figure {
    flex: 0 0 200px;
    max-width: 100%;
    margin: 0;
}

.screens-small figure {
    flex-basis: 150px;
}

.screens-medium figure {
    flex-basis: 260px;
}

.screens-wide figure {
    flex-basis: 100%;
}

.screens figcaption {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--muted);
}

.screens img {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 34px -22px rgba(2, 62, 89, 0.5);
}

.screens-wide img {
    width: auto;
}

/* previous / next */
.pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 80px;
}

.pager-link {
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    font-family: var(--display);
    font-size: 21px;
    font-weight: 300;
    line-height: 1.25;
    text-decoration: none;
    transition: transform 0.25s, border-color 0.25s;
}

.pager-link:hover {
    transform: translateY(-3px);
    border-color: var(--flame);
}

.pager-link span {
    display: block;
    margin-bottom: 8px;
    font-family: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.pager-next {
    text-align: right;
}

.pager-meta {
    margin-top: 26px;
    font-size: 15px;
    color: var(--muted);
}

@media (max-width: 860px) {
    .toc {
        columns: 2;
    }

    .prose table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 680px) {
    .toc {
        columns: 1;
    }

    .hero-logo {
        width: 150px;
    }

    .screens {
        gap: 22px 16px;
    }

    .screens figure {
        flex-basis: calc(50% - 8px);
    }

    .screens-small figure {
        flex-basis: calc(33.333% - 11px);
    }

    .screens-medium figure,
    .screens-wide figure {
        flex-basis: 100%;
    }

    .pager {
        grid-template-columns: 1fr;
        margin-top: 56px;
    }

    .pager-next {
        text-align: left;
    }
}
