/* =========================================
   BrightLeaf App Styles
   ========================================= */

:root {
  --sage: #8B9E7C;
  --sage-light: #C5D4B8;
  --sage-pale: #EEF2EA;
  --cream: #FAF8F3;
  --warm: #F5EDE0;
  --bark: #3D3228;
  --bark-light: #5C4F42;
  --gold: #C4A265;
  --gold-light: #E8D5B0;
  --white: #FFFFFF;
  --error: #c0392b;
  --error-bg: #fdf0ef;
  --success: #27ae60;
  --success-bg: #eafaf1;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--cream);
  color: var(--bark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(250, 248, 243, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 158, 124, 0.15);
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--bark);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-logo span { color: var(--sage); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--bark-light);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--bark); }
.btn-nav {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  background: var(--sage);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.btn-nav:hover {
  background: var(--bark);
  transform: translateY(-1px);
}

/* ---- PAGE LAYOUT ---- */
.page {
  padding-top: 5rem;
  min-height: calc(100vh - 60px);
}
.page-header {
  text-align: center;
  padding: 3rem 2rem 1rem;
}
.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--bark);
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
}
.page-header h1 em {
  font-style: normal;
  color: var(--sage);
}
.page-header p {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--bark-light);
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.7;
}
.page-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--sage);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--bark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 50, 40, 0.15);
}
.btn-secondary {
  background: transparent;
  color: var(--sage);
  border: 1.5px solid var(--sage);
}
.btn-secondary:hover {
  background: var(--sage-pale);
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover {
  background: var(--bark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 50, 40, 0.15);
}
.btn-lg {
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
}
.btn-full {
  display: block;
  width: 100%;
}

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

/* ---- TOPIC CARDS ---- */
.topic-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(139, 158, 124, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(61, 50, 40, 0.08);
}
.topic-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.topic-icon.sage { background: var(--sage-pale); }
.topic-icon.gold { background: var(--gold-light); }
.topic-icon.warm { background: var(--warm); }
.topic-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--bark);
}
.topic-card p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--bark-light);
  margin-bottom: 1rem;
}
.topic-meta {
  font-size: 0.8rem;
  color: var(--sage);
  font-weight: 500;
}

/* ---- PRICING ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 2rem auto 0;
}
.pricing-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  border: 1.5px solid rgba(139, 158, 124, 0.2);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(61, 50, 40, 0.08);
}
.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(196, 162, 101, 0.15);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 100px;
}
.pricing-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--bark);
  margin-bottom: 0.25rem;
}
.pricing-price span {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--bark-light);
}
.pricing-desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--bark-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}
.pricing-features li {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--bark);
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}
.pricing-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 600;
}
.pricing-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--bark-light);
}

/* ---- AUTH FORMS ---- */
.auth-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 2rem;
}
.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(139, 158, 124, 0.15);
  box-shadow: 0 4px 20px rgba(61, 50, 40, 0.04);
}
.auth-card h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 0.25rem;
}
.auth-card .subtitle {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--bark-light);
  margin-bottom: 1.75rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bark);
  margin-bottom: 0.4rem;
}
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid rgba(139, 158, 124, 0.3);
  border-radius: 10px;
  background: var(--cream);
  color: var(--bark);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139, 158, 124, 0.1);
}
.form-submit {
  margin-top: 1.5rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--bark-light);
}
.auth-footer a {
  color: var(--sage);
  font-weight: 500;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ---- ALERTS ---- */
.alert {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(192, 57, 43, 0.15);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.15);
}

/* ---- PAMPHLET LIST ---- */
.pamphlet-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.pamphlet-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--white);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(139, 158, 124, 0.12);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pamphlet-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 50, 40, 0.06);
}
.pamphlet-item.locked {
  opacity: 0.65;
  cursor: default;
}
.pamphlet-item.locked:hover {
  transform: none;
  box-shadow: none;
}
.pamphlet-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--sage);
  flex-shrink: 0;
}
.pamphlet-item.locked .pamphlet-num {
  background: var(--warm);
  color: var(--bark-light);
}
.pamphlet-info { flex: 1; }
.pamphlet-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bark);
  margin-bottom: 0.15rem;
}
.pamphlet-info p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--bark-light);
}
.pamphlet-badge {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  flex-shrink: 0;
}
.badge-free {
  background: var(--sage-pale);
  color: var(--sage);
}
.badge-locked {
  background: var(--warm);
  color: var(--bark-light);
}
.badge-premium {
  background: var(--gold-light);
  color: var(--gold);
}

/* ---- TOPIC DETAIL HEADER ---- */
.topic-header {
  text-align: center;
  padding: 3rem 2rem 1rem;
}
.topic-header-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}
.topic-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--bark);
  margin-bottom: 0.5rem;
}
.topic-header p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--bark-light);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- PAMPHLET READER ---- */
.reader {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem;
}
.reader-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(139, 158, 124, 0.15);
}
.reader-topic {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}
.reader-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--bark);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.reader-subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--bark-light);
  line-height: 1.6;
}
.reader-meta {
  font-size: 0.8rem;
  color: var(--sage);
  margin-top: 1rem;
}

/* Reader content */
.reader-content {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--bark);
}
.reader-content p {
  margin-bottom: 1.5rem;
}
.reader-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.reader-content .opening {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--bark);
  line-height: 1.8;
}
.reader-content .exercise {
  background: var(--sage-pale);
  border-radius: 14px;
  padding: 1.75rem;
  margin: 2rem 0;
  border-left: 4px solid var(--sage);
}
.reader-content .exercise h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.reader-content .exercise p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.reader-content .exercise p:last-child {
  margin-bottom: 0;
}
.reader-content .closing {
  font-style: italic;
  color: var(--bark-light);
  border-top: 1px solid rgba(139, 158, 124, 0.15);
  padding-top: 2rem;
  margin-top: 2rem;
}

/* Reader navigation */
.reader-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(139, 158, 124, 0.15);
}
.reader-nav a {
  font-size: 0.9rem;
  color: var(--sage);
  text-decoration: none;
  font-weight: 500;
}
.reader-nav a:hover { text-decoration: underline; }

/* ---- ACCOUNT ---- */
.account-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}
.account-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(139, 158, 124, 0.15);
  margin-bottom: 1.5rem;
}
.account-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 1rem;
}
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(139, 158, 124, 0.08);
}
.account-row:last-child { border-bottom: none; }
.account-label {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--bark-light);
}
.account-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bark);
}
.status-active {
  color: var(--success);
  font-weight: 600;
}
.status-inactive {
  color: var(--bark-light);
}

/* ---- SUCCESS PAGE ---- */
.success-container {
  text-align: center;
  max-width: 550px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}
.success-container h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--bark);
  margin-bottom: 1rem;
}
.success-container p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--bark-light);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ---- FOOTER ---- */
footer {
  padding: 2rem 2rem;
  text-align: center;
  background: var(--bark);
  color: rgba(250, 248, 243, 0.5);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.5px;
}
footer span { color: var(--sage-light); }

/* ---- PROFESSION SELECTION ---- */
.profession-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.profession-card {
  background: var(--white);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  border: 2px solid rgba(139, 158, 124, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  color: var(--bark);
  display: block;
  width: 100%;
}
.profession-card:hover {
  border-color: var(--sage);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(61, 50, 40, 0.08);
}
.profession-card.selected {
  border-color: var(--sage);
  background: var(--sage-pale);
}
.profession-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.profession-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 0.35rem;
}
.profession-card p {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--bark-light);
  line-height: 1.5;
}

/* ---- FOR YOU CARD ---- */
.for-you-card {
  border: 2px solid var(--sage);
  background: linear-gradient(135deg, var(--white), var(--sage-pale));
  position: relative;
  overflow: hidden;
}
.for-you-card::after {
  content: 'Personalized';
  position: absolute;
  top: 12px;
  right: -28px;
  background: var(--sage);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.2rem 2.5rem;
  transform: rotate(45deg);
}
.for-you-card:hover {
  border-color: var(--bark);
}

/* ---- RECOMMENDED BADGE ---- */
.badge-recommended {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-pale);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.pamphlet-item.recommended {
  border-color: var(--sage-light);
  background: linear-gradient(135deg, var(--white) 85%, var(--sage-pale));
}

/* ---- PAMPHLET TOPIC LABEL (for-you page) ---- */
.pamphlet-topic-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--sage);
  margin-top: 0.35rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  nav { padding: 0.85rem 1.25rem; }
  .nav-links { gap: 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .page-header { padding: 2rem 1.5rem 1rem; }
  .page-content { padding: 1.5rem; }
  .reader { padding: 1.5rem; }
  .auth-container { padding: 1.5rem; }
  .topic-header { padding: 2rem 1.5rem 1rem; }
  .profession-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .nav-link { font-size: 0.8rem; }
  .btn-nav { padding: 0.4rem 1rem; font-size: 0.8rem; }
  .pamphlet-item { padding: 1rem; gap: 1rem; }
  .profession-grid { grid-template-columns: 1fr; }
}
