/* ─────────────────────────────────────────────────────────────────
   FeelGoodNews — style.css
   Shared stylesheet used across all pages of the site.
───────────────────────────────────────────────────────────────── */

/* ─── CSS Variables ─────────────────────────────────────────────── */
:root {
  --yellow:       #FFD234;
  --yellow-light: #FFF3B0;
  --yellow-dark:  #E8B800;
  --amber:        #FF9F1C;
  --white:        #FFFFFF;
  --cream:        #FFFDF4;
  --text:         #1A1400;
  --text-muted:   #7A6A20;
  --border:       #F0E080;
  --shadow:       rgba(232, 184, 0, 0.18);
  --radius:       20px;
  --radius-sm:    12px;
}

/* ─── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

img { display: block; width: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }

/* ─── Nav ───────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  box-shadow: 0 2px 16px var(--shadow);
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo span { color: var(--amber); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--yellow);
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.5rem 1.3rem;
  border-radius: 50px;
  border: 2px solid var(--yellow-dark);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

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

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 520px;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--amber) 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.35);
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--text);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: rgba(26,20,0,0.75);
  margin-bottom: 2rem;
  max-width: 420px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn-primary {
  background: var(--text);
  color: var(--yellow);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(26,20,0,0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,20,0,0.22);
}

.btn-secondary {
  background: rgba(255,255,255,0.4);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.6); }

/* ─── Featured Story Card (hero right) ─────────────────────────── */
.hero-featured {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(26,20,0,0.18);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hero-featured-img {
  height: 200px;
  background: linear-gradient(135deg, #FFF3B0, #FFD234);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  overflow: hidden;
}

.hero-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-featured-body { padding: 1.4rem; }

.featured-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.hero-featured-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.hero-featured-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.read-more {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s;
}

.read-more:hover { gap: 0.6rem; }

/* ─── Section Layout ────────────────────────────────────────────── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 900;
}

.section-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amber);
}

.section-link:hover { text-decoration: underline; }

/* ─── Story Card Grid ───────────────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
}

.story-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
}

.story-card-img {
  height: 190px;
  background: var(--yellow-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  overflow: hidden;
}

.story-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card-body { padding: 1.3rem; }

.story-tag {
  display: inline-block;
  background: var(--yellow-light);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.7rem;
}

.story-card-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.story-card-body p {
  font-size: 0.87rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2px solid var(--yellow-dark);
  flex-shrink: 0;
}

/* ─── Divider ───────────────────────────────────────────────────── */
.divider {
  border: none;
  height: 2px;
  background: var(--border);
  margin: 0 2rem;
}

/* ─── Newsletter ────────────────────────────────────────────────── */
.newsletter {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--amber) 100%);
  border-radius: var(--radius);
  padding: 3.5rem;
  text-align: center;
  margin: 0 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}

.newsletter h2 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.6rem;
}

.newsletter p {
  font-weight: 600;
  color: rgba(26,20,0,0.75);
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.85rem 1.3rem;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.55);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.newsletter-form input::placeholder { color: rgba(26,20,0,0.5); }

.newsletter-form input:focus {
  background: rgba(255,255,255,0.8);
  border-color: var(--white);
}

.newsletter-form button {
  background: var(--text);
  color: var(--yellow);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}

.newsletter-form button:hover { transform: translateY(-2px); }

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  background: var(--text);
  color: rgba(255,243,176,0.75);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
}

footer .footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--yellow);
  transition: opacity 0.2s;
}

footer a:hover { opacity: 0.7; }

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-text     { animation: fadeUp 0.7s ease both; }
.hero-featured { animation: fadeUp 0.7s ease 0.2s both; }
.story-card    { animation: fadeUp 0.6s ease both; }
.story-card:nth-child(2) { animation-delay: 0.1s; }
.story-card:nth-child(3) { animation-delay: 0.2s; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-featured { display: none; }
  .newsletter { padding: 2.5rem 1.5rem; margin: 0 1rem 3rem; }
  .newsletter-form { flex-direction: column; }
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
}