/* =============================================================
   ENVIOUS LANDSCAPING — globals.css
   Root variables, reset, typography, scrollbar, base styles
   ============================================================= */

/* ── Google Fonts ── */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap");

/* ── Design Tokens ── */
:root {
  /* Palette */
  --color-primary: #0f172a;
  --color-secondary: #1e293b;
  --color-accent: #c6a87d;
  --color-accent-light: #dfc4a2;
  --color-accent-dark: #a8895e;
  --color-bg: #020617;
  --color-bg-card: #0d1526;
  --color-bg-glass: rgba(15, 23, 42, 0.72);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;
  --color-border: rgba(198, 168, 125, 0.14);
  --color-border-strong: rgba(198, 168, 125, 0.32);
  --color-overlay: rgba(2, 6, 23, 0.72);
  --color-overlay-deep: rgba(2, 6, 23, 0.9);
  --color-success: #4ade80;
  --color-error: #f87171;

  /* Typography */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Montserrat", "Helvetica Neue", sans-serif;
  --font-editorial: "EB Garamond", Georgia, serif;

  /* Type scale — fluid */
  --text-xs: clamp(0.65rem, 1vw, 0.75rem);
  --text-sm: clamp(0.8rem, 1.2vw, 0.875rem);
  --text-base: clamp(0.9rem, 1.4vw, 1rem);
  --text-md: clamp(1rem, 1.6vw, 1.125rem);
  --text-lg: clamp(1.1rem, 2vw, 1.25rem);
  --text-xl: clamp(1.25rem, 2.4vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 3vw, 2rem);
  --text-3xl: clamp(2rem, 4vw, 2.75rem);
  --text-4xl: clamp(2.5rem, 5vw, 3.75rem);
  --text-5xl: clamp(3rem, 6vw, 5rem);
  --text-6xl: clamp(3.5rem, 7.5vw, 6.5rem);

  /* Line heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-loose: 1.8;

  /* Letter spacing */
  --tracking-tight: -0.03em;
  --tracking-normal: 0em;
  --tracking-wide: 0.08em;
  --tracking-widest: 0.18em;

  /* Spacing */
  --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;
  --space-40: 10rem;

  /* Containers */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* Radii */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 32px rgba(198, 168, 125, 0.18);
  --shadow-glow-strong: 0 0 48px rgba(198, 168, 125, 0.32);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-luxury: 500ms cubic-bezier(0.23, 1, 0.32, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-above: 10;
  --z-overlay: 100;
  --z-modal: 200;
  --z-nav: 300;
  --z-top: 400;

  /* Layout */
  --navbar-height: 80px;
  --mobile-cta-bar-height: 64px;
}

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

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-normal);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Reserve space for mobile CTA bar — footer.css adds this via media query */
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent-dark);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-dark) var(--color-bg);
}

/* ── Type Base ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-5xl);
}
h2 {
  font-size: var(--text-4xl);
}
h3 {
  font-size: var(--text-3xl);
}
h4 {
  font-size: var(--text-2xl);
}
h5 {
  font-size: var(--text-xl);
}
h6 {
  font-size: var(--text-lg);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-light);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input,
textarea,
select {
  font-family: var(--font-body);
}

/* ── 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-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.75s var(--transition-luxury),
    transform 0.75s var(--transition-luxury);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger — driven by HTML order via nth-child in main.js,
   or via data-reveal-delay attribute read by ScrollRevealController */
.reveal[data-reveal-delay="1"] {
  transition-delay: 0.1s;
}
.reveal[data-reveal-delay="2"] {
  transition-delay: 0.2s;
}
.reveal[data-reveal-delay="3"] {
  transition-delay: 0.3s;
}
.reveal[data-reveal-delay="4"] {
  transition-delay: 0.4s;
}

/* ── SVG Icon System ── */
.icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon--sm {
  width: 16px;
  height: 16px;
}
.icon--md {
  width: 20px;
  height: 20px;
}
.icon--lg {
  width: 24px;
  height: 24px;
}
.icon--xl {
  width: 32px;
  height: 32px;
}
.icon--2xl {
  width: 40px;
  height: 40px;
}
.icon--accent {
  color: var(--color-accent);
}
.icon--muted {
  color: var(--color-text-muted);
}

/* ── Shared Utility: Section Header ── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.section-header--left {
  text-align: left;
  margin-inline: 0;
}

.section-header__overline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.section-header__description {
  font-size: var(--text-md);
  font-weight: 300;
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-inline: auto;
}

.section-header--left .section-header__description {
  margin-inline: 0;
}

/* ── Shared Utility: Accent Divider ── */
.accent-divider {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-accent);
  margin: var(--space-6) auto;
}

.accent-divider--left {
  margin-left: 0;
}

/* ── Shared Utility: Overline Label ── */
.overline {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ── Shared Utility: Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--space-4) var(--space-8);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-luxury),
    color var(--transition-luxury),
    border-color var(--transition-luxury),
    box-shadow var(--transition-luxury),
    transform var(--transition-luxury);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: transparent;
  color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(241, 245, 249, 0.35);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-border-strong);
}

.btn--ghost:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: 0.62rem;
}
.btn--lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-sm);
}

.btn__arrow {
  display: inline-block;
  transition: transform var(--transition-luxury);
  font-style: normal;
  line-height: 1;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}
