/* ==========================================================================
   Modern Home Page & Architectural Sections
   ========================================================================== */

/* 1. Full-Viewport Modern Hero Slider */
.hero-slider {
    position: relative;
    height: clamp(580px, 84vh, 840px);
    background-color: #161513;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.hero-slide.is-leaving {
    opacity: 1;
    z-index: 1;
    transition: none;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-slide__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide.is-active .hero-slide__content {
    animation: heroFadeUp 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Entrance held until the fonts + first photo are ready (html.hero-pending, set in layouts/main.php),
   so the headline never re-flows halfway through its rise-in. */
.hero-pending .hero-slide .hero-slide__content {
    opacity: 0;
    animation: none;
}

.hero-slide__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(16, 15, 13, 0.5) 0%, rgba(16, 15, 13, 0) 24%),
        linear-gradient(105deg, rgba(16, 15, 13, 0.78) 0%, rgba(16, 15, 13, 0.42) 52%, rgba(16, 15, 13, 0.14) 100%);
}

.hero-slide__container {
    position: relative;
    z-index: 2;
}

.hero-slide__content {
    max-width: 650px;
    color: #FFFFFF;
    padding-bottom: 3rem;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #E3C9A6;
    margin-bottom: 1.15rem;
}

.hero-kicker::before {
    content: '';
    width: 28px;
    height: 1px;
    background-color: #E3C9A6;
}

.hero-slide__title {
    color: #FFFFFF;
    font-size: clamp(2.7rem, 5.4vw, 4.75rem);
    font-weight: 400;
    line-height: 1.06;
    margin-bottom: 1.25rem;
}

.hero-slide__title em {
    font-style: italic;
    color: #ECD9BE;
}

.hero-slide__desc {
    font-size: 1.04rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.84);
    max-width: 520px;
    margin-bottom: 2.2rem;
}

.hero-slide__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

/* Hero Slider Footer Controls */
.hero-slider__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.25rem;
    z-index: 5;
}

.hero-slider__footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hero-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.45);
    padding: 0.35rem 0;
    transition: color var(--t-fast) var(--ease);
}

.hero-dot::after {
    content: '';
    width: 0;
    height: 1.5px;
    background-color: #E3C9A6;
    transition: width 0.4s var(--ease);
}

.hero-dot.is-active {
    color: #FFFFFF;
}

.hero-dot.is-active::after {
    width: 36px;
}

.hero-arrows {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast) var(--ease);
}

.hero-arrow:hover {
    background-color: #FFFFFF;
    color: var(--color-ink);
    border-color: #FFFFFF;
}

/* 2. Modern Asymmetric Bento Category Grid (6 Series) */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.bento-card {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 4.4;
    background-color: var(--color-surface-alt);
}

.bento-card--wide {
    grid-column: span 2;
    aspect-ratio: 16 / 10;
}

.bento-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.75s var(--ease);
}

.bento-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 15, 13, 0.02) 45%, rgba(16, 15, 13, 0.78) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    color: #FFFFFF;
}

.bento-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1.8vw, 1.75rem);
    color: #FFFFFF;
    line-height: 1.15;
}

.bento-card__count {
    display: inline-block;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.25rem;
}

.bento-card__arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.bento-card:hover img {
    transform: scale(1.06);
}

.bento-card:hover .bento-card__arrow {
    background-color: #FFFFFF;
    color: var(--color-ink);
    transform: translate(2px, -2px);
}

/* 3. Bespoke Custom-Made — dark rounded panel inset within the page margins */
.bespoke-panel {
    background-color: #181715;
    color: #F4F1EC;
    border-radius: var(--radius-lg);
    padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 5vw, 4.5rem);
}

.bespoke-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
}

.bespoke-eyebrow {
    color: #E3C9A6;
}

.bespoke-title {
    color: #FFFFFF;
    margin: 0.65rem 0 1.1rem;
}

.bespoke-desc {
    color: #B4ADA3;
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.75;
}

.bespoke-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

/* Layered Overlapping Visual */
.bespoke-visual {
    position: relative;
    padding-bottom: 3.5rem;
    padding-right: 2.5rem;
}

.bespoke-visual__main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 4.4;
}

.bespoke-visual__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bespoke-visual__inset {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 48%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 5px solid #181715;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.bespoke-visual__inset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4. Borderless Editorial Projects Grid */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.editorial-card {
    display: flex;
    flex-direction: column;
}

.editorial-card__media {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background-color: var(--color-surface-alt);
    margin-bottom: 1.15rem;
}

.editorial-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.editorial-card:hover .editorial-card__media img {
    transform: scale(1.05);
}

.editorial-card__tag {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: var(--color-ink);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.editorial-card__meta {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 500;
}

.editorial-card__title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 0.35rem 0 0.5rem;
}

.editorial-card__title a:hover {
    color: var(--color-accent);
}

.editorial-card__excerpt {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.65;
}

/* 5. Dual Feature Cards (Trade Portal + PDF Catalogue) */
.dual-cta-section {
    border-top: 1px solid var(--color-border);
}

.dual-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.dual-cta-card {
    border-radius: var(--radius-lg);
    padding: clamp(2.25rem, 4vw, 3.25rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dual-cta-card--dark {
    background: linear-gradient(135deg, #211F1C 0%, #151412 100%);
    color: #F4F1EC;
}

.dual-cta-card--dark h3 {
    color: #FFFFFF;
}

.dual-cta-card--dark p {
    color: #B4ADA3;
}

.dual-cta-card--warm {
    background: linear-gradient(135deg, #F3EFE8 0%, #EAE3D8 100%);
    color: var(--color-ink);
    border: 1px solid var(--color-border);
}

.dual-cta-card--warm p {
    color: var(--color-muted);
}

.dual-cta-card h3 {
    font-size: clamp(1.6rem, 2.4vw, 2.15rem);
    margin: 0.65rem 0 0.85rem;
}

.dual-cta-card p {
    font-size: 0.94rem;
    line-height: 1.7;
    max-width: 460px;
    margin-bottom: 1.85rem;
}

.dual-cta-card__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dual-cta-card--dark .eyebrow {
    color: #E3C9A6;
}

/* 6. At-a-Glance Trust Strip — one floating card overlapping the hero */
.stats-strip {
    position: relative;
    z-index: 6;
    margin-top: calc(-1 * var(--stats-overlap));
}

.stats-strip__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.stat {
    position: relative;
    display: flex;
    flex-direction: column-reverse; /* <dt> label comes first in the markup, value shows on top */
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    padding: 2rem 1.25rem;
    text-align: center;
}

/* Short, centred dividers (drawn on the card, not full-height borders) */
.stat + .stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 26%;
    bottom: 26%;
    width: 1px;
    background-color: var(--color-border);
}

.stat__value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-variant-numeric: lining-nums;
    font-weight: 500;
    line-height: 1;
    color: var(--color-ink);
}

.stat__label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.5;
    color: var(--color-muted);
    max-width: 220px;
}

/* Small tablets & phones: 2 × 2 grid with a centred cross of dividers */
@media (max-width: 760px) {
    .stats-strip__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat {
        padding: 1.6rem 1rem;
    }

    .stat:nth-child(3)::before {
        display: none;
    }

    .stat:nth-child(-n + 2)::after {
        content: '';
        position: absolute;
        left: 14%;
        right: 14%;
        bottom: 0;
        height: 1px;
        background-color: var(--color-border);
    }

    .stat__label {
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }
}

/* 7. From Our Muar Workshop */
.workshop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
}

.workshop-visual {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1rem;
    align-items: start;
}

.workshop-visual__tall,
.workshop-visual__short {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--color-surface-alt);
}

.workshop-visual__tall {
    aspect-ratio: 3 / 4.2;
}

.workshop-visual__short {
    aspect-ratio: 3 / 3.8;
    margin-top: 4.5rem;
}

.workshop-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workshop-lead {
    color: var(--color-muted);
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 520px;
    margin-top: 1rem;
}

.workshop-points {
    display: grid;
    gap: 1.35rem;
    margin: 2rem 0 2.25rem;
}

.workshop-point {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--color-border);
}

.workshop-point__num {
    font-variant-numeric: lining-nums;
    font-family: var(--font-display);
    font-size: 1.4rem;
    line-height: 1.1;
    color: var(--color-accent);
}

.workshop-point__title {
    font-family: var(--font-sans);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
}

.workshop-point__desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--color-muted);
}

/* 8. Custom-Made Process Steps (inside the dark bespoke section) */
.process-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.6rem 2rem;
    margin-bottom: 2.25rem;
}

.process-step {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.process-step__num {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #A58662;
}

.process-step__title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    color: #FFFFFF;
    margin: 0.4rem 0 0.3rem;
}

.process-step__desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #B4ADA3;
}

.bespoke-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.25rem;
}

.bespoke-cats__label {
    width: 100%;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8F877C;
    margin-bottom: 0.2rem;
}

.bespoke-chip {
    padding: 0.42rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: #EAE4DC;
    transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.bespoke-chip:hover {
    border-color: #E3C9A6;
    background-color: rgba(227, 201, 166, 0.08);
    color: #FFFFFF;
}

/* 9. Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.testimonial {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.75rem;
    padding: 2rem 2rem 1.75rem;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
}

.testimonial__quote {
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.45;
    color: var(--color-ink);
}

.testimonial__quote::before {
    content: '\201C';
    display: block;
    font-size: 3.2rem;
    line-height: 0.7;
    color: var(--color-accent);
    margin-bottom: 0.4rem;
}

.testimonial__by {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--color-border);
}

.testimonial__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-ink);
}

.testimonial__role {
    font-size: 0.78rem;
    color: var(--color-muted);
}

/* 10. Visit Our Showroom */
.showroom-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
}

.showroom-visual {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 5 / 4;
    background-color: var(--color-surface-warm);
}

.showroom-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showroom-details {
    display: grid;
    gap: 1.15rem;
    margin: 1.85rem 0 2.25rem;
}

.showroom-detail {
    display: grid;
    grid-template-columns: 1.5rem 1fr;
    gap: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-ink-soft);
}

.showroom-detail svg {
    color: var(--color-accent);
    margin-top: 0.2rem;
}

.showroom-detail strong {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.1rem;
}

.showroom-detail a:hover {
    color: var(--color-accent);
}

.showroom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-card--wide {
        grid-column: span 1;
        aspect-ratio: 4 / 4.2;
    }

    .bespoke-grid,
    .dual-cta-grid,
    .workshop-grid,
    .showroom-grid {
        grid-template-columns: 1fr;
    }

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

}

@media (max-width: 640px) {
    .hero-slider {
        height: 600px;
    }

    .hero-slider__footer {
        bottom: 1.5rem;
    }

    .hero-slide__actions .btn {
        flex: 1 1 auto;
    }

    .bento-grid,
    .editorial-grid,
    .testimonial-grid,
    .process-steps {
        grid-template-columns: 1fr;
    }

    .stat {
        padding: 1.5rem 1rem;
    }

    .bespoke-visual {
        padding-right: 1rem;
        padding-bottom: 2.5rem;
    }

    .workshop-visual__short {
        margin-top: 2.5rem;
    }

    .showroom-actions .btn {
        flex: 1 1 100%;
    }
}

/* Hero scroll depth: background drifts slower than the page, copy lifts and fades out.
   Driven by --hero-shift / --hero-fade set from JS. */
.hero-slide__bg {
    transform: translate3d(0, calc(var(--hero-shift, 0px) * 0.4), 0);
    will-change: transform;
}

.hero-slide__container {
    transform: translate3d(0, calc(var(--hero-shift, 0px) * 0.18), 0);
    opacity: var(--hero-fade, 1);
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide__bg,
    .hero-slide__container {
        transform: none;
        opacity: 1;
    }
}

/* ==========================================================================
   Home: Full-Screen Hero + Seamless Section Flow
   ========================================================================== */

/* Hero fills exactly the rest of the first screen (below the top banner).
   The transparent header floats over it. svh keeps it clear of mobile browser bars. */
.has-hero-overlay .hero-slider {
    height: calc(100vh - var(--banner-h, 0px));
    height: calc(100svh - var(--banner-h, 0px));
    min-height: 560px;
}

/* Keep the copy centred in the visible area: below the header, above the stats card */
.has-hero-overlay .hero-slide {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--stats-overlap) + 4.5rem);
}

.has-hero-overlay .hero-slide__content {
    padding-bottom: 0;
}

.has-hero-overlay .hero-slider__footer {
    bottom: calc(var(--stats-overlap) + 1.75rem);
}

/* One cream background for every section: they're separated by spacing, not colour bands.
   Adjacent sections share a single gap instead of stacking two paddings. */
.page-home main > .section + .section {
    padding-top: 0;
}

.page-home main > .stats-strip + .section {
    padding-top: clamp(4rem, 7vw, 6rem);
}

@media (max-width: 1024px) {
    :root {
        --stats-overlap: 2.75rem;
    }
}

@media (max-width: 640px) {
    :root {
        --stats-overlap: 2rem;
    }

    .has-hero-overlay .hero-slide {
        padding-bottom: calc(var(--stats-overlap) + 5rem);
    }

    .has-hero-overlay .hero-slider__footer {
        bottom: calc(var(--stats-overlap) + 1.25rem);
    }

    .bespoke-panel {
        border-radius: var(--radius-lg);
    }
}

/* Phones: swipe replaces the prev/next arrows */
@media (max-width: 640px) {
    .hero-arrows {
        display: none;
    }
}

/* Stats card: hidden while the visitor is at the very top (so it doesn't sit half-over the hero),
   rises into place once they start scrolling, and hides again when they scroll back to the top.
   Only with JS — without it, or with reduced motion, the card is always visible. */
.js .page-home .stats-strip__grid {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .page-home .stats-strip.is-shown .stats-strip__grid {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js .page-home .stats-strip__grid {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Coming Soon (app/Views/pages/placeholder.php)
   ========================================================================== */
.coming-soon__inner {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4.5rem) 0;
    text-align: center;
}

.coming-soon__title {
    margin: 0.75rem 0 1rem;
}

.coming-soon__desc {
    color: var(--color-muted);
    line-height: 1.75;
    margin-bottom: 2rem;
}

.coming-soon__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}
