/* ═══════════════════════════════════════════════════════════════════
   site/notes.css — the Field Journal page (/notes).
   Looks like the notes themselves: cream dot-grid paper, navy ink,
   teal definitions, saffron highlights, coral traps, a handwritten hand
   for annotations. Scoped under body.fj so nothing leaks into the rest
   of the site. Phone first; the laptop layout is added at 900px.
   ═══════════════════════════════════════════════════════════════════ */

.fj {
    --fj-paper: #F7F1E3;
    --fj-paper2: #FBF7EE;
    --fj-ink: #1F2A44;
    --fj-ink2: #4A5570;
    --fj-teal: #1E8C7E;
    --fj-teal-d: #156B60;
    --fj-saffron: #E8A33D;
    --fj-coral: #E4572E;
    --fj-line: #E6DCC5;
    --fj-bio: #3F8F4A;
    --fj-chem: #D9822B;
    --fj-phy: #2F6FB3;
    --fj-hand: 'Caveat', 'Comic Sans MS', cursive;
    background: var(--fj-paper);
    color: var(--fj-ink);
}

/* The dot grid of the notebook, on the whole page. */
.fj main {
    background-color: var(--fj-paper);
    background-image: radial-gradient(rgba(31, 42, 68, .13) 1px, transparent 1.2px);
    background-size: 22px 22px;
}

.fj-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px;
}

.fj-narrow {
    max-width: 760px;
}

/* ── type ─────────────────────────────────────────────────────────── */
.fj-tag,
.fj-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 700 12px/1 'JetBrains Mono', monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fj-teal-d);
}

.fj-tag {
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--fj-line);
}

.fj-h1 {
    font: 800 clamp(34px, 8.6vw, 62px)/1.06 'Sora', sans-serif;
    letter-spacing: -.02em;
    margin: 18px 0 14px;
}

.fj-drawn {
    position: relative;
    display: inline-block;
    font-family: var(--fj-hand);
    font-weight: 700;
    font-size: 1.28em;
    line-height: .9;
    color: var(--fj-teal);
}

.fj-scribble {
    position: absolute;
    left: -2%;
    bottom: -10px;
    width: 104%;
    height: 18px;
    overflow: visible;
}

.fj-scribble path {
    fill: none;
    stroke: var(--fj-saffron);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: fj-draw 1.1s .5s cubic-bezier(.6, .1, .3, 1) forwards;
}

@keyframes fj-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.fj-lead {
    font: 400 17px/1.6 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    max-width: 540px;
    margin: 0;
}

.fj-h2 {
    font: 800 clamp(26px, 6.4vw, 42px)/1.12 'Sora', sans-serif;
    letter-spacing: -.015em;
    margin: 10px 0 0;
}

.fj-hl {
    color: var(--fj-teal);
}

.fj-sub {
    font: 400 16px/1.6 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    margin: 10px 0 0;
}

.fj-head {
    margin-bottom: 26px;
}

.fj-sec {
    padding: 64px 0;
}

/* ── hero ─────────────────────────────────────────────────────────── */
.fj-hero {
    position: relative;
    overflow: hidden;
    /* The site's nav bar is position:fixed, so the hero clears it. */
    padding: calc(var(--site-nav, 64px) + 22px) 0 28px;
    border-bottom: 1px dashed var(--fj-line);
}

/* The teal double margin rule of every Field Journal page. */
.fj-hero::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 18px;
    width: 6px;
    border-left: 2px solid rgba(30, 140, 126, .35);
    border-right: 2px solid rgba(30, 140, 126, .35);
    pointer-events: none;
}

.fj-hero-in {
    display: grid;
    gap: 8px;
    position: relative;
}

.fj-hero-txt {
    position: relative;
    z-index: 4;
    padding-left: 18px;
}

.fj-stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    gap: 6px 22px;
    padding: 0;
    margin: 22px 0 22px;
}

.fj-stats li {
    display: flex;
    flex-direction: column;
}

.fj-stats b {
    font: 800 26px/1 'Sora', sans-serif;
    color: var(--fj-ink);
}

.fj-stats span {
    font: 500 12px/1.3 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    margin-top: 4px;
}

.fj-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fj-btn-big {
    padding: 14px 22px !important;
    font-size: 16px !important;
}

.fj-hero-cta .nd-pr-fig,
.fj-end-in .nd-pr-fig {
    display: inline;
    font: inherit;
    margin: 0;
}

.fj-hero-note {
    font: 500 13px/1.5 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    margin: 12px 0 0;
}

/* The fan of real pages. Placement is `transform`; the gentle bob is
   the separate `translate` property, so the two never fight and the
   placement can change per breakpoint without new keyframes. */
.fj-fan {
    position: relative;
    height: 330px;
    margin-top: 22px;
}

.fj-pg {
    position: absolute;
    top: 24px;
    left: 50%;
    width: 172px;
    height: auto;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(31, 42, 68, .08), 0 18px 40px -12px rgba(31, 42, 68, .35);
    transform-origin: 50% 90%;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
    animation: fj-bob 7s ease-in-out infinite;
}

.fj-pg.p1 {
    transform: translateX(-98%) rotate(-10deg);
    animation-delay: -2s;
}

.fj-pg.p2 {
    transform: translateX(-2%) rotate(9deg);
    animation-delay: -4.5s;
}

.fj-pg.p3 {
    transform: translateX(-50%) rotate(-1.5deg);
    z-index: 2;
}

@keyframes fj-bob {
    50% {
        translate: 0 -10px;
    }
}

.fj-note {
    position: absolute;
    z-index: 3;
    font: 700 20px/1.05 var(--fj-hand);
    pointer-events: none;
}

.fj-note.n1 {
    bottom: 0;
    left: 0;
    color: var(--fj-teal-d);
    transform: rotate(-5deg);
}

.fj-note {
    display: none;
}

.fj-note.n2 {
    bottom: 6px;
    right: 2%;
    color: var(--fj-coral);
    transform: rotate(4deg);
    text-align: right;
}

/* ── buy cards ───────────────────────────────────────────────────── */
.fj-buy {
    display: grid;
    gap: 16px;
}

.fj-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--fj-paper2);
    border: 1px solid var(--fj-line);
    border-radius: 12px;
    padding: 26px 20px 20px;
    box-shadow: 0 1px 2px rgba(31, 42, 68, .06), 0 14px 30px -18px rgba(31, 42, 68, .35);
}

.fj-card:nth-child(even) {
    transform: rotate(.5deg);
}

.fj-card:nth-child(odd) {
    transform: rotate(-.4deg);
}

/* A strip of washi tape holding the card to the page. */
.fj-tape {
    position: absolute;
    top: -11px;
    left: 50%;
    width: 86px;
    height: 22px;
    transform: translateX(-50%) rotate(-3deg);
    background: rgba(232, 163, 61, .55);
    border-left: 2px dashed rgba(255, 255, 255, .5);
    border-right: 2px dashed rgba(255, 255, 255, .5);
}

.fj-bio .fj-tape {
    background: rgba(63, 143, 74, .38);
}

.fj-chem .fj-tape {
    background: rgba(217, 130, 43, .42);
}

.fj-phy .fj-tape {
    background: rgba(47, 111, 179, .35);
}

.fj-card-name {
    font: 800 18px/1.25 'Sora', sans-serif;
    margin: 0;
}

.fj-bio .fj-card-name i {
    color: var(--fj-bio);
}

.fj-chem .fj-card-name i {
    color: var(--fj-chem);
}

.fj-phy .fj-card-name i {
    color: var(--fj-phy);
}

.fj-card-sub {
    font: 500 14px/1.4 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    margin: 4px 0 0;
}

.fj-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 16px 0 6px;
}

.fj .fj-price .nd-pr-fig {
    font: 800 40px/1 'Sora', sans-serif;
    margin: 0;
    color: var(--fj-ink);
}

.fj .fj-price .nd-pr-term {
    font: 500 12px/1 'JetBrains Mono', monospace;
    color: var(--fj-ink2);
    margin: 0;
}

.fj-sep {
    margin: 0 0 4px;
    font: 600 14px/1.4 'DM Sans', sans-serif;
    color: var(--fj-teal-d);
}

.fj-sep .nd-pr-sep {
    opacity: 1;
}

/* The promo nudge on the ₹199 card. The server decides what a code is
   worth; this only says where to enter one. */
.fj-promo {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 0;
    padding: 9px 12px;
    border: 1.5px dashed var(--fj-coral);
    border-radius: 8px;
    background: rgba(228, 87, 46, .06);
    font: 600 13.5px/1.4 'DM Sans', sans-serif;
    color: #B5401E;
}

.fj-promo i {
    margin-top: 2px;
}

.fj-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px;
}

.fj-list li {
    position: relative;
    padding-left: 22px;
    margin: 7px 0;
    font: 400 14.5px/1.45 'DM Sans', sans-serif;
}

.fj-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--fj-teal);
    font-weight: 700;
}

/* A peek at a real page of that subject, top of the page only. */
.fj-peek {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
    border: 1px solid var(--fj-line);
    margin: 10px 0 16px;
    background: #fff;
}

.fj-card .nd-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

.fj-card-all {
    border: 2px solid var(--fj-saffron);
    background: #FFFDF7;
}

.fj-ribbon {
    position: absolute;
    top: 14px;
    right: -6px;
    padding: 5px 12px;
    font: 700 11px/1 'JetBrains Mono', monospace;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--fj-coral);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 4px 10px -4px rgba(228, 87, 46, .6);
}

.fj-card-all .fj-price .nd-pr-fig {
    font-size: 48px;
}

.fj-fine {
    font: 400 14px/1.6 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    text-align: center;
    margin: 22px auto 0;
    max-width: 640px;
}

/* ── look inside ─────────────────────────────────────────────────── */
.fj-inside {
    background: linear-gradient(180deg, transparent, rgba(30, 140, 126, .06) 30%, rgba(30, 140, 126, .06) 70%, transparent);
}

.fj-strip-wrap {
    position: relative;
}

.fj-strip {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 16px 26px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.fj-shot {
    flex: 0 0 72vw;
    max-width: 300px;
    margin: 0;
    scroll-snap-align: center;
    cursor: zoom-in;
}

.fj-shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(31, 42, 68, .08), 0 16px 32px -14px rgba(31, 42, 68, .4);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.fj-shot:hover img {
    transform: translateY(-6px) rotate(-1deg);
}

.fj-shot figcaption {
    margin-top: 12px;
    font: 600 14px/1.35 'DM Sans', sans-serif;
}

.fj-shot figcaption span {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font: 700 11px/1.5 'JetBrains Mono', monospace;
    color: #fff;
}

.fj-shot figcaption .b {
    background: var(--fj-bio);
}

.fj-shot figcaption .c {
    background: var(--fj-chem);
}

.fj-shot figcaption .p {
    background: var(--fj-phy);
}

.fj-shot figcaption em {
    font-style: normal;
    margin-left: 4px;
    font: 700 16px/1 var(--fj-hand);
    color: var(--fj-coral);
}

.fj-arrow {
    display: none;
}

/* ── anatomy of a chapter ────────────────────────────────────────── */
.fj-anat {
    list-style: none;
    counter-reset: fj;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px 16px;
    padding: 0;
    margin: 0;
}

.fj-anat li {
    counter-increment: fj;
    position: relative;
    display: flex;
    flex-direction: column;
}

.fj-anat img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 10px 22px -12px rgba(31, 42, 68, .45);
    margin-bottom: 10px;
}

.fj-anat li::before {
    content: counter(fj);
    position: absolute;
    top: -10px;
    left: -8px;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--fj-teal);
    color: #fff;
    font: 800 14px/1 'Sora', sans-serif;
    box-shadow: 0 0 0 3px var(--fj-paper);
}

.fj-anat b {
    font: 800 15px/1.3 'Sora', sans-serif;
}

.fj-anat span {
    font: 400 13.5px/1.4 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    margin-top: 2px;
}

/* ── table of contents ───────────────────────────────────────────── */
.fj-toc {
    display: grid;
    gap: 16px;
}

.fj-sub-toc {
    background: var(--fj-paper2);
    border: 1px solid var(--fj-line);
    border-radius: 12px;
    padding: 4px 18px 10px;
    border-top: 5px solid var(--fj-teal);
}

.fj-sub-toc.fj-bio {
    border-top-color: var(--fj-bio);
}

.fj-sub-toc.fj-chem {
    border-top-color: var(--fj-chem);
}

.fj-sub-toc.fj-phy {
    border-top-color: var(--fj-phy);
}

.fj-sub-toc summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 0 10px;
    font: 800 18px/1.3 'Sora', sans-serif;
}

.fj-sub-toc summary::-webkit-details-marker {
    display: none;
}

.fj-sub-toc summary small {
    display: block;
    font: 500 13px/1.4 'DM Sans', sans-serif;
    color: var(--fj-ink2);
    margin-top: 2px;
}

.fj-sub-toc ol {
    margin: 0 0 8px;
    padding-left: 22px;
}

.fj-sub-toc li {
    font: 400 14.5px/1.5 'DM Sans', sans-serif;
    padding: 4px 0;
    border-bottom: 1px dashed var(--fj-line);
}

.fj-sub-toc li:last-child {
    border-bottom: 0;
}

.fj-sub-toc li em,
.fj-faq em {
    font-style: normal;
    margin-left: 6px;
    font: 700 17px/1 var(--fj-hand);
    color: var(--fj-coral);
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.fj-faq details {
    background: var(--fj-paper2);
    border: 1px solid var(--fj-line);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 0 18px;
}

.fj-faq summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding: 16px 28px 16px 0;
    font: 700 16px/1.4 'Sora', sans-serif;
}

.fj-faq summary::-webkit-details-marker {
    display: none;
}

.fj-faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 12px;
    font: 700 22px/1 'Sora', sans-serif;
    color: var(--fj-teal);
}

.fj-faq details[open] summary::after {
    content: "\2013";
}

.fj-faq p {
    margin: 0 0 16px;
    font: 400 15px/1.6 'DM Sans', sans-serif;
    color: var(--fj-ink2);
}

.fj-faq a {
    color: var(--fj-teal-d);
    font-weight: 600;
}

/* ── last call ───────────────────────────────────────────────────── */
.fj-end {
    padding: 56px 16px 72px;
}

.fj-end-in {
    text-align: center;
    background: var(--fj-ink);
    color: #fff;
    border-radius: 20px;
    padding: 40px 20px;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px);
    background-size: 22px 22px;
}

.fj-end-in .fj-h2 {
    color: #fff;
}

.fj-end-in .fj-sub {
    color: rgba(255, 255, 255, .8);
}

.fj-end-in .nd-pr-fig {
    color: var(--fj-saffron);
    font-weight: 800;
}

.fj-end-in .fj-hero-cta {
    justify-content: center;
    margin-top: 20px;
}

.fj-end-in .nd-btn.ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .45);
    background: transparent;
}

/* ── page viewer ─────────────────────────────────────────────────── */
.fj-lb {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 12px 20px;
    background: rgba(15, 20, 34, .92);
}

.fj-lb[hidden] {
    display: none;
}

.fj-lb img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 6px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}

.fj-lb-cap {
    margin: 12px 0 0;
    color: #fff;
    font: 600 14px/1.4 'DM Sans', sans-serif;
    text-align: center;
}

.fj-lb-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* ═══ tablet ═══ */
@media (min-width: 620px) {
    .fj-buy {
        grid-template-columns: repeat(2, 1fr);
    }

    .fj-card-all {
        grid-column: 1 / -1;
    }

    .fj-anat {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px 22px;
    }

    .fj-shot {
        flex-basis: 260px;
    }

    .fj-fan {
        height: 450px;
    }

    .fj-pg {
        width: 240px;
    }

    .fj-note {
        display: block;
    }
}

/* ═══ laptop ═══ */
@media (min-width: 900px) {
    .fj-hero {
        padding: 56px 0 40px;
    }

    .fj-hero::before {
        left: 28px;
    }

    .fj-hero-in {
        grid-template-columns: 1.05fr .95fr;
        align-items: center;
        gap: 24px;
        min-height: 560px;
    }

    .fj-hero-txt {
        padding-left: 34px;
    }

    .fj-fan {
        height: 540px;
        margin: 0;
    }

    .fj-pg {
        width: 262px;
        top: 40px;
    }

    .fj-pg.p1 {
        transform: translateX(-92%) rotate(-9deg);
    }

    .fj-pg.p2 {
        transform: translateX(-8%) rotate(8deg);
    }

    /* Hovering the fan spreads it, like thumbing a notebook. */
    .fj-fan:hover .fj-pg.p1 {
        transform: translateX(-112%) rotate(-13deg);
    }

    .fj-fan:hover .fj-pg.p2 {
        transform: translateX(12%) rotate(12deg);
    }

    .fj-fan:hover .fj-pg.p3 {
        transform: translateX(-50%) translateY(-12px) rotate(0);
    }

    .fj-note {
        font-size: 24px;
    }

    .fj-sec {
        padding: 88px 0;
    }

    .fj-buy {
        grid-template-columns: 1.35fr 1fr 1fr 1fr;
        align-items: stretch;
    }

    .fj-card-all {
        grid-column: auto;
    }

    .fj-anat {
        grid-template-columns: repeat(5, 1fr);
    }

    .fj-anat li:nth-child(n+6) {
        /* second row of four, centred under five */
        grid-column: span 1;
    }

    .fj-toc {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }

    .fj-strip {
        padding-left: max(16px, calc((100vw - 1160px) / 2 + 16px));
        padding-right: 80px;
    }

    .fj-arrow {
        display: grid;
        place-items: center;
        position: absolute;
        top: 38%;
        z-index: 3;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 1px solid var(--fj-line);
        background: #fff;
        color: var(--fj-ink);
        box-shadow: 0 8px 20px -10px rgba(31, 42, 68, .5);
        cursor: pointer;
    }

    .fj-arrow.prev {
        left: 14px;
    }

    .fj-arrow.next {
        right: 14px;
    }

    .fj-end-in {
        padding: 56px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .fj-pg,
    .fj-scribble path {
        animation: none !important;
        transition: none !important;
    }

    .fj-scribble path {
        stroke-dashoffset: 0;
    }
}
