/* ==============================================
   essays.css
   Essay card grid + featured card.
   Used on: homepage (index.html), blog index.
   ============================================== */

/* Hero header (warm bg, Cormorant) */
.home-hero {
  background: var(--hero-bg);
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 80px);
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 70% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
}

.home-hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.55);
  margin-bottom: 16px;
}

.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  font-weight: 300;
  line-height: 1.06;
  color: #F5F0E8;
  margin: 0 0 22px;
}

.hero-headline em {
  font-style: italic;
  color: var(--amber-light);
}

.hero-sub {
  font-family: var(--font-essay-body);
  font-size: 1.05rem;
  line-height: 1.82;
  color: rgba(245, 240, 232, 0.72);
  max-width: 420px;
  margin: 0 0 32px;
  font-style: italic;
}

.hero-sub strong {
  color: rgba(245, 240, 232, 0.9);
  font-weight: 500;
  font-style: normal;
}

.hero-nl {
  display: flex;
  max-width: 380px;
}

.hero-nl input {
  flex: 1;
  background: rgba(245, 240, 232, 0.1);
  border: 1px solid rgba(245, 240, 232, 0.22);
  border-right: none;
  padding: 12px 16px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: #F5F0E8;
  outline: none;
  border-radius: 3px 0 0 3px;
}

.hero-nl input::placeholder {
  color: rgba(245, 240, 232, 0.32);
}

.hero-nl button {
  background: var(--amber);
  color: var(--ink);
  border: none;
  padding: 12px 20px;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: 0 3px 3px 0;
  transition: background 0.2s;
}

.hero-nl button:hover {
  background: var(--amber-light);
}

/* Hero visual (quote card) */
.hero-quote-card {
  background: rgba(245, 240, 232, 0.08);
  border: 2px solid var(--amber);
  border-radius: 6px;
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero-quote-card::before {
  content: '\201C';
  position: absolute;
  top: -28px;
  left: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 9rem;
  color: rgba(245, 240, 232, 0.1);
  line-height: 1;
  pointer-events: none;
}

.hero-quote-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
}

.hero-quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  color: #F5F0E8;
  margin-bottom: 18px;
}

.hero-quote-attr {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-light);
}

/* Hero fade-in animations */
.hero-headline {
  animation: fadeUp 0.4s 0.05s ease both;
}

.hero-sub {
  animation: fadeUp 0.4s 0.13s ease both;
}

.hero-nl {
  animation: fadeUp 0.4s 0.2s ease both;
}

/* Essays section */
.essays-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) clamp(20px, 5vw, 72px);
}

.essays-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}

.see-all {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  border-bottom: 1px solid var(--amber);
  padding-bottom: 1px;
  transition: color 0.2s;
  cursor: pointer;
}

.see-all:hover {
  color: var(--amber-dark);
  border-color: var(--amber-dark);
}

/* Featured post */
.post-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--amber);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--bg-card);
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
}

.post-featured:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.post-featured:hover .essay-title {
  color: var(--amber-dark);
}

.pf-img {
  overflow: hidden;
}

.pf-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.post-featured:hover .pf-img img {
  transform: scale(1.03);
}

.pf-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Essay titles — Libre Baskerville */
.essay-title {
  font-family: var(--font-essay-heading);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.essay-title-sm {
  font-family: var(--font-essay-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 10px;
}

/* Essay excerpts — Lora */
.essay-excerpt {
  font-family: var(--font-essay-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.essay-excerpt-featured {
  font-family: var(--font-essay-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.78;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* Grid cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  cursor: pointer;
}

.post-card:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
  border-color: #D0D0D0;
}

.post-card:hover .essay-title-sm {
  color: var(--amber-dark);
}

.pc-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-subtle);
}

.pc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.post-card:hover .pc-img img {
  transform: scale(1.04);
}

.pc-body {
  padding: 22px;
}

/* Blog index page */
.blog-index-hero {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--amber);
  padding: clamp(38px, 5vw, 54px) clamp(20px, 5vw, 72px) clamp(34px, 4vw, 44px);
}

.blog-index-hero-inner {
  max-width: 740px;
  margin: 0 auto;
}

.blog-index-hero .eyebrow {
  margin: 0 0 16px !important;
}

.blog-index-hero-inner > * {
  margin-top: 0;
}

.blog-index-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--ink);
  margin-top: 0 !important;
  margin-bottom: 20px;
  line-height: 1.1;
}

.blog-index-sub {
  font-family: var(--font-essay-body);
  font-style: normal;
  font-weight: 400;
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text-muted);
  max-width: 560px;
}

.blog-index-body {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) clamp(20px, 5vw, 72px);
}

.bi-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.bi-filter {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.bi-filter:hover,
.bi-filter.active {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}

.bi-essay-list {
  display: flex;
  flex-direction: column;
}

.bi-essay-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.bi-essay-item:first-child {
  border-top: 1px solid var(--border);
}

.bi-essay-item:hover {
  background: var(--bg-subtle);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.bi-essay-item:hover .bi-essay-title {
  color: var(--amber-dark);
}

.bi-essay-thumb {
  aspect-ratio: 1;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.bi-essay-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bi-essay-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 5px;
}

.bi-essay-title {
  font-family: var(--font-essay-heading);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 6px;
}

.bi-essay-excerpt {
  font-family: var(--font-essay-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 8px;
}

.bi-essay-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  color: var(--text-faint);
}
