/* ==========================================================================
   NVL HOMES — DESIGN SYSTEM
   Single source of truth for colour, type, spacing and core components.
   Every page inherits from these tokens. Built fluid (fills any screen).

   FONTS — pick ONE loading method:
   (A) Quick start: add this to your <head> (or enqueue in WordPress):
       <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
       <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
   (B) Production (recommended, faster): self-host the woff2 files in a /fonts/
       folder and uncomment the @font-face block at the bottom of this file.
   ========================================================================== */

:root {
  /* ---- Brand palette (from the green footer) ---- */
  --nvl-green:        #14472A;   /* primary */
  --nvl-green-dark:   #0E3320;   /* hover / deep */
  --nvl-green-mid:    #1E5E38;   /* secondary green */
  --nvl-leaf:         #3DA35D;   /* accent green / icons */
  --nvl-mist:         #EAF2EC;   /* page background */
  --nvl-navy:         #16243E;   /* secondary brand */
  --nvl-gold:         #C8912A;   /* CTA accent */
  --nvl-amber:        #F2761B;   /* alt CTA accent */
  --nvl-ink:          #1C2620;   /* headings */
  --nvl-slate:        #44504A;   /* body text */
  --nvl-muted:        #717C76;   /* meta / captions */
  --nvl-line:         #DCE5DE;   /* borders / dividers */
  --nvl-white:        #FFFFFF;

  /* ---- Semantic roles (use THESE in components, not raw brand names) ---- */
  --color-bg:            var(--nvl-mist);
  --color-surface:       var(--nvl-white);
  --color-heading:       var(--nvl-ink);
  --color-body:          var(--nvl-slate);
  --color-muted:         var(--nvl-muted);
  --color-line:          var(--nvl-line);
  --color-primary:       var(--nvl-green);
  --color-primary-hover: var(--nvl-green-dark);
  --color-accent:        var(--nvl-gold);
  --color-accent-ink:    var(--nvl-ink);
  --color-link:          var(--nvl-green-mid);
  --color-footer:        var(--nvl-green);

  /* ---- Typography ---- */
  --font-display: "Space Grotesk", system-ui, sans-serif;  /* headings */
  --font-body:    "Inter", system-ui, sans-serif;          /* paragraphs */
  --font-mono:    "Space Mono", ui-monospace, monospace;   /* eyebrows / labels */

  /* Fluid type scale — min @320px, max @~1440px */
  --fs-eyebrow: clamp(0.72rem, 0.69rem + 0.15vw, 0.80rem);
  --fs-small:   clamp(0.82rem, 0.79rem + 0.15vw, 0.90rem);
  --fs-body:    clamp(1.00rem, 0.97rem + 0.18vw, 1.0625rem);
  --fs-lead:    clamp(1.10rem, 1.02rem + 0.35vw, 1.30rem);
  --fs-h4:      clamp(1.15rem, 1.05rem + 0.50vw, 1.45rem);
  --fs-h3:      clamp(1.40rem, 1.18rem + 1.05vw, 2.00rem);
  --fs-h2:      clamp(1.90rem, 1.48rem + 2.05vw, 2.90rem);
  --fs-h1:      clamp(2.40rem, 1.70rem + 3.40vw, 4.00rem);
  --fs-display: clamp(2.80rem, 1.75rem + 5.10vw, 5.00rem);

  --lh-tight: 1.08;
  --lh-snug:  1.25;
  --lh-body:  1.65;

  /* ---- Spacing scale ---- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-section: clamp(3.5rem, 7vw, 8rem);  /* vertical band padding */

  /* ---- Layout ---- */
  --container:      1280px;   /* readable content cap */
  --container-wide: 1440px;   /* wide sections */
  --gutter: clamp(1.1rem, 4vw, 3rem);

  /* ---- Radius / shadow / motion ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20,71,42,.05), 0 6px 18px -10px rgba(20,71,42,.14);
  --shadow-md: 0 2px 6px rgba(20,71,42,.06), 0 18px 40px -18px rgba(20,71,42,.20);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur: 0.3s;
}

/* ==========================================================================
   RESET — minimal, modern, lightweight
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: var(--color-link); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--color-primary-hover); }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); font-weight: 500; }

.nvl-display { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -0.025em; color: var(--color-heading); }
.nvl-lead    { font-size: var(--fs-lead); color: var(--color-body); max-width: 60ch; }
p            { max-width: 70ch; }
.nvl-muted   { color: var(--color-muted); }
.nvl-small   { font-size: var(--fs-small); }

/* Eyebrow / section kicker — the Space Mono detail */
.nvl-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.nvl-eyebrow::before {
  content: "";
  width: 1.8em; height: 2px;
  background: var(--nvl-leaf);
}

/* ==========================================================================
   LAYOUT — containers & section bands (full-bleed friendly)
   ========================================================================== */
.nvl-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nvl-container--wide { max-width: var(--container-wide); }
.nvl-container--narrow { max-width: 760px; }

.nvl-section { padding-block: var(--space-section); }
.nvl-section--mist  { background: var(--nvl-mist); }
.nvl-section--white { background: var(--nvl-white); }

/* Green feature band — flips text to light automatically */
.nvl-section--green {
  background: var(--nvl-green);
  --color-heading: var(--nvl-white);
  --color-body: rgba(255,255,255,.82);
  --color-muted: rgba(255,255,255,.62);
  --color-line: rgba(255,255,255,.16);
  color: var(--color-body);
}
.nvl-section--green .nvl-eyebrow { color: var(--nvl-leaf); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.nvl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-small);
  letter-spacing: 0.01em;
  line-height: 1;
  min-height: 48px;
  padding: 0 1.6rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.nvl-btn:active { transform: translateY(1px); }

.nvl-btn--primary { background: var(--color-primary); color: var(--nvl-white); }
.nvl-btn--primary:hover { background: var(--color-primary-hover); color: var(--nvl-white); }

/* Gold CTA — reserve for the top conversion action */
.nvl-btn--accent { background: var(--color-accent); color: var(--color-accent-ink); }
.nvl-btn--accent:hover { background: #b27f22; color: var(--color-accent-ink); }

.nvl-btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.nvl-btn--ghost:hover { background: var(--color-primary); color: var(--nvl-white); }

/* On green bands, ghost buttons go light */
.nvl-section--green .nvl-btn--ghost { color: var(--nvl-white); border-color: rgba(255,255,255,.5); }
.nvl-section--green .nvl-btn--ghost:hover { background: var(--nvl-white); color: var(--nvl-green); }

/* ==========================================================================
   CARDS & COMPONENTS
   ========================================================================== */
.nvl-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}

/* Listing tag e.g. FOR SALE / FOR RENT */
.nvl-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4em 0.8em;
  border-radius: var(--radius-sm);
  background: var(--nvl-mist);
  color: var(--nvl-green);
}
.nvl-tag--rent { background: rgba(22,36,62,.08); color: var(--nvl-navy); }
.nvl-tag--gold { background: rgba(200,145,42,.14); color: #8d6418; }

/* Price */
.nvl-price { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h4); color: var(--color-heading); }

/* Responsive auto-grid — fills any screen without media queries */
.nvl-grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.nvl-grid--cards { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.nvl-grid--2     { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }

/* ==========================================================================
   ACCESSIBILITY & MOTION
   ========================================================================== */
:focus-visible { outline: 3px solid var(--nvl-leaf); outline-offset: 2px; border-radius: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   (B) SELF-HOSTED FONTS — uncomment for production after uploading woff2s
   ==========================================================================
@font-face { font-family:"Space Grotesk"; src:url("fonts/space-grotesk-500.woff2") format("woff2"); font-weight:500; font-display:swap; }
@font-face { font-family:"Space Grotesk"; src:url("fonts/space-grotesk-700.woff2") format("woff2"); font-weight:700; font-display:swap; }
@font-face { font-family:"Inter"; src:url("fonts/inter-400.woff2") format("woff2"); font-weight:400; font-display:swap; }
@font-face { font-family:"Inter"; src:url("fonts/inter-500.woff2") format("woff2"); font-weight:500; font-display:swap; }
@font-face { font-family:"Space Mono"; src:url("fonts/space-mono-400.woff2") format("woff2"); font-weight:400; font-display:swap; }
@font-face { font-family:"Space Mono"; src:url("fonts/space-mono-700.woff2") format("woff2"); font-weight:700; font-display:swap; }
*/
