/* ==========================================================================
   NOVA ESTATE — Base Styles, RTL Foundations & Typography (assets/css/base.css)
   ========================================================================== */

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body-ar);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-scroll-locked {
  overflow: hidden;
}

main {
  flex: 1 0 auto;
}

/* Media Elements */
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  font-style: italic;
  color: var(--text-muted);
}

/* Form Elements Inheritance */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

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

ul,
ol {
  list-style: none;
}

/* Accessible Focus States */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Skip to Content Link for Keyboard Users */
.skip-link {
  position: absolute;
  top: -100px;
  right: var(--space-4);
  z-index: 999;
  background-color: var(--brand-navy);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-3);
}

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

[hidden] {
  display: none !important;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
.font-display {
  color: var(--text-primary);
  font-weight: var(--weight-bold);
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
}

h4 {
  font-size: var(--text-h4);
  line-height: var(--lh-h3);
}

/* Editorial Luxury Brand & Latin Display Text */
.brand-latin,
.editorial-en {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

/* Tabular Numbers for Prices, Areas, Counts & Percentages */
.num-tabular,
.price-value,
.spec-value {
  font-family: var(--font-numeric);
  font-variant-numeric: var(--numeric-spacing);
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Layout Containers & Section Primitives */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-16);
}

.section--subtle {
  background-color: var(--bg-subtle);
  border-block: 1px solid var(--border-hairline);
}

.section--navy {
  background-color: var(--brand-navy);
  color: var(--text-inverse);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.section-header__copy {
  max-width: 680px;
}

/* Gold Overline Label — Uses #856A2B on light backgrounds for WCAG AA >= 4.5:1 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--accent-gold-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--accent-gold);
}

.section--navy .eyebrow {
  color: var(--accent-gold);
}

.section-title {
  margin-bottom: var(--space-2);
}

.section--navy .section-title {
  color: var(--text-inverse);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: var(--text-body);
}

.section--navy .section-subtitle {
  color: var(--text-inverse-muted);
}

/* Standardized SVG Icon System (Lucide 1.5px stroke) */
.icon {
  display: inline-block;
  width: var(--icon-md);
  height: var(--icon-md);
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon--sm {
  width: var(--icon-sm);
  height: var(--icon-sm);
}

.icon--md {
  width: var(--icon-md);
  height: var(--icon-md);
}

.icon--lg {
  width: var(--icon-lg);
  height: var(--icon-lg);
}

/* Respect Reduced Motion Preferences */
@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;
  }
}
