/* Design tokens — warm cream stone, olive-charcoal and earthy brown.
   The CMS Colours and Fonts tabs map onto these custom properties. */
:root {
  --color-primary: #2f2e27;
  --color-primary-dark: #1d1c17;
  --color-secondary: #2a2923;
  --color-accent: #8b6b4e;
  --color-accent-soft: #ece3d8;
  --color-rose: #b5563d;
  --color-sage: #6f7a5c;
  --color-surface: #f3eee8;
  --color-surface-soft: #faf7f3;
  --color-default: #5d5a51;
  --color-muted: #8c877c;
  --color-line: #e3dbd0;
  --color-white: #ffffff;
  --font-default: 'Manrope', system-ui, sans-serif;
  --font-primary: 'Urbanist', system-ui, sans-serif;
  --font-heading: 'Urbanist', system-ui, sans-serif;
  --radius: 28px;
  --radius-sm: 18px;
  --section-max-width: 82rem;
  --header-h: 84px;
  --header-top: 14px;
  --section-pad-y: 100px;
  --base-size: 16px;
  --shadow: 0 18px 46px -30px color-mix(in srgb, var(--color-primary) 40%, transparent);
  --shadow-lg: 0 30px 70px -38px color-mix(in srgb, var(--color-primary) 55%, transparent);
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.65; -webkit-font-smoothing: antialiased; background: var(--color-surface); }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--color-accent); color: var(--color-white); }

.container { max-width: var(--section-max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad-y) 0; position: relative; }
section, footer { overflow-x: clip; }
section.tight { padding-top: calc(var(--section-pad-y) * .55); }
section.white { background: var(--color-surface-soft); }
section.dark { background: var(--color-primary); color: color-mix(in srgb, var(--color-white) 76%, transparent); }
section.dark h2, section.dark h3 { color: var(--color-white); }

/* the accent words in a headline — the warm brown second line */
.hl { color: var(--color-accent); }
section.dark .hl { color: color-mix(in srgb, var(--color-accent) 55%, var(--color-white)); }

/* ── Buttons: charcoal pills, an optional round arrow knob ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem; padding: 1rem 1.7rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--color-primary); color: var(--color-white); font-family: var(--font-primary); font-weight: 600; font-size: .95rem; line-height: 1; white-space: nowrap; letter-spacing: .005em;
  transition: background .3s ease, color .3s ease, transform .3s var(--ease), box-shadow .3s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 16px 30px -16px color-mix(in srgb, var(--color-primary) 80%, transparent); }
/* a pill with a white round arrow knob on its right ("Explore Properties ↗") */
.btn.knob { padding: .4rem .4rem .4rem 1.5rem; gap: 1.1rem; }
.btn .k { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--color-white); color: var(--color-primary); flex: none; transition: transform .35s var(--ease); }
.btn .k svg { width: 17px; height: 17px; }
.btn:hover .k { transform: rotate(45deg); }
.btn.light { background: var(--color-white); color: var(--color-primary); }
.btn.light:hover { background: var(--color-white); }
.btn.light .k { background: var(--color-primary); color: var(--color-white); }
.btn.soft { background: var(--color-accent-soft); color: var(--color-primary); }
.btn.soft:hover { background: color-mix(in srgb, var(--color-accent) 24%, var(--color-white)); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--color-primary); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--color-primary) 22%, transparent); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--color-primary); }
.btn.small { padding: .72rem 1.15rem; font-size: .86rem; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
/* the separate round dark arrow button */
.round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--color-primary); color: var(--color-white); transition: transform .35s var(--ease), background .3s ease; }
.round svg { width: 18px; height: 18px; }
.round:hover { background: var(--color-primary-dark); transform: rotate(45deg); }
/* text link with an arrow ("View All Properties →") */
.arrow-link { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-primary); font-weight: 700; font-size: .95rem; color: var(--color-primary); }
.arrow-link svg { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }
.arrow-link:hover { color: var(--color-accent); }

/* ── Section heads: a small spaced eyebrow trailed by a thin rule, a bold headline whose accent words turn brown ── */
.eyebrow { display: inline-flex; align-items: center; gap: .9rem; font-family: var(--font-default); font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--color-muted); }
.eyebrow::after { content: ''; width: 64px; height: 1px; background: currentColor; opacity: .55; flex: none; }
section.dark .eyebrow { color: color-mix(in srgb, var(--color-white) 62%, transparent); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin-top: .8rem; font-weight: 800; }
.section-head p { margin-top: 1rem; font-size: 1.04rem; max-width: 60ch; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { content: ''; width: 64px; height: 1px; background: currentColor; opacity: .55; flex: none; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.section-head.split { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; }
.section-head.split p { max-width: 52ch; }

/* a white card */
.card-white { background: var(--color-white); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 600; font-size: .8rem; color: var(--color-secondary); margin-bottom: .35rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: var(--color-surface-soft); border: 1.5px solid var(--color-line); border-radius: 14px; padding: .85rem 1.05rem; color: var(--color-secondary);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; background: var(--color-white); border-color: var(--color-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 16%, transparent); }
.form-grid ::placeholder { color: color-mix(in srgb, var(--color-muted) 80%, var(--color-white)); }
.form-grid .check { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; font-weight: 500; }
.form-grid .check input { width: auto; margin-top: .25rem; accent-color: var(--color-primary); }
.field-err { color: #b03a2a; font-size: .82rem; margin-top: .35rem; }
.form-note { font-size: .8rem; color: var(--color-muted); }
.form-ok { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-sage) 16%, var(--color-white)); color: color-mix(in srgb, var(--color-sage) 70%, #000); }
.form-ok svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.form-bad { padding: 12px 16px; border-radius: 12px; background: #fbeae5; color: #9c3322; font-size: .9rem; }

/* a tick list, the tick drawn in CSS so it follows the theme colours */
.tick-list { list-style: none; display: grid; gap: .6rem; }
.tick-list li { position: relative; padding-left: 1.8rem; font-size: .95rem; }
.tick-list li::before { content: ''; position: absolute; left: 0; top: .22em; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--color-accent-soft); }
.tick-list li::after { content: ''; position: absolute; left: .41rem; top: .45em; width: .3rem; height: .55rem; border: solid var(--color-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* rating stars */
.stars { display: inline-flex; gap: 2px; color: #d39b2a; }
.stars svg { width: 15px; height: 15px; fill: currentColor; }

/* a property's label chip (Featured / New / Hot Deal / Reduced) */
.tag { display: inline-flex; align-items: center; padding: .38rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; background: var(--color-white); color: var(--color-secondary); }
.tag.featured { background: var(--color-primary); color: var(--color-white); }
.tag.hot-deal { background: var(--color-rose); color: var(--color-white); }
.tag.reduced { background: var(--color-sage); color: var(--color-white); }
.tag.let { background: var(--color-accent); color: var(--color-white); }

/* round icon tiles in four warm tints (the row values keep their names) */
.tint { display: grid; place-items: center; border-radius: 50%; flex: none; }
.tint svg { width: 46%; height: 46%; }
.tint.lavender { background: var(--color-accent-soft); color: var(--color-accent); }
.tint.indigo { background: var(--color-primary); color: var(--color-white); }
.tint.sky { background: color-mix(in srgb, var(--color-sage) 18%, var(--color-white)); color: var(--color-sage); }
.tint.rose { background: color-mix(in srgb, var(--color-rose) 14%, var(--color-white)); color: var(--color-rose); }

/* ── Header logo: a house outline and a two-line wordmark ── */
.logo { display: inline-flex; align-items: center; gap: .7rem; font: 800 1.28rem var(--font-heading); color: var(--color-secondary); letter-spacing: .02em; text-transform: uppercase; min-width: 0; }
.logo img { max-height: 44px; width: auto; max-width: min(46vw, 240px); object-fit: contain; }
.logo .mark { width: 40px; height: 40px; display: grid; place-items: center; flex: none; color: var(--color-primary); }
.logo .mark svg { width: 36px; height: 36px; stroke-width: 1.6; }
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1; min-width: 0; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .45em; font: 600 .44em var(--font-default); letter-spacing: .28em; color: var(--color-muted); }

/* ══ Motion: section-enter animations (plugins/motion.client.ts) ══
   Hidden states apply only while html.hg-motion is set and the section has not
   entered the frame yet; --i staggers siblings, --d adds a fixed delay. */
.hg-motion [data-anim] {
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    transform 1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    filter .9s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    clip-path 1.1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms));
}
.hg-motion section:not(.hg-inview) [data-anim], .hg-motion footer:not(.hg-inview) [data-anim] { opacity: 0; }
.hg-motion section:not(.hg-inview) [data-anim="up"], .hg-motion footer:not(.hg-inview) [data-anim="up"] { transform: translateY(36px); }
.hg-motion section:not(.hg-inview) [data-anim="down"] { transform: translateY(-30px); }
.hg-motion section:not(.hg-inview) [data-anim="left"] { transform: translateX(56px); }
.hg-motion section:not(.hg-inview) [data-anim="right"] { transform: translateX(-56px); }
.hg-motion section:not(.hg-inview) [data-anim="zoom"] { transform: scale(.9); }
.hg-motion section:not(.hg-inview) [data-anim="blur"] { filter: blur(12px); transform: scale(1.03); }
.hg-motion section:not(.hg-inview) [data-anim="pop"] { transform: translateY(16px) scale(.85); }
.hg-motion section:not(.hg-inview) [data-anim="rise"] { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.hg-motion section.hg-inview [data-anim="rise"] { clip-path: inset(-10% -5% -20% -5%); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0 round var(--radius)); }
.hg-motion section.hg-inview [data-anim="clip"] { clip-path: inset(0 0 0 0 round var(--radius)); }
.hg-motion [data-anim="clip"] img { transition: transform 1.6s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] img { transform: scale(1.15); }

@keyframes kh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float { animation: kh-float 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
}
@media (max-width: 640px) {
  :root { --section-pad-y: 72px; --radius: 22px; --header-h: 72px; --header-top: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 32px; }
}
