/* ============================================
   Visit Lalibela — Design System
   ============================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

/* --- Custom Properties --- */
:root {
  --bg: #FDF8F0;
  --bg-alt: #F5EDE0;
  --text: #2C1810;
  --text-light: #5C4A3A;
  --primary: #C4623A;
  --primary-dark: #A34E2D;
  --secondary: #D4A843;
  --muted: #6B7B5E;
  --sand: #E8DDD0;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(44,24,16,0.08);
  --shadow-hover: 0 8px 24px rgba(44,24,16,0.12);
  --max-width: 1100px;
  --reading-width: 700px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s ease;
}

/* --- Base --- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  padding-top: 70px;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.25rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

.subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  line-height: 1.6;
}

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

.reading-width { max-width: var(--reading-width); }

.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(253,248,240,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--sand);
  padding: 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  min-height: 80vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.hero * {
  position: relative;
  color: var(--white);
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero .subtitle {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  margin: 0.5rem auto 0;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.card-body { padding: 1.5rem; }

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- Pull Quote --- */
.pull-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  line-height: 1.6;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  font-size: 1rem;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

/* --- Footer --- */
.footer {
  background: var(--text);
  color: var(--sand);
  padding: 3rem 0;
}

.footer a {
  color: var(--secondary);
  transition: color 0.2s;
}
.footer a:hover { color: var(--white); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--sand);
  padding: 4rem 2rem;
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* --- Section Nav (sticky tabs) --- */
.section-nav {
  position: sticky;
  top: 70px;
  background: var(--bg);
  padding: 1rem 0;
  border-bottom: 1px solid var(--sand);
  z-index: 99;
  overflow-x: auto;
  white-space: nowrap;
}

.section-nav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.2s;
}

.section-nav a:hover,
.section-nav a.active {
  background: var(--primary);
  color: var(--white);
}

/* --- Support Tier Cards --- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.tier-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 2px solid var(--sand);
  transition: all 0.3s;
}

.tier-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.tier-card .tier-icon { font-size: 3rem; margin-bottom: 1rem; }
.tier-card .tier-title { font-family: var(--font-heading); font-size: 1.5rem; }
.tier-card .tier-amount { color: var(--primary); font-weight: 700; font-size: 1.25rem; }

/* --- Blog / Post List --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  display: flex;
  gap: 1.5rem;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-card img {
  width: 300px;
  min-height: 200px;
  object-fit: cover;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; } .mt-4 { margin-top: 4rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; } .mb-4 { margin-bottom: 4rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .container { padding: 0 1.5rem; }
  .section { padding: 4rem 0; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .hero { min-height: 60vh; }
  .hero h1 { font-size: 2.25rem; }
  .hero .subtitle { font-size: 1.1rem; }

  .pull-quote { font-size: 1.25rem; }

  .card-grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }

  .post-card { flex-direction: column; }
  .post-card img { width: 100%; }

  /* Mobile nav */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(253,248,240,0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem 2rem;
    border-bottom: 1px solid var(--sand);
    gap: 0.25rem;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.75rem 0;
    font-size: 1.05rem;
  }

  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .hero h1 { font-size: 1.85rem; }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
  .cta-banner { padding: 3rem 1.5rem; }
}
