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

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-accent: #2a2a2a;
  --color-accent-light: #f0f0f0;
  --color-border: #e5e5e5;
  --color-highlight: #3d5afe;
  --font-body: 'DM Sans', sans-serif;
  --font-heading: 'DM Sans', sans-serif;
  --max-width: 1200px;
  --section-padding: 120px 0;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-padding);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--color-text-secondary);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Footer ===== */
.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
}

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

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--color-text);
  transform: translateY(-1px);
}

.btn-text {
  padding: 0;
  font-weight: 500;
  color: var(--color-text);
}

.btn-text::after {
  content: '\2192';
  transition: transform var(--transition);
}

.btn-text:hover::after {
  transform: translateX(4px);
}

/* ===== Scroll Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ===== Page Transition ===== */
.page-content {
  animation: pageEnter 0.5s ease both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: var(--color-bg);
    transition: right var(--transition);
    gap: 32px;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.75rem; }
}

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

  section {
    padding: 60px 0;
  }
}
