@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Lato:wght@400;600;700&display=swap');

:root {
  --brown: #2C1810;
  --gold: #D4AF37;
  --gold-hover: #C4A030;
  --cream: #FAF7F2;
  --muted: #6B4C3B;
  --border: #E8DDD5;
  --white: #ffffff;
}

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

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--brown);
  line-height: 1.7;
}

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

/* NAV */
.nav {
  background: var(--brown);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: 'Merriweather', serif;
  font-size: 15px;
  font-weight: 700;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { color: var(--brown); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--gold);
  color: var(--brown) !important;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--gold-hover) !important; }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--brown) 0%, #4A2C1A 60%, #6B3A2A 100%);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23D4AF37' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,175,55,0.2);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 30px;
  padding: 6px 18px;
  color: var(--gold);
  font-size: 13px; font-weight: 600;
  margin-bottom: 28px;
}
.hero h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(32px, 5vw, 54px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  color: rgba(255,255,255,0.75);
  font-size: 18px;
  margin-bottom: 36px;
  max-width: 540px;
  margin-left: auto; margin-right: auto;
}
.hero-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 620px;
  margin: 0 auto 36px;
}
.hero-step {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 20px;
  color: var(--white);
  transition: background 0.2s;
}
.hero-step:hover { background: rgba(255,255,255,0.18); }
.step-num {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--brown);
  font-weight: 700; font-size: 16px;
  margin: 0 auto 10px;
}
.hero-step h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.hero-step p { font-size: 12px; color: rgba(255,255,255,0.6); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold);
  color: var(--brown);
  font-weight: 700; font-size: 17px;
  padding: 16px 36px;
  border-radius: 40px;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 8px 24px rgba(212,175,55,0.3);
}
.btn-primary:hover { background: var(--gold-hover); transform: scale(1.03); }

/* SECTION */
.section { padding: 72px 24px; }
.section-white { background: var(--white); }
.section-cream { background: var(--cream); }
.section-title {
  font-family: 'Merriweather', serif;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--brown);
  margin-bottom: 10px;
}
.section-sub { color: var(--muted); font-size: 16px; margin-bottom: 48px; }
.text-center { text-align: center; }
.max-w { max-width: 1100px; margin: 0 auto; }
.max-w-md { max-width: 760px; margin: 0 auto; }

/* MOOD CARDS */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.mood-card {
  border-radius: 20px;
  padding: 28px;
  border: 1px solid;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  display: block;
}
.mood-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(44,24,16,0.12); }
.mood-card.simple { background: linear-gradient(160deg,#f5f5f5,#fafafa); border-color: #d0d0d0; }
.mood-card.formal { background: linear-gradient(160deg,#EEF4FB,#F2F6FC); border-color: #B5D4F4; }
.mood-card.warm   { background: linear-gradient(160deg,#FEF2F0,#FDF5F0); border-color: #F5C4B3; }
.mood-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.mood-card.simple .mood-icon { background: #e0e0e0; }
.mood-card.formal .mood-icon { background: #B5D4F4; }
.mood-card.warm   .mood-icon { background: #F5C4B3; }
.mood-card h3 { font-family: 'Merriweather', serif; font-size: 20px; margin-bottom: 8px; }
.mood-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.mood-link { color: var(--gold); font-weight: 700; font-size: 14px; margin-top: 18px; display: block; }

/* WHY US */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.why-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.why-icon {
  width: 48px; height: 48px;
  background: var(--brown);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.why-icon svg { color: var(--gold); }
.why-card h3 { font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.why-card p { font-size: 13px; color: var(--muted); }

/* ARTICLE GRID */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.article-card {
  background: var(--cream);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.2s;
  display: block;
}
.article-card:hover { box-shadow: 0 6px 20px rgba(44,24,16,0.1); }
.article-card h3 { font-weight: 700; font-size: 14px; color: var(--brown); margin-bottom: 4px; }
.article-card p { font-size: 12px; color: #666; }
.browse-all {
  display: inline-block;
  margin-top: 24px;
  border: 1px solid var(--gold);
  color: var(--brown);
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 700; font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.browse-all:hover { background: var(--gold); color: var(--brown); }

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; }
details {
  border-bottom: 1px solid var(--border);
}
details summary {
  padding: 18px 0;
  font-weight: 700; font-size: 15px; color: var(--brown);
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  color: var(--gold); font-size: 22px; font-weight: 300;
  transition: transform 0.2s;
}
details[open] summary::after { content: '−'; }
details p { padding: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* AD SLOT */
.ad-slot {
  background: #E8DDD5;
  border: 1px solid #D4C4B8;
  border-radius: 12px;
  height: 90px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; font-style: italic;
  opacity: 0.7;
  margin: 24px auto;
  max-width: 728px;
}

/* FOOTER */
footer {
  background: var(--brown);
  color: rgba(255,255,255,0.6);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-icon {
  width: 32px; height: 32px;
  background: var(--gold); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.footer-logo span { color: var(--white); font-weight: 700; font-size: 14px; }
.footer-links { display: flex; gap: 20px; font-size: 12px; }
.footer-links a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 12px; }

/* ARTICLE PAGE */
.article-header {
  background: var(--brown);
  padding: 56px 24px;
  color: var(--white);
}
.article-header h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.25;
  margin-bottom: 12px;
}
.article-header p { color: rgba(255,255,255,0.75); font-size: 18px; }
.article-body { max-width: 780px; margin: 0 auto; padding: 48px 24px; }
.article-body h2 { font-family: 'Merriweather', serif; font-size: 26px; color: var(--brown); margin: 36px 0 16px; }
.article-body h3 { font-size: 18px; color: var(--brown); margin: 24px 0 10px; }
.article-body p { color: #444; margin-bottom: 16px; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; color: #444; }
.article-body li { margin-bottom: 8px; line-height: 1.7; }
.callout {
  background: var(--white);
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.callout h3 { color: var(--brown); font-size: 16px; margin-bottom: 6px; }
.callout p { color: var(--muted); font-size: 14px; margin: 0; }
.example-box {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px 20px;
  font-style: italic;
  font-size: 14px;
  color: #555;
  margin-top: 8px;
}
.cta-box {
  background: linear-gradient(135deg, var(--brown), #3D2415);
  color: var(--white);
  padding: 36px;
  border-radius: 12px;
  text-align: center;
  margin: 40px 0;
}
.cta-box h2 { font-family: 'Merriweather', serif; margin-bottom: 12px; }
.cta-box p { color: rgba(255,255,255,0.8); margin-bottom: 20px; }
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--brown);
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 6px;
  transition: background 0.2s;
}
.btn-gold:hover { background: var(--gold-hover); }

/* TEMPLATES PAGE */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.template-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
  cursor: pointer;
}
.template-card:hover { border-color: var(--gold); box-shadow: 0 6px 24px rgba(44,24,16,0.1); }
.template-top { height: 6px; }
.template-body { padding: 22px; }
.template-tag {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 10px;
}
.template-card h3 { font-family: 'Merriweather', serif; font-size: 17px; margin-bottom: 6px; }
.template-card p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.template-use {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  color: var(--white);
  transition: opacity 0.2s;
}
.template-use:hover { opacity: 0.85; }

/* EDITOR PAGE */
.editor-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
  align-items: start;
}
.editor-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 80px;
}
.editor-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.field-group { margin-bottom: 12px; }
.field-group label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.field-group input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px;
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  transition: border-color 0.2s;
}
.field-group input:focus { outline: none; border-color: var(--gold); }
.editor-hint {
  background: var(--cream);
  border-radius: 8px; padding: 12px;
  font-size: 12px; color: var(--muted);
  line-height: 1.6; margin-top: 16px;
}
.letter-canvas {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}
.letter-header { padding: 20px 36px; color: var(--white); }
.letter-header p:first-child { font-size: 11px; opacity: 0.65; margin-bottom: 2px; }
.letter-header p:last-child { font-size: 16px; font-weight: 600; }
.letter-content {
  padding: 36px;
  font-family: Georgia, serif;
  font-size: 12pt;
  color: #1a1a1a;
  line-height: 1.8;
  min-height: 600px;
}
.letter-content .sender { margin-bottom: 20px; }
.letter-content .date-line { margin-bottom: 20px; }
.letter-content .recipient { margin-bottom: 20px; }
.letter-content .salutation { margin-bottom: 16px; }
.letter-content .body p { margin-bottom: 12px; }
.letter-content .closing { margin-top: 24px; }
.editor-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
}
.toolbar-select {
  padding: 5px 8px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px;
  background: var(--cream); cursor: pointer;
}
.btn-download {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brown); color: var(--white);
  padding: 8px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 700;
  border: none; cursor: pointer;
  transition: background 0.2s;
}
.btn-download:hover { background: #3d2415; }
.btn-download-pdf {
  background: var(--gold); color: var(--brown);
}
.btn-download-pdf:hover { background: var(--gold-hover); }
.toolbar-spacer { flex: 1; }

/* ARTICLES DIRECTORY */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}
.dir-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dir-card:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(44,24,16,0.08); }
.dir-card h3 { font-size: 14px; font-weight: 700; color: var(--brown); margin-bottom: 4px; }
.dir-card p { font-size: 12px; color: var(--muted); }
.dir-cat { font-size: 11px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; display: block; }

@media (max-width: 768px) {
  .editor-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .editor-panel { position: static; }
}
