/* Base styles — reset, CSS custom properties, typography */

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

:root {
  /* Brand colours */
  --color-primary:       #c0392b;
  --color-primary-dark:  #962d22;
  --color-primary-light: #e74c3c;
  --color-gold:          #d4a017;
  --color-gold-light:    #f0c040;

  /* Neutrals */
  --color-bg:            #faf9f7;
  --color-bg-alt:        #f2ede7;
  --color-surface:       #ffffff;
  --color-border:        #e8e0d8;
  --color-text:          #2c2c2c;
  --color-text-muted:    #6b6b6b;
  --color-text-light:    #9e9e9e;

  /* Semantic */
  --color-success:       #27ae60;
  --color-error:         #e74c3c;
  --color-warning:       #f39c12;

  /* Typography */
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body:    'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
  --shadow-xl:  0 20px 50px rgba(0,0,0,.15);

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

  /* Layout */
  --container-max: 1200px;
  --navbar-h:      68px;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* Utility classes */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.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; }
.text-muted   { color: var(--color-text-muted); }

.hidden { display: none !important; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #ede8e3 25%, #f5f1ed 50%, #ede8e3 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: var(--space-8) auto;
}

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

/* Toast notification */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-error); }

/* Section spacing */
.section {
  padding-block: var(--space-16);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-header h2 {
  margin-bottom: var(--space-3);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 0;
}

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: var(--space-3) auto 0;
  border-radius: var(--radius-full);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary  { background: var(--color-primary); color: #fff; }
.badge-gold     { background: var(--color-gold); color: #fff; }
.badge-success  { background: var(--color-success); color: #fff; }

@media (max-width: 640px) {
  .container { padding-inline: var(--space-4); }
  .section   { padding-block: var(--space-10); }
}
