/*
 * Weloved Design System
 * A magazine, not a website. Confident whitespace. No icons.
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors - New Palette */
  --color-bg: #edede9;              /* Parchment - main background */
  --color-surface: #F3F2F1;         /* Linen - cards, elevated surfaces */
  --color-border: #d6ccc2;          /* Dust Grey - borders, dividers */
  --color-text: #2f3439;            /* Jet Black - primary text */
  --color-accent: #8c7353;          /* Faded Copper - interactive elements */
  --color-accent-hover: #6d5a40;    /* Darker copper for hover */

  /* Semantic Colors */
  --color-muted: #5a5d61;           /* Muted text */
  --color-error: #9b2c2c;           /* Muted red for errors */
  --color-success: #276749;         /* Muted green for success */

  /* Faded State */
  --color-faded-overlay: rgba(237, 237, 233, 0.6);
  --color-faded-text: #8a8d91;

  /* Typography - Fonts */
  --font-editorial: 'Bitter', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography - Scale (Mobile First) */
  --text-display: 2.5rem;           /* 40px - Hero text */
  --text-h1: 2rem;                  /* 32px - Page titles */
  --text-h2: 1.5rem;                /* 24px - Section headers */
  --text-h3: 1.25rem;               /* 20px - Subsections */
  --text-body-lg: 1.125rem;         /* 18px - Memorial content */
  --text-body: 1rem;                /* 16px - Standard text */
  --text-body-sm: 0.875rem;         /* 14px - Secondary text */
  --text-ui: 0.875rem;              /* 14px - Buttons, labels */
  --text-ui-sm: 0.75rem;            /* 12px - Captions, meta */

  /* Typography - Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Spacing Scale */
  --space-1: 0.25rem;               /* 4px */
  --space-2: 0.5rem;                /* 8px */
  --space-3: 0.75rem;               /* 12px */
  --space-4: 1rem;                  /* 16px */
  --space-6: 1.5rem;                /* 24px */
  --space-8: 2rem;                  /* 32px */
  --space-12: 3rem;                 /* 48px */
  --space-16: 4rem;                 /* 64px */
  --space-24: 6rem;                 /* 96px */

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Shadows - subtle, magazine-like */
  --shadow-sm: 0 1px 2px rgba(47, 52, 57, 0.05);
  --shadow-md: 0 2px 4px rgba(47, 52, 57, 0.08);
}

/* Desktop scale adjustments */
@media (min-width: 768px) {
  :root {
    --text-display: 3.5rem;         /* 56px */
    --text-h1: 2.5rem;              /* 40px */
    --text-h2: 1.875rem;            /* 30px */
    --text-h3: 1.5rem;              /* 24px */
    --text-body-lg: 1.25rem;        /* 20px */
  }
}

/* ==========================================================================
   Base Reset & Element Styles
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-editorial);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-editorial);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

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

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

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

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

/* Lists */
ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
}

/* Blockquotes - editorial style */
blockquote {
  font-family: var(--font-editorial);
  font-size: var(--text-body-lg);
  font-style: italic;
  margin: var(--space-8) 0;
  padding-left: var(--space-6);
  border-left: 2px solid var(--color-accent);
  color: var(--color-text);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: white;
}

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

/* ==========================================================================
   Bulma Overrides
   ========================================================================== */

/* Override Bulma's default blue theme */
.navbar.is-info {
  background-color: var(--color-bg);
}

.navbar-item,
.navbar-link {
  font-family: var(--font-ui);
  color: var(--color-text);
}

.navbar-item:hover,
.navbar-link:hover {
  background-color: transparent;
  color: var(--color-accent);
}

/* Override Bulma section padding */
.section {
  padding: var(--space-8) var(--space-4);
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-12) var(--space-8);
  }
}

/* Override Bulma container */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 1024px) {
  .container {
    max-width: 960px;
  }
}

/* Override Bulma buttons */
.button {
  font-family: var(--font-ui);
  border-radius: var(--radius-md);
}

/* Override Bulma inputs */
.input,
.textarea,
.select select {
  font-family: var(--font-editorial);
  border-radius: var(--radius-sm);
}

/* Override Bulma cards */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: none;
  border: 1px solid var(--color-border);
}

/* Override Bulma titles */
.title {
  font-family: var(--font-editorial);
  color: var(--color-text);
}

.subtitle {
  font-family: var(--font-editorial);
  color: var(--color-muted);
}
