/* ================================================================
   TOP CARMEL REAL ESTATE
   Base — Reset, Typography, Global Elements
   css/base.css
   ================================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-white);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

address {
  font-style: normal;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(var(--text-4xl), 5.5vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw,   var(--text-5xl)); }
h3 { font-size: clamp(var(--text-2xl), 3vw,   var(--text-4xl)); }
h4 { font-size: clamp(var(--text-xl),  2.5vw, var(--text-3xl)); }
h5 { font-size: var(--text-2xl); }
h6 { font-size: var(--text-xl); }

p {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text);
}

.lead {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  display: block;
}

blockquote {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--color-navy);
}

/* ── Focus Styles ───────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Selection ──────────────────────────────────────────────────── */
::selection {
  background-color: var(--color-gold-light);
  color: var(--color-navy);
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-sand-light);
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: var(--radius-full);
}

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

.text-gold    { color: var(--color-gold); }
.text-navy    { color: var(--color-navy); }
.text-muted   { color: var(--color-text-muted); font-family: var(--font-ui); }
.text-white   { color: var(--color-white); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-ui      { font-family: var(--font-ui); }

/* ── Animation: Fade-in-up ──────────────────────────────────────── */
.fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up:nth-child(1) { transition-delay: 0ms;   }
.fade-in-up:nth-child(2) { transition-delay: 80ms;  }
.fade-in-up:nth-child(3) { transition-delay: 160ms; }
.fade-in-up:nth-child(4) { transition-delay: 240ms; }
.fade-in-up:nth-child(5) { transition-delay: 320ms; }
.fade-in-up:nth-child(6) { transition-delay: 400ms; }

/* ── Divider ────────────────────────────────────────────────────── */
.divider {
  width: 56px;
  height: 2px;
  background: var(--color-gold);
  margin-block: var(--space-6);
}

.divider-center {
  margin-inline: auto;
}

/* ── Gold Accent Line ───────────────────────────────────────────── */
.accent-line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--color-gold);
  vertical-align: middle;
  margin-inline: var(--space-3);
}
