/* ===================================================
   base.css — Shared foundations (tokens, reset, utilities, animations, buttons)
   Loaded on ALL pages. This MUST be loaded before any other CSS.
   =================================================== */

/* 1. Google Fonts */
/* @import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,700;1,400&family=Quicksand:wght@300;400;500;600;700&display=swap'); */

@font-face {
  font-family: 'Quicksand';
  src: url('../assets/fonts/Quicksand-VariableFont_wght.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  src: url('../assets/fonts/EBGaramond-VariableFont_wght.woff2') format('woff2');
  font-display: swap;
}

/* 2. Design Tokens */
:root {
  /* Colors */
  --color-text: #0F1926;
  --color-bg: #F7FBFF;
  --color-accent: #F24C3D;
  --color-accent-dark: #c93b2e;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-light: #e0e6ed;
  --color-gray: #7a8b97;
  --color-gray-dark: #3d4f5c;
  --color-surface: rgba(247, 251, 255, 0.85);

  /* Typography */
  --font-body: 'Quicksand', sans-serif;
  --font-title: 'EB Garamond', serif;

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

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-xl: 40px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 25, 38, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 25, 38, 0.10);
  --shadow-lg: 0 20px 60px rgba(15, 25, 38, 0.16);
  --shadow-accent: 0 5px 10px rgba(242, 76, 61, 0.35);

  /* Transitions */
  --transition-fast: all 0.2s ease;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.65s cubic-bezier(0.4, 0, 0.2, 1);

  /* Nav */
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* 4. Layout Utilities */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

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

/* 5. Scroll Reveal Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lineExpand {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}


/* ===================================================
   BUTTONS (shared across public and admin)
   =================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius-xl);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(242, 76, 61, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-gray-light);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}


/* ===================================================
   UTILITIES
   =================================================== */

.text-accent {
  color: var(--color-accent);
}

.text-gray {
  color: var(--color-gray);
}

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

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mb-md {
  margin-bottom: var(--space-md);
}

/* ===================================================
   SPINNER (shared by contact form + admin)
   =================================================== */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* ===================================================
   ALERTS (used by both contact form and admin)
   =================================================== */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  max-width: 960px;
  margin: auto;
}

.alert-danger {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
