/* =========================================================
   Variables
   ========================================================= */
:root {
  /* Color Palette */
  --color-background: #0b1724; /* deep navy background */
  --color-surface: #111c2a;    /* elevated surface navy */
  --color-surface-alt: #151f2e;
  --color-text: #f5f7fa;
  --color-text-muted: #a5b2c5;

  --color-primary: #1f4c8f;    /* refined navy blue */
  --color-primary-soft: #20375a;
  --color-primary-hover: #275da8;

  --color-success: #3fa794;
  --color-warning: #e2a53a;
  --color-danger:  #d66565;

  /* Neutral Grays (cool / slate) */
  --gray-50:  #f8fafc;
  --gray-100: #eef2f7;
  --gray-200: #e1e7f0;
  --gray-300: #c9d3e3;
  --gray-400: #a5b2c5;
  --gray-500: #7b8697;
  --gray-600: #556072;
  --gray-700: #394355;
  --gray-800: #222a37;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino", "Book Antiqua", "Georgia", "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;   /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem;  /* 20px */
  --font-size-2xl: 1.5rem;  /* 24px */
  --font-size-3xl: 1.875rem;/* 30px */
  --font-size-4xl: 2.25rem; /* 36px */
  --font-size-5xl: 3rem;    /* 48px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows (subtle, elegant) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 260ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
}

/* =========================================================
   Reset / Normalize
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

textarea {
  resize: vertical;
}

/* Remove default link underlines (we restyle later) */
a {
  text-decoration: none;
  color: inherit;
}

/* =========================================================
   Base Styles
   ========================================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
}

/* Headings: elegant, minimal, with subtle hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--line-height-tight);
  color: var(--gray-50);
}

h1 {
  font-size: clamp(2.25rem, 3vw, 3rem);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

/* Links: subtle, professional */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: var(--space-6) 0;
}

/* =========================================================
   Accessibility & Motion
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

/* =========================================================
   Utilities
   ========================================================= */

/* Layout Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* Flex Helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs {
  gap: var(--space-2);
}

.gap-sm {
  gap: var(--space-3);
}

.gap-md {
  gap: var(--space-4);
}

.gap-lg {
  gap: var(--space-6);
}

/* Grid Helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Screen Reader Only */
.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;
}

/* Spacing Utilities (common) */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--space-4); }
.mb-sm { margin-bottom: var(--space-4); }
.mt-md { margin-top: var(--space-6); }
.mb-md { margin-bottom: var(--space-6); }
.mt-lg { margin-top: var(--space-8); }
.mb-lg { margin-bottom: var(--space-8); }

.pt-section { padding-top: var(--space-16); }
.pb-section { padding-bottom: var(--space-16); }

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }

/* =========================================================
   Components
   ========================================================= */

/* Buttons: primary, ghost, subtle */
.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.button:hover,
.btn:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.button:disabled,
.btn:disabled,
.button[aria-disabled="true"],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.button--ghost,
.btn--ghost {
  background-color: transparent;
  color: var(--gray-50);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.button--ghost:hover,
.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.button--subtle,
.btn--subtle {
  background-color: var(--color-surface-alt);
  color: var(--gray-50);
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.button--subtle:hover,
.btn--subtle:hover {
  background-color: var(--color-surface);
}

/* Inputs & Textareas */
.input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(8, 14, 24, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary-hover);
  box-shadow: 0 0 0 1px rgba(39, 93, 168, 0.6);
}

.input[disabled],
textarea[disabled],
select[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: inline-block;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-1);
  color: var(--gray-100);
}

/* Cards: for property highlights, case studies, etc. */
.card {
  position: relative;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}

.card--muted {
  background-color: rgba(10, 18, 30, 0.9);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Simple tag / pill, useful for status, type (Residential, Commercial) */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pill--success {
  border-color: rgba(63, 167, 148, 0.5);
  color: var(--color-success);
}

.pill--warning {
  border-color: rgba(226, 165, 58, 0.5);
  color: var(--color-warning);
}

.pill--danger {
  border-color: rgba(214, 101, 101, 0.5);
  color: var(--color-danger);
}

/* Subtle section background utility for banded layout */
.section-alt {
  background: radial-gradient(circle at top left, rgba(39, 93, 168, 0.35), transparent 55%),
              radial-gradient(circle at bottom right, rgba(17, 24, 39, 0.85), transparent 55%);
}

/* End of base.css */
