/* ============================================================
   Homepage Sections — Intro, Featured Posts, Newsletter
   Depends on: css/design-system.css for tokens
   ============================================================ */

/* ---- Scroll reveal (JS adds .visible) ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   INTRO / POSITIONING SECTION
   Left-aligned, spacious
   ============================================================ */
.intro-section {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--section-padding);
}

.intro-section .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* First sentence — large, confident */
.intro-statement {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  letter-spacing: -0.01em;
  max-width: 780px;
}

.intro-statement strong {
  font-weight: 500;
  color: var(--color-text);
}

/* Proof bar — mono, spaced, no dot separator */
.proof-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-8);
}

.proof-item {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hide the old dot dividers */
.proof-divider {
  display: none;
}

@media (max-width: 600px) {
  .proof-bar {
    gap: var(--space-5) var(--space-6);
  }
}

/* ============================================================
   FEATURED POSTS — Typographic list, not numbered grid
   ============================================================ */
.featured-section {
  background: var(--color-bg);
  padding-block: var(--section-padding);
}

.featured-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* "Featured Writing" eyebrow */
.featured-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
}

.featured-all-link {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast);
  letter-spacing: 0.01em;
}

.featured-all-link:hover {
  color: var(--color-text);
}

.featured-all-link:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Full-width typographic list — replaces grid */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Post card: typographic list item */
.post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-8) 0 var(--space-8) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  border-left: 2px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: border-left-color 0.3s ease;
  position: relative;
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.post-card:hover::before { opacity: 1; }

.post-card:first-child {
  border-top: 1px solid var(--color-border);
}

.post-card:hover {
  border-left-color: var(--color-accent);
}

/* Watermark number */
.post-card-number {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 6rem;
  font-weight: 700;
  color: rgba(255,255,255,0.025);
  line-height: 1;
  pointer-events: none;
  font-family: var(--font-display);
  user-select: none;
  display: block;
}

/* Title: Space Grotesk 500, text-xl */
.post-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.01em;
  flex: 1;
  transition: color var(--duration-fast);
  margin: 0;
}

/* Pillar tag — mono, small, muted */
.post-card-pillar {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Arrow on right */
.post-card-arrow {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-out),
              color var(--duration-fast);
  /* strip "Read article →" text — just the arrow */
}

/* Hover states */
.post-card:hover .post-card-title {
  color: var(--color-accent);
}

.post-card:hover .post-card-arrow {
  transform: translateX(4px);
  color: var(--color-text);
}

.post-card:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .post-card {
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-6) 0;
  }
  .post-card-title {
    font-size: var(--text-lg);
    flex-basis: 100%;
  }
  .post-card-pillar {
    font-size: 0.65rem;
  }
}

/* ============================================================
   NEWSLETTER SECTION — Minimal, no card background
   ============================================================ */
.newsletter-section {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding-block: var(--section-padding);
}

.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

/* Eyebrow: mono */
.newsletter-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

/* Large Space Grotesk headline */
.newsletter-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.newsletter-desc {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
}

/* Minimal form — bottom border only on input */
.newsletter-form {
  display: flex;
  gap: var(--space-4);
  max-width: 480px;
  margin: 0 auto;
  align-items: flex-end;
}

.newsletter-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--duration-fast);
  font-family: var(--font-body);
  min-width: 0;
}

.newsletter-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.newsletter-input:focus {
  border-bottom-color: var(--color-text);
}

.newsletter-input:focus-visible {
  border-bottom-color: var(--color-highlight);
}

/* Submit: text button with arrow */
.newsletter-btn {
  background: none;
  color: var(--color-text);
  border: none;
  padding: var(--space-3) 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--duration-fast),
              letter-spacing var(--duration-base) var(--ease-out);
  flex-shrink: 0;
}

.newsletter-btn:hover {
  opacity: 0.7;
  letter-spacing: 0.03em;
}

.newsletter-btn:active {
  opacity: 0.5;
}

.newsletter-btn:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 4px;
}

.newsletter-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  letter-spacing: 0.05em;
}

@media (max-width: 500px) {
  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-5);
  }
  .newsletter-btn {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-3);
    text-align: left;
  }
}
