/* Stoneoak: design tokens, base, buttons, header, footer and WhatsApp button. Loaded on every page. */

/* Layout: split hero (forest panel + photograph), then ivory sections divided by fine gold rules, no boxed cards. Left-aligned throughout. */
:root {
  --forest: #0f2a1c;      /* hero, footer */
  --green: #183f29;       /* brand green, buttons on light */
  --paper: #f7f5ef;       /* page */
  --stone: #ece8de;       /* alternate band */
  --gold: #c8a553;        /* rules, buttons on dark */
  --gold-deep: #85651f;   /* gold text on light */
  --ink: #16231b;
  --muted: #46534a;
  --on-dark: #f3efe4;
  --on-dark-muted: #c4c9bf;
  --rule: rgba(22, 35, 27, 0.14);
  --rule-gold: rgba(200, 165, 83, 0.55);
  --display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4.5vw, 56px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 500; }
h1, h2 { font-family: var(--display); line-height: 1.02; letter-spacing: -0.01em; }
h3 { font-family: var(--display); font-size: 1.6rem; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
.lede { font-size: 1.0625rem; color: var(--muted); max-width: 52ch; }

/* Buttons: square, quiet, sentence case */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 0;
  font: 600 0.9rem/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-gold { background: var(--gold); color: var(--forest); }
.btn-gold:hover { background: #d6b66a; }
.btn-green { background: var(--green); color: var(--on-dark); }
.btn-green:hover { background: var(--forest); }
.btn-line { border-color: var(--rule-gold); color: var(--green); background: transparent; }
.btn-line:hover { border-color: var(--gold); background: rgba(200, 165, 83, 0.1); }
.link { color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.link:hover { color: var(--gold-deep); }
.link-light { color: var(--on-dark); }
.link-light:hover { color: var(--gold); }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 38px; height: 44px; object-fit: contain; mix-blend-mode: multiply; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.45rem; letter-spacing: 0.16em; color: var(--ink); }
.brand-sub { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.28em; color: var(--gold-deep); margin-top: 5px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { text-decoration: none; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--green); }
.nav .btn { color: var(--green); min-height: 42px; padding: 0 20px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--rule-gold); color: var(--green); width: 44px; height: 44px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 0 auto; position: relative; content: ""; }
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 78px; }

/* Header: Services menu */
.nav-item { position: relative; }
.nav-trigger { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; font: 500 0.875rem/1 var(--sans); color: var(--muted); }
.nav-trigger:hover, .nav-item.open .nav-trigger { color: var(--green); }
.nav-trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .2s var(--ease); }
.nav-item.open .nav-trigger svg { transform: rotate(180deg); }
.nav-menu { display: none; position: absolute; top: calc(100% + 22px); left: -20px; width: 330px; background: var(--paper); border: 1px solid var(--rule-gold); border-top: 2px solid var(--gold); box-shadow: 0 18px 40px rgba(15, 42, 28, 0.14); padding: 8px 0; z-index: 40; }
.nav-item.open .nav-menu { display: block; }
.nav .nav-menu a { display: block; padding: 12px 20px; color: var(--ink); }
.nav .nav-menu a:hover { background: rgba(200, 165, 83, 0.12); }
.nav-menu strong { display: block; font-weight: 600; font-size: 0.9rem; }
.nav-menu span { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* Switchable modules (see site-config.js) */
html:not(.mod-dubai) [data-module="dubai"] { display: none !important; }
html.mod-dubai [data-module-off="dubai"] { display: none !important; }

/* Footer */
.footer { background: var(--forest); color: var(--on-dark-muted); padding-block: 72px 32px; font-size: 0.875rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer .brand-name { color: var(--on-dark); }
.footer h4 { margin: 0 0 16px; font-size: 0.8125rem; font-weight: 600; color: var(--gold); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--on-dark); }
.footer-about { margin-top: 16px; max-width: 34ch; }
.footer-base { margin-top: 56px; padding-top: 20px; border-top: 1px solid rgba(200, 165, 83, 0.25); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; }
.wa { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25D366; box-shadow: 0 6px 18px rgba(15, 42, 28, 0.25); }
.wa svg { width: 28px; height: 28px; fill: #fff; }
.wa span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 1040px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 78px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--paper); padding: 8px max(var(--gutter), env(safe-area-inset-right, 0px)) 24px max(var(--gutter), env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--rule-gold); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; width: 100%; font-size: 1rem; }
  .nav-item { width: 100%; }
  .nav-trigger { padding: 14px 0; font-size: 1rem; width: 100%; justify-content: space-between; }
  .nav-menu { position: static; width: auto; box-shadow: none; border: 0; border-left: 2px solid var(--gold); padding: 0 0 8px; margin-left: 2px; }
  .nav .nav-menu a { padding: 10px 16px; }
  .nav .btn { margin-top: 12px; width: 100%; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Header button: same on every page */
.site-header .nav .btn-line { background: transparent; color: var(--green); border: 1px solid var(--rule-gold); }
.site-header .nav .btn-line:hover { background: rgba(200, 165, 83, 0.1); border-color: var(--gold); }

/* "My requirements" form: popup on every page, inline on assisted.html (assets/js/requirements.js) */
.rq-lock { overflow: hidden; }
.rq-dialog { width: min(820px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(15, 42, 28, 0.35); overflow: hidden; }
.rq-dialog[open] { display: flex; flex-direction: column; }
.rq-dialog::backdrop { background: rgba(15, 42, 28, 0.55); }
.rq-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px 8px; }
.rq-head h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); }
.rq-close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--stone); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.rq-close:hover { background: #e2ddd0; }
.rq-body { overflow-y: auto; padding: 0 28px 28px; }
.rq-intro { color: var(--muted); font-size: 0.9375rem; margin: 6px 0 20px; }
.rq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rq-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.rq-field[hidden] { display: none; }
.rq-wide { grid-column: 1 / -1; }
.rq-field label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rq-field input, .rq-field select, .rq-field textarea { width: 100%; min-height: 46px; padding: 0 14px; font: 500 0.9375rem var(--sans); color: var(--ink); background: #fff; border: 1px solid rgba(22, 35, 27, 0.22); border-radius: 8px; }
.rq-field textarea { padding: 12px 14px; resize: vertical; min-height: 84px; }
.rq-field select:disabled { background: var(--paper); color: var(--muted); }
.rq-field input:focus, .rq-field select:focus, .rq-field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 165, 83, 0.25); }
.rq-field small { font-size: 0.78rem; color: var(--muted); }
.rq-linkedin { padding: 14px 16px; background: rgba(200, 165, 83, 0.1); border-left: 3px solid var(--gold); border-radius: 6px; }
.rq-bad input, .rq-bad select { border-color: #9b2c1f; }
.rq-err { font-size: 0.78rem; font-weight: 600; color: #9b2c1f; }
.rq-err:empty { display: none; }
.rq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rq-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 0.875rem; color: var(--muted); }
.rq-consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--green); }
.rq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; }
.rq-submit:disabled { opacity: 0.6; cursor: wait; }
.rq-status { font-size: 0.875rem; color: var(--muted); }
.rq-status a { color: var(--green); font-weight: 600; }
.rq-done { display: grid; gap: 10px; padding-top: 8px; }
.rq-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--on-dark); font-size: 1.5rem; }
.rq-done h3 { font-size: 2rem; }
.rq-done p { color: var(--muted); max-width: 60ch; }
.rq-ref { font-weight: 600; color: var(--gold-deep) !important; }
.rq-demo { padding: 10px 14px; background: rgba(200, 165, 83, 0.14); border-radius: 6px; color: var(--ink) !important; font-size: 0.875rem; }
.rq-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 8px 0 0; border-top: 1px solid var(--rule); }
.rq-sum div { padding: 10px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.rq-sum dt { font-size: 0.75rem; color: var(--muted); }
.rq-sum dd { margin: 2px 0 0; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.rq-inline { background: #fff; border-radius: 12px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 12px 40px rgba(15, 42, 28, 0.08); }
.rq-inline .rq-intro { margin-top: 0; }
@media (max-width: 760px) {
  .rq-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .rq-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .rq-head { padding: 18px 18px 6px; }
  .rq-body { padding: 0 18px 24px; }
  .rq-grid, .rq-sum { grid-template-columns: 1fr; }
}
/* Site-visit form: no empty cell after the removed field. Phone takes the free cell in each layout (3 cols: span 2; 2 cols: full row; 1 col: auto). */
.sv-grid [data-f="phone"] { grid-column: span 2; }
@media (max-width: 760px) {
  .sv-grid [data-f="phone"] { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .sv-grid [data-f="phone"] { grid-column: auto; }
}

/* Selling a home: terms of engagement and the property form (requirements.js, sell()) */
.sl-terms { margin: 0; padding: 0 0 0 22px; display: grid; gap: 12px; font-size: 0.9rem; color: var(--ink); max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding-block: 16px; }
.sl-terms li::marker { color: var(--gold-deep); font-weight: 700; }
.sl-terms b { font-weight: 700; }
.sl-ver { margin-top: 8px; font-size: 0.75rem; color: var(--muted); }
.sl-docs { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 4px; }
.sl-docs label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.sl-docs input { width: 17px; height: 17px; min-height: 0; accent-color: var(--green); }
.sl-next:disabled { opacity: 0.5; cursor: not-allowed; }
