/* ========================================
   Base Styles — Design System Foundation
   ======================================== */

/* --- Inter Font (Local) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/Inter-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/Inter-Bold.woff2') format('woff2');
}

/* --- Custom Properties --- */
:root {
  /* Colors — warm palette (from App DesignTokens) */
  --bg-cream: #FAF5ED;
  --card-bg: #FFFCF7;
  --card-bg-hover: #FFF9F2;
  --text-primary: #40332E;
  --text-secondary: #8C8073;
  --accent-light: #EDCCB3;
  --accent-blue: #5A8FB8;
  --accent-blue-hover: #4A7FA8;
  --accent-blue-light: rgba(90, 143, 184, 0.1);

  /* Shadows */
  --card-shadow: 0 3px 10px rgba(115, 89, 64, 0.10);
  --card-shadow-hover: 0 6px 20px rgba(115, 89, 64, 0.15);

  /* Border */
  --border-color: rgba(64, 51, 46, 0.08);

  /* Radius (from App DesignTokens) */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Layout */
  --header-height: 72px;
  --header-height-scrolled: 56px;
  --section-padding: 120px;
  --container-max: 1200px;
  --container-padding: 24px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --spring: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-cream: #211F1C;
    --card-bg: #2B2926;
    --card-bg-hover: #322F2C;
    --text-primary: #EBE6E0;
    --text-secondary: #A69E94;
    --accent-light: #664D3D;
    --accent-blue: #7BAED4;
    --accent-blue-hover: #8BBDE0;
    --accent-blue-light: rgba(123, 174, 212, 0.15);
    --card-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    --card-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.35);
    --border-color: rgba(235, 230, 224, 0.08);
  }
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 0;
}

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

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

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 600;
}

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

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

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

/* --- Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- Scroll Animation Utilities --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* --- Selection --- */
::selection {
  background-color: var(--accent-light);
  color: var(--text-primary);
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  html { scroll-behavior: auto; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb { background: var(--accent-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
