/* static/css/about.css - the About page below its hero (hero.css). */

/* ---------- Scroll reveal (about.js adds .is-in) ---------- */
/* Uses `translate`, not `transform`, so it composes with the card tilt. */
.js-reveal .reveal {
    opacity: 0;
    translate: 0 28px;
    transition:
        opacity 0.8s ease calc(var(--d, 0) * 90ms),
        translate 0.9s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--d, 0) * 90ms),
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}
.js-reveal .reveal.is-in { opacity: 1; translate: none; }

/* ---------- Who we are ---------- */
.about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 2rem 5rem;
    align-items: start;
}
.about-intro h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    letter-spacing: -0.015em;
    line-height: 1.12;
    color: var(--primary-navy);
    margin: 0;
    text-wrap: balance;
}
.about-intro-text p {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 1.1rem;
}
.about-intro-text p:first-child::first-letter {
    float: left;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 3.4rem;
    line-height: 0.9;
    margin: 0.35rem 0.6rem 0 0;
    color: var(--leaf-dark);
}

/* ---------- The chain ---------- */
.about-chain { position: relative; padding-top: 72px; }
.about-chain-thread {
    position: absolute;
    left: 0;
    right: 0;
    top: 6px;
    width: 100%;
    height: 60px;
    overflow: visible;
}
.about-chain-thread path { fill: none; stroke-linecap: round; }
.about-chain-thread-bg { stroke: rgba(16, 41, 74, 0.12); stroke-width: 2; stroke-dasharray: 2 8; vector-effect: non-scaling-stroke; }
.about-chain-thread-fg {
    stroke: var(--accent-yellow);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: var(--draw, 0);
}
.js-reveal .about-chain-thread-fg { stroke-dashoffset: calc(1 - var(--draw, 0)); }

.about-chain-steps {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}
.about-step { position: relative; }
/* A knot on the thread above each stage; it lights up as the thread arrives. */
.about-step::before {
    content: '';
    position: absolute;
    top: -44px;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-radius: 50%;
    background: var(--warm-gray);
    border: 3px solid rgba(16, 41, 74, 0.25);
    transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.about-step.is-reached::before,
html:not(.js-reveal) .about-step::before {
    background: var(--accent-yellow);
    border-color: var(--primary-navy);
    transform: scale(1.25);
}
.about-step-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(16, 41, 74, 0.08);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    will-change: transform;
}
.about-step-card:hover { box-shadow: 0 24px 48px rgba(16, 41, 74, 0.16); }
.about-step-card:focus-visible { outline: 3px solid var(--accent-yellow); outline-offset: 3px; }
.about-step-media {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--light-gray);
}
.about-step-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.about-step-card:hover .about-step-media img { transform: scale(1.07); }
.about-step-num {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--primary-navy);
    color: var(--accent-yellow);
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 0.8rem;
}
.about-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.1rem 1.15rem 1.25rem;
    flex: 1;
}
.about-step-body strong {
    font-family: var(--font-secondary);
    font-size: 1.15rem;
    color: var(--primary-navy);
}
.about-step-body > span {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    flex: 1;
}
.about-step-body em {
    font-style: normal;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--leaf-dark);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.about-step-body em i { font-size: 0.8em; transition: transform 0.2s ease; }
.about-step-card:hover em i { transform: translateX(3px); }

.about-chain-also {
    margin: 2rem 0 0;
    color: var(--text-muted);
}
.about-chain-also a { color: var(--brand-blue); font-weight: 600; }

/* ---------- How we work ---------- */
.about-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.about-value {
    position: relative;
    padding: 2rem 1.6rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(16, 41, 74, 0.1);
    overflow: hidden;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
/* A woven corner that slides in on hover. */
.about-value::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background:
        repeating-linear-gradient(45deg, rgba(62, 140, 57, 0.18) 0 3px, transparent 3px 9px),
        repeating-linear-gradient(-45deg, rgba(226, 174, 72, 0.22) 0 3px, transparent 3px 9px);
    transform: scale(0.6);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}
.about-value:hover { box-shadow: 0 20px 44px rgba(16, 41, 74, 0.12); border-color: rgba(16, 41, 74, 0.2); }
.about-value:hover::after { transform: scale(1); opacity: 1; }
.about-value > i {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-navy);
    color: var(--accent-yellow);
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}
.about-value h3 {
    font-size: 1.1rem;
    color: var(--primary-navy);
    margin: 0 0 0.5rem;
}
.about-value p {
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* ---------- Where we are ---------- */
.about-where {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem 5rem;
}
.about-places { display: grid; gap: 1rem; }
.about-place {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.about-place > i { color: var(--accent-yellow); font-size: 1.2rem; margin-top: 0.2rem; }
.about-place strong { display: block; color: #fff; margin-bottom: 0.2rem; }
.about-place span { color: #b9c5d3; font-size: 0.95rem; line-height: 1.55; }
.about-registry { margin: 0; }
.about-registry div {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.about-registry dt { color: #b9c5d3; font-size: 0.92rem; }
.about-registry dd {
    margin: 0;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .about-chain-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .about-chain { padding-top: 0; }
    .about-chain-thread, .about-step::before { display: none; }
    .about-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .about-intro,
    .about-where { grid-template-columns: 1fr; }
    .about-chain-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .about-chain-steps { grid-template-columns: 1fr; }
    .about-step-card { flex-direction: row; }
    .about-step-media { width: 38%; flex: none; aspect-ratio: auto; }
    .about-values { grid-template-columns: 1fr; }
    .about-registry div { flex-direction: column; gap: 0.2rem; }
    .about-registry dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal .reveal { opacity: 1; translate: none; transition: none; }
    .about-step-card, .about-value, .about-step-media img { transition: none; transform: none; }
}
