/* ==========================================================================
   About page. Same materials as the landing page: the stage hero, real
   printed sheets, tile tones (.lib-tone--* in base.css) and pill buttons.
   ========================================================================== */

.about-page {
    color: var(--text-primary);
}

.about-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.about-heading {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.about-aside {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-secondary);
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.about-actions--center {
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Hero: the story on the left, a desk of printed sheets on the right
   -------------------------------------------------------------------------- */
.about-hero {
    padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3.5rem, 7vw, 5.5rem);
    overflow: hidden;
}

.about-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.about-hero-title {
    max-width: 11ch;
    margin: 0 0 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(3rem, 1.6rem + 5vw, 5.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.about-hero-lede {
    max-width: 46ch;
    margin: 0 0 2rem;
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-desk {
    position: relative;
    aspect-ratio: 1 / 0.9;
}

.about-desk__sheet,
.about-desk__mandala {
    position: absolute;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(14, 27, 44, 0.1), 0 24px 48px -18px rgba(14, 27, 44, 0.45);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-desk__sheet {
    width: 46%;
    height: auto;
}

.about-desk__sheet--1 { left: 2%; top: 8%; transform: rotate(-9deg); }
.about-desk__sheet--2 { left: 30%; top: 0; transform: rotate(3deg); z-index: 1; }

.about-desk__mandala {
    right: 0;
    bottom: 2%;
    z-index: 2;
    width: 50%;
    padding: 4%;
    transform: rotate(7deg);
}

.about-desk__mandala img {
    display: block;
    width: 100%;
    height: auto;
}

/* Two crayons lying on the desk */
.about-desk__crayon {
    position: absolute;
    z-index: 3;
    width: 34%;
    height: 7%;
    border-radius: 999px 8px 8px 999px;
    box-shadow: 0 10px 18px -10px rgba(14, 27, 44, 0.6);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-desk__crayon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -12%;
    width: 16%;
    height: 70%;
    background: inherit;
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
    transform: translateY(-50%);
    filter: brightness(0.85);
}

.about-desk__crayon--coral { left: 8%; bottom: 10%; background: #ff6b4a; transform: rotate(-18deg); }
.about-desk__crayon--sky { left: 26%; bottom: 2%; background: #4ea8e6; transform: rotate(-4deg); }

.about-hero:hover .about-desk__sheet--1 { transform: rotate(-13deg) translate(-4%, -2%); }
.about-hero:hover .about-desk__sheet--2 { transform: rotate(1deg) translateY(-4%); }
.about-hero:hover .about-desk__mandala { transform: rotate(3deg) translateY(-3%); }
.about-hero:hover .about-desk__crayon--coral { transform: rotate(-24deg) translateX(-6%); }

/* --------------------------------------------------------------------------
   How it started: the typical site next to ours, then the question
   -------------------------------------------------------------------------- */
.about-story {
    padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.about-story__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.about-story__text p {
    max-width: 52ch;
    margin: 0 0 1.1rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-versus {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0;
}

.about-browser {
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    box-shadow: 0 20px 40px -26px rgba(14, 27, 44, 0.5);
}

.about-browser--bad { transform: rotate(-2deg); }
.about-browser--good { transform: rotate(1.5deg) translateY(10px); }

.about-browser__bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.55rem 0.7rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.about-browser__bar i {
    width: 8px;
    height: 8px;
    background: var(--border-strong);
    border-radius: 50%;
}

.about-browser__bar span {
    flex: 1;
    min-width: 0;
    margin-left: 0.4rem;
    padding: 0.15rem 0.5rem;
    overflow: hidden;
    font-size: 0.6875rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 999px;
}

.about-browser__body {
    position: relative;
    aspect-ratio: 3 / 3.6;
    overflow: hidden;
}

.about-browser--bad .about-browser__body {
    background:
        repeating-linear-gradient(45deg, color-mix(in srgb, var(--text-muted) 10%, transparent) 0 8px, transparent 8px 16px),
        var(--bg-secondary);
}

.about-ad,
.about-fake,
.about-popup {
    position: absolute;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.about-ad {
    color: var(--text-muted);
    background: color-mix(in srgb, var(--text-muted) 18%, var(--bg-card));
    border: 1px dashed var(--border-strong);
}

.about-ad--banner { top: 4%; left: 5%; right: 5%; height: 16%; }
.about-ad--side { right: 5%; top: 24%; width: 24%; height: 44%; }

.about-fake {
    padding: 0.45rem 0.6rem;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.4);
}

.about-fake--1 { left: 6%; top: 26%; background: #16a34a; }
.about-fake--2 { left: 12%; top: 44%; background: #dc2626; transform: rotate(-4deg); }
.about-fake--3 { left: 5%; top: 62%; background: #f59e0b; color: #1f1300; }

.about-popup {
    left: 14%;
    right: 10%;
    bottom: 6%;
    gap: 0.2rem;
    padding: 0.75rem 1.5rem 0.75rem 0.75rem;
    text-align: left;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.5);
}

.about-popup__x {
    position: absolute;
    top: 0.3rem;
    right: 0.5rem;
    font-size: 1rem;
    color: var(--text-muted);
}

.about-browser--good .about-browser__body {
    display: grid;
    place-items: center;
    padding: 8% 12% 22%;
    background: var(--jg-stage-surface);
}

.about-browser--good img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 12px 24px -14px rgba(14, 27, 44, 0.5);
}

.about-real {
    position: absolute;
    bottom: 6%;
    left: 50%;
    padding: 0.5rem 1.1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--jg-cta-ink);
    background: var(--jg-sun-cta);
    border-radius: 999px;
    transform: translateX(-50%);
}

.about-quote {
    margin-top: clamp(3rem, 6vw, 4.5rem);
    padding-top: 0;
    padding-bottom: 0;
    border: 0;
    background: none;
    text-align: center;
}

.about-quote p {
    max-width: 24ch;
    font-style: normal;
    margin: 0 auto 1rem;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text-primary);
}

.about-quote footer {
    font-style: normal;
    font-size: 1.0625rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.about-section {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.about-section--tint {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.about-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-bottom: 2rem;
}

.about-section__head .about-heading {
    margin: 0;
}

/* What you can expect: a bento of tiles in the landing page's tones */
.promise-bento {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.promise {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 1.75rem;
    overflow: hidden;
    background: var(--tone);
    border-radius: 28px;
}

.promise--wide {
    grid-column: span 2;
}

.promise--print {
    grid-column: 1 / -1;
    min-height: 0;
}

.promise--wide:first-child h3,
.promise--wide:first-child p {
    max-width: 58%;
}

.promise__icon {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: auto;
    font-size: 1.35rem;
    color: var(--tone-ink);
    background: color-mix(in srgb, var(--bg-card) 70%, transparent);
    border-radius: 16px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.promise:hover .promise__icon {
    transform: rotate(-8deg) scale(1.08);
}

.promise h3 {
    margin: 1.5rem 0 0.4rem;
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 1rem + 0.8vw, 1.65rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.promise--wide h3 {
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
}

.promise p {
    max-width: 44ch;
    margin: 0;
    line-height: 1.55;
    color: var(--text-secondary);
}

.promise a {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-color: var(--tone-ink);
    text-underline-offset: 3px;
}

/* The ads tile shows what's missing: a crossed-out ad */
.promise--wide:first-child::after {
    content: "Ad";
    position: absolute;
    right: 8%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 30%;
    max-width: 220px;
    aspect-ratio: 4 / 3;
    font-weight: 800;
    font-size: 1.5rem;
    color: color-mix(in srgb, var(--tone-ink) 55%, transparent);
    background:
        linear-gradient(to top right, transparent calc(50% - 2px), var(--tone-ink) calc(50% - 2px), var(--tone-ink) calc(50% + 2px), transparent calc(50% + 2px)),
        color-mix(in srgb, var(--bg-card) 55%, transparent);
    border: 2px dashed color-mix(in srgb, var(--tone-ink) 40%, transparent);
    border-radius: 14px;
    transform: translateY(-50%) rotate(-4deg);
}

/* What's on the site: one tile per group, a sample sheet peeking out */
.catalogue {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.catalogue-card {
    position: relative;
    min-height: 260px;
    padding: 1.6rem 1.6rem 1.4rem;
    overflow: hidden;
    background: var(--tone);
    border-radius: 24px;
    isolation: isolate;
}

.catalogue-card__text {
    max-width: 66%;
}

.catalogue-card:not(:has(.catalogue-card__sheet)) .catalogue-card__text {
    max-width: none;
}

.catalogue-card h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.9rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.catalogue-card h3 i {
    font-size: 1rem;
    color: var(--tone-ink);
}

.catalogue-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalogue-card a {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    background: color-mix(in srgb, var(--bg-card) 75%, transparent);
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.catalogue-card a:hover {
    color: #fff;
    text-decoration: none;
    background: var(--tone-ink);
}

[data-theme="dark"] .catalogue-card a:hover {
    color: var(--bg-primary);
}

.catalogue-card__sheet {
    position: absolute;
    z-index: -1;
    right: -4%;
    bottom: -14%;
    width: 34%;
    height: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 18px 36px -16px rgba(14, 27, 44, 0.45);
    transform: rotate(9deg);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.catalogue-card:hover .catalogue-card__sheet {
    transform: rotate(5deg) translateY(-8%);
}

/* Compare: them, greyed and crossed; us, on the stage */
.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}

.compare__col {
    padding: 1.75rem 1.75rem 1.25rem;
    border-radius: 24px;
}

.compare__col h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.compare__col dl {
    margin: 0;
}

.compare__col dl > div {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border-light);
}

.compare__col dt {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.compare__col dd {
    position: relative;
    margin: 0;
    padding-left: 1.6rem;
    font-weight: 500;
}

.compare__col dd::before {
    position: absolute;
    left: 0;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.compare__col--them {
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px dashed var(--border-strong);
}

.compare__col--them h3 {
    color: var(--text-secondary);
}

.compare__col--them dd::before {
    content: "\f00d";
    color: #dc2626;
}

.compare__col--us {
    color: var(--text-primary);
    background: var(--jg-stage-surface);
    border: 1px solid color-mix(in srgb, var(--jg-accent) 25%, transparent);
    box-shadow: 0 24px 44px -28px rgba(14, 27, 44, 0.5);
}

.compare__col--us dd::before {
    content: "\f00c";
    color: var(--brand-secondary-strong, #0f8f7c);
}

/* --------------------------------------------------------------------------
   Why "Jolly Grid": the two words, set big. Jolly in the logo's colours,
   Grid on graph paper.
   -------------------------------------------------------------------------- */
.about-name {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    border-top: 1px solid var(--border-light);
}

.name-words {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1rem 0 0;
}

.name-word {
    padding: 1.75rem 2rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 28px;
}

.name-word dt {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 2rem + 5vw, 6.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
}

.name-word--jolly dt span:nth-child(1) { color: #ff6b4a; }
.name-word--jolly dt span:nth-child(2) { color: #ffb020; }
.name-word--jolly dt span:nth-child(3) { color: #3dd6b5; }
.name-word--jolly dt span:nth-child(4) { color: #4ea8e6; }
.name-word--jolly dt span:nth-child(5) { color: #8b5cf6; }

.name-word--jolly dt span {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.name-word--jolly:hover dt span:nth-child(odd) { transform: translateY(-8px) rotate(-6deg); }
.name-word--jolly:hover dt span:nth-child(even) { transform: translateY(4px) rotate(5deg); }

.name-word--grid {
    background:
        linear-gradient(var(--jg-stage-grid) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--jg-stage-grid) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--bg-card);
}

.name-word--grid dt {
    color: var(--jg-accent);
}

.name-word dd {
    max-width: 40ch;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Closing band */
.about-cta {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    text-align: center;
}

.about-cta.jg-stage {
    background: var(--jg-stage-surface);
    border-top: 1px solid color-mix(in srgb, var(--jg-accent) 14%, transparent);
}

.about-cta p {
    margin: 0 auto 1.75rem;
    font-size: 1.0625rem;
    color: var(--text-secondary);
}

.about-page a:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Smaller screens
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .about-hero-grid,
    .about-story__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-desk {
        max-width: 480px;
        width: 100%;
        margin: 0 auto;
    }

    .promise-bento,
    .catalogue {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compare,
    .name-words {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .promise-bento,
    .catalogue {
        grid-template-columns: minmax(0, 1fr);
    }

    .promise--wide {
        grid-column: auto;
    }

    .promise {
        min-height: 0;
    }

    .promise--wide:first-child::after {
        display: none;
    }

    .promise--wide:first-child h3,
    .promise--wide:first-child p {
        max-width: none;
    }

    .about-versus {
        gap: 0.6rem;
    }

    .about-fake,
    .about-ad,
    .about-popup {
        font-size: 0.625rem;
    }

    .compare__col dl > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-desk__sheet,
    .about-desk__mandala,
    .about-desk__crayon,
    .promise__icon,
    .catalogue-card__sheet,
    .name-word--jolly dt span {
        transition: none;
    }
}
