/* ==========================================================================
   /aux-go — the آکس‌گو introduction page.
   Loaded only on this page, through @push('headHook'), so nothing here costs
   the rest of the site a byte.

   The page borrows the app's own material palette rather than the theme's,
   because the subject is the app: ink is an oiled workbench, the light surface
   is a raw melamine face, and the one saturated colour is the AUX red.

   One rule governs the motion. The hero animates the cut plan -- the thing the
   product makes -- filling a sheet part by part, once, on load. Nothing else on
   the page moves without being asked. And nothing that is a Largest
   Contentful Paint candidate animates its opacity: an element at opacity 0 is
   not painted, so fading the headline in would postpone LCP by exactly the
   animation delay. See memory/project.md, where that was learned the hard way
   on the homepage.
   ========================================================================== */

.go-lp {
    --lp-ink: #17130f;
    --lp-board: #f6f1e8;
    --lp-kerf: #b8a184;
    --lp-red: #ed1c24;
    --lp-steel: #55606b;
    --lp-line: #ddd2bd;
    --lp-text: #221c16;
    --lp-text-2: #6a5f52;

    color: var(--lp-text);
}

.go-lp section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.go-lp .lp-wrap {
    width: min(100% - 2rem, 68rem);
    margin-inline: auto;
}

.go-lp h2 {
    font-size: clamp(1.4rem, 3.4vw, 2rem);
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 .5rem;
}

.go-lp p { line-height: 1.9; color: var(--lp-text-2); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.lp-hero {
    position: relative;
    background: var(--lp-ink);
    color: var(--lp-board);
    overflow: hidden;
}

/* A cutting grid behind the words: the thing the product makes. */
.lp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(184, 161, 132, .13) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(184, 161, 132, .13) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(120% 100% at 80% 0%, #000, transparent 75%);
    pointer-events: none;
}

.lp-hero .lp-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    gap: clamp(1.75rem, 5vw, 3rem);
    align-items: center;
}

@media (min-width: 900px) {
    .lp-hero .lp-wrap { grid-template-columns: 1fr 1fr; }
}

.lp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .85rem;
    border: 1px solid rgba(246, 241, 232, .28);
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    color: #d9cfc0;
    margin-bottom: 1rem;
}

.lp-hero__eyebrow b { color: var(--lp-board); font-weight: 700; }

/* Transform only. This is the LCP element. */
.lp-hero h1 {
    font-size: clamp(1.85rem, 5.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -.01em;
    margin: 0 0 1rem;
    color: var(--lp-board);
    animation: lp-slide .5s cubic-bezier(.2, .8, .3, 1) both;
}

.lp-hero h1 span { color: var(--lp-red); }

.lp-hero__lede {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: #cbbfad;
    max-width: 42ch;
    margin: 0 0 1.75rem;
    animation: lp-rise .5s ease .1s both;
}

.lp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    animation: lp-rise .5s ease .18s both;
}

.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 52px;
    padding: 0 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform .12s ease;
}

.lp-btn:active { transform: scale(.98); }
.lp-btn--primary { background: var(--lp-red); color: #fff; }
.lp-btn--primary:hover { color: #fff; }
.lp-btn--ghost { border-color: rgba(246, 241, 232, .34); color: #e6ddd0; }
.lp-btn--ghost:hover { color: #fff; border-color: rgba(246, 241, 232, .6); }
.lp-btn--dark { background: var(--lp-ink); color: var(--lp-board); }
.lp-btn--dark:hover { color: var(--lp-board); }
.lp-btn svg { width: 20px; height: 20px; }

.lp-hero__note {
    margin-top: 1.125rem;
    font-size: .8125rem;
    color: #9d9285;
    animation: lp-rise .5s ease .26s both;
}

/* --------------------------------------------------------------------------
   The hero drawing: a sheet being filled, part by part.
   -------------------------------------------------------------------------- */

.lp-sheet {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    animation: lp-rise .6s ease .1s both;
}

.lp-sheet__part {
    opacity: 0;
    animation: lp-part .45s cubic-bezier(.2, .9, .3, 1.1) forwards;
    transform-box: fill-box;
    transform-origin: center;
}

.lp-sheet__caption {
    margin-top: .75rem;
    text-align: center;
    font-size: .8125rem;
    color: #9d9285;
}

@keyframes lp-part {
    from { opacity: 0; transform: scale(.9); }
    to { opacity: 1; transform: none; }
}

@keyframes lp-slide {
    from { transform: translateY(14px); }
}

@keyframes lp-rise {
    from { opacity: 0; transform: translateY(12px); }
}

/* --------------------------------------------------------------------------
   Numbers strip
   -------------------------------------------------------------------------- */

.lp-figures {
    display: grid;
    /* Fixed counts rather than auto-fit: auto-fit fitted three across at one
       common width and dropped the fourth onto a row of its own, which reads
       as a mistake rather than as a set. */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid rgba(246, 241, 232, .16);
    margin-top: 2.5rem;
    position: relative;
    z-index: 1;
}

.lp-figure b {
    display: block;
    font-size: clamp(1.5rem, 3.6vw, 2.1rem);
    font-weight: 800;
    color: var(--lp-board);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

.lp-figure span { font-size: .8125rem; color: #9d9285; }

@media (min-width: 620px) {
    .lp-figures { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------------------------
   Feature cards

   Not one uniform grid of identical rounded boxes. A card describing something
   the app produces is cut square with an edge band down its leading side, the
   way the app itself draws a panel; the rest of the page is rounded.
   -------------------------------------------------------------------------- */

.lp-grid {
    display: grid;
    gap: 1rem;
    /* min() on the minimum is load-bearing: a bare minmax(16rem, 1fr) forces a
       track wider than the viewport as soon as the reader enlarges text -- 16rem
       is 410px at 160% text, on a 360px phone -- and that is exactly what makes a
       page scroll sideways. Measured on this page at 160%. */
    grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
    margin-top: 2rem;
}

.lp-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--lp-line);
    border-radius: 3px;
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    padding-inline-start: 1.5rem;
    overflow: hidden;
}

.lp-card::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: var(--lp-kerf);
}

.lp-card--key::before { background: var(--lp-red); }

.lp-card__icon { color: var(--lp-red); margin-bottom: .625rem; }
.lp-card__icon svg { width: 28px; height: 28px; }
.lp-card h3 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 .375rem; }
.lp-card p { font-size: .9375rem; margin: 0; }

/* --------------------------------------------------------------------------
   Steps — a real sequence, so numbered markers are information here
   -------------------------------------------------------------------------- */

.lp-steps { display: grid; gap: 1rem; margin-top: 2rem; counter-reset: lp-step; }

@media (min-width: 780px) {
    .lp-steps { grid-template-columns: repeat(4, 1fr); }
}

.lp-step {
    position: relative;
    padding-top: 2.75rem;
    counter-increment: lp-step;
}

.lp-step::before {
    content: counter(lp-step, persian);
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid var(--lp-red);
    color: var(--lp-red);
    font-weight: 800;
    font-size: .95rem;
}

/* The line that makes four boxes read as one sequence. */
@media (min-width: 780px) {
    .lp-step::after {
        content: '';
        position: absolute;
        top: 1.05rem;
        inset-inline-start: 2.6rem;
        inset-inline-end: -1rem;
        height: 1px;
        background: var(--lp-line);
    }
    .lp-step:last-child::after { display: none; }
}

.lp-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .25rem; }
.lp-step p { font-size: .875rem; margin: 0; }

/* --------------------------------------------------------------------------
   Promises
   -------------------------------------------------------------------------- */

.lp-promise {
    background: var(--lp-board);
    border-radius: 16px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 820px) {
    .lp-promise { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

.lp-promise h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.lp-promise h3 svg { width: 22px; height: 22px; color: var(--lp-red); }
.lp-promise p { margin: 0; font-size: .9375rem; }

/* --------------------------------------------------------------------------
   Comparison table
   -------------------------------------------------------------------------- */

.lp-compare {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-size: .9375rem;
    background: #fff;
    border: 1px solid var(--lp-line);
    border-radius: 12px;
    overflow: hidden;
}

.lp-compare th, .lp-compare td { padding: .875rem 1rem; text-align: start; }
.lp-compare thead th { background: var(--lp-board); font-weight: 700; font-size: .875rem; }
.lp-compare tbody tr { border-top: 1px solid var(--lp-line); }
.lp-compare td:first-child { font-weight: 600; }
.lp-compare .yes { color: #1e7f5c; font-weight: 700; }
.lp-compare .no { color: var(--lp-text-2); }

/* On a phone the table stops being a table.
   Three columns of Persian prose in 360px means either four-character line
   wraps or a sideways drag, and a comparison nobody can read across is not a
   comparison. Each row becomes its own block with the two answers labelled
   from the header, so the same information is read down the page instead. */
@media (max-width: 640px) {
    .lp-compare, .lp-compare tbody, .lp-compare tr, .lp-compare td { display: block; width: 100%; }
    .lp-compare thead { display: none; }

    .lp-compare tr {
        border-top: 0;
        border-bottom: 1px solid var(--lp-line);
        padding: .875rem 1rem;
    }

    .lp-compare tr:last-child { border-bottom: 0; }

    .lp-compare td { padding: 0; }

    .lp-compare td:first-child {
        font-weight: 700;
        margin-bottom: .375rem;
    }

    /* The header cell each answer belongs to, carried down as a label. */
    .lp-compare td:not(:first-child)::before {
        content: attr(data-label) ' — ';
        color: var(--lp-text-2);
        font-weight: 600;
    }

    .lp-compare td:not(:first-child) { font-size: .875rem; padding-block: .125rem; }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.lp-faq { margin-top: 1.5rem; }

.lp-faq details {
    border-bottom: 1px solid var(--lp-line);
    padding: 1rem 0;
}

.lp-faq summary {
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.lp-faq summary::after {
    content: '';
    flex: 0 0 auto;
    width: .6rem;
    height: .6rem;
    border-inline-end: 2px solid var(--lp-red);
    border-block-end: 2px solid var(--lp-red);
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.lp-faq details[open] summary::after { transform: rotate(-135deg); }
.lp-faq details p { margin: .75rem 0 0; font-size: .9375rem; }

/* --------------------------------------------------------------------------
   Closing call to action
   -------------------------------------------------------------------------- */

.lp-cta {
    background: var(--lp-ink);
    color: var(--lp-board);
    border-radius: 20px;
    padding: clamp(1.75rem, 5vw, 3rem);
    text-align: center;
}

.lp-cta h2 { color: var(--lp-board); }
.lp-cta p { color: #cbbfad; max-width: 46ch; margin-inline: auto; }
.lp-cta .lp-hero__actions { justify-content: center; margin-top: 1.5rem; animation: none; }

/* --------------------------------------------------------------------------
   Motion budget
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .go-lp *,
    .go-lp *::before,
    .go-lp *::after {
        animation-duration: .001ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    /* The parts must still end up visible, not merely stop moving. */
    .lp-sheet__part { opacity: 1; }
}
