/* ==========================================================================
   RSR F4 — Custom Stylesheet for Full Site Editing
   Handles animations, decorative elements, and section-specific styling
   that theme.json cannot manage
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    --rsrf4-primary: #0F0F0F;
    --rsrf4-primary-rgb: 15, 15, 15;
    --rsrf4-charcoal: #1C1C1E;
    --rsrf4-charcoal-light: #2A2A2D;
    --rsrf4-accent: #C4A265;
    --rsrf4-accent-light: #D4B87A;
    --rsrf4-accent-dark: #9E7E45;
    --rsrf4-green: #2C4A3E;
    --rsrf4-green-rgb: 44, 74, 62;
    --rsrf4-green-dark: #1A3028;
    --rsrf4-green-light: #3A6052;
    --rsrf4-cream: #F8F5F0;
    --rsrf4-warm-white: #FDFCFA;
    --rsrf4-stone: #E8E0D4;
    --rsrf4-stone-dark: #D5C9B8;
    --rsrf4-taupe: #A69580;
    --rsrf4-white: #FFFFFF;
    --rsrf4-text: #1C1C1E;
    --rsrf4-text-mid: #555555;
    --rsrf4-text-light: #7A7A7A;
    --rsrf4-text-muted: #999999;
    --rsrf4-border: rgba(0, 0, 0, 0.06);
    --rsrf4-border-dark: rgba(255, 255, 255, 0.08);

    --rsrf4-font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --rsrf4-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --rsrf4-section-pad: clamp(80px, 10vw, 160px);
    --rsrf4-container: 1240px;
    --rsrf4-container-narrow: 860px;

    --rsrf4-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --rsrf4-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --rsrf4-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Global Scrolling & Overflow
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Subtle grain texture — z-index 9999 so it stays above everything but pointer-events:none */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Section Base Styles
   -------------------------------------------------------------------------- */
.rsrf4-section {
    padding: var(--rsrf4-section-pad) 0;
    position: relative;
}

.rsrf4-section__label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--rsrf4-font-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--rsrf4-accent);
    margin-bottom: 20px;
}

.rsrf4-section__label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--rsrf4-accent);
}

.rsrf4-section__label--light {
    color: var(--rsrf4-accent-light);
}

.rsrf4-section__label--light::before {
    background: var(--rsrf4-accent-light);
}

.rsrf4-section__label--accent {
    color: var(--rsrf4-accent);
}

.rsrf4-section__headline {
    font-family: var(--rsrf4-font-serif);
    font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 300;
    line-height: 1.1;
    color: var(--rsrf4-charcoal);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.rsrf4-section__headline--light {
    color: var(--rsrf4-white);
}

.rsrf4-section__headline em {
    font-style: italic;
    color: var(--rsrf4-accent);
    font-weight: 300;
}

.rsrf4-section__text {
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    color: var(--rsrf4-text-mid);
    max-width: 620px;
    margin-bottom: 16px;
}

.rsrf4-section__text--centered {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.rsrf4-section__text--light {
    color: rgba(255, 255, 255, 0.6);
}

.rsrf4-section__text--large {
    font-size: clamp(17px, 1.3vw, 21px);
    line-height: 1.75;
}

/* --------------------------------------------------------------------------
   HEADER — FSE Template Part (Fixed on top)
   -------------------------------------------------------------------------- */
/* Always-white sticky header */
.rsrf4-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9990 !important;
    padding: 18px clamp(1.5rem, 3vw, 3rem) !important;
    background: #FFFFFF !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.4s var(--rsrf4-ease-smooth);
}

/* Admin bar offset */
.admin-bar .rsrf4-header {
    top: 32px !important;
}

/* Slightly stronger shadow on scroll */
.rsrf4-header.is-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Custom logo sizing */
.rsrf4-header .custom-logo-link,
.rsrf4-header .wp-block-site-logo {
    display: flex;
    align-items: center;
}
.rsrf4-header .custom-logo-link img,
.rsrf4-header .custom-logo,
.rsrf4-header .wp-block-site-logo img {
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Site title — dark text on white */
.rsrf4-header .wp-block-site-title {
    margin: 0;
}

.rsrf4-header .wp-block-site-title a {
    font-family: var(--rsrf4-font-sans);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--rsrf4-charcoal) !important;
    text-decoration: none;
}

/* Navigation — dark links on white header */
.rsrf4-header .wp-block-navigation__container {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.rsrf4-header .wp-block-navigation a,
.rsrf4-header .wp-block-navigation-item__content {
    font-family: var(--rsrf4-font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rsrf4-text-light) !important;
    transition: all 0.3s var(--rsrf4-ease);
    position: relative;
    padding-bottom: 3px;
    text-decoration: none !important;
}

.rsrf4-header .wp-block-navigation a::after,
.rsrf4-header .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--rsrf4-accent);
    transition: width 0.4s var(--rsrf4-ease-out);
}

.rsrf4-header .wp-block-navigation a:hover,
.rsrf4-header .wp-block-navigation-item__content:hover {
    color: var(--rsrf4-charcoal) !important;
}

.rsrf4-header .wp-block-navigation a:hover::after,
.rsrf4-header .wp-block-navigation-item__content:hover::after,
.rsrf4-header .wp-block-navigation a.is-active::after {
    width: 100%;
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.rsrf4-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--rsrf4-primary);
}

.rsrf4-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.rsrf4-hero__bg--default {
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(44, 74, 62, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(196, 162, 101, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 50%, rgba(26, 48, 40, 0.8) 0%, var(--rsrf4-primary) 70%);
}

.rsrf4-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* Animated floating lines */
.rsrf4-hero__lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.12;
    z-index: 1;
}

.rsrf4-hero__line-el {
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--rsrf4-accent), transparent);
    animation: rsrf4-heroLine 8s ease-in-out infinite;
}

.rsrf4-hero__line-el:nth-child(1) { left: 15%; height: 30vh; top: -10%; animation-delay: 0s; animation-duration: 10s; }
.rsrf4-hero__line-el:nth-child(2) { left: 35%; height: 40vh; top: -20%; animation-delay: 2s; animation-duration: 12s; }
.rsrf4-hero__line-el:nth-child(3) { left: 55%; height: 25vh; top: -5%; animation-delay: 4s; animation-duration: 9s; }
.rsrf4-hero__line-el:nth-child(4) { left: 75%; height: 35vh; top: -15%; animation-delay: 1s; animation-duration: 11s; }
.rsrf4-hero__line-el:nth-child(5) { left: 90%; height: 20vh; top: -8%; animation-delay: 3s; animation-duration: 8s; }

@keyframes rsrf4-heroLine {
    0% { transform: translateY(-100%); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(calc(100vh + 100%)); opacity: 0; }
}

/* Corner accents */
.rsrf4-hero__corner {
    position: absolute;
    width: 80px;
    height: 80px;
    z-index: 2;
}

.rsrf4-hero__corner--tl {
    top: 60px;
    left: 60px;
    border-top: 1px solid rgba(196, 162, 101, 0.2);
    border-left: 1px solid rgba(196, 162, 101, 0.2);
}

.rsrf4-hero__corner--br {
    bottom: 60px;
    right: 60px;
    border-bottom: 1px solid rgba(196, 162, 101, 0.2);
    border-right: 1px solid rgba(196, 162, 101, 0.2);
}

.rsrf4-hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 clamp(24px, 5vw, 72px);
}

.rsrf4-hero__tagline {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-family: var(--rsrf4-font-sans);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--rsrf4-accent);
    margin-bottom: 36px;
}

.rsrf4-hero__tagline::before,
.rsrf4-hero__tagline::after {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--rsrf4-accent);
    opacity: 0.4;
}

.rsrf4-hero__headline {
    font-family: var(--rsrf4-font-serif);
    font-size: clamp(44px, 6.5vw, 88px);
    font-weight: 300;
    line-height: 1.05;
    color: #fff;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.rsrf4-hero__headline em {
    font-style: italic;
    color: var(--rsrf4-accent-light);
    font-weight: 300;
}

.rsrf4-hero__subheadline {
    font-family: var(--rsrf4-font-sans);
    font-size: clamp(14px, 1.1vw, 17px);
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.5);
    max-width: 540px;
    margin: 0 auto 48px;
}

/* Diamond divider */
.rsrf4-hero__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rsrf4-hero__divider span:nth-child(1),
.rsrf4-hero__divider span:nth-child(3) {
    width: 32px;
    height: 1px;
    background: var(--rsrf4-accent);
    opacity: 0.3;
}

.rsrf4-hero__divider span:nth-child(2) {
    width: 6px;
    height: 6px;
    border: 1px solid var(--rsrf4-accent);
    transform: rotate(45deg);
    opacity: 0.5;
}

/* Legacy support for old .rsrf4-hero__line */
.rsrf4-hero__line {
    width: 48px;
    height: 1px;
    background: var(--rsrf4-accent);
    margin: 0 auto;
}

.rsrf4-hero__scroll {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.rsrf4-hero__scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--rsrf4-accent-light), transparent);
    animation: rsrf4-scroll-pulse 2.5s ease-in-out infinite;
}

@keyframes rsrf4-scroll-pulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 0.8; transform: scaleY(1); transform-origin: top; }
}

/* --------------------------------------------------------------------------
   STATS BANNER
   -------------------------------------------------------------------------- */
.rsrf4-stats {
    background: var(--rsrf4-charcoal);
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}

.rsrf4-stats::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--rsrf4-green-dark), transparent 30%, transparent 70%, var(--rsrf4-green-dark));
    opacity: 0.3;
}

.rsrf4-stats__container {
    max-width: var(--rsrf4-container);
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 72px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
    z-index: 2;
}

.rsrf4-stats__item {
    text-align: center;
    position: relative;
}

.rsrf4-stats__item + .rsrf4-stats__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
}

.rsrf4-stats__number {
    font-family: var(--rsrf4-font-serif);
    font-size: clamp(40px, 4vw, 60px);
    font-weight: 300;
    color: var(--rsrf4-accent-light);
    line-height: 1;
    margin-bottom: 8px;
}

.rsrf4-stats__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* --------------------------------------------------------------------------
   ABOUT
   -------------------------------------------------------------------------- */
.rsrf4-about {
    background: var(--rsrf4-warm-white);
    overflow: hidden;
}

.rsrf4-about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 100px;
}

.rsrf4-about__image {
    position: relative;
}

.rsrf4-about__image img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 3px;
}

.rsrf4-about__accent-card {
    position: absolute;
    bottom: -32px;
    right: -32px;
    background: var(--rsrf4-accent);
    padding: 32px 36px;
    border-radius: 2px;
    z-index: 2;
}

.rsrf4-about__accent-card-title {
    font-family: var(--rsrf4-font-serif);
    font-size: 48px;
    font-weight: 300;
    color: #fff;
    line-height: 1;
}

.rsrf4-about__accent-card-text {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.rsrf4-about__pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding-top: 80px;
}

.rsrf4-about__pillar {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--rsrf4-stone-dark);
    transition: border-color 0.4s var(--rsrf4-ease);
}

.rsrf4-about__pillar:hover {
    border-left-color: var(--rsrf4-accent);
}

.rsrf4-about__pillar-accent {
    width: 0;
    height: 0;
    margin: 0;
    display: none;
}

.rsrf4-about__pillar-title {
    font-family: var(--rsrf4-font-serif);
    font-size: 24px;
    font-weight: 400;
    color: var(--rsrf4-charcoal);
    margin-bottom: 12px;
    line-height: 1.25;
}

.rsrf4-about__pillar-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--rsrf4-text-light);
}

/* --------------------------------------------------------------------------
   PORTFOLIO
   -------------------------------------------------------------------------- */
.rsrf4-portfolio {
    background: var(--rsrf4-white);
}

.rsrf4-portfolio__header {
    text-align: center;
    margin-bottom: 72px;
}

/* Portfolio row: flex layout with 3 equal cards */
.rsrf4-portfolio__row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}

/* Legacy grid selectors for backwards compat */
.rsrf4-portfolio__grid,
.wp-block-columns.rsrf4-portfolio__grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}

.rsrf4-portfolio__card,
.wp-block-group.rsrf4-portfolio__card {
    flex: 1 1 calc(33.333% - 16px) !important;
    min-width: 280px !important;
    max-width: calc(33.333% - 16px);
}

.rsrf4-portfolio__card,
.wp-block-column.rsrf4-portfolio__card,
.wp-block-group.rsrf4-portfolio__card {
    background: #fff;
    border-radius: 3px;
    transition: all 0.5s var(--rsrf4-ease-out);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    padding-bottom: 24px;
}

.rsrf4-portfolio__card--empty {
    background: transparent !important;
    border: none !important;
}

.rsrf4-portfolio__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.rsrf4-portfolio__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rsrf4-accent), var(--rsrf4-accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--rsrf4-ease-out);
    z-index: 2;
}

.rsrf4-portfolio__card:hover::before {
    transform: scaleX(1);
}

.rsrf4-portfolio__card-image,
.rsrf4-portfolio__card .wp-block-image,
.rsrf4-portfolio__card > figure {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--rsrf4-stone) 0%, var(--rsrf4-stone-dark) 100%);
    margin-bottom: 0 !important;
    border-radius: 3px 3px 0 0;
}

.rsrf4-portfolio__card-image img,
.rsrf4-portfolio__card .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--rsrf4-ease-out);
}

.rsrf4-portfolio__card:hover .rsrf4-portfolio__card-image img {
    transform: scale(1.04);
}

.rsrf4-portfolio__card-image--placeholder {
    background: linear-gradient(135deg, var(--rsrf4-stone), var(--rsrf4-stone-dark));
    display: flex;
    align-items: center;
    justify-content: center;
}

.rsrf4-portfolio__card-content {
    padding: 28px 28px 24px;
}

/* Block-based card: pad all content after the image */
.rsrf4-portfolio__card > .wp-block-heading,
.rsrf4-portfolio__card > .wp-block-group,
.rsrf4-portfolio__card > p {
    padding-left: 24px;
    padding-right: 24px;
}
.rsrf4-portfolio__card > .wp-block-heading {
    margin-top: 20px;
}

.rsrf4-portfolio__card-title,
.rsrf4-portfolio__card > .wp-block-heading {
    font-family: var(--rsrf4-font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--rsrf4-charcoal);
    margin-bottom: 6px;
    line-height: 1.25;
}

.rsrf4-portfolio__card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.rsrf4-portfolio__card-type {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rsrf4-accent-dark);
    background: rgba(196, 162, 101, 0.1);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 4px;
}

.rsrf4-portfolio__card-location {
    font-size: 12px;
    font-weight: 500;
    color: var(--rsrf4-text-light);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rsrf4-portfolio__card-location::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rsrf4-accent);
}

.rsrf4-portfolio__card-desc {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--rsrf4-text-light);
}

.rsrf4-portfolio__card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--rsrf4-border);
}

.rsrf4-portfolio__card-units,
.rsrf4-portfolio__card-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rsrf4-text-muted);
}

.rsrf4-portfolio__card-status {
    color: var(--rsrf4-green);
}

/* --------------------------------------------------------------------------
   INVESTMENT THESIS
   -------------------------------------------------------------------------- */
.rsrf4-thesis,
.wp-block-group.rsrf4-thesis {
    background: var(--rsrf4-green-dark);
    position: relative;
    overflow: hidden;
}

.rsrf4-thesis::before,
.wp-block-group.rsrf4-thesis::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 0% 100%, rgba(196, 162, 101, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 100% 0%, rgba(44, 74, 62, 0.3) 0%, transparent 50%);
}

.rsrf4-thesis__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.rsrf4-thesis__bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 48, 40, 0.95), rgba(15, 15, 15, 0.92));
}

.rsrf4-thesis .rsrf4-container {
    position: relative;
    z-index: 2;
}

.rsrf4-thesis__header {
    text-align: center;
    margin-bottom: 72px;
}

.rsrf4-thesis__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.rsrf4-thesis__card {
    padding: 44px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    transition: all 0.4s var(--rsrf4-ease-out);
    position: relative;
    overflow: hidden;
}

.rsrf4-thesis__card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(196, 162, 101, 0.2);
    transform: translateY(-4px);
}

/* Ghost number in background */
.rsrf4-thesis__card::after {
    content: attr(data-number);
    position: absolute;
    font-family: var(--rsrf4-font-serif);
    font-size: 64px;
    font-weight: 300;
    color: rgba(196, 162, 101, 0.12);
    top: 20px;
    right: 28px;
    line-height: 1;
    pointer-events: none;
}

/* Bottom accent bar on hover */
.rsrf4-thesis__card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rsrf4-accent);
    transition: width 0.5s var(--rsrf4-ease-out);
}

.rsrf4-thesis__card:hover::before {
    width: 100%;
}

.rsrf4-thesis__card-number {
    display: none;
}

.rsrf4-thesis__card-title {
    font-family: var(--rsrf4-font-serif);
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.25;
    position: relative;
}

.rsrf4-thesis__card-text {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
}

/* --------------------------------------------------------------------------
   OPERATING PLATFORM
   -------------------------------------------------------------------------- */
.rsrf4-platform {
    background: var(--rsrf4-warm-white);
}

.rsrf4-platform__header {
    text-align: center;
    margin-bottom: 72px;
}

.rsrf4-platform__layout {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.rsrf4-platform__image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 3px;
}

.rsrf4-platform__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.rsrf4-platform__item {
    padding: 40px 36px;
    background: var(--rsrf4-cream);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--rsrf4-ease-out);
    border-bottom: 2px solid transparent;
}

.rsrf4-platform__item:hover {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.06);
    border-bottom-color: var(--rsrf4-accent);
}

.rsrf4-platform__item-accent {
    display: none;
}

.rsrf4-platform__item-title {
    font-family: var(--rsrf4-font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--rsrf4-charcoal);
    margin-bottom: 10px;
}

.rsrf4-platform__item-text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--rsrf4-text-light);
}

/* --------------------------------------------------------------------------
   GLOBAL PERSPECTIVE
   -------------------------------------------------------------------------- */
.rsrf4-global,
.wp-block-group.rsrf4-global {
    background: var(--rsrf4-charcoal);
    position: relative;
    overflow: hidden;
    padding: clamp(100px, 12vw, 200px) 0;
}

.rsrf4-global::before,
.wp-block-group.rsrf4-global::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 70% at 80% 50%, rgba(44, 74, 62, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 10% 80%, rgba(196, 162, 101, 0.06) 0%, transparent 50%);
}

/* Large decorative quote mark */
.rsrf4-global::after,
.wp-block-group.rsrf4-global::after {
    content: '\201C';
    position: absolute;
    top: -20px;
    left: 5%;
    font-family: var(--rsrf4-font-serif);
    font-size: 400px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.015);
    line-height: 1;
    pointer-events: none;
}

.rsrf4-global__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.06;
}

.rsrf4-global__content {
    max-width: var(--rsrf4-container-narrow);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.rsrf4-global .rsrf4-section__headline {
    color: #fff;
}

.rsrf4-global .rsrf4-section__headline em {
    color: var(--rsrf4-accent);
}

.rsrf4-global .rsrf4-section__text {
    color: rgba(255, 255, 255, 0.6);
    margin-left: auto;
    margin-right: auto;
}

.rsrf4-global__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto 36px;
}

.rsrf4-global__divider span:nth-child(1),
.rsrf4-global__divider span:nth-child(3) {
    width: 40px;
    height: 1px;
    background: var(--rsrf4-accent);
    opacity: 0.3;
}

.rsrf4-global__divider span:nth-child(2) {
    width: 5px;
    height: 5px;
    border: 1px solid var(--rsrf4-accent);
    transform: rotate(45deg);
    opacity: 0.4;
}

/* --------------------------------------------------------------------------
   GOVERNANCE
   -------------------------------------------------------------------------- */
.rsrf4-governance {
    background: var(--rsrf4-cream);
}

.rsrf4-governance__header {
    text-align: center;
    margin-bottom: 72px;
}

.rsrf4-governance__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.rsrf4-governance__card {
    padding: 36px 28px;
    background: #fff;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--rsrf4-ease-out);
    border: 1px solid var(--rsrf4-border);
}

.rsrf4-governance__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.rsrf4-governance__card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rsrf4-green), var(--rsrf4-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--rsrf4-ease-out);
}

.rsrf4-governance__card:hover .rsrf4-governance__card-border {
    transform: scaleX(1);
}

.rsrf4-governance__card-title {
    font-family: var(--rsrf4-font-serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--rsrf4-charcoal);
    margin-bottom: 12px;
    line-height: 1.3;
}

.rsrf4-governance__card-text {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--rsrf4-text-light);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.rsrf4-footer {
    background: var(--rsrf4-primary);
    padding: 72px 0 44px;
    position: relative;
}

.rsrf4-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rsrf4-green-dark), var(--rsrf4-accent), var(--rsrf4-green-dark));
    opacity: 0.4;
}

.rsrf4-footer__inner {
    max-width: var(--rsrf4-container);
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 72px);
}

.rsrf4-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 48px;
}

.rsrf4-footer__company {
    display: block;
    font-family: var(--rsrf4-font-sans);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--rsrf4-accent-light);
    margin-bottom: 10px;
}

.rsrf4-footer__tagline {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    font-family: var(--rsrf4-font-serif);
}

.rsrf4-footer__contact {
    text-align: right;
}

.rsrf4-footer__email {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s var(--rsrf4-ease);
    margin-bottom: 4px;
}

.rsrf4-footer__email:hover {
    color: var(--rsrf4-accent);
}

.rsrf4-footer__address {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.6;
}

.rsrf4-footer__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 32px;
}

.rsrf4-footer__legal {
    font-size: 11px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.2);
    max-width: 680px;
    margin-bottom: 16px;
}

.rsrf4-footer__copyright {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   ANIMATIONS
   -------------------------------------------------------------------------- */
[data-animate] {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s var(--rsrf4-ease-out), transform 0.9s var(--rsrf4-ease-out);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger > *,
[data-animate] .rsrf4-about__pillar,
[data-animate] .rsrf4-thesis__card,
[data-animate] .rsrf4-platform__item,
[data-animate] .rsrf4-governance__card,
[data-animate] .rsrf4-portfolio__card,
[data-animate] .rsrf4-stats__item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--rsrf4-ease-out), transform 0.6s var(--rsrf4-ease-out);
}

[data-animate].is-visible .rsrf4-about__pillar,
[data-animate].is-visible .rsrf4-thesis__card,
[data-animate].is-visible .rsrf4-platform__item,
[data-animate].is-visible .rsrf4-governance__card,
[data-animate].is-visible .rsrf4-portfolio__card,
[data-animate].is-visible .rsrf4-stats__item {
    opacity: 1;
    transform: translateY(0);
}

[data-animate].is-visible > *:nth-child(1),
[data-animate].is-visible .rsrf4-about__pillar:nth-child(1),
[data-animate].is-visible .rsrf4-thesis__card:nth-child(1),
[data-animate].is-visible .rsrf4-portfolio__card:nth-child(1),
[data-animate].is-visible .rsrf4-governance__card:nth-child(1),
[data-animate].is-visible .rsrf4-platform__item:nth-child(1),
[data-animate].is-visible .rsrf4-stats__item:nth-child(1) { transition-delay: 0.05s; }

[data-animate].is-visible > *:nth-child(2),
[data-animate].is-visible .rsrf4-about__pillar:nth-child(2),
[data-animate].is-visible .rsrf4-thesis__card:nth-child(2),
[data-animate].is-visible .rsrf4-portfolio__card:nth-child(2),
[data-animate].is-visible .rsrf4-governance__card:nth-child(2),
[data-animate].is-visible .rsrf4-platform__item:nth-child(2),
[data-animate].is-visible .rsrf4-stats__item:nth-child(2) { transition-delay: 0.12s; }

[data-animate].is-visible > *:nth-child(3),
[data-animate].is-visible .rsrf4-about__pillar:nth-child(3),
[data-animate].is-visible .rsrf4-thesis__card:nth-child(3),
[data-animate].is-visible .rsrf4-portfolio__card:nth-child(3),
[data-animate].is-visible .rsrf4-governance__card:nth-child(3),
[data-animate].is-visible .rsrf4-platform__item:nth-child(3),
[data-animate].is-visible .rsrf4-stats__item:nth-child(3) { transition-delay: 0.19s; }

[data-animate].is-visible > *:nth-child(4),
[data-animate].is-visible .rsrf4-thesis__card:nth-child(4),
[data-animate].is-visible .rsrf4-portfolio__card:nth-child(4),
[data-animate].is-visible .rsrf4-governance__card:nth-child(4),
[data-animate].is-visible .rsrf4-platform__item:nth-child(4),
[data-animate].is-visible .rsrf4-stats__item:nth-child(4) { transition-delay: 0.26s; }

[data-animate].is-visible > *:nth-child(5),
[data-animate].is-visible .rsrf4-portfolio__card:nth-child(5),
[data-animate].is-visible .rsrf4-platform__item:nth-child(5) { transition-delay: 0.33s; }

[data-animate].is-visible > *:nth-child(6),
[data-animate].is-visible .rsrf4-platform__item:nth-child(6) { transition-delay: 0.40s; }

/* --------------------------------------------------------------------------
   RESPONSIVE — Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .rsrf4-header .wp-block-navigation__container { gap: 28px; }
    .rsrf4-about__grid { grid-template-columns: 1fr; gap: 48px; }
    .rsrf4-about__accent-card { right: 20px; bottom: -24px; }
    .rsrf4-portfolio__row .rsrf4-portfolio__card,
    .rsrf4-portfolio__grid .rsrf4-portfolio__card {
        flex: 1 1 calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
    }
    .rsrf4-thesis__grid { grid-template-columns: repeat(2, 1fr); }
    .rsrf4-platform__grid { grid-template-columns: repeat(2, 1fr); }
    .rsrf4-governance__grid { grid-template-columns: repeat(2, 1fr); }
    .rsrf4-stats__container { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .rsrf4-stats__item:nth-child(3)::before { display: none; }
}

/* --------------------------------------------------------------------------
   RESPONSIVE — Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .rsrf4-hero__corner { display: none; }
    .rsrf4-hero__headline { font-size: clamp(36px, 9vw, 54px); }
    .rsrf4-about__grid { grid-template-columns: 1fr; }
    .rsrf4-about__pillars { grid-template-columns: 1fr; gap: 32px; }
    .rsrf4-about__accent-card { position: relative; bottom: auto; right: auto; margin-top: -20px; display: inline-block; }
    .rsrf4-stats__container { grid-template-columns: repeat(2, 1fr); }
    .rsrf4-stats__item::before { display: none !important; }
    .rsrf4-portfolio__row .rsrf4-portfolio__card,
    .rsrf4-portfolio__grid .rsrf4-portfolio__card {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
    .rsrf4-thesis__grid { grid-template-columns: 1fr; }
    .rsrf4-platform__grid { grid-template-columns: 1fr; }
    .rsrf4-governance__grid { grid-template-columns: 1fr; }
    .rsrf4-footer__top { flex-direction: column; }
    .rsrf4-footer__contact { text-align: left; }
    .rsrf4-global::after { font-size: 200px; }
}

/* --------------------------------------------------------------------------
   WORDPRESS ADMIN BAR
   -------------------------------------------------------------------------- */
body.admin-bar .wp-block-template-part:has(.rsrf4-header),
body.admin-bar .rsrf4-header { top: 32px; }

@media (max-width: 782px) {
    body.admin-bar .wp-block-template-part:has(.rsrf4-header),
    body.admin-bar .rsrf4-header { top: 46px; }
}

/* --------------------------------------------------------------------------
   PRINT
   -------------------------------------------------------------------------- */
@media print {
    .rsrf4-header, .rsrf4-hero__scroll, .rsrf4-hero__lines, .rsrf4-hero__corner { display: none; }
    .rsrf4-hero { min-height: auto; padding: 60px 0; }
    .rsrf4-section { padding: 40px 0; break-inside: avoid; }
}
