/* =================================================
   AIVELLE COLLECTION — RUBY
================================================= */

.ruby-page {
    --ruby: #a1122f;
    --ruby-bright: #d21f49;
    --ruby-deep: #5a0718;
    --ruby-soft: rgba(161, 18, 47, .18);
    --ruby-line: rgba(161, 18, 47, .46);
    --accent: var(--ruby);
}

.ruby-page ::selection {
    color: #ffffff;
    background: var(--ruby);
}


/* -------------------------------------------------
   Standalone hero and progress foundations
   These are included here so Ruby does not depend on issue-01.css.
-------------------------------------------------- */

.ruby-page .editorial-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: 100svh;
    padding-top: var(--header-height, 88px);
    overflow: hidden;
}

.ruby-page .editorial-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ruby-page .editorial-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.ruby-page .editorial-hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, var(--content-max, 1600px));
    margin-inline: auto;
    padding:
        0
        var(--page-gutter, clamp(20px, 4.8vw, 82px))
        clamp(58px, 8vw, 118px);
}

.ruby-page .hero-copy {
    width: min(100%, 1120px);
    max-width: 1120px;
    opacity: var(--hero-copy-opacity, 1);
    transform: translate3d(0, var(--hero-copy-y, 0), 0);
    will-change: transform, opacity;
}

.ruby-page .editorial-hero h1 {
    display: block;
    max-width: 1050px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(76px, 11vw, 176px);
    font-weight: 400;
    letter-spacing: -.065em;
    line-height: .82;
    text-wrap: balance;
}

.ruby-page .hero-deck {
    max-width: 650px;
    margin: 36px 0 0;
    color: var(--paper, #e8e6e1);
    font-size: clamp(19px, 1.8vw, 28px);
    line-height: 1.45;
}

.ruby-page .hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 34px;
    margin-top: 38px;
}

.ruby-page .scroll-cue {
    position: absolute;
    right: var(--page-gutter, clamp(20px, 4.8vw, 82px));
    bottom: 54px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted, #7d7d79);
    text-transform: uppercase;
    letter-spacing: .17em;
    writing-mode: vertical-rl;
    font-size: 9px;
}

.ruby-page .scroll-cue::after {
    content: "";
    width: 1px;
    height: 50px;
    background: linear-gradient(var(--ruby-bright), transparent);
    animation: rubyScrollPulse 2.2s ease-in-out infinite;
}

.ruby-page .reading-progress {
    position: fixed;
    top: 50%;
    left: 18px;
    z-index: 600;
    display: grid;
    justify-items: center;
    gap: 10px;
    opacity: .92;
    transform: translateY(-50%);
}

.ruby-page .reading-progress span {
    color: var(--muted, #7d7d79);
    font-size: 9px;
    letter-spacing: .16em;
}

.ruby-page .progress-track {
    position: relative;
    width: 2px;
    height: 170px;
    overflow: hidden;
    background: rgba(255, 255, 255, .16);
}

.ruby-page .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 0;
    background: var(--ruby-bright);
    transition: height .08s linear;
}

@keyframes rubyScrollPulse {
    0%, 100% {
        opacity: .35;
        transform: scaleY(.65);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}

@media (max-width: 1100px) {
    .ruby-page .reading-progress {
        display: none;
    }
}

@media (max-width: 992px) {
    .ruby-page .scroll-cue {
        display: none;
    }
}

@media (max-width: 600px) {
    .ruby-page .editorial-hero {
        min-height: 92svh;
    }

    .ruby-page .editorial-hero-content {
        padding-bottom: 48px;
    }

    .ruby-page .editorial-hero h1 {
        font-size: clamp(72px, 22vw, 112px);
        line-height: .84;
    }

    .ruby-page .hero-meta {
        display: grid;
    }
    
    .ruby-page .hero-deck {
        max-width: 650px;
        margin: 26px 0 0;
        color: var(--paper, #e8e6e1);
        font-size: clamp(19px, 1.8vw, 28px);
        line-height: 1.45;
    }

    .ruby-page .hero-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 18px 34px;
        margin-top: 28px;
    }
}

/* -------------------------------------------------
   Reading progress
-------------------------------------------------- */

.ruby-reading-progress .progress-track {
    background: rgba(255, 255, 255, .15);
}

.ruby-reading-progress .progress-fill {
    background: linear-gradient(
        to bottom,
        var(--ruby-bright),
        var(--ruby)
    );

    box-shadow:
        0 0 12px rgba(210, 31, 73, .42);
}

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

.ruby-hero {
    border-bottom-color: rgba(161, 18, 47, .25);
}

.ruby-hero .editorial-hero-media {
    background:
        radial-gradient(
            circle at 74% 38%,
            rgba(161, 18, 47, .24),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #242424,
            #070707 65%
        );
}

.ruby-hero h1 {
    color: #ffffff;
}

.ruby-hero h1::after {
    content: "";

    display: block;

    width: clamp(56px, 7vw, 110px);
    height: 2px;
    margin-top: 30px;

    background: var(--ruby);
}

.ruby-hero-shade {
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.92) 0%,
            rgba(0,0,0,.82) 14%,
            rgba(0,0,0,.58) 30%,
            rgba(0,0,0,.28) 48%,
            rgba(0,0,0,.10) 68%,
            rgba(0,0,0,.03) 84%,
            rgba(0,0,0,0) 100%
        ),
        linear-gradient(
            to top,
            rgba(0,0,0,.78) 0%,
            rgba(0,0,0,.22) 32%,
            transparent 62%
        );
}

.ruby-hero img {
    filter:
        brightness(1.08)
        contrast(1.06);
}
/* -------------------------------------------------
   Placeholder language
-------------------------------------------------- */

.ruby-placeholder {
    position: relative;

    display: grid;
    place-items: center;

    overflow: hidden;

    color: rgba(255, 255, 255, .46);

    background:
        radial-gradient(
            circle at 74% 30%,
            rgba(161, 18, 47, .26),
            transparent 22%
        ),
        linear-gradient(
            135deg,
            #2b2b2b,
            #111111 58%,
            #070707
        );
}

.ruby-placeholder::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            120deg,
            transparent 0%,
            rgba(255, 255, 255, .035) 35%,
            transparent 52%
        ),
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, .025) 0 1px,
            transparent 1px 36px
        );
}

.ruby-placeholder::after {
    content: "";

    position: absolute;
    inset: 20px;

    border: 1px solid rgba(255, 255, 255, .09);

    pointer-events: none;
}

.ruby-placeholder span {
    position: relative;
    z-index: 2;

    max-width: 260px;
    padding: 18px;

    text-align: center;
    text-transform: uppercase;
    letter-spacing: .16em;

    font-size: 9px;
    line-height: 1.7;
}

.ruby-placeholder--hero {
    position: absolute;
    inset: 0;
}

.ruby-placeholder--portrait {
    aspect-ratio: 3 / 4;
}

.ruby-placeholder--tall {
    aspect-ratio: 2 / 3;
}

.ruby-placeholder--square {
    aspect-ratio: 1;
}

.ruby-placeholder--landscape {
    aspect-ratio: 4 / 3;
}

.ruby-placeholder--full-bleed,
.ruby-placeholder--closing {
    position: absolute;
    inset: 0;
}

.ruby-placeholder--offset {
    margin-top: 16%;
}

/* -------------------------------------------------
   Opening
-------------------------------------------------- */

.ruby-opening {
    padding-block: clamp(110px, 15vw, 220px);

    background:
        linear-gradient(
            180deg,
            #050505,
            #0a0708
        );
}

.ruby-opening-lead {
    max-width: 1180px;
    margin: 0;

    color: #ffffff;

    font-size: clamp(34px, 4.8vw, 76px);
    letter-spacing: -.045em;
    line-height: 1.04;

    text-wrap: balance;
}

.ruby-opening-lead em {
    color: var(--ruby-bright);

    font-style: normal;
}

/* -------------------------------------------------
   Shared collection sections
-------------------------------------------------- */

.ruby-section,
.ruby-look-section,
.ruby-pair-section,
.ruby-emotional-centre,
.ruby-credits {
    padding-block: clamp(100px, 13vw, 200px);

    border-top: 1px solid var(--line);
}

.ruby-section--dark {
    background:
        linear-gradient(
            180deg,
            #050505,
            #0c0809
        );
}

.ruby-section--paper,
.ruby-look-section--paper {
    color: #090909;
    background: #ffffff;
}

.ruby-look-section--paper .editorial-title,
.ruby-look-section--paper .look-title {
    color: #090909;
}

.ruby-look-section--paper .meta,
.ruby-look-section--paper .image-caption {
    color: #7b7b7b;
}

.ruby-look-section--paper .body-copy {
    color: #333333;
}

.ruby-look-section--paper .wardrobe-item {
    color: #404040;
}

.ruby-section--paper .wardrobe-item span:last-child,
.ruby-look-section--paper .wardrobe-item span:last-child {
    color: var(--ruby);
}

.ruby-section-marker {
    display: flex;
    align-items: end;

    gap: 30px;

    margin-bottom: clamp(50px, 7vw, 105px);

    color: var(--ruby-bright);

    text-transform: uppercase;
    letter-spacing: .18em;

    font-size: 11px;
}

.ruby-section-rule {
    flex: 1;

    height: 1px;
    margin-bottom: 7px;

    background: var(--ruby-line);
}

.ruby-copy-panel {
    align-self: center;

    padding: clamp(20px, 5vw, 90px);
}

.ruby-accent-line {
    width: 46px;
    height: 2px;
    margin-block: 26px;

    background: var(--ruby);
}

/* -------------------------------------------------
   Arrival
-------------------------------------------------- */

.ruby-arrival {
    align-items: center;
}

/* -------------------------------------------------
   Portrait pair
-------------------------------------------------- */

.ruby-pair-section {
    background: #f0eee9;
}

.ruby-pair-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: clamp(28px, 5vw, 90px);

    align-items: start;
}

.ruby-pair-section .image-caption {
    color: #6d6965;
}

/* -------------------------------------------------
   Quote
-------------------------------------------------- */

.ruby-quote-section {
    display: grid;
    align-items: center;

    min-height: 82svh;
    padding-block: clamp(100px, 14vw, 210px);

    color: #ffffff;
    background:
        radial-gradient(
            circle at 80% 30%,
            rgba(161, 18, 47, .28),
            transparent 30%
        ),
        #090607;
}

.ruby-display-quote {
    max-width: 1200px;
    margin: 0;

    font-size: clamp(48px, 7.6vw, 128px);
    font-weight: 400;
    letter-spacing: -.06em;
    line-height: .9;

    text-wrap: balance;
}

.ruby-quote-credit {
    margin-top: 36px;

    color: var(--ruby-bright);

    text-transform: uppercase;
    letter-spacing: .18em;

    font-size: 10px;
}

/* -------------------------------------------------
   Looks
-------------------------------------------------- */

.ruby-look-section {
    background: #050505;
}

/* Look 02 overrides the default dark Look section */
.ruby-look-section.ruby-look-section--paper {
    background: #ffffff;   /* or #fcfcfb if you prefer the warmer paper tone */
}

.ruby-look-header {
    margin-bottom: clamp(70px, 8vw, 120px);
}

.ruby-look-header--centre {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.ruby-look-header--centre .look-number {

    display: block;

    margin-bottom: 18px;

    color: var(--ruby-bright);

    letter-spacing: .28em;
    text-transform: uppercase;
    font-size: 11px;
}

.ruby-look-header--centre .editorial-title {

    max-width: 1000px;

    margin: 0 auto;

    font-size: clamp(72px, 7vw, 132px);

    line-height: .88;

    letter-spacing: -.05em;
}

.ruby-look-header .look-number {
    color: var(--ruby-bright);
}

.ruby-look-one {
    align-items: start;
}

.ruby-look-side {
    margin-top: 14%;

    padding-left: clamp(28px, 3vw, 48px);

    max-width: 430px;
}

.ruby-look-section .wardrobe-list {
    border-top-color: var(--ruby-line);
}

.ruby-look-section .wardrobe-item span:last-child {
    color: var(--ruby-bright);
}

/* -------------------------------------------------
   Full bleed
-------------------------------------------------- */

.ruby-full-bleed {
    position: relative;

    min-height: 88svh;

    overflow: hidden;
}

.ruby-full-bleed-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .88),
            transparent 58%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .42),
            transparent 72%
        );
}

.ruby-full-bleed-caption {
    position: absolute;
    left: var(--page-gutter);
    bottom: clamp(36px, 6vw, 90px);
    z-index: 3;

    max-width: 900px;
}

/* -------------------------------------------------
   Mosaic
-------------------------------------------------- */

.ruby-mosaic {
    display: grid;
    grid-template-columns: 1.08fr .92fr;

    gap: var(--grid-gap);

    align-items: start;
}

.ruby-mosaic-side {
    display: grid;

    gap: var(--grid-gap);
}

.ruby-small-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: var(--grid-gap);
}

/* -------------------------------------------------
   Emotional centre
-------------------------------------------------- */

.ruby-emotional-centre {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #0a0708,
            #13070a
        );
}

.ruby-emotional-centre .aivelle-grid {
    align-items: center;
}

/* -------------------------------------------------
   Closing
-------------------------------------------------- */

.ruby-closing {
    position: relative;

    display: grid;
    align-items: end;

    min-height: 94svh;

    overflow: hidden;

    border-top: 1px solid var(--ruby-line);
}

.ruby-closing-shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, .96),
            rgba(0, 0, 0, .12) 72%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .66),
            transparent 70%
        );
}

.ruby-closing-content {
    position: relative;
    z-index: 2;

    padding-block-end: clamp(60px, 9vw, 120px);
}

.ruby-closing-action {
    margin-top: 38px;
}

/* -------------------------------------------------
   Credits
-------------------------------------------------- */

.ruby-credits {
    background: #050505;
}

.ruby-credit-label {
    margin-top: 28px;
}

/* -------------------------------------------------
   Ruby global overrides
-------------------------------------------------- */

.ruby-page .eyebrow,
.ruby-page .look-number,
.ruby-page .chapter-number {
    color: var(--ruby-bright);
}

.ruby-page .text-link::after,
.ruby-page .nav-link:hover,
.ruby-page .nav-link:focus-visible,
.ruby-page .members-link:hover,
.ruby-page .members-link:focus-visible,
.ruby-page .newsletter-form button {
    color: var(--ruby-bright);
}

.ruby-page .nav-link::after,
.ruby-page .accent-line,
.ruby-page .progress-fill {
    background: var(--ruby);
}

.ruby-page .members-popup,
.ruby-page .members-popup::before {
    border-color: var(--ruby);
}

.ruby-page .members-popup,
.ruby-page .mobile-members-link i {
    color: var(--ruby-bright);
}

.ruby-page .newsletter-form {
    border-bottom-color: rgba(161, 18, 47, .55);
}

/* -------------------------------------------------
   Responsive
-------------------------------------------------- */

@media (max-width: 1100px) {

    .ruby-reading-progress {
        display: none;
    }

}

@media (max-width: 992px) {

    .ruby-pair-grid,
    .ruby-mosaic {
        grid-template-columns: 1fr;
    }

    .ruby-placeholder--offset,
    .ruby-look-side {
        margin-top: 0;
    }

}

@media (max-width: 600px) {

    .ruby-opening-lead {
        font-size: clamp(36px, 11vw, 58px);
    }

    .ruby-look-header {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .ruby-section-marker {
        align-items: center;
    }

    .ruby-section-rule {
        display: none;
    }

    .ruby-small-pair {
        grid-template-columns: 1fr;
    }

    .ruby-copy-panel {
        padding: 38px 0 0;
    }

    .ruby-full-bleed {
        min-height: 68svh;
    }
    
    /* Mobile Ruby hero */
    .ruby-page .ruby-hero {
        min-height: 100svh;
        align-items: end;
    }

    .ruby-page .ruby-placeholder--hero {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .ruby-page .ruby-placeholder--hero img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;

        /* Keeps the model visible on the right */
        object-position: 67% center;
    }

    .ruby-page .editorial-hero-content {
        padding:
            0
            var(--page-gutter, 20px)
            clamp(48px, 8vh, 76px);
    }

    .ruby-page .hero-copy {
        max-width: 100%;
        transform: translateY(-90px);
    }

}


/* =================================================
   AIVELLE RUBY — iPad portrait refinement
   Applies only to portrait tablets. Desktop, tablet
   landscape and mobile <=600px remain unchanged.
================================================= */

@media
    (min-width: 601px)
    and (max-width: 1024px)
    and (orientation: portrait) {

    /* -------------------------------------------------
       1. Hero
       Pull the Ruby title block upward so it reads as
       part of the image rather than sitting below it.
    -------------------------------------------------- */

    .ruby-page .ruby-hero {
        min-height: 100svh;
        align-items: end;
    }

    .ruby-page .ruby-placeholder--hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 62% center;
    }

    .ruby-page .editorial-hero-content {
        padding-bottom: clamp(210px, 21vh, 270px);
    }

    .ruby-page .hero-copy {
        max-width: 820px;
    }

    .ruby-page .editorial-hero h1 {
        font-size: clamp(86px, 10vw, 112px);
        line-height: .82;
    }

    .ruby-page .hero-deck {
        margin-top: 22px;
        max-width: 620px;
        font-size: clamp(20px, 2.35vw, 24px);
    }

    .ruby-page .hero-meta {
        margin-top: 26px;
        gap: 14px 28px;
    }


    /* -------------------------------------------------
       2. Opening Note
       Use the full editorial width instead of the generic
       six-column tablet treatment.
    -------------------------------------------------- */

    .ruby-opening {
        padding-block: clamp(90px, 10vw, 126px);
    }

    .ruby-opening .aivelle-grid {
        display: block;
    }

    .ruby-opening .aivelle-grid > .span-10 {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .ruby-opening-lead {
        width: 100%;
        max-width: 930px;
        font-size: clamp(42px, 5.5vw, 58px);
        line-height: 1.05;
        text-wrap: balance;
    }


    /* -------------------------------------------------
       3. Confidence quote
       Let the quote occupy the full tablet composition
       while retaining left alignment.
    -------------------------------------------------- */

    .ruby-quote-section {
        min-height: auto;
        padding-block: clamp(94px, 10vw, 128px);
    }

    .ruby-quote-section .aivelle-grid {
        display: block;
    }

    .ruby-quote-section .aivelle-grid > .span-10 {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .ruby-display-quote {
        width: 100%;
        max-width: 950px;
        font-size: clamp(56px, 7.2vw, 76px);
        line-height: .92;
        text-wrap: balance;
    }

    .ruby-quote-credit {
        margin-top: 28px;
    }


    /* -------------------------------------------------
       4. Movement Study
       Keep the caption floating over the lower image area.
    -------------------------------------------------- */

    .ruby-full-bleed {
        min-height: 82svh;
    }

    .ruby-placeholder--full-bleed img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 66% center;
    }

    .ruby-full-bleed-caption {
        left: var(--page-gutter);
        right: var(--page-gutter);
        bottom: clamp(48px, 6vh, 74px);
        max-width: 900px;
    }

    .ruby-full-bleed-caption .section-heading {
        max-width: 900px;
        font-size: clamp(48px, 6vw, 64px);
        line-height: .96;
    }


    /* -------------------------------------------------
       5. End of collection
       Keep the closing copy over the image instead of
       allowing it to drop into a separate black block.
    -------------------------------------------------- */

    .ruby-closing {
        min-height: 88svh;
        align-items: end;
    }

    .ruby-placeholder--closing img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 55% center;
    }

    .ruby-closing::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background:
            linear-gradient(
                to top,
                rgba(0,0,0,.92) 0%,
                rgba(0,0,0,.54) 34%,
                rgba(0,0,0,.10) 70%,
                transparent 100%
            );
    }

    .ruby-closing-content {
        z-index: 2;
        padding-block-end: clamp(54px, 7vh, 86px);
    }

    .ruby-closing-content .aivelle-grid {
        display: block;
    }

    .ruby-closing-content .aivelle-grid > .span-8 {
        width: 100%;
        max-width: 820px;
    }

    .ruby-closing .section-heading {
        max-width: 820px;
        font-size: clamp(50px, 6.4vw, 68px);
        line-height: .97;
    }


    /* -------------------------------------------------
       6. Credits
       Title upper left, credit labels underneath it,
       explanatory copy aligned cleanly on the right.
    -------------------------------------------------- */

    .ruby-credits {
        padding-block: clamp(92px, 10vw, 126px);
    }

    .ruby-credits .aivelle-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        align-items: start;
        row-gap: clamp(38px, 5vw, 56px);
    }

    .ruby-credits .aivelle-grid > .span-5 {
        grid-column: 1 / span 6;
    }

    .ruby-credits .aivelle-grid > .span-3 {
        grid-column: 1 / span 6;
        grid-row: 2;
        padding-right: clamp(18px, 3vw, 36px);
    }

    .ruby-credits .aivelle-grid > .span-4 {
        grid-column: 7 / -1;
        grid-row: 2;
        padding-left: clamp(18px, 3vw, 36px);
        border-left: 1px solid var(--ruby-line);
    }

    .ruby-credits .editorial-title {
        font-size: clamp(42px, 5.6vw, 56px);
        line-height: 1;
    }

    .ruby-credits .small-copy {
        max-width: 440px;
    }


    /* -------------------------------------------------
       Shorter portrait tablet viewports
       Extra protection for smaller iPad heights.
    -------------------------------------------------- */

    @media (max-height: 1080px) {

        .ruby-page .editorial-hero-content {
            padding-bottom: clamp(170px, 17vh, 210px);
        }

        .ruby-page .editorial-hero h1 {
            font-size: clamp(78px, 9.4vw, 100px);
        }

        .ruby-page .hero-deck {
            margin-top: 18px;
        }

        .ruby-page .hero-meta {
            margin-top: 22px;
        }

        .ruby-full-bleed {
            min-height: 78svh;
        }

        .ruby-closing {
            min-height: 84svh;
        }

    }

}
