/* ============================================================
   JS ARCHITECTS — Global Styles
   styles.css: tokens, resets, typography, utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@400;500;600&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --color-charcoal:   #1A1A1A;
  --color-offwhite:   #F5F2EE;
  --color-brass:      #B8943F;
  --color-brass-light:#D4AF6A;
  --color-grey:       #6B6B6B;
  --color-white:      #FFFFFF;
  --color-border:     rgba(26,26,26,0.12);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --text-hero:  clamp(2.8rem, 6vw, 5.5rem);
  --text-h2:    clamp(2rem, 4vw, 3.2rem);
  --text-h3:    clamp(1.25rem, 2vw, 1.75rem);
  --text-body:  1rem;
  --text-sm:    0.875rem;
  --text-xs:    0.75rem;

  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   8rem;

  --transition-fast: 200ms ease;
  --transition-base: 400ms ease;
  --transition-slow: 700ms ease;

  --max-width: 1320px;
  --nav-height: 150px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-charcoal);
  background-color: var(--color-offwhite);
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p { line-height: 1.8; }

/* ── Layout Utilities ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-lg) 0;
}

.section--light { background-color: var(--color-offwhite); }
.section--dark  { background-color: var(--color-charcoal); color: var(--color-white); }
.section--white { background-color: var(--color-white); }

/* ── Section Header ─────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: var(--space-sm);
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 300;
  color: var(--color-charcoal);
  margin-bottom: var(--space-sm);
}

.section--dark .section-header__title { color: var(--color-white); }

.section-header__subtitle {
  font-size: var(--text-sm);
  color: var(--color-grey);
  max-width: 520px;
  margin: 0 auto;
}

.section--dark .section-header__subtitle { color: rgba(255,255,255,0.6); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn--primary {
  background-color: var(--color-brass);
  color: var(--color-white);
  border: 1px solid var(--color-brass);
}
.btn--primary:hover {
  background-color: transparent;
  color: var(--color-brass);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.6);
}
.btn--outline:hover {
  border-color: var(--color-brass);
  color: var(--color-brass);
}

.btn--outline-dark {
  background-color: transparent;
  color: var(--color-charcoal);
  border: 1px solid var(--color-charcoal);
}
.btn--outline-dark:hover {
  background-color: var(--color-charcoal);
  color: var(--color-white);
}

/* ── Divider Line ────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 1px;
  background-color: var(--color-brass);
  margin: var(--space-sm) auto;
}

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

/* ── Fade-in Scroll Animation ───────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in--delay-1 { transition-delay: 100ms; }
.fade-in--delay-2 { transition-delay: 200ms; }
.fade-in--delay-3 { transition-delay: 300ms; }
.fade-in--delay-4 { transition-delay: 400ms; }

/* ── Page Hero Banner (about, contact, etc.) ─────────────── */
.page-hero {
  position: relative;
  height: 420px;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-lg);
  overflow: hidden;
  background-color: var(--color-charcoal);
}

.page-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.page-hero__content {
  position: relative;
  z-index: 2;
}

.page-hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: 0.75rem;
}

.page-hero__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--color-white);
  font-weight: 300;
}

/* ── Accessibility ───────────────────────────────────────── */
.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-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 3px;
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* ── Responsive Helpers ──────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 5rem;
  }
  .container { padding: 0 var(--space-sm); }
}
