/* ==========================================================================
   Luna Studio — home page
   --------------------------------------------------------------------------
   Only the sections unique to the home page live here: the hero, the tile
   band that overlaps it, the about split, the photo strip, the offerings
   pair and the closing CTA.

   Header, footer, cards, buttons and colour come from css/theme.css,
   which every page shares. Load this after it.
   ========================================================================== */

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

.rf-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(540px, 78vh, 800px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Room for the tile band that overlaps the lower edge. */
    padding: var(--space-lg) 0 calc(var(--space-lg) + 70px);
    text-align: center;
}

.rf-hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* Pre-cropped to the wall, moon and floor, so the framing holds at any
       viewport instead of drifting with background-position. */
    background-image: url('../assets/images/luna_wall_hero.jpeg');
    background-size: cover;
    background-position: center;
}

/* Scrim: keeps the headline legible and lets the hero melt into the tiles. */
.rf-hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(47, 36, 29, 0.42) 0%,
            rgba(47, 36, 29, 0.16) 34%,
            rgba(73, 46, 32, 0.72) 82%,
            var(--surface-base) 100%);
}

.rf-hero h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 5.4vw, 4.4rem);
    letter-spacing: 0.05em;
    line-height: 1.14;
    color: #fff;
    text-shadow: 0 2px 30px rgba(47, 36, 29, 0.4);
}

.rf-hero p {
    margin: var(--space-md) auto 0;
    max-width: 560px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 1px 14px rgba(47, 36, 29, 0.5);
}

.rf-hero__links {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Action tiles — one flush band lifted over the hero edge
   -------------------------------------------------------------------------- */

.rf-tiles {
    position: relative;
    z-index: 5;
    margin-top: -84px;
}

.rf-tiles__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    box-shadow: 0 24px 60px rgba(20, 14, 10, 0.42);
}

.rf-tile {
    position: relative;
    overflow: hidden;
    min-height: 172px;
    padding: var(--space-md) var(--space-sm) var(--space-sm);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--space-3xs);
    transition: filter var(--t-fast);
}

.rf-tile__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* The tile ink is already chosen per surface, so this only needs to sit a step
   behind the title. 0.78 dropped the sage and clay tiles to 3.8:1 and 4.3:1;
   0.9 keeps the hierarchy and clears AA on all three. */
.rf-tile__meta {
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0.9;
}

.rf-tile::after {
    content: '';
    position: absolute;
    left: var(--space-sm);
    right: var(--space-sm);
    bottom: 0;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-slow);
}

.rf-tile:hover::after {
    transform: scaleX(1);
}

.rf-tile:hover {
    filter: brightness(1.09);
}

/* Ink follows the surface, so every tile clears contrast. Scoped to the theme
   class so these beat the base `a { color: inherit }`. */
.theme-refined .rf-tile--class {
    background-color: var(--luna-plum);
    color: var(--ink-on-dark);
}

.theme-refined .rf-tile--workshop {
    background-color: var(--luna-clay);
    color: var(--ink-on-dark);
}

.theme-refined .rf-tile--rent {
    background-color: var(--luna-sage);
    color: var(--luna-black);
}

.rf-tile__badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.3rem 0.75rem;
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background-color: var(--luna-sand);
    color: var(--luna-black);
}

/* --------------------------------------------------------------------------
   More than just a studio
   Copy + portrait (matched height) on top; three full-bleed tiles below.
   -------------------------------------------------------------------------- */

.rf-about {
    padding: var(--space-2xl) 0 var(--space-xl);
}

.rf-about__top {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    column-gap: var(--space-lg);
    align-items: stretch;
}

.rf-about__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
    align-items: flex-end;
}

.theme-refined .rf-about h2 {
    font-size: clamp(2.1rem, 4.4vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: -0.015em;
    line-height: 1.02;
    color: var(--luna-sand);
    margin-bottom: var(--space-md);
}

.rf-about__copy p {
    max-width: 42ch;
    color: var(--ink-on-dark-muted);
}

.rf-about__copy .accent-pill-btn {
    margin-top: var(--space-md);
}

.rf-about__portrait {
    margin: 0;
    background: rgba(237, 228, 218, 0.08);
    overflow: hidden;
    align-self: stretch;
}

.rf-about__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rf-about__tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    margin-top: var(--space-lg);
}

.rf-about__tile {
    display: block;
    margin: 0;
    overflow: hidden;
    background: rgba(237, 228, 218, 0.08);
}

.rf-about__tile img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--ease);
}

.rf-about__tile:hover img {
    transform: scale(1.05);
}

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

.rf-cta {
    background-color: var(--luna-plum);
    padding: var(--space-2xl) 0;
    text-align: center;
}

.theme-refined .rf-cta h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: var(--space-2xs);
}

.theme-refined .rf-cta p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   Understated text link, used where a full button would shout
   -------------------------------------------------------------------------- */

.rf-textlink {
    position: relative;
    display: inline-block;
    padding-bottom: 3px;
    font-family: var(--font-display);
    font-size: 0.76rem;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--luna-sand);
}

.rf-hero__links .rf-textlink {
    color: #fff;
}

.rf-textlink::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    opacity: 0.42;
    transform-origin: left;
    transition: opacity var(--t-fast), transform var(--t-slow);
}

.rf-textlink:hover::after {
    opacity: 1;
    transform: scaleX(1.06);
}

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

@media (max-width: 900px) {
    .rf-tiles {
        margin-top: -48px;
    }

    .rf-tiles__row {
        grid-template-columns: 1fr;
    }

    .rf-about__top {
        grid-template-columns: 1fr;
        row-gap: var(--space-md);
    }

    .rf-about__copy {
        text-align: left;
        align-items: flex-start;
    }

    .rf-about__portrait {
        order: -1;
    }

    .rf-about__portrait img {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .rf-about {
        padding-top: var(--space-xl);
    }

    .rf-tile {
        min-height: 148px;
    }
}

@media (max-width: 520px) {
    .rf-hero {
        min-height: 68vh;
    }

    .rf-hero__links {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }

    .rf-about__tiles {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    .rf-about__tile img {
        transition: none;
    }
}
