/* ==========================================================================
   About page (website/about.html) — mobile-first.
   Loaded after index.css: reuses its --lp-* tokens (including the shared
   --lp-action) and adds only the ink of the story's pen line.
   Breakpoints: 576 / 768 / 992 / 1200px.
   ========================================================================== */

:root {
    /* A blue ballpoint: the pen line, its dots and years, the quote mark.
       Nothing else on the page is blue. 7.3:1 on the cream panel. */
    --ab-ink: #1f4f8f;
    --ab-ink-track: rgba(31, 79, 143, 0.14);
    --ab-paper: #fffaf6;

    --ab-line-x: 20px;      /* centre of the pen line from the body's start edge */
    --ab-line-gutter: 48px; /* room the line takes before the text */
    --ab-prose: 38rem;
}

.about .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.about a:focus-visible,
.about [tabindex]:focus-visible {
    outline: 3px solid var(--lp-action);
    outline-offset: 3px;
}

/* ===== Buttons and links ===== */
.ab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 26px;
    border: 2px solid var(--lp-action);
    border-radius: var(--lp-radius-md);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    transition: background-color var(--lp-speed), color var(--lp-speed);
}

.ab-btn--primary {
    background-color: var(--lp-action);
    color: #fff;
}

.ab-btn--primary:hover {
    border-color: var(--lp-action-hover);
    background-color: var(--lp-action-hover);
}

.ab-btn--outline {
    background-color: #fff;
    color: var(--lp-action);
}

.ab-btn--outline:hover {
    background-color: var(--lp-action);
    color: #fff;
}

.ab-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--lp-touch);
    color: var(--lp-action);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.ab-link:hover {
    color: var(--lp-action-hover);
}

/* ===== Panels and headings ===== */
.ab-panel {
    margin-bottom: 20px;
    padding: var(--lp-box-pad) clamp(16px, 3vw, 32px);
    border-radius: var(--lp-radius-lg);
    background-color: var(--lp-glass);
    backdrop-filter: blur(2px);
    box-shadow: var(--lp-shadow-section);
}

.ab-title {
    margin-bottom: 16px;
    color: var(--lp-heading);
    font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
    font-weight: 800;
    line-height: 1.5;
}

.ab-lead {
    max-width: var(--ab-prose);
    margin-bottom: 24px;
    color: #555;
    line-height: 1.95;
}

/* ===== Hero ===== */
.ab-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-block: 20px;
    padding: 32px 20px 36px;
    border-radius: 0 0 var(--lp-radius-xl) var(--lp-radius-xl);
    background-color: var(--lp-cream);
    box-shadow: var(--lp-shadow-soft);
    text-align: center;
}

.ab-hero__body {
    min-width: 0;
}

.ab-hero h1 {
    margin-bottom: 16px;
    color: var(--lp-intro-heading);
    font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.45rem);
    font-weight: 800;
    line-height: 1.55;
    text-wrap: balance;
}

.ab-hero__text {
    max-width: 36rem;
    margin-inline: auto;
    margin-bottom: 26px;
    color: #555;
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    font-weight: 500;
    line-height: 1.95;
}

.ab-hero .ab-btn {
    width: 100%;
}

/* An arched doorway: the page's invitation to come and visit. */
.ab-hero__arch {
    order: -1;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 3 / 4;
    border-radius: 999px 999px var(--lp-radius-md) var(--lp-radius-md);
    background-color: var(--lp-peach);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.75), 0 18px 40px rgba(215, 107, 60, 0.18);
    overflow: hidden;
}

.ab-hero__arch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* ===== Story: the pen line =====
   One continuous line of blue ink runs down the story's start (right)
   edge: a curl where the pen touches the paper, a hand-drawn wobble
   (a mask tile repeated, so it never stretches), a dot on each year and
   a final dot at the end. */
.ab-story__body {
    position: relative;
    padding-inline-start: var(--ab-line-gutter);
}

.ab-ink {
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(var(--ab-line-x) - 20px);
    width: 40px;
    pointer-events: none;
}

.ab-ink__start {
    display: block;
    fill: none;
    stroke: var(--ab-ink);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.ab-ink__track,
.ab-ink__line {
    position: absolute;
    inset-block: 44px 0;
    inset-inline: 0;
    background-color: var(--ab-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='96' viewBox='0 0 40 96'%3E%3Cpath d='M20 0 C26 24 14 72 20 96' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E") top center / 40px 96px repeat-y;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='96' viewBox='0 0 40 96'%3E%3Cpath d='M20 0 C26 24 14 72 20 96' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E") top center / 40px 96px repeat-y;
}

.ab-ink__track {
    background-color: var(--ab-ink-track);
}

/* The end of the line: a full stop. Outside the mask, so drawn separately. */
.ab-ink::after {
    content: "";
    position: absolute;
    inset-block-end: -5px;
    inset-inline-start: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--ab-ink);
}

.ab-story__text {
    max-width: var(--ab-prose);
    padding-block-start: 6px;
    color: #444;
    font-size: 1.05rem;
    line-height: 2;
}

.ab-story__text p + p {
    margin-top: 1em;
}

.ab-timeline {
    max-width: var(--ab-prose);
    list-style: none;
    margin-top: 28px;
    padding-bottom: 12px;
}

.ab-milestone {
    position: relative;
    padding-bottom: 26px;
}

.ab-milestone__dot {
    position: absolute;
    top: 0.5rem;
    inset-inline-start: calc(var(--ab-line-x) - var(--ab-line-gutter) - 8px);
    width: 16px;
    height: 16px;
    border: 3px solid var(--ab-ink);
    border-radius: 50%;
    background-color: var(--ab-ink);
    box-shadow: 0 0 0 4px var(--lp-cream);
}

.ab-milestone__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 14px;
    line-height: 1.6;
}

.ab-milestone__year {
    color: var(--ab-ink);
    font-size: 1.3rem;
    font-weight: 900;
}

.ab-milestone__title {
    color: var(--lp-ink);
    font-size: 1.075rem;
    font-weight: 800;
}

.ab-milestone__text {
    margin-top: 4px;
    color: #555;
    line-height: 1.9;
}

/* The one moment of motion: the line draws itself as the story is
   read, and each dot fills as the line reaches it. Only where the
   browser ties animations to scrolling and the reader allows motion;
   everywhere else the line is simply drawn. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .ab-story__body {
            view-timeline: --ab-story block;
        }

        /* The tip follows the reader at three quarters of the screen. */
        .ab-ink__line,
        .ab-ink::after {
            animation: ab-draw linear both;
            animation-timeline: --ab-story;
            animation-range: cover 25vh cover calc(100% - 75vh);
        }

        .ab-ink::after {
            animation-name: ab-end;
        }

        .ab-milestone__dot {
            animation: ab-dot linear both;
            animation-timeline: view();
            animation-range: cover calc(25vh - 24px) cover 25vh;
        }
    }
}

@keyframes ab-draw {
    from { clip-path: inset(0 0 100% 0); }
    to   { clip-path: inset(0); }
}

@keyframes ab-end {
    0%, 98% { transform: scale(0); }
    100%    { transform: scale(1); }
}

@keyframes ab-dot {
    from { background-color: var(--lp-cream); }
    to   { background-color: var(--ab-ink); }
}

/* ===== Director's words ===== */
.ab-quote {
    position: relative;
    margin-bottom: 20px;
    padding: 36px 22px 28px;
    border-radius: var(--lp-radius-lg);
    background-color: var(--ab-paper);
    box-shadow: 0 10px 30px rgba(215, 107, 60, 0.12);
}

.ab-quote__text {
    position: relative;
    max-width: 44rem;
    padding-inline-start: 44px;
}

/* The opening guillemet, in the pen's ink. */
.ab-quote__text::before {
    content: "«";
    position: absolute;
    top: -0.35em;
    inset-inline-start: -4px;
    color: var(--ab-ink);
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1;
}

.ab-quote__text p {
    color: var(--lp-ink);
    font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
    font-weight: 400;
    line-height: 2;
}

.ab-quote__by {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding-inline-start: 44px;
}

.ab-quote__by img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--lp-peach);
}

.ab-quote__by > span {
    display: flex;
    flex-direction: column;
    line-height: 1.7;
}

.ab-quote__name {
    color: var(--lp-ink);
    font-weight: 800;
}

.ab-quote__role {
    color: #555;
    font-size: 0.925rem;
}

/* ===== Beliefs ===== */
.ab-beliefs {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
}

.ab-belief h3 {
    margin-bottom: 6px;
    color: var(--lp-intro-heading);
    font-size: 1.15rem;
    font-weight: 800;
}

.ab-belief p {
    max-width: var(--ab-prose);
    color: #444;
    font-size: 1.05rem;
    line-height: 2;
}

.ab-values {
    display: grid;
    gap: 18px 32px;
}

.ab-value {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* The landing page's yellow disc. */
.ab-value__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--lp-yellow);
    font-size: 1.2rem;
    line-height: 1;
}

.ab-value__title {
    color: var(--lp-ink);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.7;
}

.ab-value p {
    color: #555;
    line-height: 1.85;
}

/* ===== What makes us different ===== */
.ab-highlights {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px 24px;
}

.ab-highlight img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    margin-bottom: 14px;
    border-radius: var(--lp-radius-md);
    background-color: var(--lp-peach);
    object-fit: cover;
}

.ab-highlight h3 {
    margin-bottom: 6px;
    color: var(--lp-ink);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.6;
}

.ab-highlight p {
    color: #555;
    line-height: 1.9;
}

/* ===== Facts ===== */
.ab-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
}

.ab-fact {
    display: flex;
    flex-direction: column-reverse; /* the number above its label */
    min-width: 0;
}

.ab-fact dd {
    color: var(--lp-heading);
    font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.4rem);
    font-weight: 900;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.ab-fact dt {
    color: #555;
    font-weight: 600;
    line-height: 1.7;
}

/* ===== Team ===== */
.ab-people {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
}

.ab-person {
    min-width: 0;
    text-align: center;
}

.ab-person__photo {
    display: block;
    width: min(120px, 100%);
    aspect-ratio: 1;
    margin: 0 auto 12px;
    border-radius: 50%;
    background-color: var(--lp-peach);
    object-fit: cover;
}

.ab-person__initial {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lp-heading);
    font-size: 2.4rem;
    font-weight: 800;
}

.ab-person__name {
    color: var(--lp-ink);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ab-person__role {
    color: var(--lp-action);
    font-size: 0.925rem;
    font-weight: 700;
}

.ab-person__bio {
    margin-top: 4px;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== Gallery: a swipeable strip on phones, a grid from 768px ===== */
.ab-gallery {
    display: flex;
    gap: 14px;
    margin-inline: calc(-1 * clamp(16px, 3vw, 32px));
    padding-inline: clamp(16px, 3vw, 32px);
    padding-bottom: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: clamp(16px, 3vw, 32px);
}

.ab-gallery > li {
    flex: 0 0 82%;
    scroll-snap-align: start;
}

.ab-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: var(--lp-radius-md);
    background-color: var(--lp-peach);
    object-fit: cover;
}

.ab-photo figcaption {
    margin-top: 8px;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===== Branches ===== */
.ab-branches {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.ab-branch {
    padding: 20px 22px 12px;
    border-radius: var(--lp-radius-md);
    background-color: #fff;
    box-shadow: var(--lp-shadow-card);
}

.ab-branch__title {
    margin-bottom: 8px;
    color: var(--lp-ink);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.6;
}

.ab-branch__address {
    display: flex;
    gap: 10px;
    color: #444;
    font-style: normal;
    line-height: 1.9;
}

.ab-branch__address i {
    margin-top: 0.45em;
    color: var(--lp-action);
}

/* ===== Closing call to action ===== */
.ab-cta {
    margin-bottom: 20px;
    padding: 40px 20px;
    border-radius: var(--lp-radius-xl);
    background-color: var(--ab-paper);
    box-shadow: 0 10px 30px rgba(215, 107, 60, 0.12);
    text-align: center;
}

.ab-cta__title {
    margin-bottom: 10px;
    color: var(--lp-intro-heading);
    font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem);
    font-weight: 800;
    line-height: 1.5;
}

.ab-cta p {
    max-width: 34rem;
    margin-inline: auto;
    color: #555;
    line-height: 1.95;
}

.ab-cta__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* ===== ≥ 576px ===== */
@media (min-width: 576px) {
    .ab-hero .ab-btn {
        width: auto;
    }

    .ab-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ab-people {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ab-cta__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ab-quote {
        padding: 44px 40px 36px;
    }

    .ab-quote__text,
    .ab-quote__by {
        padding-inline-start: 64px;
    }

    .ab-quote__text::before {
        font-size: 5.5rem;
    }
}

/* ===== ≥ 768px ===== */
@media (min-width: 768px) {
    .ab-hero {
        flex-direction: row;
        justify-content: space-between;
        gap: 48px;
        padding: 56px 56px 60px;
        border-radius: 0 0 60px 60px;
        text-align: start;
    }

    .ab-hero__body {
        flex: 1 1 0;
    }

    .ab-hero__text {
        margin-inline: 0;
    }

    .ab-hero__arch {
        order: 0;
        flex: 0 0 auto;
        width: 30%;
        max-width: 300px;
    }

    .ab-beliefs,
    .ab-values,
    .ab-branches {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ab-facts {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .ab-people {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ab-gallery {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: dense;
        margin-inline: 0;
        padding-inline: 0;
        overflow: visible;
    }

    /* The first photo leads, at twice the size. */
    .ab-gallery > li:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }

    .ab-gallery > li:first-child .ab-photo {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .ab-gallery > li:first-child img {
        flex: 1;
        height: 100%;
        min-height: 0;
        aspect-ratio: auto;
    }

    .ab-cta {
        padding: 56px 40px;
    }
}

/* ===== ≥ 992px ===== */
@media (min-width: 992px) {
    /* The story's heading sits beside the line, like a chapter title. */
    .ab-story {
        display: grid;
        grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
        gap: 40px;
        align-items: start;
    }

    .ab-story__title {
        position: sticky;
        top: 110px;
        font-size: 2rem;
    }

    .ab-highlights {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ab-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .ab-btn {
        transition: none;
    }
}
