/* ============================================================
   Logan Custom Homes — Base Reset & Global Styles
   ============================================================ */

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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent horizontal-scroll from decorative offsets on small screens.
   Use `clip`, NOT `hidden`: overflow-x:hidden on body breaks position:fixed
   on iOS Safari (the sticky header rides with the scroll). */
body {
  overflow-x: clip;
}

/* Respect reduced-motion preferences (also reveals content if animations are suppressed) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--bone);
  background-color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--bone);
  letter-spacing: var(--tracking-wide);
}

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

p {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--bone);
  opacity: 0.85;
}

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

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

/* --- Utilities --- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.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;
}

/* --- Focus styles (accessibility) --- */

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 4px;
}

/* --- Selection --- */

::selection {
  background-color: var(--bronze);
  color: var(--charcoal);
}

/* --- Scrollbar (Webkit) --- */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--charcoal);
}
::-webkit-scrollbar-thumb {
  background: var(--bronze-warm);
  border-radius: 3px;
}
