/* The MN Studio — Editorial Layout Styles */

/* ==================== EDITORIAL HERO ==================== */

.editorial-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
}

.editorial-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
}

.editorial-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
}

.editorial-hero-content {
    position: relative;
    z-index: 2;
    padding: var(--space-3xl) var(--space-2xl);
    max-width: 800px;
    color: var(--white);
}

.editorial-hero-category {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.editorial-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.editorial-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.375rem);
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

/* ==================== EDITORIAL SECTION ==================== */

.editorial-section {
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--cream);
}

.editorial-section--dark {
    background: var(--black);
    color: var(--white);
}

.editorial-section--white {
    background: var(--white);
}

.editorial-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== EDITORIAL GRID LAYOUTS ==================== */

/* Two column split layout */
.editorial-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.editorial-split--reverse {
    direction: rtl;
}

.editorial-split--reverse > * {
    direction: ltr;
}

/* Asymmetric layouts */
.editorial-asymmetric {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.editorial-asymmetric--reverse {
    grid-template-columns: 1fr 2fr;
}

/* Masonry-style editorial grid */
.editorial-masonry {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--space-lg);
}

.editorial-masonry-item {
    position: relative;
    overflow: hidden;
}

.editorial-masonry-item--large {
    grid-column: span 8;
    grid-row: span 2;
}

.editorial-masonry-item--medium {
    grid-column: span 6;
}

.editorial-masonry-item--small {
    grid-column: span 4;
}

.editorial-masonry-item--tall {
    grid-row: span 2;
}

/* ==================== EDITORIAL IMAGES ==================== */

.editorial-image {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.editorial-image img,
.editorial-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position is set via JS for responsive desktop/mobile values */
    transition: transform 0.8s var(--ease);
}

.editorial-image:hover img,
.editorial-image:hover video {
    transform: scale(1.03);
}

.editorial-image--portrait {
    aspect-ratio: 3/4;
}

.editorial-image--landscape {
    aspect-ratio: 16/9;
}

.editorial-image--square {
    aspect-ratio: 1/1;
}

.editorial-image--wide {
    aspect-ratio: 21/9;
}

.editorial-image--full {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Image caption */
.editorial-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--white);
}

.editorial-image-caption-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.editorial-image-caption-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== EDITORIAL TEXT ==================== */

.editorial-text {
    max-width: 700px;
}

.editorial-text--center {
    margin: 0 auto;
    text-align: center;
}

.editorial-text--right {
    margin-left: auto;
    text-align: right;
}

.editorial-category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.editorial-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

.editorial-title--small {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.editorial-title--large {
    font-size: clamp(3rem, 7vw, 6rem);
}

.editorial-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    color: var(--gray);
    margin-bottom: var(--space-md);
}

.editorial-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--gray);
    margin-bottom: var(--space-lg);
}

.editorial-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray);
}

.editorial-body p {
    margin-bottom: var(--space-md);
}

.editorial-body p:last-child {
    margin-bottom: 0;
}

/* Drop cap for first paragraph */
.editorial-body--dropcap p:first-of-type::first-letter {
    font-family: var(--font-serif);
    float: left;
    font-size: 4.5rem;
    line-height: 0.8;
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    color: var(--black);
    font-weight: 400;
}

/* ==================== EDITORIAL QUOTE ==================== */

.editorial-quote {
    position: relative;
    padding: var(--space-2xl) 0;
    margin: var(--space-2xl) 0;
}

.editorial-quote::before {
    content: '"';
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font-serif);
    font-size: 8rem;
    line-height: 1;
    color: var(--gold);
    opacity: 0.3;
}

.editorial-quote-text {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    color: var(--black);
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.editorial-quote-author {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    padding-left: var(--space-lg);
}

/* ==================== EDITORIAL DIVIDERS ==================== */

.editorial-divider {
    width: 100%;
    height: 1px;
    background: var(--gray-light);
    margin: var(--space-2xl) 0;
}

.editorial-divider--gold {
    background: var(--gold);
    height: 2px;
    width: 80px;
}

.editorial-divider--center {
    margin-left: auto;
    margin-right: auto;
}

/* ==================== EDITORIAL FEATURE BLOCK ==================== */

.editorial-feature {
    position: relative;
    padding: var(--space-3xl) var(--space-2xl);
    background: var(--black);
    color: var(--white);
    overflow: hidden;
}

.editorial-feature-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
}

.editorial-feature-bg img,
.editorial-feature-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.editorial-feature-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.editorial-feature .editorial-category {
    color: var(--gold);
}

.editorial-feature .editorial-title {
    color: var(--white);
}

.editorial-feature .editorial-body {
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== EDITORIAL CAROUSEL ==================== */

.editorial-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.editorial-carousel-track {
    display: flex;
    gap: var(--space-md);
    transition: transform 0.5s var(--ease);
}

.editorial-carousel-item {
    flex: 0 0 auto;
    width: 60%;
}

.editorial-carousel-item img,
.editorial-carousel-item video {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: center center;
}

.editorial-carousel-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.editorial-carousel-btn {
    width: 48px;
    height: 48px;
    border: 1px solid var(--gray-light);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
}

.editorial-carousel-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

/* ==================== EDITORIAL SPECS/DETAILS ==================== */

.editorial-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

.editorial-spec {
    text-align: center;
}

.editorial-spec-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.editorial-spec-value {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--black);
}

/* ==================== EDITORIAL CTA ==================== */

.editorial-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    transition: all 0.3s var(--ease);
    margin-top: var(--space-md);
}

.editorial-cta:hover {
    color: var(--gold);
    gap: 1rem;
}

.editorial-cta-arrow {
    width: 24px;
    height: 1px;
    background: currentColor;
    position: relative;
    transition: width 0.3s var(--ease);
}

.editorial-cta-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 6px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
}

.editorial-cta:hover .editorial-cta-arrow {
    width: 32px;
}

/* Light variant for dark backgrounds */
.editorial-cta--light {
    color: var(--white);
}

.editorial-cta--light:hover {
    color: var(--gold);
}

/* ==================== EDITORIAL RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .editorial-split {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .editorial-split--reverse {
        direction: ltr;
    }

    .editorial-asymmetric,
    .editorial-asymmetric--reverse {
        grid-template-columns: 1fr;
    }

    .editorial-masonry {
        grid-template-columns: repeat(6, 1fr);
    }

    .editorial-masonry-item--large {
        grid-column: span 6;
    }

    .editorial-masonry-item--medium {
        grid-column: span 6;
    }

    .editorial-masonry-item--small {
        grid-column: span 3;
    }

    .editorial-carousel-item {
        width: 80%;
    }

    .editorial-container {
        padding: 0 var(--space-md);
    }
}

@media (max-width: 768px) {
    .editorial-hero {
        min-height: 85svh;
    }

    .editorial-hero-content {
        padding: var(--space-xl) var(--space-md);
        max-width: 100%;
    }

    .editorial-hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
        line-height: 1.1;
    }

    .editorial-hero-subtitle {
        font-size: clamp(0.95rem, 3vw, 1.125rem);
        line-height: 1.5;
    }

    .editorial-hero-category {
        font-size: 0.65rem;
        letter-spacing: 0.15em;
    }

    .editorial-section {
        padding: var(--space-xl) var(--space-md);
    }

    .editorial-container {
        padding: 0;
    }

    .editorial-masonry {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .editorial-masonry-item--large,
    .editorial-masonry-item--medium,
    .editorial-masonry-item--small {
        grid-column: span 1;
    }

    .editorial-masonry-item--tall {
        grid-row: span 1;
    }

    .editorial-image--full {
        width: calc(100% + var(--space-md) * 2);
        margin-left: calc(var(--space-md) * -1);
    }

    .editorial-text {
        max-width: 100%;
    }

    .editorial-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        line-height: 1.15;
    }

    .editorial-title--large {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .editorial-title--small {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }

    .editorial-subtitle {
        font-size: clamp(1rem, 3vw, 1.25rem);
    }

    .editorial-lead {
        font-size: 1.0625rem;
        line-height: 1.7;
    }

    .editorial-body {
        font-size: 1rem;
        line-height: 1.75;
    }

    .editorial-quote {
        padding: var(--space-xl) 0;
        margin: var(--space-xl) 0;
    }

    .editorial-quote::before {
        font-size: 5rem;
    }

    .editorial-quote-text {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
        padding-left: 0;
        line-height: 1.5;
    }

    .editorial-quote-author {
        padding-left: 0;
        font-size: 0.75rem;
    }

    .editorial-specs {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        padding: var(--space-md) 0;
    }

    .editorial-spec-label {
        font-size: 0.65rem;
    }

    .editorial-spec-value {
        font-size: 1.25rem;
    }

    .editorial-carousel-item {
        width: 90%;
    }

    .editorial-feature {
        padding: var(--space-xl) var(--space-md);
    }

    .editorial-feature-content {
        max-width: 100%;
    }

    .editorial-divider {
        margin: var(--space-xl) 0;
    }

    .editorial-category {
        font-size: 0.65rem;
    }

    .editorial-cta {
        font-size: 0.8rem;
        padding: 0.75rem 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .editorial-body--dropcap p:first-of-type::first-letter {
        font-size: 3.5rem;
        padding-right: 0.375rem;
    }
}

@media (max-width: 480px) {
    .editorial-hero {
        min-height: 75svh;
    }

    .editorial-hero-content {
        padding: var(--space-lg) var(--space-sm);
    }

    .editorial-hero-title {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
    }

    .editorial-hero-subtitle {
        font-size: 0.9375rem;
    }

    .editorial-section {
        padding: var(--space-lg) var(--space-sm);
    }

    .editorial-split {
        gap: var(--space-lg);
    }

    .editorial-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .editorial-title--large {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
    }

    .editorial-specs {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .editorial-carousel-item {
        width: 95%;
    }

    .editorial-image--full {
        width: calc(100% + var(--space-sm) * 2);
        margin-left: calc(var(--space-sm) * -1);
    }

    .editorial-quote::before {
        font-size: 4rem;
    }

    .editorial-quote-text {
        font-size: clamp(1.125rem, 5vw, 1.5rem);
    }

    .editorial-body--dropcap p:first-of-type::first-letter {
        font-size: 3rem;
    }

    .editorial-feature {
        padding: var(--space-lg) var(--space-sm);
    }

    .editorial-carousel-nav {
        gap: var(--space-sm);
    }
}

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */

@media (hover: none) and (pointer: coarse) {
    .editorial-image:hover img,
    .editorial-image:hover video {
        transform: none;
    }

    .editorial-carousel-btn {
        width: 56px;
        height: 56px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Active states for touch feedback */
    .editorial-cta:active {
        opacity: 0.7;
    }

    .editorial-carousel-btn:active {
        background: var(--gold);
        border-color: var(--gold);
        color: var(--white);
    }

    .editorial-image:active img,
    .editorial-image:active video {
        transform: scale(0.98);
    }
}

/* ==================== SAFE AREA FOR NOTCHED DEVICES ==================== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .editorial-hero-content {
        padding-left: max(var(--space-md), env(safe-area-inset-left));
        padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    .editorial-section {
        padding-left: max(var(--space-md), env(safe-area-inset-left));
        padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    @media (max-width: 768px) {
        .editorial-hero-content {
            padding-left: max(var(--space-md), env(safe-area-inset-left));
            padding-right: max(var(--space-md), env(safe-area-inset-right));
        }

        .editorial-section {
            padding-left: max(var(--space-md), env(safe-area-inset-left));
            padding-right: max(var(--space-md), env(safe-area-inset-right));
        }
    }

    @media (max-width: 480px) {
        .editorial-hero-content {
            padding-left: max(var(--space-sm), env(safe-area-inset-left));
            padding-right: max(var(--space-sm), env(safe-area-inset-right));
        }

        .editorial-section {
            padding-left: max(var(--space-sm), env(safe-area-inset-left));
            padding-right: max(var(--space-sm), env(safe-area-inset-right));
        }
    }
}

/* ==================== LANDSCAPE MOBILE OPTIMIZATIONS ==================== */

@media (max-width: 896px) and (orientation: landscape) {
    .editorial-hero {
        min-height: 100svh;
    }

    .editorial-hero-content {
        padding-top: var(--space-lg);
        padding-bottom: var(--space-lg);
    }

    .editorial-hero-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .editorial-hero-subtitle {
        font-size: 0.9375rem;
        max-width: 70%;
    }
}

/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {
    .editorial-image img,
    .editorial-image video,
    .editorial-carousel-track {
        transition: none;
    }

    .editorial-cta,
    .editorial-cta-arrow,
    .editorial-carousel-btn {
        transition: none;
    }
}
