/* Public homepage. Organic decoration is cropped from the approved design reference. */
.homepage {
    --ink: #102540;
    --teal: #075b55;
    --deep-teal: #073939;
    --paper: #faf8ef;
    --green: #d3e4b8;
    --forest: url('../images/soberpathways-nature-pathway.jpg');
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, sans-serif;
    line-height: 1.45;
}
.homepage a:focus-visible, .homepage button:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}
.home-hero a:focus-visible, .pathfinder-band a:focus-visible { outline-color: #fff; }
.home-wrap { width: min(94%, 84rem); margin-inline: auto; min-width: 0; }
.home-header { background: #fffefa; }
.home-header .home-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .35rem clamp(.8rem, 2vw, 1.8rem);
    padding-block: .35rem;
}
.home-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: fit-content;
    max-width: 100%;
    color: var(--ink);
    font-size: clamp(1.4rem, 2.05vw, 1.85rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.05em;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.home-brand small {
    display: block;
    margin-block-start: .22em;
    color: var(--teal);
    font-size: .53em;
    font-weight: 700;
    letter-spacing: 0;
}
.home-brand img { flex: none; width: clamp(2.6rem, 5vw, 3.85rem); height: auto; border-radius: 50%; }
.home-nav, .home-account, .home-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem .7rem;
    min-width: 0;
}
.home-nav { justify-content: center; }
.home-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: .2rem;
    color: var(--ink);
    font-size: .9rem;
    font-weight: 660;
    text-decoration: none;
}
.home-nav a[aria-current] { box-shadow: inset 0 -2px var(--teal); }
.home-nav a:hover, .home-brand:hover { color: var(--teal); text-decoration: underline; }
.home-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .48rem;
    max-width: 100%;
    min-height: 44px;
    padding: .42em 1.13em;
    border: 1px solid transparent;
    border-radius: 2rem;
    font-size: .93rem;
    font-weight: 740;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}
.home-button:hover { text-decoration: underline; }
.home-button i { flex: none; }
.home-button-teal { background: var(--teal); color: #fff; }
.home-button-teal:hover { background: var(--deep-teal); color: #fff; }
.home-button-line { border-color: var(--teal); color: var(--ink); }
.home-button-line:hover { background: #e9f0e8; color: var(--ink); }
.home-button-cream { background: #fbf6dc; color: var(--ink); }
.home-button-cream:hover { background: #fff; color: var(--ink); }
.home-button-glass { border-color: #fff; background: #073939; color: #fff; }
.home-button-glass:hover { background: #fff; color: var(--deep-teal); }
.home-faq { margin-inline-start: auto; }
.home-hero {
    background: linear-gradient(90deg, #073939f7 0%, #073939ef 31%, #073939c7 65%, #07393905 100%), var(--forest) center 31% / cover;
    color: #fff;
    border-radius: 0 0 48% 2% / 0 0 3% 2%;
}
.home-hero .home-wrap {
    display: grid;
    align-content: center;
    min-height: clamp(19rem, 27vw, 25rem);
    padding: clamp(1.6rem, 3vw, 3rem) clamp(.15rem, 3.8vw, 3.2rem);
}
.home-hero-copy { width: min(100%, 47rem); }
.home-hero h1, .home-heading h2, .audience-card h3, .pathfinder-band h2 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: -.032em;
    line-height: 1.1;
    text-wrap: balance;
}
.home-hero h1 {
    margin: 0 0 .55rem;
    font-size: clamp(1.85rem, 1.35rem + 2.35vw, 2.85rem);
    font-style: italic;
    text-wrap: wrap;
    overflow-wrap: anywhere;
}
.home-hero h1 em {
    display: table;
    margin-block-start: .08em;
    padding: .07em .2em .115em;
    background: #075b55;
    box-decoration-break: clone;
    border-radius: 18% 4% 21% 6% / 10% 8% 12% 9%;
}
.home-hero p { max-width: 32rem; margin: 0 0 .8rem; font-size: 1.11rem; }
.home-section { padding-block: clamp(1rem, 2vw, 1.75rem); }
.home-heading { text-align: center; margin-block-end: .9rem; }
.home-heading h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    margin: 0;
    font-size: clamp(1.65rem, 3.08vw, 2.65rem);
}
.home-heading h2::before, .home-heading h2::after {
    content: '';
    flex: 0 1 4.1rem;
    block-size: 2px;
    background: #21796b;
}
.home-heading h2 span { min-width: 0; overflow-wrap: anywhere; }
.home-heading p { margin: .28rem auto 0; max-width: 44rem; }
.audience-grid, .feature-grid, .illustration-grid, .home-footer .home-wrap {
    display: grid;
    gap: clamp(.66rem, 1.1vw, 1rem);
}
.audience-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.audience-card {
    --scene: url('../images/scene-recovery.png');
    --card-color: #e3efe6;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
    gap: .75rem;
    min-width: 0;
    padding: clamp(1rem, 2.1vw, 1.65rem);
    border: 1px solid #d5e3d6;
    border-radius: 1.1rem;
    background: var(--card-color);
}
.audience-card::before {
    content: '';
    position: absolute;
    inset: 0 0 0 47%;
    pointer-events: none;
    border-radius: inherit;
    background: var(--scene) right bottom / 100% 100% no-repeat;
    mask-image: linear-gradient(90deg, transparent 6%, #000 88%);
}
.audience-card > * { position: relative; }
.audience-card :is(h3,p), .feature-card :is(h3,p), .pathfinder-intro > div {
    min-width: 0;
    overflow-wrap: anywhere;
}
.audience-card-support { --scene: url('../images/scene-support.png'); --card-color: #f7f0d8; border-color: #e7dec5; }
.audience-card > i { color: var(--teal); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.15; }
.audience-card h3 { margin: 0 0 .26rem; font-size: clamp(1.45rem, 2.4vw, 2.15rem); }
.audience-card p { max-width: 28ch; margin: 0 0 .7rem; }
.home-feature-band { background: linear-gradient(105deg, #e4edd5, #f0f1e4 58%, #e4edd5); }
.feature-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.4rem), 1fr)); gap: .48rem; }
.feature-card {
    --scene: url('../images/scene-journal.png');
    min-width: 0;
    text-align: center;
    padding: .72rem .65rem clamp(2.95rem, 4.4vw, 4rem);
    border: 1px solid #dbe3d2;
    border-radius: 1.22rem;
    background: var(--scene) center bottom / 100% auto no-repeat, #fbf8ec;
}
.feature-card-origin { --scene: url('../images/scene-origin.png'); }
.feature-card-goals { --scene: url('../images/scene-goals.png'); }
.feature-card-relapse { --scene: url('../images/scene-relapse.png'); }
.feature-card-social { --scene: url('../images/scene-social.png'); }
.feature-card i { color: var(--teal); font-size: 2.05rem; line-height: 1.05; }
.feature-card h3, .illustration-card h3 { font-size: 1.13rem; font-weight: 780; margin: .21em 0 .2em; }
.feature-card p, .illustration-card p { margin: 0; }
.illustration-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.illustration-card {
    min-width: 0;
    margin: 0;
    padding: .32rem;
    border: 1px solid #dce1d0;
    border-radius: 1rem;
    background: #fbf9ef;
    display: flex;
    flex-direction: column;
}
.illustration-image {
    display: block;
    position: relative;
    border-radius: .66rem;
    text-decoration: none;
    color: var(--ink);
}
.illustration-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.42;
    object-fit: cover;
    object-position: center top;
    border-radius: inherit;
}
.illustration-image .illustration-zoom {
    display: grid;
    position: absolute;
    inset: auto .4rem .4rem auto;
    place-items: center;
    width: max(2rem, 44px);
    height: max(2rem, 44px);
    background: var(--green);
    color: var(--deep-teal);
    border: 1px solid var(--deep-teal);
    border-radius: 50%;
}
.illustration-image:hover .illustration-zoom { color: #fff; background: var(--teal); }
.illustration-card figcaption { padding: .32rem .55rem .45rem; }
.illustration-card .illustration-label { color: #415457; font-size: .82rem; margin-block-start: .24rem; }
.illustration-dialog {
    max-width: min(94vw, 67rem);
    max-height: 92vh;
    padding: .85rem;
    border: 1px solid #839c8d;
    border-radius: .8rem;
    background: var(--paper);
    color: var(--ink);
}
.illustration-dialog::backdrop { background: #102540d9; }
.illustration-dialog img { display: block; max-width: 100%; max-height: 69vh; width: auto; height: auto; margin: .6rem auto; object-fit: contain; }
.illustration-dialog h2 { font: 700 1.4rem/1.2 Georgia, 'Times New Roman', serif; margin: 0; }
.illustration-dialog .dialog-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.illustration-dialog a { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal); }
.pathfinder-band {
    color: #fff;
    background: url('../images/scene-pathfinder-ridgeline.png') center top / 100% clamp(.9rem, 3vw, 2.4rem) no-repeat, linear-gradient(100deg, #073939, #0d5759 76%, #073939);
    padding-block: clamp(1.8rem, 4vw, 3.2rem) .85rem;
}
.pathfinder-band .home-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr) auto;
    align-items: center;
    gap: .8rem clamp(.85rem, 2vw, 1.65rem);
    padding-inline: clamp(.1rem, 2vw, 1.3rem);
}
.pathfinder-intro { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; min-width: 0; }
.pathfinder-intro > div { flex: 1 1 11rem; }
.pathfinder-intro > i { flex: none; font-size: clamp(2.35rem, 4vw, 3.6rem); color: #fbf6dc; }
.pathfinder-band h2 { margin: 0 0 .12rem; font-size: clamp(1.65rem, 3vw, 2.5rem); font-style: italic; }
.pathfinder-band h2 em { color: #e0ebba; }
.pathfinder-band p, .pathfinder-band ul { margin: 0; }
.pathfinder-band ul { padding-inline-start: 1.45em; border-inline-start: 1px solid #8bb3a7; }
.pathfinder-band li + li { margin-block-start: .18em; }
.home-footer .home-wrap {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.25rem), 1fr));
    padding-block: .85rem 1rem;
    align-items: start;
}
.home-footer .home-wrap > :nth-child(n+2) { padding-inline-start: .85rem; border-inline-start: 1px solid #a8beb3; }
.home-footer h2 { font-size: 1.02rem; font-weight: 780; margin: 0 0 .18rem; }
.home-footer p { margin: 0; }
.home-footer .home-wrap a:not(.home-brand) { display: flex; width: fit-content; max-width: 100%; gap: .45em; color: var(--teal); min-height: 28px; align-items: center; overflow-wrap: anywhere; }
.home-footer .home-brand { flex-direction: column; align-items: center; text-align: center; font-size: clamp(1rem, 1.9vw, 1.55rem); }
.home-footer i { flex: none; }
@media (max-width: 1100px) {
    .home-header .home-wrap { grid-template-columns: minmax(0, 1fr) auto; }
    .home-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 820px) {
    .pathfinder-band .home-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pathfinder-band .home-button { justify-self: start; }
    .home-footer .home-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: .95rem; }
    .home-footer .home-wrap > :nth-child(n) { padding-inline-start: 0; border: 0; }
}
@media (max-width: 590px) {
    .home-header .home-wrap, .audience-grid, .illustration-grid, .pathfinder-band .home-wrap {
        grid-template-columns: minmax(0, 1fr);
    }
    .home-account { grid-row: 2; }
    .home-nav { grid-row: 3; }
    .home-header .home-wrap { padding-block: .55rem; }
    .home-nav a { min-height: 44px; }
    .home-hero {
        background: linear-gradient(180deg, #073939 0%, #073939f1 calc(100% - max(4rem, 18vw)), #07393917 100%), var(--forest) 66% center / cover;
    }
    .home-hero .home-wrap { min-height: 0; padding: 1.45rem .27rem clamp(4rem, 18vw, 6rem); }
    .home-actions { column-gap: .3rem; }
    .home-actions .home-button { padding-inline: .8em; }
    .home-heading h2::before, .home-heading h2::after { flex-basis: .8rem; }
    .feature-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
    .feature-card { background-size: 100% min(2.75rem, 22%); }
    .audience-card::before { inset-inline-start: 54%; }
    .pathfinder-band ul { border: 0; }
    .home-footer .home-wrap { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
    .home-footer .home-wrap a:not(.home-brand) { min-height: 44px; }
}
@media (max-width: 350px) {
    .audience-card { grid-template-columns: minmax(0, 1fr); }
}
