/* ═══════════════════════════════════════════════════════════════
   AimHome Realty — Brand CSS
   SNRS Innovations Inc.
   Single source of truth for all design tokens.
   Import this file FIRST on every page.
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {

  /* Core Brand Colours */
  --color-navy:        #1F4E79;
  --color-navy-dark:   #122f4b;
  --color-navy-deep:   #0d2135;
  --color-gold:        #C9A84C;
  --color-gold-light:  #e0c97a;
  --color-gold-dark:   #a8882f;
  --color-offwhite:    #F7F5F0;
  --color-white:       #FFFFFF;
  --color-text:        #1a1a2e;
  --color-muted:       #6b7280;
  --color-muted-light: #9ca3af;
  --color-error:       #dc2626;
  --color-success:     #16a34a;

  /* Semantic Colour Aliases */
  --bg-primary:   var(--color-navy);
  --bg-dark:      var(--color-navy-dark);
  --bg-deeper:    var(--color-navy-deep);
  --bg-light:     var(--color-offwhite);
  --bg-white:     var(--color-white);
  --text-primary: var(--color-text);
  --text-light:   var(--color-white);
  --text-muted:   var(--color-muted);
  --accent:       var(--color-gold);
  --accent-hover: var(--color-gold-dark);

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Fluid Type Scale (clamp: min, preferred, max) */
  --text-xs:   clamp(0.70rem, 1.2vw, 0.75rem);
  --text-sm:   clamp(0.80rem, 1.4vw, 0.875rem);
  --text-base: clamp(0.95rem, 1.6vw, 1rem);
  --text-lg:   clamp(1.05rem, 1.8vw, 1.125rem);
  --text-xl:   clamp(1.15rem, 2vw, 1.25rem);
  --text-2xl:  clamp(1.35rem, 2.5vw, 1.5rem);
  --text-3xl:  clamp(1.75rem, 3vw, 1.875rem);
  --text-4xl:  clamp(2rem,    4vw, 2.5rem);
  --text-5xl:  clamp(2.5rem,  5vw, 3.25rem);
  --text-6xl:  clamp(3rem,    6vw, 4.5rem);
  --text-hero: clamp(2.8rem,  7vw, 5.75rem);

  /* Spacing (8-point grid) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max:    1200px;
  --container-narrow: 760px;
  --container-wide:   1400px;
  --gutter:           clamp(1.25rem, 5vw, 2rem);

  /* Border Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Borders */
  --border-gold:       1px solid var(--color-gold);
  --border-gold-thick: 2px solid var(--color-gold);
  --border-gold-3:     3px solid var(--color-gold);
  --border-white-20:   1px solid rgba(255,255,255,0.2);
  --border-navy-20:    1px solid rgba(31,78,121,0.2);

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
  --shadow-lg:   0 10px 32px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.10);
  --shadow-xl:   0 20px 60px rgba(0,0,0,0.20), 0 8px 20px rgba(0,0,0,0.12);
  --shadow-gold: 0 6px 28px rgba(201,168,76,0.30);
  --shadow-navy: 0 8px 32px rgba(18,47,75,0.40);

  /* Motion */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:   cubic-bezier(0.64, 0, 0.78, 0);
  --ease-both: cubic-bezier(0.65, 0, 0.35, 1);

  --duration-fast:  120ms;
  --duration-base:  240ms;
  --duration-slow:  400ms;
  --duration-xslow: 700ms;

  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-base: var(--duration-base) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);

  /* Z-Index Scale */
  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-modal:   1000;
  --z-toast:   2000;
}


/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  tab-size: 2;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, [role="button"] {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p {
  max-width: 68ch;
}

strong { font-weight: 600; }
em     { font-style: italic; }


/* ─── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }


/* ─── Section Utilities ──────────────────────────────────────── */
.section       { padding-block: var(--space-24); }
.section--sm   { padding-block: var(--space-16); }
.section--xs   { padding-block: var(--space-10); }
.section--navy { background: var(--color-navy);      color: var(--color-white); }
.section--dark { background: var(--color-navy-dark); color: var(--color-white); }
.section--deep { background: var(--color-navy-deep); color: var(--color-white); }
.section--light{ background: var(--color-offwhite);  color: var(--color-text); }
.section--white{ background: var(--color-white);     color: var(--color-text); }


/* ─── Typography Utilities ───────────────────────────────────── */
.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }

.text-navy    { color: var(--color-navy); }
.text-gold    { color: var(--color-gold); }
.text-white   { color: var(--color-white); }
.text-muted   { color: var(--color-muted); }
.text-center  { text-align: center; }
.text-left    { text-align: left; }

.uppercase    { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.10em; }


/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.9rem 2.25rem;
  border-radius: var(--radius-xs);
  border: 2px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.btn--gold {
  background: var(--color-gold);
  color: var(--color-navy-dark);
  border-color: var(--color-gold);
}
.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn--outline-gold {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}
.btn--outline-gold:hover,
.btn--outline-gold:focus-visible {
  background: var(--color-gold);
  color: var(--color-navy-dark);
  transform: translateY(-2px);
}

.btn--ghost-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.4);
}
.btn--ghost-white:hover,
.btn--ghost-white:focus-visible {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.08);
}

.btn--sm  { padding: 0.6rem 1.5rem; font-size: var(--text-xs); }
.btn--lg  { padding: 1.1rem 2.75rem; font-size: var(--text-base); }
.btn--xl  { padding: 1.3rem 3.25rem; font-size: var(--text-lg); }
.btn--full { width: 100%; }


/* ─── Gold Rule Divider ──────────────────────────────────────── */
.gold-rule {
  display: block;
  width: 52px;
  height: 2px;
  background: var(--color-gold);
  margin-block: var(--space-5);
  border: none;
  flex-shrink: 0;
}
.gold-rule--center { margin-inline: auto; }
.gold-rule--sm     { width: 36px; margin-block: var(--space-4); }


/* ─── Section Header Pattern ─────────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.section-label--light { color: var(--color-gold-light); }

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  max-width: 20ch;
}
.section-title--light { color: var(--color-white); }
.section-title--center { margin-inline: auto; }

.section-sub {
  font-size: var(--text-lg);
  color: var(--color-muted);
  margin-block-start: var(--space-4);
  max-width: 56ch;
}
.section-sub--light { color: rgba(255,255,255,0.72); }
.section-sub--center { margin-inline: auto; }

.section-header {
  margin-block-end: var(--space-16);
}
.section-header.text-center .section-title { margin-inline: auto; }
.section-header.text-center .section-sub   { margin-inline: auto; }


/* ─── Accessibility ──────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
