/* =========================================================
   Maple & May — About Us ("Our Developments") prototype
   Shares the design system with New Homes: the header and
   footer are the already-generated, canonical components
   (Montserrat headings + Open Sans body).
   ========================================================= */

:root {
    --color-dark:        #455560;  /* Dark Grey */
    --color-dark-2:      #283035;  /* secondary/Black */
    --color-cream:       #E6DFD5;  /* Linen */
    --color-grey:        #f3f1f0;  /* Page grey (Properties Section bg) */
    --color-tan:         #AA9678;  /* Wheat */
    --color-soft-wheat:  #C1B199;  /* Soft Wheat */
    --color-white:       #ffffff;
    --color-body:        #283035;
    --color-green:       #11740a;  /* secondary/Green */
    --color-orange:      #e66712;  /* secondary/Orange */
    --color-red:         #c0392b;  /* closed / let / sold */
    --color-black:       #000000;

    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --space-72: 72px;
    --space-120: 120px;

    --radius-pill: 999px;

    --container: 1200px;

    --font-head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Type tokens — exact Figma values */
    --type-hero-mobile:  700 40px/44px var(--font-head);  /* Mobile hero h1 */
    --type-hero-desktop: 700 72px/80px var(--font-head);  /* Desktop hero h1 — Desktop/Extra large */
    --type-h-lg:     700 40px/48px var(--font-head);  /* Desktop/Large */
    --type-h-sm:     700 20px/28px var(--font-head);  /* Desktop/Small */
    --type-label:    600 16px/24px var(--font-head);  /* p-default bold (Montserrat SemiBold) */
    --type-p-large:  400 24px/32px var(--font-body);  /* p-large (Open Sans) */
    --type-p:        400 16px/24px var(--font-body);  /* p-default (Open Sans) */
    --type-p-small:  400 12px/20px var(--font-body);  /* p-small (Open Sans) */
}

/* ---------- Icons ---------- */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; width: 24px; height: 24px; }
.icon--arrow-down { width: 44px; height: 44px; }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font: var(--type-p);
    color: var(--color-body);
    background: var(--color-cream);
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); }
p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

a:focus-visible, button:focus-visible {
    outline: 3px solid #f3c87a;
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.6em;
    background: var(--color-dark);
    color: var(--color-white);
    border-radius: var(--radius-pill);
    font: var(--type-label);
    border: none;
    transition: background 0.15s ease;
    text-align: center;
}
.btn:hover { background: var(--color-dark-2); }
.btn--block { width: 100%; justify-content: center; }
.btn--block .icon { color: var(--color-tan); }
/* Rectangular button — used for "View Details" and "show more" */
.btn--rect, .property-card .btn {
    border-radius: 5px;
    border: 1px solid var(--color-tan);
    padding: 12px 39px;
    font: var(--type-label);
    justify-content: center;
}
.btn--rect .icon, .property-card .btn .icon { color: var(--color-tan); }

/* ---------- Header (already-generated, canonical) ---------- */
.site-header { background: var(--color-dark); color: var(--color-white); position: sticky; top: 0; z-index: 100; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 120px; gap: 1rem; }
.site-header__logo img { height: 62px; width: auto; }
.site-header__toggle { display: flex; flex-direction: column; justify-content: space-between; width: 48px; height: 48px; padding: 12px 8px; background: transparent; border: none; }
.site-header__toggle span { display: block; height: 3px; background: var(--color-tan); border-radius: 2px; }
.site-header__nav { display: none; }
.site-header__nav ul { display: flex; align-items: stretch; gap: 10px; }
.site-header__nav a { display: inline-flex; align-items: center; height: 120px; padding: 9px 17px; font: var(--type-label); color: var(--color-white); border-bottom: 3px solid transparent; transition: background 0.15s ease; }
.site-header__nav a:hover { background: rgba(255,255,255,0.06); }
.site-header__nav a.is-active { background: var(--color-tan); color: var(--color-dark-2); border-bottom-color: var(--color-tan); }
.site-header__nav.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-dark-2); }
.site-header__nav.is-open ul { flex-direction: column; gap: 0; }
.site-header__nav.is-open a { height: auto; padding: 1rem 20px; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    color: var(--color-white);
    background: var(--color-dark);
    overflow: hidden;
    min-height: 428px;
    display: flex;
    align-items: center;
}
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__content { position: relative; z-index: 1; text-align: left; }
.hero__content h1 { font: var(--type-hero-mobile); color: var(--color-white); margin: 0 0 16px; }
.hero__content h1:last-child { margin-bottom: 0; }
.hero__content p { font: var(--type-h-sm); color: var(--color-white); margin: 0; max-width: 60ch; }

/* ---------- Register band (shared) ---------- */
.register {
    background: var(--color-grey);
    border-top: 7px solid var(--color-dark);
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.register__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 8px 32px;
    border-radius: 0 0 16px 16px;
    font: var(--type-h-sm);
    transition: background 0.15s ease;
}
.register__btn:hover { background: var(--color-dark-2); }
.register__btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--color-soft-wheat); }

/* ---------- Developments grid ---------- */
.properties { padding: 72px 0; background: var(--color-grey); }
.property-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.property-card {
    background: var(--color-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.property-card__media {
    position: relative;
    height: 197px;
    border-bottom: 2px solid var(--color-tan);
    overflow: hidden;
}
.property-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge {
    position: absolute;
    top: 16px; right: 0;
    padding: 8px 16px;
    color: var(--color-white);
    font: var(--type-p);
    border-radius: 0;
}
.badge--open    { background: #008001; }
.badge--soon    { background: #008001; }
.badge--today   { background: #c0540d; }
.badge--closed  { background: #bf0000; }
.badge--dev     { background: #333333; }
.badge--let     { background: #bf0000; }
.badge--sold    { background: #bf0000; }

.property-card__body { padding: 16px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.property-card__top { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.property-card__footer { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.property-card__body h3 { font: var(--type-h-sm); color: var(--color-dark); margin: 0; }
.property-card__body p { font: var(--type-p); color: var(--color-dark); margin: 0; }
.property-card__address { color: var(--color-body); }
.property-card__meta {
    border-top: 2px solid var(--color-tan);
    padding-top: 16px;
    color: var(--color-body);
    margin-top: auto;
}
.property-card__meta strong { font: var(--type-label); }
.properties__more { display: flex; justify-content: center; margin-top: 40px; }

/* Show more - same visual style as the Register Your Interest button */
.show-more {
    background: transparent;
    border-top: 7px solid var(--color-dark);
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 40px;
}
.show-more__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 8px 32px;
    border: 0;
    border-radius: 0 0 16px 16px;
    font: var(--type-h-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}
.show-more__btn:hover { background: var(--color-dark-2); }
.show-more__btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--color-soft-wheat); }
.show-more.is-done { display: none; }

/* ---------- Footer (already-generated, canonical) ---------- */
.site-footer { background: var(--color-dark); color: var(--color-white); padding: 72px 0 0; font: var(--type-p); }
.site-footer h4 { font: var(--type-label); color: var(--color-white); margin: 0 0 16px; }
.site-footer a { color: var(--color-white); }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 24px; }
.site-footer__brand-lockup { display: flex; align-items: center; gap: 16px; }
.site-footer__brand-lockup img { height: 68px; width: auto; }
.site-footer__strapline { display: flex; flex-direction: column; font: 400 26px/1.15 var(--font-head); color: var(--color-white); border-left: 1px solid rgba(255,255,255,0.35); padding-left: 16px; }
.site-footer__address p { font: var(--type-p); color: var(--color-white); margin: 0; }
.site-footer__links ul { display: flex; flex-direction: column; gap: 16px; }
.site-footer__links a { font: var(--type-p-small); }
.site-footer__social { display: flex; gap: 8px; margin: 0 0 16px; }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--color-white); color: var(--color-dark); border-radius: 50%; font: var(--type-label); font-size: 14px; }
.site-footer__social svg { width: 28px; height: 28px; }
.site-footer__contact { display: flex; flex-direction: column; gap: 16px; }
.site-footer__contact p { margin: 0; font: var(--type-label); color: var(--color-white); }
.site-footer__copy { padding: 0 0 40px; text-align: center; font: var(--type-p-small); color: var(--color-white); }
.site-footer__copy p { margin: 0; }

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 768px) {
    .site-header__toggle { display: none; }
    .site-header__nav { display: block; }
    .site-header__nav ul { flex-direction: row; }

    .hero__content h1 { font: var(--type-hero-desktop); }

    .property-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

    .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 37px; }
    .site-footer__links, .site-footer__contact { position: relative; padding-left: 37px; }
    .site-footer__links::before, .site-footer__contact::before {
        content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--color-cream);
    }
}

/* =========================================================
   Register Your Interest â€” drop-down form
   Appended to every prototype's styles.css.
   Scoped to .register[data-register] so it doesn't affect
   other variants of .register (e.g. new-homes "Show more").
   ========================================================= */
.register[data-register] {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: auto;
    min-height: 60px;
    transition: padding 0.2s ease;
}
.register[data-register].is-open { padding-bottom: 24px; }
.register[data-register] .register__btn { border: 0; cursor: pointer; font-family: inherit; }
.register[data-register].is-open .register__btn-icon svg { transform: rotate(180deg); }
.register[data-register] .register__btn-icon svg { transition: transform 0.2s ease; }

.register__panel[hidden] { display: none; }
.register__panel { width: 100%; display: flex; justify-content: center; padding: 24px 20px 0; }
.register-form { width: 100%; max-width: 482px; display: flex; flex-direction: column; gap: 16px; }
.register-form__field { display: flex; flex-direction: column; gap: 8px; }
.register-form__field label { font: 400 16px/24px var(--font-body); color: var(--color-body); }
.register-form__hint { font: 400 12px/20px var(--font-body); color: var(--color-body); }
.register-form__field input {
    width: 100%; height: 68px; padding: 12px;
    font: 400 16px/24px var(--font-body); color: var(--color-body);
    background: var(--color-white); border: 1px solid #808285; border-radius: 4px;
    outline: none; transition: border-color 0.15s ease;
}
.register-form__field input::placeholder { color: #808285; }
.register-form__field input:focus { border-color: var(--color-dark); box-shadow: 0 0 0 2px rgba(69,85,96,0.18); }
.register-form__submit {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 24px;
    background: var(--color-dark); color: var(--color-white);
    border: 1px solid var(--color-tan); border-radius: 2px;
    font: 600 16px/24px var(--font-head);
    cursor: pointer; transition: background 0.15s ease;
}
.register-form__submit:hover { background: var(--color-dark-2); }

/* =========================================================
   Sub-menu nav (About Us dropdown) — mirrors affordable-rent.
   Tenant-login pill is intentionally NOT included here.
   ========================================================= */
.site-header__nav.is-open > ul { flex-direction: column; gap: 0; }
.site-header__nav-toggle { appearance: none; background: transparent; border: 0; cursor: pointer; font-family: var(--font-head); font-weight: 600; color: inherit; }

.site-header__nav ul.site-header__submenu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; background: var(--color-white); }
.site-header__nav ul.site-header__submenu[hidden] { display: none; }
.site-header__nav .site-header__submenu li { display: block; width: 100%; }
.site-header__submenu a { display: flex; align-items: center; justify-content: center; gap: 20px; height: 72px; padding: 9px 17px; background: #696E72; color: var(--color-white); font: var(--type-body-bold); text-decoration: none; border: 0; border-bottom: 3px solid transparent; transition: background 0.15s ease, border-color 0.15s ease; }
.site-header__submenu a > span { flex: 1 0 0; min-width: 0; }
@media (hover: hover) {
    .site-header__submenu a:hover,
    .site-header__submenu a:focus-visible { background: var(--color-tan); border-bottom-color: var(--color-tan); }
}
.site-header__submenu .icon--chevron-right { width: 24px; height: 24px; color: var(--color-white); flex-shrink: 0; }

@media (min-width: 768px) {
    .site-header__nav-item--has-sub { position: relative; }
    .site-header__nav-toggle { display: inline-flex; align-items: center; height: 120px; padding: 9px 17px; font: var(--type-body-bold); color: var(--color-white); background: transparent; border-bottom: 3px solid transparent; transition: background 0.15s ease; }
    .site-header__nav-toggle:hover { background: rgba(255,255,255,0.06); }
    .site-header__nav-item--has-sub[data-submenu-open] .site-header__nav-toggle { background: var(--color-dark-2); border-bottom-color: var(--color-tan); }
    .site-header__submenu { position: absolute; top: 100%; left: 0; width: 266px; z-index: 50; }
}

/* Mobile drawer: 283px wide, dark-grey rows 72px tall */
.site-header__nav.is-open { width: 283px; right: auto; }
.site-header__nav.is-open > ul > li > a,
.site-header__nav.is-open > ul > li > .site-header__nav-toggle { display: flex; align-items: center; justify-content: flex-end; width: 100%; height: 72px; padding: 9px 32px; border: 0; background: var(--color-dark); color: var(--color-white); text-decoration: none; font: var(--type-body-bold); }
.site-header__nav.is-open > ul > .site-header__nav-item--has-sub > .site-header__nav-toggle { justify-content: space-between; }
.site-header__nav.is-open > ul > .site-header__nav-item--has-sub > .site-header__nav-toggle::before { content: "+"; flex: 0 0 auto; font-size: 24px; line-height: 1; color: var(--color-white); font-weight: 400; }
.site-header__nav.is-open .site-header__nav-item--has-sub[data-submenu-open] > .site-header__nav-toggle { background: var(--color-tan); }
.site-header__nav.is-open .site-header__nav-item--has-sub[data-submenu-open] > .site-header__nav-toggle::before { content: "\00d7"; font-size: 24px; }
.site-header__nav.is-open ul.site-header__submenu { background: var(--color-dark); }
.site-header__nav.is-open .site-header__submenu a { background: #313B42; }

/* Phone row (mobile drawer only) */
.site-header__nav-phone { display: none; }
.site-header__nav.is-open .site-header__nav-phone { display: block; }
.site-header__nav.is-open .site-header__nav-phone a { display: flex; align-items: center; justify-content: flex-start; gap: 16px; width: 100%; height: 72px; padding: 9px 32px; background: var(--color-dark); color: var(--color-white); text-decoration: none; font: var(--type-body-bold); }
.site-header__nav.is-open .site-header__nav-phone a::before { content: none; }
.site-header__nav.is-open .site-header__nav-phone .icon--phone { color: var(--color-white); flex-shrink: 0; }
@media (min-width: 768px) { .site-header__nav-phone { display: none !important; } }

/* Hamburger → X */
.site-header__toggle span { transition: transform 0.2s ease, opacity 0.15s ease; transform-origin: center; }
.site-header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
