/* ==========================================================
   SafiTrack 4.0 release page
   Builds on home.css (tokens, nav, footer, rails, tags,
   split titles, dark sections, CTA).

   Shaped like the big launch pages (Raycast 2.0, Notion,
   Linear): hero, an at-a-glance index, what changes for you,
   then one chapter per area with a large screenshot and three
   short points under it, speed, smaller things, fixes, FAQ.
   ========================================================== */

/* ---------- The 4.0 mark ----------
   The identity of the release: "4.0" in white fading to nothing, on
   the dark dotted band. The same mark opens the launch screen in the
   app (crm/launch.css). */

.rl-mark {
    display: inline-block;
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: .9;
    color: transparent;
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .1) 88%);
    -webkit-background-clip: text;
    background-clip: text;
    /* room for the descender-less digits so the clip doesn't cut them */
    padding: 0 .04em .02em;
}

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

.rl-hero {
    position: relative;
    padding: 88px 0 0;
    text-align: center;
    color: #fff;
    /* dark above, the page below: the screenshot sits across the line */
    background:
        linear-gradient(to bottom, transparent calc(100% - 300px), var(--bg) calc(100% - 300px)),
        radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, .10), transparent 60%),
        radial-gradient(circle, rgba(255, 255, 255, .09) 1px, transparent 1.3px) 0 0 / 18px 18px,
        #0e0f12;
}

.rl-hero-tag {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    font-size: 13px;
    font-weight: 600;
    color: #c9cbd1;
}

.rl-date::before {
    content: "·";
    margin: 0 6px;
}

.rl-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 28px;
    font-weight: 600;
}

.rl-title-brand {
    font-size: clamp(20px, 2.2vw, 26px);
    letter-spacing: -0.02em;
    color: #e6e7ea;
}

.rl-title .rl-mark {
    margin-top: 6px;
    font-size: clamp(132px, 22vw, 300px);
}

.rl-sub {
    max-width: 620px;
    margin: 18px auto 0;
    font-size: clamp(17px, 1.6vw, 19px);
    line-height: 1.55;
    color: #9a9da6;
    text-wrap: balance;
}

.rl-hero .hero-actions {
    justify-content: center;
}

.rl-hero-art {
    position: relative;
    max-width: 1100px;
    margin: 64px auto 0;
    padding: 0 40px 0 0;
}

/* The product rises out of the mark as the page opens */
@media (prefers-reduced-motion: no-preference) {
    .rl-title .rl-mark {
        animation: rl-rise .9s cubic-bezier(.2, .8, .2, 1) both;
    }

    .rl-hero-art .rl-shot:not(.rl-phone) {
        animation: rl-rise 1s cubic-bezier(.2, .8, .2, 1) .15s both;
    }

    .rl-hero-phone {
        animation: rl-rise-phone 1s cubic-bezier(.2, .8, .2, 1) .3s both;
    }
}

@keyframes rl-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}

@keyframes rl-rise-phone {
    from { opacity: 0; transform: translateY(48px); }
    to { opacity: 1; transform: none; }
}

/* The closing banner carries the mark too */
.rl-mark-cta {
    display: block;
    width: max-content;
    margin: 0 auto 8px;
    font-size: clamp(96px, 14vw, 180px);
}

/* screenshots of the real app */
.rl-shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-ui, 0 1px 2px rgba(16, 18, 24, .05), 0 12px 32px -12px rgba(16, 18, 24, .18));
}

.rl-phone {
    border-radius: 22px;
}

.rl-hero .rl-shot {
    border-color: rgba(255, 255, 255, .14);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 40px 80px -24px rgba(0, 0, 0, .55);
}

.rl-hero-phone {
    position: absolute;
    right: 0;
    bottom: -48px;
    width: 22%;
    min-width: 150px;
    box-shadow: 0 24px 60px -16px rgba(16, 18, 24, .35);
}

/* ---------- Shared section head ---------- */

.rl-head {
    max-width: 760px;
    padding: 96px 48px 0;
}

.rl-head .split-title {
    margin-top: 16px;
}

.rl-lead {
    max-width: 620px;
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
}

/* ---------- At a glance ---------- */

.rl-hero + .rl-glance {
    margin-top: 140px;
}

.rl-glance .rail,
.rl-know .rail,
.rl-chapter .rail,
.rl-more .rail,
.rl-end .rail {
    border-top: 1px solid var(--line);
}

.rl-index {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 48px;
    border-top: 1px solid var(--line);
}

.rl-index-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 168px;
    padding: 28px 28px 32px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    transition: background-color .15s var(--ease);
}

.rl-index-item:nth-child(3n) {
    border-right: 0;
}

.rl-index-item:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.rl-index-item:hover {
    background: var(--bg-soft);
}

.rl-index-num {
    margin-bottom: 18px;
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--faint);
}

.rl-index-item strong {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.rl-index-item span:last-child {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- What changes for you ---------- */

.rl-know-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 48px;
    border-top: 1px solid var(--line);
}

.rl-know-card {
    padding: 36px 36px 44px;
}

.rl-know-card + .rl-know-card {
    border-left: 1px solid var(--line);
}

.rl-know-rename {
    background: var(--bg-soft);
}

.rl-know-kicker {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--faint);
}

.rl-know-card h3 {
    margin-top: 14px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.rl-know-card p:not(.rl-know-kicker):not(.rl-rename) {
    margin-top: 10px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--muted);
}

.rl-rename {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.rl-rename s {
    color: var(--faint);
    text-decoration-thickness: 2px;
}

.rl-rename-arrow {
    color: var(--faint);
    font-weight: 400;
}

.rl-rename b {
    font-weight: 600;
    color: var(--ink);
}

.rl-know-card .rl-know-note {
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 14px !important;
}

.rl-know-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.rl-know-list li {
    padding: 10px 0;
    border-top: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
}

.rl-know-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--bg-sunk);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .88em;
    color: var(--ink-2);
}

/* ---------- Chapters ---------- */

.rl-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 56px;
    padding: 64px 64px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background-color: #f7f8fa;
    background-image: radial-gradient(circle, #d3d6dd 1px, transparent 1.3px);
    background-size: 18px 18px;
}

.rl-art > .rl-shot:not(.rl-phone) {
    max-width: 980px;
}

/* Two screenshots side by side */
.rl-art-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 24px;
    padding-left: 48px;
    padding-right: 48px;
}

.rl-art-pair .rl-shot:last-child {
    margin-top: 48px;
}

.rl-art-phones {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
}

.rl-art-phones .rl-phone {
    width: min(40%, 300px);
}

.rl-art-phones .rl-phone + .rl-phone {
    margin-top: 48px;
}

.rl-art-phones--three {
    gap: 24px;
}

.rl-art-phones--three .rl-phone {
    width: min(30%, 260px);
}

.rl-art-phones--three .rl-phone + .rl-phone {
    margin-top: 0;
}

.rl-art-phones--three .rl-phone:nth-child(2) {
    margin-top: 48px;
}

/* Three short points under the picture */
.rl-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.rl-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.rl-col {
    padding: 32px 36px 56px;
}

.rl-col + .rl-col {
    border-left: 1px solid var(--line);
}

/* Six points: two rows of three */
.rl-cols-6 .rl-col:nth-child(3n + 1) {
    border-left: 0;
}

.rl-cols-6 .rl-col:nth-child(-n + 3) {
    padding-bottom: 32px;
}

.rl-cols-6 .rl-col:nth-child(n + 4) {
    border-top: 1px solid var(--line);
}

.rl-col h3,
.rl-more-item h3 {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.rl-col p,
.rl-more-item p {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.rl-col em {
    font-style: italic;
}


/* ---------- Speed (dark) ---------- */

.rl-speed {
    margin-top: 0;
    scroll-margin-top: var(--nav-h);
    background: #0e0e10;
    color: #fff;
}

.rl-speed-head {
    padding: 120px 24px 56px;
    text-align: center;
}

.rl-speed-title {
    margin-top: 12px;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.04;
    font-weight: 600;
    letter-spacing: -0.045em;
    color: #fff;
    text-wrap: balance;
}

.rl-figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.rl-figure {
    padding: 48px 40px 56px;
}

.rl-figure + .rl-figure {
    border-left: 1px solid rgba(255, 255, 255, .09);
}

/* Two rows of three */
.rl-figure:nth-child(3n + 1) {
    border-left: 0;
}

.rl-figure:nth-child(n + 4) {
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.rl-figure-num {
    font-size: clamp(44px, 5vw, 64px);
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.04em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.rl-figure-label {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.45;
    color: #d6d7db;
}

.rl-figure-note {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #8a8d95;
}

.rl-speed-foot {
    padding: 28px 40px 120px;
    border-top: 1px solid rgba(255, 255, 255, .09);
    font-size: 15px;
    color: #8a8d95;
    text-align: center;
}

/* ---------- And more ---------- */

.rl-more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 48px;
    border-top: 1px solid var(--line);
}

.rl-more-item {
    padding: 30px 36px 34px;
    border-bottom: 1px solid var(--line);
}

.rl-more-item:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--line);
}

.rl-more-item:nth-last-child(-n + 3) {
    border-bottom: 0;
}

/* ---------- Fixed + questions ---------- */

.rl-end-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.rl-end-col {
    padding: 96px 48px 96px;
}

.rl-faq {
    border-left: 1px solid var(--line);
}

.rl-list {
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.rl-list li {
    padding: 13px 0;
    border-top: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
}

.rl-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.rl-faq-list {
    margin-top: 32px;
    border-bottom: 1px solid var(--line);
}

.rl-faq details {
    border-top: 1px solid var(--line);
}

.rl-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

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

.rl-faq summary::after {
    content: "+";
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    color: var(--faint);
    transition: transform .2s var(--ease);
}

.rl-faq details[open] summary::after {
    transform: rotate(45deg);
}

.rl-faq details p {
    padding: 0 32px 20px 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

.rl-end + .cta {
    margin-top: 0;
}

/* Anchored sections clear the sticky nav */
.rl-glance,
.rl-know,
.rl-chapter {
    scroll-margin-top: var(--nav-h);
}

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
    .rl-hero {
        padding-top: 56px;
        background:
            linear-gradient(to bottom, transparent calc(100% - 140px), var(--bg) calc(100% - 140px)),
            radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, .10), transparent 60%),
            radial-gradient(circle, rgba(255, 255, 255, .09) 1px, transparent 1.3px) 0 0 / 18px 18px,
            #0e0f12;
    }

    .rl-hero-art {
        margin-top: 40px;
        padding-right: 24px;
    }

    .rl-hero + .rl-glance {
        margin-top: 96px;
    }

    .rl-head {
        padding: 64px 24px 0;
    }

    .rl-index {
        grid-template-columns: repeat(2, 1fr);
    }

    .rl-index-item {
        min-height: 0;
        padding: 22px 24px 26px;
    }

    .rl-index-item:nth-child(3n) {
        border-right: 1px solid var(--line);
    }

    .rl-index-item:nth-child(2n) {
        border-right: 0;
    }

    .rl-index-item:nth-last-child(-n + 3) {
        border-bottom: 1px solid var(--line);
    }

    /* Nine chapters: the last one takes the whole row */
    .rl-index-item:last-child {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
    }

    .rl-index-num {
        margin-bottom: 8px;
    }

    .rl-know-grid,
    .rl-cols,
    .rl-cols-4,
    .rl-more-grid,
    .rl-end-grid {
        grid-template-columns: 1fr;
    }

    .rl-know-card {
        padding: 28px 24px 32px;
    }

    .rl-know-card + .rl-know-card,
    .rl-col + .rl-col,
    .rl-more-item:not(:nth-child(3n + 1)),
    .rl-faq {
        border-left: 0;
    }

    .rl-know-card + .rl-know-card,
    .rl-col + .rl-col,
    .rl-cols-6 .rl-col:nth-child(n + 4) {
        border-top: 1px solid var(--line);
    }

    .rl-art {
        margin-top: 40px;
        padding: 32px 20px;
    }

    .rl-art-pair {
        grid-template-columns: 1fr;
        padding: 32px 20px;
    }

    .rl-art-pair .rl-shot:last-child {
        margin-top: 0;
    }

    .rl-col,
    .rl-cols-6 .rl-col:nth-child(-n + 3) {
        padding: 22px 24px;
    }

    .rl-cols .rl-col:last-child {
        padding-bottom: 48px;
    }

    .rl-more-item,
    .rl-more-item:nth-last-child(-n + 3) {
        padding: 22px 24px;
        border-bottom: 1px solid var(--line);
    }

    .rl-more-item:last-child {
        border-bottom: 0;
    }

    .rl-end-col {
        padding: 64px 24px;
    }

    .rl-faq {
        border-top: 1px solid var(--line);
    }

    .rl-figures {
        grid-template-columns: 1fr;
    }

    .rl-figure {
        padding: 36px 24px;
    }

    .rl-figure + .rl-figure {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .09);
    }

    .rl-speed-head {
        padding: 88px 24px 40px;
    }

    .rl-speed-foot {
        padding: 24px 24px 88px;
    }
}

@media (max-width: 560px) {
    .rl-hero-phone {
        display: none;
    }

    .rl-hero-art {
        padding-right: 0;
    }

    .rl-index {
        grid-template-columns: 1fr;
    }

    .rl-index-item,
    .rl-index-item:nth-child(3n) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .rl-index-item:last-child {
        border-bottom: 0;
    }

    .rl-art-phones {
        gap: 12px;
    }

    .rl-art-phones .rl-phone {
        width: 48%;
    }

    .rl-art-phones--three .rl-phone {
        width: 32%;
        border-radius: 14px;
    }
}
