/* =============================================
   Matcha Collective — Global Styles
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600;700&family=Work+Sans:wght@300;400;500;600&display=swap');

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

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

body {
  font-family: var(--font-body);
  font-weight: var(--font-body-weight);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* === CSS Custom Properties (Design Tokens) === */
:root {
  /* Colors */
  --color-primary: #6a994e;
  --color-primary-dark: #4c7038;
  --color-primary-light: #90be6d;
  --color-bg: #faf8f4;
  --color-bg-secondary: #f0ece4;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-cream: #f5f0e6;
  --color-accent: #e8985e;
  --color-accent-pink: #d4849a;
  --color-accent-lavender: #b8a9d4;
  --color-error: #c44536;
  --color-success: #6a994e;
  --color-border: #e0ddd6;
  --color-overlay: rgba(44, 44, 44, 0.5);

  /* Typography */
  --font-heading: 'Josefin Sans', -apple-system, sans-serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
  --font-heading-weight: 400;
  --font-body-weight: 400;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --header-height: 64px;
  --announcement-height: 40px;
}

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

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

p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* === Utility Classes === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.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;
}

.text-center { text-align: center; }

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

.section--bg {
  background: var(--color-bg-secondary);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn--secondary:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn--accent {
  background: var(--color-accent-pink);
  color: #fff;
  border-color: var(--color-accent-pink);
}

.btn--accent:hover {
  background: #c47389;
  border-color: #c47389;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

/* === Announcement Bar === */
.announcement-bar {
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem var(--space-md);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
}

.announcement-bar a {
  color: #fff;
  text-decoration: underline;
}

/* === Form Elements === */
.input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  background: #fff;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.input::placeholder {
  color: var(--color-text-light);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-animate] {
  opacity: 0;
}

[data-animate].is-visible {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* === Page wrapper — push footer down === */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper main {
  flex: 1;
}
