@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --white: #ffffff;
  --off-white: #f8f7f4;
  --stone: #f0ede8;
  --mid: #e4e0d8;
  --text: #1a1a18;
  --text-mid: #4a4a44;
  --text-light: #8a8a80;
  --accent: #3a6b52;
  --accent-light: #4e8c6e;
  --accent-pale: #e8f0eb;
  --danger: #c0392b;
  --nav-h: 72px;
  --radius: 4px;
  --transition: 0.25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Fraunces', serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin-bottom: 1rem; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mid);
  display: flex; align-items: center;
}
.nav-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
}
.nav-logo-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-mark svg { width: 18px; height: 18px; fill: white; }
.nav-logo-name {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-logo-name span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-mid);
  transition: color var(--transition);
  text-transform: uppercase;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: white !important;
  border-radius: var(--radius);
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--accent-light) !important; color: white !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ── Page wrapper ── */
main { padding-top: var(--nav-h); min-height: 100vh; }

/* ── Hero ── */
.hero {
  position: relative;
  height: calc(100vh - var(--nav-h));
  min-height: 560px;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 40%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-bg.active { opacity: 1; }
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,20,12,0.75) 0%, rgba(10,20,12,0.2) 50%, transparent 100%);
}
.hero-dots {
  display: flex; gap: 8px; margin-top: 1.5rem;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.35); border: none; cursor: pointer;
  padding: 0; transition: background 0.3s, transform 0.3s;
}
.hero-dot.active { background: white; transform: scale(1.3); }
.hero-content {
  position: relative; z-index: 2;
  padding: 4rem 2rem;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.7);
  margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
  content: '';
  display: block; width: 28px; height: 1px; background: rgba(255,255,255,0.5);
}
.hero h1 { color: white; max-width: 680px; margin-bottom: 1.25rem; }
.hero-sub { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 520px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); }
.btn-outline { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* ── Section base ── */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { margin-bottom: 3rem; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title { margin-bottom: 0.75rem; }
.section-sub { color: var(--text-mid); max-width: 540px; font-size: 1.05rem; }

/* ── Mission strip ── */
.mission {
  background: var(--accent);
  color: white;
  padding: 4rem 2rem;
}
.mission-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.mission h2 { color: white; margin-bottom: 1rem; }
.mission p { color: rgba(255,255,255,0.82); line-height: 1.8; }
.mission-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 3rem; font-weight: 300;
  color: white; line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.65); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Cards grid ── */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--white);
  border: 1px solid var(--mid);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card-img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  background: var(--stone);
}
.card-img-placeholder {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--stone), var(--mid));
  display: flex; align-items: center; justify-content: center;
}
.card-img-placeholder svg { width: 40px; height: 40px; opacity: 0.3; }
.card-body { padding: 1.5rem; }
.card-meta {
  font-size: 0.75rem; color: var(--text-light);
  letter-spacing: 0.05em; margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.card-tag {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-pale); padding: 0.2rem 0.5rem; border-radius: 2px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; line-height: 1.4; }
.card p { font-size: 0.875rem; color: var(--text-mid); margin-bottom: 1rem; line-height: 1.6; }
.card-link {
  font-size: 0.8rem; font-weight: 500; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: gap var(--transition);
}
.card-link:hover { gap: 0.6rem; }

.section-footer { margin-top: 2.5rem; text-align: center; }

/* ── About strip ── */
.about-strip { background: var(--off-white); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center;
}
.about-img-wrap { position: relative; }
.about-img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--radius);
}
.about-img-badge {
  position: absolute; bottom: -1.5rem; right: -1.5rem;
  background: var(--accent);
  color: white; padding: 1.25rem;
  border-radius: var(--radius);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.06em; text-align: center;
  width: 100px;
}
.about-img-badge strong { display: block; font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 300; }
.about-text p { color: var(--text-mid); margin-bottom: 1.25rem; }
.about-pillars { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.pillar {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 1.25rem;
  background: white; border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.pillar-icon { font-size: 1.25rem; flex-shrink: 0; }
.pillar-title { font-weight: 500; font-size: 0.875rem; margin-bottom: 0.2rem; }
.pillar-desc { font-size: 0.8rem; color: var(--text-light); }

/* ── List page ── */
.page-header {
  background: var(--off-white);
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--mid);
}
.page-header-inner { max-width: 1280px; margin: 0 auto; }
.page-header .eyebrow {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--text-mid); font-size: 1.05rem; }

.posts-list { padding: 4rem 2rem; }
.posts-list-inner { max-width: 1280px; margin: 0 auto; }
.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

/* ── Single post ── */
.post-hero {
  background: var(--off-white);
  padding: 4rem 2rem 3rem;
  border-bottom: 1px solid var(--mid);
}
.post-hero-inner { max-width: 800px; margin: 0 auto; }
.post-meta-row {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.post-body {
  max-width: 800px; margin: 0 auto;
  padding: 4rem 2rem;
}
.post-body-content { font-size: 1rem; line-height: 1.85; color: var(--text-mid); }
.post-body-content h2 { color: var(--text); margin: 2.5rem 0 1rem; }
.post-body-content h3 { color: var(--text); margin: 2rem 0 0.75rem; }
.post-body-content ul, .post-body-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-body-content li { margin-bottom: 0.4rem; }
.post-body-content img { border-radius: var(--radius); margin: 2rem 0; }
.post-body-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-featured-img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 3rem;
}
.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: var(--text-light);
  margin-bottom: 1.5rem; transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; }
.form-group input, .form-group textarea, .form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--mid);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--off-white);
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  background: white;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--accent-pale);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; }
.contact-label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.contact-val { font-size: 0.95rem; color: var(--text); }

/* ── About full page ── */
.about-full-hero {
  position: relative; height: 420px;
  overflow: hidden; display: flex; align-items: flex-end;
}
.about-full-hero-bg {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1600&q=80');
  background-size: cover; background-position: center;
}
.about-full-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,20,12,0.7), transparent);
}
.about-full-hero-content {
  position: relative; z-index: 2;
  padding: 3rem 2rem; max-width: 1280px; margin: 0 auto; width: 100%;
}
.about-full-hero-content h1 { color: white; }
.about-full-hero-content p { color: rgba(255,255,255,0.8); max-width: 520px; margin-top: 0.75rem; }

/* ── Footer ── */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 4rem 2rem 2rem;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem; margin-bottom: 3rem;
}
.footer-brand { }
.footer-brand-name {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem; color: white; margin-bottom: 0.75rem;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: white; margin-bottom: 1.25rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { font-size: 0.78rem; }
.footer-license {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem;
}
.license-badge {
  background: rgba(255,255,255,0.12); padding: 0.25rem 0.6rem;
  border-radius: 2px; font-weight: 500; color: white; font-size: 0.7rem;
  letter-spacing: 0.05em;
}

/* ── Admin ── */
.admin-wrap { min-height: 100vh; background: #f5f5f5; }
.admin-nav {
  background: var(--text); color: white;
  padding: 0 2rem; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-nav-brand { font-family: 'Fraunces', serif; font-size: 1rem; }
.admin-nav-links { display: flex; gap: 1.5rem; align-items: center; }
.admin-nav-links a { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.admin-nav-links a:hover { color: white; }
.admin-body { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem; }
.admin-header { margin-bottom: 2.5rem; display: flex; justify-content: space-between; align-items: center; }
.admin-header h1 { font-size: 1.75rem; }
.admin-section { background: white; border-radius: 6px; border: 1px solid #e0e0e0; margin-bottom: 2rem; overflow: hidden; }
.admin-section-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex; justify-content: space-between; align-items: center;
}
.admin-section-header h2 { font-size: 1rem; font-family: 'DM Sans', sans-serif; font-weight: 500; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: 0.75rem 1.5rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: #888; border-bottom: 1px solid #e0e0e0;
}
.admin-table td { padding: 0.9rem 1.5rem; border-bottom: 1px solid #f0f0f0; font-size: 0.875rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }
.admin-actions { display: flex; gap: 0.5rem; }
.btn-sm {
  padding: 0.35rem 0.75rem; font-size: 0.78rem; border-radius: 3px;
  border: 1px solid; cursor: pointer; transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.btn-edit { border-color: #ccc; color: #333; background: white; }
.btn-edit:hover { border-color: var(--accent); color: var(--accent); }
.btn-del { border-color: #f5c6c2; color: var(--danger); background: white; }
.btn-del:hover { background: var(--danger); color: white; border-color: var(--danger); }
.btn-add {
  padding: 0.5rem 1.25rem; background: var(--accent); color: white;
  border: none; border-radius: var(--radius); font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-add:hover { background: var(--accent-light); }
.admin-empty { padding: 2rem 1.5rem; color: #aaa; font-size: 0.875rem; text-align: center; }

/* Admin edit form */
.edit-form { background: white; border-radius: 6px; border: 1px solid #e0e0e0; padding: 2rem; }
.edit-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.edit-field { display: flex; flex-direction: column; gap: 0.4rem; }
.edit-field.full { grid-column: 1 / -1; }
.edit-field label { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em; color: #555; }
.edit-field input, .edit-field textarea {
  padding: 0.65rem 0.9rem; border: 1px solid #ddd; border-radius: 4px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; outline: none;
  transition: border-color 0.15s;
}
.edit-field input:focus, .edit-field textarea:focus { border-color: var(--accent); }
.edit-field textarea { min-height: 380px; resize: vertical; font-size: 0.85rem; font-family: monospace; }
.edit-field small { font-size: 0.72rem; color: #aaa; }
.edit-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* Login */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--off-white);
}
.login-box { background: white; border: 1px solid var(--mid); border-radius: 6px; padding: 2.5rem; width: 360px; }
.login-box h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.login-box p { font-size: 0.875rem; color: var(--text-light); margin-bottom: 2rem; }
.login-error { background: #fdf0ef; border: 1px solid #f5c6c2; color: var(--danger); padding: 0.65rem 1rem; border-radius: 4px; font-size: 0.85rem; margin-bottom: 1.25rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .mission-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: white; padding: 1.5rem 2rem; gap: 1.25rem;
    border-bottom: 1px solid var(--mid);
  }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .edit-form-grid { grid-template-columns: 1fr; }
  .about-img-badge { display: none; }
}
