/* ═══════════════════════════════════════════════════
   GIY Architecture Inc. — Global Design System
   ═══════════════════════════════════════════════════ */

/* ─── CUSTOM PROPERTIES ─── */
:root {
  /* Container widths */
  --container: 960px;       /* prose / text-heavy sections */
  --container-wide: 1200px; /* grids, cards, most sections */
  --container-hero: 1440px; /* hero section */

  /* Light mode (default) */
  --bg: #EEEEEE;
  --bg-alt: #E2E0DC;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --accent: #8B7355;
  --accent-warm: #C4A882;
  --link: #996633;
  --border: #D0CCC6;
  --card-bg: #F5F3F0;

  /* Transitions */
  --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-alt: #1A1A18;
  --text: #E8E4DF;
  --text-muted: #8A8580;
  --accent: #C4A882;
  --accent-warm: #8B7355;
  --link: #D4A85C;
  --border: #2A2824;
  --card-bg: #1A1917;
}

/* ─── RESET ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p a, li a, dd a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

p a:hover, li a:hover, dd a:hover {
  color: var(--accent);
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
}

h1 {
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(32px, 3.5vw, 52px);
  line-height: 1.15;
}

h3 {
  font-size: 28px;
  font-weight: 400;
}

h1 em, h2 em {
  font-style: italic;
  color: var(--accent);
}

/* Section labels — small uppercase accent text */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* Section headings — Cormorant Garamond */
.section-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 48px;
}

/* Body text helpers */
.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

/* ─── LAYOUT UTILITIES ─── */

/*
 * --px: dynamic horizontal padding that constrains content to --container-wide.
 * At narrow viewports it falls back to 60px; at wide viewports it grows so the
 * content area never exceeds --container-wide. Override --px on specific
 * elements to use the narrower --container (e.g. legal pages).
 */
section,
nav,
footer {
  --px: max(60px, calc((100% - var(--container-wide)) / 2));
}

section {
  padding: 120px var(--px);
}

.container {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ─── CTA LINK (arrow style) ─── */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
  transition: gap 0.3s, color 0.3s;
}

.cta-link:hover {
  gap: 20px;
  color: var(--accent);
}

.cta-arrow {
  font-size: 18px;
  transition: transform 0.3s;
}

.cta-link:hover .cta-arrow {
  transform: translateX(4px);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 36px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.btn-solid {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-solid:hover {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
}

/* ─── SCROLL ANIMATIONS ─── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
