/**
 * Residence Four Apartments — theme
 * Palette from brand logo: black, charcoal grey, muted gold (#c09868).
 * Prefix: r4-*  ·  tokens: --r4-…
 */
:root {
    --r4-ink: #000000;
    --r4-ink-soft: #404040;
    --r4-accent: #c09868;
    --r4-accent-deep: #a07a4e;
    --r4-accent-soft: #d4b892;
    --r4-ground: #f3f3f3;
    --r4-paper: #e8e8e8;
    --r4-muted: #585858;
    --r4-white: #ffffff;
    --r4-line: rgba(0, 0, 0, 0.12);
    --r4-line-soft: rgba(0, 0, 0, 0.07);
    --r4-radius: 2px;
    --r4-radius-lg: 8px;
    --r4-shadow: 0 20px 48px -16px rgba(0, 0, 0, 0.28);
    --r4-font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --r4-font-ui: "Manrope", system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

.r4-body {
    margin: 0;
    font-family: var(--r4-font-ui);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--r4-ink-soft);
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(192, 152, 104, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(64, 64, 64, 0.08), transparent 50%),
        linear-gradient(180deg, var(--r4-ground) 0%, #fafafa 40%, var(--r4-ground) 100%);
    min-height: 100vh;
}

.r4-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--r4-ink);
    color: var(--r4-white);
}

.r4-skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* —— Header —— */
.r4-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(238, 241, 239, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--r4-line-soft);
}

.r4-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.9rem 0;
    flex-wrap: wrap;
}

.r4-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.r4-brand-mark {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    background: var(--r4-ink);
    color: var(--r4-accent);
    font-family: var(--r4-font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.r4-brand-logo {
    display: block;
    height: 2.25rem;
    width: auto;
}

.r4-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.r4-brand-title {
    font-family: var(--r4-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--r4-ink);
}

.r4-brand-tagline {
    font-size: 0.75rem;
    color: var(--r4-muted);
    letter-spacing: 0.02em;
}

.r4-nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    border: 0;
    background: transparent;
}

.r4-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--r4-ink);
}

.r4-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0 0;
}

@media (min-width: 992px) {
    .r4-nav-list {
        padding: 0;
    }
}

.r4-nav-link {
    text-decoration: none;
    color: var(--r4-ink-soft);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding-bottom: 0.15rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.r4-nav-link:hover,
.r4-nav-link.is-active {
    color: var(--r4-accent-deep);
    border-bottom-color: var(--r4-accent);
}

/* —— Coming soon (interim public face) —— */
.r4-body-soon {
    position: relative;
    min-height: 100vh;
    background: var(--r4-ink);
}

.r4-body-soon .r4-header-soon {
    position: absolute;
    inset-inline: 0;
    top: 0;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
    pointer-events: none;
}

.r4-body-soon .r4-header-soon .r4-brand {
    pointer-events: auto;
}

.r4-body-soon .r4-brand-logo {
    height: 2rem;
    opacity: 0.9;
}

.r4-body-soon #main-content {
    min-height: 100vh;
}

.r4-soon {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--r4-white);
    text-align: center;
}

.r4-soon-media {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 50% at 50% 35%, rgba(192, 152, 104, 0.18), transparent 58%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(64, 64, 64, 0.35), transparent 55%),
        linear-gradient(160deg, #000000 0%, #141414 45%, #0a0a0a 100%);
    transform: scale(1.03);
    animation: r4-hero-drift 22s ease-in-out infinite alternate;
}

.r4-soon-veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.65) 100%);
    pointer-events: none;
}

.r4-soon-content {
    position: relative;
    z-index: 1;
    padding: 6rem 1rem 5rem;
    max-width: 36rem;
    margin-inline: auto;
    animation: r4-rise 1s ease both;
}

.r4-soon-logo {
    display: block;
    width: min(100%, 22rem);
    height: auto;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.45));
}

.r4-soon-title {
    font-family: var(--r4-font-ui);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    margin: 0 0 1.1rem;
    color: var(--r4-accent);
}

.r4-soon-lead {
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
    max-width: 26rem;
}

.r4-soon-actions {
    margin-top: 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.r4-soon-enquiry {
    font-family: var(--r4-font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--r4-accent);
    border-bottom: 1px solid transparent;
    padding-bottom: 0.15rem;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.r4-soon-enquiry:hover {
    color: var(--r4-accent-soft);
    border-bottom-color: rgba(192, 152, 104, 0.55);
}

.r4-notify {
    width: min(100%, 22rem);
    text-align: center;
}

.r4-notify-label {
    display: block;
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.r4-notify-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(192, 152, 104, 0.35);
    transition: border-color 0.2s ease;
}

.r4-notify-row:focus-within {
    border-bottom-color: var(--r4-accent);
}

.r4-notify-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--r4-font-ui);
    font-size: 0.95rem;
    padding: 0.65rem 0.35rem 0.7rem 0;
}

.r4-notify-input::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

.r4-notify-submit {
    border: 0;
    background: transparent;
    color: var(--r4-accent);
    font-family: var(--r4-font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.65rem 0 0.7rem 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.r4-notify-submit:hover {
    color: var(--r4-accent-soft);
}

.r4-notify-status {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
}

.r4-notify-status.is-ok {
    color: var(--r4-accent-soft);
}

.r4-notify-status.is-err {
    color: #e0a0a0;
}

/* Soft gold focus + subtle desktop cursor on coming-soon */
.r4-body-soon a:focus-visible,
.r4-body-soon button:focus-visible,
.r4-body-soon input:focus-visible {
    outline: 1px solid var(--r4-accent);
    outline-offset: 4px;
}

@media (pointer: fine) {
    .r4-body-soon {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5.5' fill='none' stroke='%23c09868' stroke-opacity='0.85' stroke-width='1'/%3E%3Ccircle cx='12' cy='12' r='1.2' fill='%23c09868' fill-opacity='0.9'/%3E%3C/svg%3E") 12 12, auto;
    }

    .r4-body-soon a,
    .r4-body-soon button,
    .r4-body-soon input,
    .r4-body-soon label {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='none' stroke='%23c09868' stroke-opacity='0.95' stroke-width='1.15'/%3E%3Ccircle cx='12' cy='12' r='1.4' fill='%23c09868'/%3E%3C/svg%3E") 12 12, pointer;
    }
}

.r4-footer-soon {
    margin-top: 0;
    background: transparent;
    position: absolute;
    inset-inline: 0;
    bottom: 0;
}

.r4-footer-soon .r4-footer-base {
    border-top: 0;
    padding: 1.25rem 0 1.5rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

/* —— Hero —— */
.r4-hero {
    position: relative;
    min-height: min(92vh, 820px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: var(--r4-white);
}

.r4-hero-media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 48%, rgba(192, 152, 104, 0.28) 100%),
        linear-gradient(160deg, #000000 0%, #2a2a2a 55%, #141414 100%);
    background-size: cover;
    transform: scale(1.02);
    animation: r4-hero-drift 18s ease-in-out infinite alternate;
}

@keyframes r4-hero-drift {
    from { transform: scale(1.02) translate3d(0, 0, 0); }
    to   { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
}

.r4-hero-content {
    position: relative;
    z-index: 1;
    padding: 4.5rem 0 5rem;
    max-width: 40rem;
    animation: r4-rise 0.9s ease both;
}

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

.r4-brand-hero {
    font-family: var(--r4-font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: var(--r4-accent);
}

.r4-hero-title {
    font-family: var(--r4-font-display);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.r4-hero-lead {
    font-size: 1.1rem;
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 1.75rem;
}

.r4-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* —— Buttons —— */
.r4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.35rem;
    font-family: var(--r4-font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--r4-radius);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.r4-btn:hover {
    transform: translateY(-1px);
}

.r4-btn-primary {
    background: var(--r4-accent);
    color: var(--r4-white);
}

.r4-btn-primary:hover {
    background: var(--r4-accent-deep);
    color: var(--r4-white);
}

.r4-btn-ghost {
    background: transparent;
    color: var(--r4-white);
    border-color: rgba(255, 255, 255, 0.45);
}

.r4-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--r4-white);
}

/* —— Sections —— */
.r4-section {
    padding: 4.5rem 0;
}

.r4-section-alt {
    background: rgba(255, 255, 255, 0.45);
    border-block: 1px solid var(--r4-line-soft);
}

.r4-section-head {
    max-width: 36rem;
    margin-bottom: 2.5rem;
}

.r4-eyebrow {
    display: inline-block;
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--r4-accent-deep);
}

.r4-section-title,
.r4-page-title {
    font-family: var(--r4-font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
}

.r4-section-title {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.r4-section-lead,
.r4-page-lead {
    color: var(--r4-muted);
    margin: 0;
    max-width: 36rem;
}

.r4-section-cta {
    margin: 2.5rem 0 0;
}

.r4-page-hero {
    padding: 3.5rem 0 2rem;
    border-bottom: 1px solid var(--r4-line-soft);
    background: linear-gradient(180deg, rgba(192, 152, 104, 0.08), transparent);
}

.r4-page-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

/* —— Features / units —— */
.r4-feature-grid,
.r4-unit-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .r4-feature-grid,
    .r4-unit-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.r4-feature,
.r4-unit {
    padding: 1.5rem 0;
    border-top: 1px solid var(--r4-line);
}

.r4-feature-title,
.r4-unit-name {
    font-family: var(--r4-font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.r4-feature-text,
.r4-unit-text,
.r4-unit-meta,
.r4-unit-plan {
    color: var(--r4-muted);
    font-size: 0.98rem;
}

.r4-unit-meta {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--r4-accent-deep);
    margin-bottom: 0.5rem;
}

.r4-unit-plan {
    font-size: 0.85rem;
    font-style: italic;
}

/* —— Gallery —— */
.r4-gallery-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .r4-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .r4-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.r4-gallery-item {
    margin: 0;
}

.r4-gallery-placeholder {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
    background:
        linear-gradient(145deg, var(--r4-paper), var(--r4-ground)),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 8px,
            rgba(192, 152, 104, 0.06) 8px,
            rgba(192, 152, 104, 0.06) 16px
        );
    color: var(--r4-muted);
    font-size: 0.9rem;
    border: 1px solid var(--r4-line-soft);
}

.r4-gallery-item figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--r4-ink-soft);
}

.r4-map-placeholder {
    margin-top: 1.5rem;
    min-height: 240px;
    display: grid;
    place-items: center;
    background: var(--r4-paper);
    border: 1px dashed var(--r4-line);
    color: var(--r4-muted);
}

/* —— Prose / form —— */
.r4-prose {
    max-width: 42rem;
}

.r4-prose p {
    margin: 0 0 1rem;
}

.r4-placeholder-note {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    background: rgba(192, 152, 104, 0.08);
    border-left: 3px solid var(--r4-accent);
    font-size: 0.9rem;
    color: var(--r4-ink-soft);
}

.r4-form .form-control {
    border-radius: var(--r4-radius);
    border-color: var(--r4-line);
    padding: 0.7rem 0.85rem;
}

.r4-form .form-control:focus {
    border-color: var(--r4-accent);
    box-shadow: 0 0 0 0.2rem rgba(192, 152, 104, 0.2);
}

.r4-optional {
    color: var(--r4-muted);
    font-weight: 400;
    font-size: 0.85em;
}

.r4-honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.r4-alert {
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--r4-radius);
    font-size: 0.95rem;
}

.r4-alert-success {
    background: rgba(192, 152, 104, 0.12);
    color: var(--r4-accent-deep);
}

.r4-alert-error {
    background: rgba(140, 40, 40, 0.08);
    color: #6e1f1f;
}

/* —— Footer —— */
.r4-footer {
    margin-top: 2rem;
    background: var(--r4-ink);
    color: rgba(255, 255, 255, 0.78);
}

.r4-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2.75rem 0 1.75rem;
}

.r4-footer-name {
    font-family: var(--r4-font-display);
    font-size: 1.25rem;
    color: var(--r4-white);
}

.r4-footer-note {
    max-width: 28rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
}

.r4-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.r4-footer-nav a {
    color: var(--r4-accent-soft);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.r4-footer-nav a:hover {
    color: var(--r4-white);
}

.r4-footer-base {
    padding: 1rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* —— Motion —— */
.r4-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.r4-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .r4-hero-media,
    .r4-soon-media,
    .r4-hero-content,
    .r4-soon-content,
    .r4-btn,
    .r4-reveal {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
