*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background: var(--r-color-bg);
    color: var(--r-color-text);
    font-family: var(--r-font-sans);
    font-size: var(--r-text-base);
    line-height: var(--r-leading-normal);
    font-feature-settings: "ss01", "cv01", "cv11";
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--r-color-gold); color: #0a1929; }

:focus-visible { outline: 2px solid var(--r-color-gold); outline-offset: 3px; border-radius: var(--r-radius-xs); }

/* ─── R-CONTAINER ─── */

.r-container { width: 100%; max-width: var(--r-container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.r-container--wide { max-width: var(--r-container-wide); }
.r-container--narrow { max-width: var(--r-container-narrow); }

/* ─── R-SECTION ─── */

.r-section {
    position: relative;
    padding-block: var(--r-section-y);
    background: var(--r-color-bg);
    isolation: isolate;
    overflow: clip;
}
.r-section--tight { padding-block: var(--r-section-y-tight); }
.r-section--alt { background: var(--r-color-bg-2); }
.r-section--deep { background: var(--r-color-bg-3); }
.r-section--surface { background: var(--r-color-surface); }
.r-section--hero { padding-block: clamp(120px, 14vh, 180px) clamp(64px, 8vh, 96px); }

.r-section + .r-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--r-color-line-gold) 50%, transparent 100%);
    opacity: 0.7;
    pointer-events: none;
}

.r-section--bleed::before { display: none; }

/* ─── R-SECTION-HEADER ─── */

.r-section-header { max-width: 720px; margin-inline: auto; margin-block-end: var(--r-space-12); text-align: center; }
.r-section-header--left { margin-inline: 0; text-align: left; }

.r-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--r-space-2);
    padding: 5px 14px;
    border-radius: var(--r-radius-full);
    background: var(--r-color-gold-tint);
    color: var(--r-color-gold);
    border: 1px solid var(--r-color-gold-tint-strong);
    font-family: var(--r-font-sans);
    font-size: var(--r-text-xs);
    font-weight: var(--r-weight-semibold);
    letter-spacing: var(--r-tracking-wider);
    text-transform: uppercase;
    margin-block-end: var(--r-space-5);
}

.r-section-title {
    font-family: var(--r-font-display);
    font-size: var(--r-text-5xl);
    font-weight: var(--r-weight-semibold);
    line-height: var(--r-leading-tight);
    letter-spacing: var(--r-tracking-tight);
    color: var(--r-color-text);
    margin: 0 0 var(--r-space-4);
    text-wrap: balance;
}

.r-section-title em {
    font-style: italic;
    color: var(--r-color-gold);
    font-weight: var(--r-weight-regular);
}

.r-section-lede {
    font-size: var(--r-text-lg);
    line-height: var(--r-leading-relaxed);
    color: var(--r-color-text-muted);
    margin: 0;
    text-wrap: pretty;
}

/* ─── R-CARD ─── */

.r-card {
    position: relative;
    background: var(--r-color-surface);
    border: 1px solid var(--r-color-line);
    border-radius: var(--r-radius-xl);
    padding: var(--r-space-8);
    transition: transform var(--r-dur-normal) var(--r-ease-out),
                border-color var(--r-dur-normal) var(--r-ease-out),
                box-shadow var(--r-dur-normal) var(--r-ease-out),
                background var(--r-dur-normal) var(--r-ease-out);
    text-decoration: none;
    color: inherit;
    display: block;
}

.r-card--ghost { background: transparent; border-color: var(--r-color-line); }
.r-card--elevated { background: var(--r-color-surface-2); box-shadow: var(--r-shadow-md); }
.r-card--gold { border-color: var(--r-color-line-gold); background: linear-gradient(180deg, var(--r-color-gold-tint), transparent 60%), var(--r-color-surface); }

a.r-card:hover, button.r-card:hover, .r-card--interactive:hover {
    transform: translateY(-3px);
    border-color: var(--r-color-line-gold);
    box-shadow: var(--r-shadow-lg);
}

.r-card__eyebrow { font-size: var(--r-text-xs); font-weight: var(--r-weight-semibold); color: var(--r-color-gold); text-transform: uppercase; letter-spacing: var(--r-tracking-wider); margin-block-end: var(--r-space-3); }
.r-card__title { font-family: var(--r-font-display); font-size: var(--r-text-2xl); font-weight: var(--r-weight-semibold); line-height: var(--r-leading-snug); margin: 0 0 var(--r-space-3); }
.r-card__body { color: var(--r-color-text-soft); font-size: var(--r-text-base); line-height: var(--r-leading-relaxed); margin: 0; }
.r-card__meta { display: flex; gap: var(--r-space-4); flex-wrap: wrap; margin-block-start: var(--r-space-5); padding-block-start: var(--r-space-4); border-block-start: 1px solid var(--r-color-line); font-size: var(--r-text-sm); color: var(--r-color-text-muted); }

/* ─── R-STAT ─── */

.r-stat { display: flex; flex-direction: column; gap: var(--r-space-1); }
.r-stat__num { font-family: var(--r-font-display); font-size: var(--r-text-4xl); font-weight: var(--r-weight-semibold); color: var(--r-color-gold); line-height: 1; letter-spacing: var(--r-tracking-tight); }
.r-stat__label { font-size: var(--r-text-sm); color: var(--r-color-text-muted); text-transform: uppercase; letter-spacing: var(--r-tracking-wide); font-weight: var(--r-weight-medium); }
.r-stat__sub { font-size: var(--r-text-xs); color: var(--r-color-text-faint); }

.r-stat--inline { flex-direction: row; align-items: baseline; gap: var(--r-space-2); }
.r-stat--inline .r-stat__num { font-size: var(--r-text-2xl); }

.r-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--r-space-8); }

/* ─── R-BUTTON ─── */

.r-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--r-space-2);
    padding: 14px 28px;
    border-radius: var(--r-radius-full);
    font-family: var(--r-font-sans);
    font-size: var(--r-text-base);
    font-weight: var(--r-weight-semibold);
    letter-spacing: var(--r-tracking-wide);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--r-dur-fast) var(--r-ease-out),
                background var(--r-dur-normal) var(--r-ease-out),
                box-shadow var(--r-dur-normal) var(--r-ease-out),
                border-color var(--r-dur-normal) var(--r-ease-out);
    line-height: 1;
    white-space: nowrap;
}

.r-btn:active { transform: scale(0.97); }

.r-btn--primary { background: linear-gradient(180deg, var(--r-color-gold-soft), var(--r-color-gold)); color: #0a1929; box-shadow: var(--r-shadow-gold); }
.r-btn--primary:hover { box-shadow: var(--r-shadow-gold-lg); transform: translateY(-1px); }

.r-btn--ghost { background: transparent; border-color: var(--r-color-line-strong); color: var(--r-color-text); }
.r-btn--ghost:hover { background: var(--r-color-surface-elev); border-color: var(--r-color-line-gold); }

.r-btn--outline { background: transparent; border-color: var(--r-color-gold); color: var(--r-color-gold); }
.r-btn--outline:hover { background: var(--r-color-gold); color: #0a1929; }

.r-btn--whatsapp { background: #25d366; color: #fff; }
.r-btn--whatsapp:hover { background: #1fb657; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3); }

.r-btn--sm { padding: 9px 18px; font-size: var(--r-text-sm); }
.r-btn--lg { padding: 18px 36px; font-size: var(--r-text-lg); }

.r-btn-group { display: inline-flex; gap: var(--r-space-3); flex-wrap: wrap; }

/* ─── R-CTA-BAR ─── */

.r-cta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--r-space-4);
    align-items: center;
    margin-block-start: var(--r-space-8);
}
.r-cta-bar--center { justify-content: center; }
.r-cta-bar__note { font-size: var(--r-text-sm); color: var(--r-color-text-muted); display: inline-flex; align-items: center; gap: var(--r-space-2); }

/* ─── R-FORM-FIELD ─── */

.r-field { display: flex; flex-direction: column; gap: var(--r-space-2); }
.r-field__label { font-size: var(--r-text-sm); font-weight: var(--r-weight-semibold); color: var(--r-color-text-soft); }
.r-field__input,
.r-field__select,
.r-field__textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--r-color-surface-elev);
    border: 1px solid var(--r-color-line);
    border-radius: var(--r-radius-md);
    color: var(--r-color-text);
    font-family: inherit;
    font-size: var(--r-text-base);
    line-height: 1.4;
    transition: border-color var(--r-dur-fast) var(--r-ease-out), box-shadow var(--r-dur-fast) var(--r-ease-out), background var(--r-dur-fast) var(--r-ease-out);
}
.r-field__input:focus,
.r-field__select:focus,
.r-field__textarea:focus {
    outline: none;
    border-color: var(--r-color-gold);
    box-shadow: 0 0 0 3px var(--r-color-gold-tint);
    background: var(--r-color-bg-2);
}
.r-field__textarea { resize: vertical; min-height: 96px; }
.r-field__hint { font-size: var(--r-text-xs); color: var(--r-color-text-faint); }

/* ─── R-GRID ─── */

.r-grid { display: grid; gap: var(--r-grid-gap); }
.r-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.r-grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.r-grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (min-width: 720px) { .r-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .r-grid--3 { grid-template-columns: repeat(3, 1fr); } .r-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ─── R-MARKET-CARD ─── */

.r-market { position: relative; padding: var(--r-space-8); border-radius: var(--r-radius-xl); border: 1px solid var(--r-color-line); background: var(--r-color-surface); transition: all var(--r-dur-normal) var(--r-ease-out); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: var(--r-space-5); overflow: hidden; }
.r-market::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--m-color, var(--r-color-gold)); opacity: 0.7; }
.r-market:hover { transform: translateY(-4px); border-color: var(--m-color, var(--r-color-gold)); box-shadow: var(--r-shadow-lg); }
.r-market[data-market="uae"] { --m-color: var(--r-color-uae); }
.r-market[data-market="uk"] { --m-color: var(--r-color-uk); }
.r-market[data-market="ksa"] { --m-color: var(--r-color-ksa); }
.r-market[data-market="oman"] { --m-color: var(--r-color-oman); }
.r-market[data-market="greece"] { --m-color: var(--r-color-greece); }

.r-market__head { display: flex; align-items: center; gap: var(--r-space-3); }
.r-market__flag { font-size: 2.4rem; line-height: 1; }
.r-market__title { margin: 0; font-family: var(--r-font-display); font-size: var(--r-text-xl); font-weight: var(--r-weight-semibold); color: var(--r-color-text); }
.r-market__tag { font-size: var(--r-text-xs); font-weight: var(--r-weight-semibold); color: var(--m-color); letter-spacing: var(--r-tracking-wide); text-transform: uppercase; }
.r-market__points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--r-space-2); }
.r-market__points li { display: flex; align-items: center; gap: var(--r-space-2); color: var(--r-color-text-soft); font-size: var(--r-text-sm); line-height: var(--r-leading-snug); }
.r-market__points li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--m-color); flex-shrink: 0; }
.r-market__foot { display: flex; gap: var(--r-space-6); padding-block-start: var(--r-space-4); border-block-start: 1px solid var(--r-color-line); margin-block-start: auto; }
.r-market__metric { display: flex; flex-direction: column; gap: 2px; }
.r-market__metric-num { font-family: var(--r-font-display); font-size: var(--r-text-xl); font-weight: var(--r-weight-semibold); color: var(--m-color); line-height: 1; }
.r-market__metric-label { font-size: var(--r-text-xs); color: var(--r-color-text-faint); text-transform: uppercase; letter-spacing: var(--r-tracking-wide); }
.r-market__arrow { position: absolute; top: var(--r-space-6); right: var(--r-space-6); color: var(--r-color-text-faint); font-size: 1.4rem; transition: transform var(--r-dur-normal) var(--r-ease-out), color var(--r-dur-normal) var(--r-ease-out); }
.r-market:hover .r-market__arrow { color: var(--m-color); transform: translate(4px, -4px); }

/* ─── R-PARTNER-STRIP ─── */

.r-partner-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--r-space-6); align-items: center; }
.r-partner-strip img { max-height: 38px; width: auto; margin: 0 auto; filter: grayscale(0.5) brightness(0.95) contrast(1.05); opacity: 0.78; transition: filter var(--r-dur-normal) var(--r-ease-out), opacity var(--r-dur-normal) var(--r-ease-out); }
.r-partner-strip img:hover { filter: none; opacity: 1; }

/* ─── R-PILL ─── */

.r-pill { display: inline-flex; align-items: center; gap: var(--r-space-2); padding: 5px 12px; border-radius: var(--r-radius-full); font-size: var(--r-text-xs); font-weight: var(--r-weight-semibold); letter-spacing: var(--r-tracking-wide); border: 1px solid; line-height: 1.2; }
.r-pill--gold { background: var(--r-color-gold-tint); color: var(--r-color-gold); border-color: var(--r-color-gold-tint-strong); }
.r-pill--success { background: rgba(16, 185, 129, 0.1); color: var(--r-color-success); border-color: rgba(16, 185, 129, 0.22); }
.r-pill--info { background: rgba(59, 130, 246, 0.1); color: var(--r-color-info); border-color: rgba(59, 130, 246, 0.22); }
.r-pill--neutral { background: var(--r-color-surface-elev); color: var(--r-color-text-soft); border-color: var(--r-color-line); }

.r-pill-row { display: flex; flex-wrap: wrap; gap: var(--r-space-2); }

/* ─── R-DIVIDER ─── */

.r-divider { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--r-color-line-gold) 50%, transparent); margin-block: var(--r-space-12); }

/* ─── R-FOUNDER-PILL ─── */

.r-founder { display: inline-flex; align-items: center; gap: var(--r-space-3); padding: 8px 16px 8px 8px; background: var(--r-color-surface-elev); border: 1px solid var(--r-color-line); border-radius: var(--r-radius-full); }
.r-founder__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--r-color-gold); flex-shrink: 0; }
.r-founder__name { font-size: var(--r-text-sm); font-weight: var(--r-weight-semibold); color: var(--r-color-text); line-height: 1.2; }
.r-founder__role { font-size: var(--r-text-xs); color: var(--r-color-text-muted); margin-block-start: 2px; }

/* ─── R-ACCESSIBILITY UTILITIES ─── */

.r-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ─── PRINT ─── */

@media print {
    .r-section { padding-block: var(--r-space-10); break-inside: avoid; }
    .r-card { box-shadow: none; border: 1px solid #ccc; }
    body { color: #000; background: #fff; }
}

/* ─── VIEW TRANSITIONS API (Tier 3) ─── */

@supports (view-transition-name: a) {
    @view-transition { navigation: auto; }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: var(--r-dur-slow);
        animation-timing-function: var(--r-ease-out);
    }

    ::view-transition-old(root) {
        animation-name: r-fade-out;
    }

    ::view-transition-new(root) {
        animation-name: r-fade-in;
    }

    @keyframes r-fade-out {
        to { opacity: 0; transform: translateY(-8px); }
    }

    @keyframes r-fade-in {
        from { opacity: 0; transform: translateY(8px); }
    }

    .r-card[data-vt-id],
    .r-market[data-vt-id] {
        view-transition-name: var(--vt-id);
    }

    /* Element-level: project card → project hero morph */
    ::view-transition-group(*[id^="project-img-"]) {
        animation-duration: 480ms;
        animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    }
    ::view-transition-image-pair(*[id^="project-img-"]) {
        isolation: auto;
    }
    ::view-transition-old(*[id^="project-img-"]),
    ::view-transition-new(*[id^="project-img-"]) {
        height: 100%;
        object-fit: cover;
        object-position: center;
        animation-duration: 480ms;
    }

    /* Hero on detail page must be ready to receive the morph */
    .project-hero-new .hero-background {
        contain: paint;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none !important;
    }
}

/* ─── MOBILE TUNING ─── */

@media (max-width: 640px) {
    :root { --r-section-y: 56px; --r-section-y-tight: 40px; }
    .r-section-header { margin-block-end: var(--r-space-8); }
    .r-card { padding: var(--r-space-6); }
    .r-market { padding: var(--r-space-6); }
    .r-cta-bar { gap: var(--r-space-3); }
}

/* ═══════════════════════════════════════════════════════════
   LEGACY HOMEPAGE NORMALIZATION
   Re-skins existing inline-styled sections to match the system
   without touching markup. Applied to body.home-investor pages
   ═══════════════════════════════════════════════════════════ */

body section.section[style*="background"] {
    background: var(--r-color-bg-2) !important;
    padding-block: var(--r-section-y) !important;
    position: relative;
    overflow: clip;
}

body section.section[style*="background"]:nth-of-type(2n) {
    background: var(--r-color-bg) !important;
}

body section.section[style*="background"]:nth-of-type(3n+1) {
    background: linear-gradient(180deg, var(--r-color-bg-2) 0%, var(--r-color-bg-3) 60%, var(--r-color-bg-2) 100%) !important;
}

body section.section[id="partners"] {
    background: var(--r-color-bg) !important;
    padding-block: clamp(56px, 6vw, 80px) !important;
}

body section.section + section.section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--r-color-line-gold) 50%, transparent 100%);
    opacity: 0.65;
    pointer-events: none;
}

body section.hero {
    background: var(--r-color-bg-2) !important;
    padding-block: clamp(120px, 14vh, 180px) clamp(64px, 8vh, 96px) !important;
    position: relative;
    overflow: clip;
    isolation: isolate;
}

body section.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 30% 25%, rgba(212, 175, 55, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

body section.section h2,
body section.hero h1 {
    font-family: var(--r-font-display);
    letter-spacing: var(--r-tracking-tight);
    line-height: var(--r-leading-tight);
    text-wrap: balance;
}

body section.section h2 {
    font-size: var(--r-text-5xl);
    font-weight: var(--r-weight-semibold);
    margin-block-end: var(--r-space-4);
}

body section.hero h1 {
    font-size: var(--r-text-display) !important;
    font-weight: var(--r-weight-semibold);
    margin-block-end: var(--r-space-5) !important;
}

body section.section .section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--r-space-2);
    padding: 5px 14px;
    border-radius: var(--r-radius-full);
    background: var(--r-color-gold-tint);
    color: var(--r-color-gold);
    border: 1px solid var(--r-color-gold-tint-strong);
    font-family: var(--r-font-sans);
    font-size: var(--r-text-xs);
    font-weight: var(--r-weight-semibold);
    letter-spacing: var(--r-tracking-wider);
    text-transform: uppercase;
    margin-block-end: var(--r-space-5);
}

body .section-header {
    max-width: 720px;
    margin-inline: auto;
    margin-block-end: var(--r-space-12);
    text-align: center;
}

body .section-subtitle {
    font-size: var(--r-text-lg) !important;
    color: var(--r-color-text-muted) !important;
    line-height: var(--r-leading-relaxed) !important;
    max-width: 640px;
    margin-inline: auto;
    text-wrap: pretty;
}

body .btn,
body a.btn,
body button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--r-space-2);
    padding: 14px 28px;
    border-radius: var(--r-radius-full);
    font-family: var(--r-font-sans);
    font-size: var(--r-text-base);
    font-weight: var(--r-weight-semibold);
    letter-spacing: var(--r-tracking-wide);
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform var(--r-dur-fast) var(--r-ease-out),
                box-shadow var(--r-dur-normal) var(--r-ease-out);
    line-height: 1;
}

body .btn-primary {
    background: linear-gradient(180deg, var(--r-color-gold-soft), var(--r-color-gold)) !important;
    color: #0a1929 !important;
    box-shadow: var(--r-shadow-gold);
}
body .btn-primary:hover { box-shadow: var(--r-shadow-gold-lg); transform: translateY(-1px); }

body .btn-outline {
    background: transparent !important;
    border-color: var(--r-color-line-strong) !important;
    color: var(--r-color-text) !important;
}
body .btn-outline:hover { border-color: var(--r-color-line-gold) !important; background: var(--r-color-surface-elev) !important; }

body .btn-lg { padding: 18px 36px; font-size: var(--r-text-lg); }

body .container {
    max-width: var(--r-container) !important;
    padding-inline: clamp(16px, 4vw, 32px) !important;
}

body section.section [style*="border-radius:20px"],
body section.section [style*="border-radius:18px"],
body section.section [style*="border-radius:16px"],
body section.section [style*="border-radius:14px"] {
    border-radius: var(--r-radius-xl) !important;
    transition: transform var(--r-dur-normal) var(--r-ease-out), box-shadow var(--r-dur-normal) var(--r-ease-out), border-color var(--r-dur-normal) var(--r-ease-out) !important;
}

body section.section a[style*="border-radius:20px"]:hover,
body section.section a[style*="border-radius:18px"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--r-shadow-lg), 0 0 0 1px var(--r-color-line-gold) !important;
}

body section.section img[loading="lazy"] {
    transition: transform var(--r-dur-slow) var(--r-ease-out);
}

body .partners img,
body section[id="partners"] img,
body section[id="partners"] [style*="grayscale"] img {
    filter: grayscale(0.55) brightness(0.95) contrast(1.08) !important;
    opacity: 0.78 !important;
    transition: filter var(--r-dur-normal) var(--r-ease-out), opacity var(--r-dur-normal) var(--r-ease-out), transform var(--r-dur-normal) var(--r-ease-out);
}
body .partners img:hover,
body section[id="partners"] img:hover {
    filter: none !important;
    opacity: 1 !important;
    transform: translateY(-2px);
}

body input[type="number"],
body input[type="text"],
body input[type="email"],
body input[type="tel"],
body select,
body textarea {
    font-family: inherit;
    transition: border-color var(--r-dur-fast) var(--r-ease-out), box-shadow var(--r-dur-fast) var(--r-ease-out);
}

body input[type="number"]:focus,
body input[type="text"]:focus,
body input[type="email"]:focus,
body input[type="tel"]:focus,
body select:focus,
body textarea:focus {
    outline: none !important;
    border-color: var(--r-color-gold) !important;
    box-shadow: 0 0 0 3px var(--r-color-gold-tint) !important;
}

@media (max-width: 980px) {
    body section.hero .container > div[style*="grid-template-columns:1fr 1fr"] {
        display: block !important;
    }
    body section.hero .container > div[style*="grid-template-columns:1fr 1fr"] > div + div {
        margin-block-start: var(--r-space-12);
    }
    body section.hero h1 {
        font-size: clamp(2rem, 7vw, 3rem) !important;
    }
}

@media (max-width: 640px) {
    body section.section h2,
    body section.hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.4rem) !important;
    }
    body section.section [style*="font-size:2.5rem"] {
        font-size: 1.65rem !important;
    }
    body section.section [style*="display:flex"][style*="gap:2.5rem"] {
        gap: var(--r-space-4) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   R-HERO — Hero rebuild (Tier G)
   Live DB signals + featured testimonial overlay
   ═══════════════════════════════════════════════════════════ */

.r-hero {
    position: relative;
    padding-block: clamp(112px, 14vh, 168px) clamp(64px, 9vh, 96px);
    background: var(--r-color-bg-2);
    overflow: clip;
    isolation: isolate;
}

.r-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 45% at 25% 20%, rgba(212, 175, 55, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 80% 90%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 35% at 60% 40%, rgba(124, 58, 237, 0.04) 0%, transparent 70%);
}

.r-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    min-height: 60vh;
}

.r-hero__content { display: flex; flex-direction: column; gap: var(--r-space-6); max-width: 640px; }

.r-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--r-space-2);
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: var(--r-radius-full);
    background: var(--r-color-surface-elev);
    color: var(--r-color-text-soft);
    border: 1px solid var(--r-color-line);
    font-size: var(--r-text-xs);
    font-weight: var(--r-weight-semibold);
    letter-spacing: var(--r-tracking-wide);
    line-height: 1.3;
}

.r-hero__title {
    font-family: var(--r-font-display);
    font-size: var(--r-text-display);
    font-weight: var(--r-weight-semibold);
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--r-color-text);
    margin: 0;
    text-wrap: balance;
}

.r-hero__title em {
    font-style: italic;
    color: var(--r-color-gold);
    font-weight: var(--r-weight-regular);
}

.r-hero__lede {
    font-size: var(--r-text-lg);
    line-height: var(--r-leading-relaxed);
    color: var(--r-color-text-soft);
    margin: 0;
    text-wrap: pretty;
}

.r-hero__lede strong { color: var(--r-color-text); font-weight: var(--r-weight-semibold); }

.r-hero__pills { display: flex; flex-wrap: wrap; gap: var(--r-space-2); }

.r-hero__cta { display: flex; flex-wrap: wrap; gap: var(--r-space-3); margin-block-start: var(--r-space-2); }

.r-hero__compliance {
    margin: 0;
    padding: var(--r-space-4);
    border-radius: var(--r-radius-md);
    background: rgba(212, 175, 55, 0.06);
    border-inline-start: 3px solid var(--r-color-gold);
    font-size: var(--r-text-sm);
    line-height: var(--r-leading-normal);
    color: var(--r-color-text-muted);
}
.r-hero__compliance strong { color: var(--r-color-gold); }

.r-hero__aside {
    display: flex;
    flex-direction: column;
    gap: var(--r-space-4);
    align-self: stretch;
    justify-content: center;
}

.r-hero__founder {
    display: flex;
    align-items: center;
    gap: var(--r-space-3);
    padding: var(--r-space-3) var(--r-space-4) var(--r-space-3) var(--r-space-3);
    background: var(--r-color-surface);
    border: 1px solid var(--r-color-line-gold);
    border-radius: var(--r-radius-full);
    align-self: flex-start;
}
.r-hero__founder img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--r-color-gold); flex-shrink: 0; }
.r-hero__founder-name { font-size: var(--r-text-sm); font-weight: var(--r-weight-semibold); color: var(--r-color-text); line-height: 1.3; }
.r-hero__founder-role { font-size: var(--r-text-xs); color: var(--r-color-text-muted); margin-block-start: 2px; line-height: 1.4; }

.r-hero__signals {
    background: var(--r-color-surface);
    border: 1px solid var(--r-color-line);
    border-radius: var(--r-radius-xl);
    padding: var(--r-space-6);
    display: flex;
    flex-direction: column;
    gap: var(--r-space-5);
}

.r-hero__signal--live {
    display: inline-flex;
    align-items: center;
    gap: var(--r-space-2);
    color: var(--r-color-success);
    font-size: var(--r-text-sm);
    font-weight: var(--r-weight-semibold);
}
.r-hero__signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--r-color-success);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: r-pulse 2s ease-in-out infinite;
}
@keyframes r-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.r-hero__signal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--r-space-4);
    padding-block-start: var(--r-space-4);
    border-block-start: 1px solid var(--r-color-line);
}
.r-hero__metric { display: flex; flex-direction: column; gap: 4px; }
.r-hero__metric-num { font-family: var(--r-font-display); font-size: var(--r-text-3xl); font-weight: var(--r-weight-semibold); color: var(--r-color-gold); line-height: 1; letter-spacing: var(--r-tracking-tight); }
.r-hero__metric-lbl { font-size: var(--r-text-xs); color: var(--r-color-text-muted); text-transform: uppercase; letter-spacing: var(--r-tracking-wide); font-weight: var(--r-weight-medium); line-height: 1.3; }

.r-hero__testimonial {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), transparent 60%), var(--r-color-surface);
    border: 1px solid var(--r-color-line-gold);
    border-radius: var(--r-radius-xl);
    padding: var(--r-space-6);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--r-space-3);
    position: relative;
}
.r-hero__testimonial::before {
    content: "“";
    position: absolute;
    top: 8px;
    right: 16px;
    font-family: var(--r-font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--r-color-gold-tint-strong);
    pointer-events: none;
}
.r-hero__rating { color: var(--r-color-gold); font-size: var(--r-text-sm); letter-spacing: 2px; }
.r-hero__quote { margin: 0; font-family: var(--r-font-display); font-size: var(--r-text-md); line-height: 1.55; color: var(--r-color-text); font-style: italic; font-weight: var(--r-weight-regular); }
.r-hero__attribution { font-size: var(--r-text-sm); color: var(--r-color-text-muted); }
.r-hero__attribution strong { color: var(--r-color-text-soft); font-weight: var(--r-weight-semibold); }

@media (max-width: 980px) {
    .r-hero { padding-block: clamp(96px, 12vh, 120px) clamp(48px, 6vh, 72px); }
    .r-hero__layout { grid-template-columns: 1fr; gap: var(--r-space-10); }
    .r-hero__title { font-size: clamp(2rem, 7vw, 3rem); }
    .r-hero__signal-grid { grid-template-columns: repeat(3, 1fr); gap: var(--r-space-3); }
    .r-hero__metric-num { font-size: var(--r-text-2xl); }
}

@media (max-width: 540px) {
    .r-hero__signal-grid { grid-template-columns: 1fr 1fr; }
    .r-hero__signals, .r-hero__testimonial { padding: var(--r-space-5); }
}

/* ═══════════════════════════════════════════════════════════
   R-SKEL — skeleton loaders (Tier D)
   Replaces spinners with progressive skeleton screens
   ═══════════════════════════════════════════════════════════ */

.r-skel { display: block; background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: r-shimmer 1.4s var(--r-ease-out) infinite; border-radius: var(--r-radius-sm); }
@keyframes r-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.r-skel--text { height: 14px; margin: 6px 0; }
.r-skel--text-lg { height: 20px; margin: 8px 0; }
.r-skel--title { height: 28px; margin: 10px 0; border-radius: var(--r-radius-sm); }
.r-skel--avatar { width: 44px; height: 44px; border-radius: 50%; }
.r-skel--card { height: 200px; border-radius: var(--r-radius-lg); margin-block-end: var(--r-space-4); }
.r-skel--chip { height: 28px; width: 96px; border-radius: var(--r-radius-full); display: inline-block; margin-inline-end: 6px; }
.r-skel--bar { height: 12px; border-radius: var(--r-radius-full); }
.r-skel--row { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--r-space-3); align-items: center; padding: 12px 0; border-bottom: 1px solid var(--r-color-line); }

@media (prefers-reduced-motion: reduce) { .r-skel { animation: none; opacity: 0.6; } }

/* ═══════════════════════════════════════════════════════════
   R-VT — element-level View Transitions (Tier B)
   Project cards on /projects morph to hero on /project/{slug}
   ═══════════════════════════════════════════════════════════ */

@supports (view-transition-name: a) {
    [data-vt-id="project-card"] { view-transition-name: project-card; }
    [data-vt-id^="project-card-"] { view-transition-name: var(--vt-name, project-card); }
    [data-vt-id="project-hero"] { view-transition-name: project-hero; contain: layout; }
    [data-vt-id="project-hero-image"] { view-transition-name: project-hero-image; contain: layout paint; }
    [data-vt-id="project-hero-title"] { view-transition-name: project-hero-title; }

    ::view-transition-old(project-card),
    ::view-transition-new(project-card),
    ::view-transition-old(project-hero),
    ::view-transition-new(project-hero),
    ::view-transition-old(project-hero-image),
    ::view-transition-new(project-hero-image),
    ::view-transition-old(project-hero-title),
    ::view-transition-new(project-hero-title) {
        animation-duration: 380ms;
        animation-timing-function: var(--r-ease-out);
    }
}
