/* =========================================================
   about.css — /about page
   Uses the tokens from base.css (:root). Every class is prefixed .ab-
   Reduced-motion: base.css already disables all animations/transitions.
   ========================================================= */

[hidden] {
    display: none !important;
}

.ab-page section[id] {
    scroll-margin-top: calc(var(--header-h, 72px) + 12px);
}

.ab-page h3 {
    margin-top: 0;
}

/* Gradient heading text is always Title Case */
.ab-page .grad {
    text-transform: capitalize;
}

/* ---------- Load-in rise (only the keyframes hold the hidden state, so no-animation = visible) ---------- */
.ab-rise {
    animation: ab-rise .8s cubic-bezier(.22, .61, .36, 1) both;
    animation-delay: var(--d, 0ms);
}

@keyframes ab-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Shared icon tile ---------- */
.ab-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    font-size: 1.15rem;
}

/* ---------- Image slots (real image OR dashed empty box) ---------- */
.ab-slot {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line-2);
    background:
        radial-gradient(420px 220px at 100% 0%, var(--brand-a-16), transparent 60%),
        radial-gradient(420px 220px at 0% 100%, var(--white-04), transparent 60%),
        var(--surface);
    box-shadow: var(--shadow);
}

.ab-slot-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ab-slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 200px;
    padding: 16px;
    color: var(--muted);
    font-size: .875rem;
    text-align: center;
    border: 2px dashed var(--line-2);
    border-radius: var(--r);
}

.ab-slot-empty .icon {
    font-size: 1.8rem;
    opacity: .7;
}

.ab-slot-empty small {
    opacity: .75;
    font-size: .875rem;
}

.ab-slot-vision {
    aspect-ratio: 4 / 3;
}

/* =========================================================
   1. HERO
   ========================================================= */

.ab-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.ab-pills li {
    padding: 8px 16px;
    border-radius: var(--r-pill);
    border: 1px solid var(--blue-32);
    background: var(--blue-12);
    color: var(--text);
    font-size: .875rem;
    font-weight: 600;
}

/* =========================================================
   2. WHAT WE DO
   ========================================================= */
.ab-what {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.ab-what-text {
    min-width: 0;
}

.ab-note {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.7;
    max-width: 62ch;
}

.ab-pillars {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.ab-pillar {
    padding: 22px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .6s;
}

.ab-pillar:hover {
    transform: translateY(-2px);
}

.ab-pillar-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ab-pillar .ab-ico {
    margin-bottom: 0;
}

.ab-pillar-head h3 {
    margin: 0;
}

.ab-pillar h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.ab-pillar p {
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.6;
}

/* =========================================================
   3. STATS
   ========================================================= */
.ab-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ab-stat {
    padding: 26px 16px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: var(--surface);
    text-align: center;
    transition: transform .25s ease, border-color .25s ease, opacity .6s;
}

.ab-stat:hover {
    transform: translateY(-2px);
}

.ab-stat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: var(--r-sm);
    font-size: 1.05rem;
}

.ab-stat-num {
    font-size: clamp(1.8rem, 3.6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ab-stat p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .875rem;
}

/* =========================================================
   4. PEOPLE
   ========================================================= */

/* ---------- Featured founder: one big photo + bio ---------- */
.ab-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    max-width: 920px;
    margin: clamp(26px, 4vw, 40px) auto 0;
    padding: clamp(16px, 3vw, 24px);
    border-radius: var(--r-lg);
    border: 1px solid var(--line-2);
    background-color: var(--surface);
    box-shadow: var(--shadow);
}

.ab-feature-media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line-2);
}

.ab-feature-media .ab-ph {
    object-position: center 15%;
}

.ab-feature-media .ab-ph-fallback {
    font-size: 4rem;
}

.ab-feature-media:hover .ab-ph {
    transform: scale(1.06);
}

.ab-feature-tx {
    min-width: 0;
}

.ab-role {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: var(--grad);
    color: var(--on-brand);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ab-feature-tx h3 {
    margin: 12px 0 12px;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.ab-feature-tx p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.7;
}

.ab-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.ab-feature-tags li {
    padding: 6px 14px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-2);
    background: var(--chip);
    color: var(--text-80);
    font-size: .875rem;
    font-weight: 600;
}

/* shared by featured founder and team */
.ab-ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transform: scale(1.02);
    transition: transform .8s cubic-bezier(.22, .61, .36, 1), filter .4s ease;
}

.ab-ph-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--on-brand);
    background: var(--grad);
}

.ab-member {
    --rx: 0deg;
    --ry: 0deg;
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line-2);
    background: var(--surface);
    transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .25s ease, border-color .3s ease, box-shadow .3s ease, opacity .6s;
    will-change: transform;
}

/* gradient glow border on hover */
.ab-member::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    padding: 2px;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.ab-member:hover::before {
    opacity: 1;
}

.ab-member:hover .ab-ph {
    transform: scale(1.12);
    filter: saturate(1.15);
}

.ab-member .ab-ph-fallback {
    font-size: 2.6rem;
}

/* =========================================================
   5. VISION
   ========================================================= */
.ab-vision {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.ab-vision-text {
    min-width: 0;
}

.ab-quote {
    margin: 22px 0 0;
    padding: 18px 20px;
    border-radius: var(--r-sm);
    border: 1px solid var(--brand-b-32);
    border-left-width: 4px;
    background: var(--brand-b-12);
    color: var(--brand-b);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.55;
}

/* =========================================================
   6. WHY + CAREERS
   ========================================================= */
.ab-why {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: clamp(26px, 4vw, 40px);
}

/* =========================================================
   7. LIFE AT ALGODELTA (mosaic + settle-in zoom + lightbox)
   ========================================================= */
.ab-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(140px, 34vw, 190px);
    grid-auto-flow: dense;
    gap: 12px;
    margin-top: clamp(26px, 4vw, 40px);
}

.ab-shot {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--line-2);
    background: var(--surface);
}

.ab-shot.big {
    grid-column: span 2;
    grid-row: span 2;
}

.ab-shot.tall {
    grid-row: span 2;
}

.ab-shot.wide {
    grid-column: span 2;
}

.ab-shot-btn {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    overflow: hidden;
}

.ab-shot-btn:focus-visible {
    outline: 2px solid var(--brand-b);
    outline-offset: -3px;
}

.ab-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 1.3s cubic-bezier(.22, .61, .36, 1), filter .4s ease;
}

/* photos start zoomed-in and settle when they scroll into view */
.js .ab-shot.reveal:not(.in) img {
    transform: scale(1.22);
}

.js .ab-shot.reveal:not(.in) {
    clip-path: inset(8% 8% 8% 8% round 18px);
}

.ab-shot.reveal {
    transition: opacity .6s, transform .6s, clip-path .9s cubic-bezier(.22, .61, .36, 1);
    clip-path: inset(0 0 0 0 round 18px);
}

.ab-shot:hover img {
    transform: scale(1.08);
    filter: saturate(1.1);
}

/* soft light sweep on hover */
.ab-shot-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(115deg, transparent 35%, var(--overlay-fill-hover) 50%, transparent 65%);
    transform: translateX(-120%);
    pointer-events: none;
}

.ab-shot:hover .ab-shot-btn::before {
    transform: translateX(120%);
    transition: transform .9s ease;
}

.ab-shot figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: var(--r-xs);
    background: var(--overlay-scrim);
    color: var(--overlay-text);
    font-size: .875rem;
    font-weight: 650;
    transform: translateY(0);
    transition: transform .3s ease;
}

.ab-shot:hover figcaption {
    transform: translateY(-4px);
}

.ab-shot-empty {
    border: 0;
    background: none;
}

.ab-shot-empty .ab-slot-empty {
    min-height: 0;
}

/* Lightbox */
.ab-lb {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--overlay-text);
}

.ab-lb[open] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 16px;
}

.ab-lb::backdrop {
    background: var(--overlay-scrim);
    backdrop-filter: blur(6px);
}

.ab-lb-fig {
    margin: 0;
    text-align: center;
    animation: ab-fade .3s ease both;
}

.ab-lb-fig img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--r-sm);
}

.ab-lb-fig figcaption {
    margin-top: 12px;
    color: var(--overlay-text-dim);
    font-size: .875rem;
}

@keyframes ab-fade {
    from {
        opacity: 0;
        transform: scale(.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ab-lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--overlay-line);
    border-radius: 50%;
    background: var(--overlay-fill);
    color: var(--overlay-text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s ease;
}

.ab-lb-btn:hover {
    background: var(--overlay-fill-hover);
}

.ab-lb-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2;
}

/* =========================================================
   8. CTA
   ========================================================= */
.ab-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    background: radial-gradient(700px 380px at 0% 0%, var(--brand-a-16), transparent 60%), radial-gradient(700px 380px at 100% 100%, var(--brand-b-16), transparent 60%), var(--surface);
}

.ab-cta h2 {
    margin-bottom: .35em;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.ab-cta .lead {
    margin-bottom: 0;
}

.ab-cta .btn-row {
    margin-top: 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 640px) {
    .ab-pillars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ab-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ab-why {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    .ab-what {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        gap: 56px;
    }

    .ab-vision {
        grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
        gap: 56px;
    }

    .ab-feature {
        grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
        gap: 40px;
    }

    .ab-cta {
        grid-template-columns: minmax(0, 1.2fr) auto;
        gap: 40px;
    }

    .ab-gallery {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: clamp(150px, 15vw, 210px);
        gap: 14px;
    }
}

@media (max-width: 899px) {

    /* floating chips only on wide layouts */
}

@media (max-width: 479px) {
    .ab-lb[open] {
        grid-template-columns: minmax(0, 1fr);
        padding: 60px 12px 12px;
    }

    .ab-lb-prev,
    .ab-lb-next {
        position: fixed;
        bottom: 16px;
        z-index: 2;
    }

    .ab-lb-prev {
        left: 16px;
    }

    .ab-lb-next {
        right: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ab-shot.reveal {
        clip-path: none !important;
    }

    .js .ab-shot.reveal:not(.in) img {
        transform: none;
    }

    .ab-member {
        transform: none;
    }
}

/* LinkedIn brand colourway for the profile button */
.btn-primary.btn-linkedin {
    background: linear-gradient(135deg, #0A66C2 0%, #0E76A8 100%);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}