/* =============================================
   STORIES OF HOPE — stylesheet
   ============================================= */

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

:root {
  --cream: #FAF7F2;
  --cream-dark: #F0EBE1;
  --ink: #1C1A17;
  --ink-light: #4A4640;
  --ink-muted: #8C8680;
  --gold: #B8976A;
  --gold-light: #D4B896;
  --gold-pale: #F0E8DA;
  --sage: #6B7F6E;
  --sage-light: #E8EDE8;
  --rose: #C4756A;
  --border: rgba(28, 26, 23, 0.1);
  --border-med: rgba(28, 26, 23, 0.18);
  --shadow-sm: 0 2px 12px rgba(28, 26, 23, 0.06);
  --shadow-md: 0 8px 32px rgba(28, 26, 23, 0.1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Jost', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background texture */
.bg-texture {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(184, 151, 106, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(107, 127, 110, 0.07) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* =============================================
   HEADER
   ============================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  color: var(--gold);
  font-size: 18px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--ink);
}

/* =============================================
   HERO
   ============================================= */

.hero {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 5rem;
  text-align: center;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero-title em {
  color: var(--gold);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--ink-light);
  line-height: 1.75;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.hero-cta {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 36px;
  border-radius: 999px;
  transition: background 0.2s, transform 0.15s;
}

.hero-cta:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

/* =============================================
   SECTIONS
   ============================================= */

.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 15px;
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.ornament-divider {
  text-align: center;
  color: var(--gold-light);
  font-size: 20px;
  padding: 1rem 0;
  position: relative;
  z-index: 1;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  display: inline-block;
  width: 120px;
  height: 1px;
  background: var(--border-med);
  vertical-align: middle;
  margin: 0 1.5rem;
}

/* =============================================
   FORM
   ============================================= */

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-muted);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 151, 106, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.65;
}

.char-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.char-hint {
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
}

.char-count {
  font-size: 12px;
  color: var(--ink-muted);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.btn-submit {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover:not(:disabled) {
  background: var(--gold);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 16px;
  transition: transform 0.2s;
}

.btn-submit:hover:not(:disabled) .btn-icon {
  transform: translateX(3px);
}

.status-message {
  margin-top: 1.25rem;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.55;
  display: none;
}

.status-message.approved {
  display: block;
  background: #EEF5EE;
  border: 1px solid #AECBAE;
  color: #2D5A2D;
}

.status-message.declined {
  display: block;
  background: #FDF0EE;
  border: 1px solid #E8B4AE;
  color: #7A2E26;
}

.status-message.reviewing {
  display: block;
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  color: #6B4E2A;
}

/* =============================================
   STORIES WALL
   ============================================= */

.stories-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.stories-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}

.ai-badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sage-light);
  color: var(--sage);
  border: 1px solid rgba(107, 127, 110, 0.25);
}

.story-count {
  font-size: 13px;
  color: var(--ink-muted);
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-med);
  border-radius: 999px;
  padding: 7px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.18s;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.stories-grid {
  columns: 2;
  column-gap: 1.25rem;
}

@media (max-width: 640px) {
  .stories-grid { columns: 1; }
}

.story-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  break-inside: avoid;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  animation: cardIn 0.4s ease both;
}

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

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

.story-quote {
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 1.1rem;
  position: relative;
  padding-left: 1.1rem;
}

.story-quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -4px;
  font-size: 2rem;
  color: var(--gold-light);
  font-family: var(--font-display);
  line-height: 1;
}

.story-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.story-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  flex-shrink: 0;
}

.story-byline {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.story-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.story-place {
  font-size: 11px;
  color: var(--ink-muted);
}

.story-theme-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid rgba(184, 151, 106, 0.3);
  white-space: nowrap;
}

/* Loading & empty states */
.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-muted);
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-med);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-muted);
  font-size: 15px;
  border: 1px dashed var(--border-med);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.empty-state p { margin-bottom: 0.5rem; }

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-inner .logo-mark {
  font-size: 20px;
  color: var(--gold);
}

.footer-inner p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-light);
}

.footer-note {
  font-family: var(--font-body) !important;
  font-style: normal !important;
  font-size: 12px !important;
  color: var(--ink-muted) !important;
}
