/* ====================================
   CSS Variables & Global Styles
   ==================================== */

:root {
  --bg-page: #FBF9EF;
  --bg-card: #EEECE3;
  --bg-card-hover: #F2F0E7;
  --bg-inset: #F5F3E9;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #DDD9CF;
  --border-light: #E5E2D8;
  --black: #1A1A1A;
  --white: #FFFFFF;
  --tag-border: #C8C4BA;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* Topographic Background */
.topo-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
}

.topo-bg svg {
  width: 100%;
  height: 100%;
}

/* Section Styles */
.section-header {
  margin-bottom: 48px;
}

.section-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 12px;
}

/* Button Styles */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              background 0.3s ease;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: none;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.btn-primary:hover::before {
  width: 100%;
  height: 100%;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* Text effect on hover */
.btn-text {
  display: inline-block;
  transition: letter-spacing 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.btn-primary:hover .btn-text,
.btn-secondary:hover .btn-text {
  letter-spacing: 0.5px;
}

/* Shine sweep on hover */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: none;
  pointer-events: none;
}

.btn-primary:hover::after {
  animation: btnShine 0.6s ease forwards;
}

@keyframes btnShine {
  0% { left: -60%; }
  100% { left: 120%; }
}

/* Arrow slide on hover */
.btn-arrow {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.btn-primary:hover .btn-arrow,
.btn-secondary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Lift + shadow on hover */
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.2);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Active press */
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover .btn-text,
  .btn-secondary:hover .btn-text {
    letter-spacing: 0;
  }
  .btn-primary::after {
    display: none;
  }
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
  .btn-arrow {
    transition: none;
  }
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .container {
    padding: 0 24px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }
}
