/* ═══════════════════════════════════════════
   STILLWILD APP — Editorial Collage Interior
   Bold. Botanical. Unapologetic.
   Moon Phase Accent Rotation
   ═══════════════════════════════════════════ */

:root {
  /* Base Palette — Editorial Warm */
  --bg: #FBF5EB;
  --bg-dark: #1C1815;
  --bg-warm: #F0E4D2;
  --text: #1C1815;
  --text-light: #FBF5EB;
  --text-muted: #8A7E73;
  --text-dim: #6B6058;
  --border: #DDD2C3;
  --danger: #C43030;

  /* Vivid Color Palette */
  --coral: #E8526E;
  --emerald: #2D8B5C;
  --gold: #D4930D;
  --sienna: #C85430;
  --plum: #7B3F6E;
  --teal: #2A7B7B;
  --olive: #6B7C3E;
  --dusty-rose: #C4868E;
  --mustard: #C9910A;

  /* Default Accent (Spring / Waxing — Emerald) */
  --accent: #2D8B5C;
  --accent-glow: #3DA670;
}

/* ─── Moon Phase Accent Rotation ─── */
.moon-new    { --accent: #E8526E; --accent-glow: #F06B84; }
.moon-waxing { --accent: #2D8B5C; --accent-glow: #3DA670; }
.moon-full   { --accent: #D4930D; --accent-glow: #E5A820; }
.moon-waning { --accent: #C85430; --accent-glow: #DC6B45; }

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

body {
  font-family: 'Source Serif 4', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── NAV ─── */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 2px solid var(--text);
  position: sticky;
  top: 0;
  background: rgba(251,245,235,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 100;
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
}

.nav-brand .still {
  font-weight: 300;
  font-style: italic;
}

.nav-brand .wild {
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { width: 100%; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #FBF5EB;
}

.nav-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}

.nav-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ─── MAIN ─── */
.app-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  min-height: calc(100vh - 140px);
}

/* ─── PAGE HEADER ─── */
.page-header {
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

.page-header p {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 1.05rem;
}

/* ─── FILTER TABS ─── */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  background: transparent;
  color: var(--text);
  border: 2.5px solid var(--border);
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-tab:hover {
  border-color: var(--text);
  background: var(--bg-warm);
}

.filter-tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ─── CONTENT CARDS ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 2.5px solid var(--border);
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.4s, box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  position: relative;
}

.card:hover {
  border-color: var(--text);
  transform: translateY(-5px) rotate(-0.3deg);
  box-shadow: 0 16px 40px rgba(28,24,21,0.08);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'Space Grotesk', sans-serif;
}

.badge-article { background: rgba(45,139,92,0.12); color: var(--emerald); }
.badge-audio { background: rgba(212,147,13,0.12); color: #A87A08; }
.badge-free { background: rgba(28,24,21,0.06); color: var(--text-muted); }
.badge-practitioner { background: rgba(200,84,48,0.12); color: var(--sienna); }
.badge-category { background: rgba(28,24,21,0.05); color: var(--text-dim); }

.card h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.65;
  flex: 1;
}

.card-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.card-lock {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

/* ─── CONTENT DETAIL ─── */
.content-detail {
  max-width: 700px;
  margin: 0 auto;
}

.content-detail h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.content-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.content-body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-dim);
}

.content-body p {
  margin-bottom: 1.5rem;
}

.content-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 2.5rem 0 1rem;
}

.content-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.content-body blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
}

.content-body strong {
  font-weight: 600;
  color: var(--text);
}

/* ─── AUDIO PLACEHOLDER ─── */
.audio-player {
  background: var(--bg-warm);
  border: 2.5px solid var(--border);
  padding: 2.5rem;
  text-align: center;
  margin: 2rem 0;
}

.audio-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.audio-player h3 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.audio-duration {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
}

.audio-coming {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ─── UPGRADE BANNER ─── */
.upgrade-banner {
  background: var(--bg-dark);
  color: var(--text-light);
  border: none;
  padding: 2.5rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.upgrade-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.upgrade-banner h3 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.upgrade-banner p {
  color: rgba(251,245,235,0.65);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

/* ─── FORUM ─── */
.forum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 2.5px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
  align-items: center;
  margin-bottom: -2.5px;
  background: #fff;
}

.post-item:hover {
  border-color: var(--text);
  background: var(--bg-warm);
  transform: translateX(6px);
  position: relative;
  z-index: 1;
}

.post-title {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.post-info {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-items: center;
  flex-wrap: wrap;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mini-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #FBF5EB;
  font-family: 'Space Grotesk', sans-serif;
}

.post-stats {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

/* ─── POST DETAIL ─── */
.post-detail {
  max-width: 700px;
  margin: 0 auto;
}

.post-detail h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.post-author-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2.5px solid var(--border);
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FBF5EB;
}

.author-name {
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Space Grotesk', sans-serif;
}

.author-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
}

.post-body {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-dim);
  margin-bottom: 3rem;
  white-space: pre-wrap;
}

/* ─── COMMENTS ─── */
.comments-section {
  border-top: 2.5px solid var(--border);
  padding-top: 2rem;
}

.comments-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.comment {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(28,24,21,0.06);
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FBF5EB;
  margin-top: 0.15rem;
}

.comment-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.comment-name {
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', sans-serif;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Space Grotesk', sans-serif;
}

.comment-body {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.65;
  white-space: pre-wrap;
}

.no-comments {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
}

/* ─── FORMS ─── */
.form-container {
  max-width: 440px;
  margin: 0 auto;
}

.form-container h1 {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.form-container .form-sub {
  color: var(--text-dim);
  font-size: 0.98rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 2.5px solid var(--border);
  color: var(--text);
  font-family: 'Source Serif 4', serif;
  font-size: 0.98rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(28,24,21,0.06);
}

.moon-new .form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,82,110,0.08); }
.moon-waxing .form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,139,92,0.08); }
.moon-full .form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,147,13,0.08); }
.moon-waning .form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,84,48,0.08); }

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}

select.form-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6058' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  margin-top: 0.5rem;
}

.form-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.form-btn-outline {
  background: transparent;
  border: 2.5px solid var(--border);
  color: var(--text);
}

.form-btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.93rem;
  color: var(--text-dim);
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.form-footer a:hover { text-decoration: underline; }

/* ─── ALERT ─── */
.alert {
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.93rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.alert-error {
  background: rgba(196,48,48,0.08);
  border-left: 4px solid var(--danger);
  color: var(--danger);
}

.alert-success {
  background: rgba(45,139,92,0.08);
  border-left: 4px solid var(--emerald);
  color: var(--emerald);
}

/* ─── PROFILE ─── */
.profile-card {
  max-width: 500px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2.5px solid var(--border);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #FBF5EB;
  flex-shrink: 0;
}

.profile-info h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 900;
}

.profile-tier {
  font-size: 0.82rem;
  margin-top: 0.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-stat {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(28,24,21,0.06);
  font-size: 0.95rem;
}

.profile-stat-label {
  color: var(--text-dim);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

.profile-stat-value {
  color: var(--text);
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
}

/* ─── WELCOME ─── */
.welcome-page {
  max-width: 600px;
  margin: 4rem auto;
  text-align: center;
}

.welcome-page h1 {
  font-family: 'Fraunces', serif;
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.welcome-page p {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin-bottom: 2rem;
  font-weight: 400;
}

.welcome-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.welcome-links a {
  padding: 0.7rem 1.6rem;
  border: 2.5px solid var(--text);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s;
  font-family: 'Space Grotesk', sans-serif;
}

.welcome-links a:hover {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-3px);
}

.welcome-links a.primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.welcome-links a.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* ─── FOOTER ─── */
.app-footer {
  text-align: center;
  padding: 2.5rem;
  border-top: 2.5px solid var(--text);
  background: var(--bg-dark);
}

.app-footer .footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(251,245,235,0.3);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .app-nav { padding: 0.85rem 1.25rem; }
  .nav-links { gap: 1rem; }
  .app-main { padding: 2rem 1.25rem 4rem; }
  .card-grid { grid-template-columns: 1fr; }
  .post-item { grid-template-columns: 1fr; }
  .post-stats { text-align: left; }
  .forum-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .nav-links { gap: 0.75rem; font-size: 0.85rem; }
  .nav-btn { padding: 0.38rem 0.9rem; font-size: 0.72rem; }
}
