/* ==========================================================================
   Beautiful Homes RS - site-wide styles
   Brand colours come from the BHRS icon set and the logo.
   ========================================================================== */

:root {
    /* Brand palette */
    --mauve: #7a656a;        /* logo lettering, headings */
    --mauve-dark: #5b4a4f;
    --peach: #f0b8a9;        /* logo mark, accents */
    --peach-dark: #e09a87;
    --peach-soft: #fbe9e3;
    --slate: #535588;        /* primary actions, top bar */
    --slate-dark: #3e3f6b;
    --sage: #bbc392;
    --sage-soft: #eef0e2;
    --pale: #cbd1eb;
    --pale-soft: #eef0f8;

    /* Neutrals */
    --ink: #2f2a35;
    --muted: #6d6773;
    --line: #e7e1e3;
    --surface: #ffffff;
    --cream: #faf6f3;
    --footer: #2e2b40;

    /* Type */
    --font-display: "Marcellus", Georgia, "Times New Roman", serif;
    --font-body: "Josefin Sans", "Segoe UI", system-ui, sans-serif;

    /* Shape */
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(47, 42, 53, .06), 0 8px 24px rgba(47, 42, 53, .08);
    --shadow-lg: 0 2px 4px rgba(47, 42, 53, .06), 0 18px 40px rgba(47, 42, 53, .16);
    --container: 1200px;
    --header-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--slate-dark); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; color: var(--mauve-dark); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--peach-dark); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--slate); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.eyebrow {
    display: inline-flex; align-items: center; gap: .4em;
    font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--mauve); margin: 0 0 .6em;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 46px; padding: .7em 1.4em .55em;
    font: 600 .95rem/1 var(--font-body); letter-spacing: .04em;
    border: 1.5px solid transparent; border-radius: 999px;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--slate); color: #fff; }
.btn--primary:hover { background: var(--slate-dark); color: #fff; }
.btn--accent { background: var(--peach); color: var(--ink); }
.btn--accent:hover { background: var(--peach-dark); color: var(--ink); }
.btn--outline { background: transparent; color: var(--slate); border-color: currentColor; }
.btn--outline:hover { background: var(--slate); border-color: var(--slate); color: #fff; }

.link-arrow {
    display: inline-flex; align-items: center; gap: .4em;
    font-weight: 600; text-decoration: none; color: var(--slate);
}
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(4px); }

.link-button {
    background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--ink); }

/* ---- Top bar --------------------------------------------------------------- */
.topbar { background: var(--slate-dark); color: #e9e8f4; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; }
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--peach); }
.topbar__contact { display: flex; gap: 22px; }
.topbar__contact a { display: inline-flex; align-items: center; gap: .45em; }
.topbar__social { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; letter-spacing: .06em; }
@media (max-width: 720px) {
    .topbar__social, .topbar__contact a[href^="mailto"] { display: none; }
    .topbar__inner { justify-content: center; }
}

/* ---- Header / navigation ---------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s, border-color .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(47, 42, 53, .08); border-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 24px; }

.brand { margin-right: auto; }
.brand img { height: 64px; width: auto; }

/* Header order: logo, nav, favourites heart (menu button on small screens) */
.site-nav { order: 1; }
.fav-link { order: 2; }
.nav-toggle { order: 3; }

.fav-link {
    position: relative; display: inline-grid; place-items: center; flex: none;
    width: 46px; height: 46px; border-radius: 50%;
    color: var(--mauve-dark); background: var(--peach-soft); text-decoration: none;
    transition: background-color .2s, color .2s;
}
.fav-link .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; }
.fav-link:hover { background: var(--peach); color: var(--ink); }
.fav-link.has-items { color: #d9665a; }
.fav-link.has-items .icon { fill: currentColor; }
.fav-link__count {
    position: absolute; top: -2px; right: -4px; min-width: 20px; height: 20px; padding: 3px 5px 0;
    border-radius: 999px; background: var(--slate); color: #fff;
    font-size: .72rem; font-weight: 600; line-height: 17px; text-align: center;
}

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
    position: relative; display: block; padding: 8px 0 6px;
    font-size: .9rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--mauve-dark); text-decoration: none;
}
.site-nav ul a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--peach-dark); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.site-nav ul a:hover::after, .site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav ul a[aria-current="page"] { color: var(--slate); }

.nav-toggle {
    display: none; width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: var(--peach-soft); color: var(--mauve-dark); cursor: pointer;
    align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 1080px) {
    .site-nav ul { gap: 18px; }
    .site-nav__cta { display: none; }
}
@media (max-width: 900px) {
    :root { --header-h: 68px; }
    .brand img { height: 50px; }
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-top: 1px solid var(--line); box-shadow: var(--shadow-lg);
        padding: 8px 20px 20px;
        visibility: hidden; opacity: 0; transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .site-nav.is-open { visibility: visible; opacity: 1; transform: none; }
    .site-nav ul { flex-direction: column; gap: 0; }
    .site-nav ul a { padding: 14px 0; border-bottom: 1px solid var(--line); }
    .site-nav ul a::after { display: none; }
    .site-nav__cta { display: inline-flex; margin-top: 16px; }
}

/* ---- Sections ------------------------------------------------------------------ */
.section { padding: 72px 0; }
.section--tint { background: var(--cream); }
.section__header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.section__title { font-size: clamp(1.75rem, 3vw, 2.4rem); margin: 0; }
@media (max-width: 640px) { .section { padding: 52px 0; } }

.notice {
    text-align: center; padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius);
    color: var(--muted);
}
.empty-state { color: var(--muted); margin: 0; }
.empty-state--hint {
    display: flex; align-items: center; gap: 12px; padding: 18px 22px;
    background: var(--peach-soft); border-radius: var(--radius);
}
.empty-state--hint .icon { width: 26px; height: 26px; flex: none; color: #d9665a; fill: currentColor; stroke: none; }

.count-pill {
    display: inline-block; vertical-align: middle; margin-left: 6px; padding: 4px 10px 2px;
    border-radius: 999px; background: var(--peach-soft); color: var(--mauve-dark);
    font-family: var(--font-body); font-size: .9rem; font-weight: 600;
}

/* ---- Footer ---------------------------------------------------------------------- */
.site-footer { background: var(--footer); color: #d9d6e4; font-size: .95rem; }
.site-footer a { color: #f3eff8; text-decoration: none; }
.site-footer a:hover { color: var(--peach); }
.site-footer__grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px;
}
.site-footer__brand img { width: 230px; margin-bottom: 18px; }
.site-footer__brand p { color: #bdb8cc; max-width: 30ch; }
.site-footer__heading {
    font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .16em;
    text-transform: uppercase; color: var(--peach); margin: 0 0 14px;
}
.site-footer__links, .site-footer__social { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer address { margin-bottom: 12px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; font-size: .85rem; color: #a7a2b8; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---- Toast ------------------------------------------------------------------------- */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 200;
    transform: translate(-50%, 20px); opacity: 0;
    max-width: min(92vw, 460px); padding: 14px 20px;
    background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
    font-size: .95rem; text-align: center;
    transition: opacity .25s, transform .25s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Footer bottom row; the small "Admin sign in" link shows on the home page only */
.site-footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 8px 20px; flex-wrap: wrap; }
.site-footer__admin { color: inherit; opacity: .55; font-size: .85em; text-decoration: none; }
.site-footer__admin:hover, .site-footer__admin:focus-visible { opacity: 1; text-decoration: underline; }
