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

:root {
  --warm: #f5f0eb;
  --cream: #faf8f5;
  --dark: #1a1a2e;
  --deep: #16213e;
  --accent: #e8a87c;
  --accent-hover: #d4956a;
  --rose: #d4a5a5;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

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

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--dark);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 24px;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--deep) !important;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  background: linear-gradient(160deg, var(--cream) 0%, var(--warm) 50%, var(--rose) 100%);
}

.hero-content {
  max-width: 800px;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--dark);
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-hover);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 32px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--deep);
  transform: translateY(-1px);
}

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

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

/* Sections */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 16px;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-dark .section-sub {
  color: rgba(255,255,255,0.7);
}

/* Vision Grid */
.vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.vision-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.vision-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.vision-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.vision-card p {
  color: var(--text-light);
  line-height: 1.8;
}

/* Why Section */
.why-content {
  max-width: 700px;
  margin: 48px auto 0;
}

.why-lead {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--accent);
}

.why-text p {
  margin-bottom: 20px;
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
}

/* Resources */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.resource-card {
  background: var(--white);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.resource-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--dark);
}

.resource-card ul {
  list-style: none;
}

.resource-card li {
  padding: 8px 0;
  color: var(--text-light);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.95rem;
}

.resource-card li:last-child {
  border-bottom: none;
}

.resource-card li strong {
  color: var(--text);
}

/* Chat */
.chat-container {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.grace-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
}

.message-content {
  padding: 16px 20px;
  border-radius: 16px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.grace-message .message-content {
  background: rgba(232, 168, 124, 0.15);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
}

.user-message .message-content {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(0,0,0,0.2);
}

#chatInput {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 28px;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

#chatInput::placeholder {
  color: rgba(255,255,255,0.4);
}

#chatInput:focus {
  border-color: var(--accent);
}

#chatSend {
  padding: 14px 28px;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 60px 24px;
  background: var(--warm);
}

.footer-quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--dark);
}

.footer p {
  color: var(--text-light);
  margin-bottom: 8px;
}

.footer-small {
  font-size: 0.85rem;
  margin-top: 16px;
}

/* Hero Stats */
.hero-stats {
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  gap: 8px;
}

.stat-divider {
  opacity: 0.5;
}

/* Community Board */
.board-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.tab {
  padding: 10px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab.active, .tab:hover {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

.board-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.board-form {
  background: rgba(255,255,255,0.05);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  height: fit-content;
}

.board-form h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.form-row {
  margin-bottom: 12px;
}

.form-row select,
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-row select option {
  background: var(--dark);
  color: var(--white);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
}

.board-form .btn {
  width: 100%;
  margin-top: 4px;
}

.board-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
}

.post {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  animation: fadeIn 0.3s ease;
}

.post-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: fit-content;
  white-space: nowrap;
}

.post-need .post-badge { background: rgba(232, 120, 120, 0.2); color: #e87878; }
.post-offer .post-badge { background: rgba(120, 200, 140, 0.2); color: #78c88c; }
.post-story .post-badge { background: rgba(168, 140, 232, 0.2); color: #a88ce8; }

.post-body {
  flex: 1;
}

.post-meta {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.post-meta strong {
  color: rgba(255,255,255,0.9);
}

.post-location {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  margin-left: 8px;
}

.post-body p {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-actions {
  margin-top: 8px;
}

.heart-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.heart-btn:hover, .heart-btn.hearted {
  border-color: #e87878;
  color: #e87878;
}

.loading, .empty-board {
  text-align: center;
  padding: 40px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

/* Love Chain */
.chain-counter {
  text-align: center;
  margin-bottom: 32px;
}

.chain-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.chain-label {
  color: var(--text-light);
  font-size: 1rem;
}

.chain-form {
  display: flex;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.chain-form input {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 28px;
  background: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.chain-form input:focus {
  border-color: var(--accent);
}

.chain-links {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.chain-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  animation: fadeIn 0.3s ease both;
}

.chain-link-icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

.chain-link strong {
  font-size: 0.85rem;
  color: var(--dark);
}

.chain-link p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 2px;
}

.chain-share {
  text-align: center;
  margin-top: 32px;
}

.chain-share p {
  color: var(--text-light);
  margin-bottom: 12px;
}

/* Share buttons */
.share-msg-btn {
  display: block;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  padding: 0;
  transition: opacity 0.2s;
}

.share-msg-btn:hover {
  opacity: 0.7;
}

.footer-share {
  margin: 20px 0;
}

.section-dark .btn-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

.section-dark .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

/* Chat Feedback */
.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.feedback-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.feedback-yes:hover {
  border-color: #78c88c;
  color: #78c88c;
}

.feedback-no:hover {
  border-color: #e87878;
  color: #e87878;
}

.message-actions .share-msg-btn {
  display: inline;
  margin-top: 0;
}

.feedback-thanks {
  font-size: 0.8rem;
  color: var(--accent);
  font-style: italic;
}

/* Journal */
.journal-entries {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.journal-entry {
  background: rgba(255,255,255,0.05);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}

.journal-date {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.journal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--white);
}

.journal-preview,
.journal-full {
  color: rgba(255,255,255,0.75);
  line-height: 1.9;
  font-size: 0.95rem;
}

.journal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.journal-read-more {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  padding: 0;
  transition: opacity 0.2s;
}

.journal-read-more:hover {
  opacity: 0.7;
}

.journal-actions .heart-btn {
  color: rgba(255,255,255,0.5);
}

.journal-actions .share-msg-btn {
  display: inline;
  margin-top: 0;
}

.journal-empty {
  text-align: center;
  padding: 40px;
  color: rgba(255,255,255,0.6);
}

.journal-empty-sub {
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Subscribe / Join */
.section-join {
  background: linear-gradient(160deg, var(--accent) 0%, var(--rose) 100%);
  color: var(--dark);
}

.section-join h2 {
  color: var(--dark);
}

.section-sub-dark {
  text-align: center;
  color: rgba(0,0,0,0.6);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe-form input {
  flex: 1;
  min-width: 180px;
  padding: 14px 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 28px;
  background: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-form input:focus {
  border-color: var(--dark);
}

.subscribe-message {
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
}

.subscribe-message.success {
  color: var(--dark);
  font-weight: 600;
}

.subscribe-message.error {
  color: #8b0000;
}

.subscribe-count {
  text-align: center;
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(0,0,0,0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .section {
    padding: 60px 0;
  }

  .chat-messages {
    height: 300px;
  }

  .board-content {
    grid-template-columns: 1fr;
  }

  .chain-form {
    flex-direction: column;
  }

  .chain-form input {
    min-width: 100%;
  }
}
