:root {
  --bg: #f7f4ee;
  --ink: #1d1b18;
  --muted: #6f675d;
  --line: #ddd4c6;
  --paper: #fffaf1;
  --accent: #b84a38;
  --accent-dark: #733225;
  --sage: #536b57;
  --sky: #d7e7ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(247, 244, 238, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a,
.post-card a,
.site-footer a {
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.nav a:hover,
.post-card a:hover,
.site-footer a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.hero {
  min-height: calc(100vh - 69px);
  display: grid;
  align-items: end;
  padding: clamp(48px, 9vw, 104px) clamp(20px, 5vw, 72px);
  color: #fffaf6;
  background:
    linear-gradient(90deg, rgba(18, 17, 15, 0.86), rgba(18, 17, 15, 0.35) 58%, rgba(18, 17, 15, 0.18)),
    url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1800&q=85") center / cover;
}

.hero-copy {
  width: min(680px, 100%);
  padding-bottom: clamp(12px, 4vh, 56px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffb199;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
}

h1 {
  max-width: 10ch;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 6.8rem);
  font-weight: 700;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 250, 246, 0.86);
  font-size: 1.15rem;
}

.button,
.signup button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.signup button:hover {
  background: var(--accent-dark);
}

.intro,
.section,
.newsletter,
.site-footer {
  padding-inline: clamp(20px, 5vw, 72px);
}

.intro {
  padding-block: clamp(40px, 8vw, 76px);
  background: var(--sky);
}

.intro p {
  width: min(900px, 100%);
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.25;
  text-align: center;
}

.section {
  padding-block: clamp(54px, 8vw, 92px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.post-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.post-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: clamp(22px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-card.featured {
  background: #223428;
  color: #fbf7ef;
}

.post-card h3 {
  max-width: 18ch;
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
}

.post-card p:not(.post-meta) {
  color: var(--muted);
}

.post-card.featured p:not(.post-meta) {
  color: rgba(251, 247, 239, 0.78);
}

.post-meta {
  margin-bottom: 18px;
  color: var(--sage);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-card.featured .post-meta {
  color: #aac4ad;
}

.post-card a {
  margin-top: auto;
  color: var(--accent);
  font-weight: 800;
}

.topics {
  background: #ffffff;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.topic-list a {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #fff;
  background: var(--sage);
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.topic-list a:nth-child(2) {
  background: var(--accent-dark);
}

.topic-list a:nth-child(3) {
  background: #2f5262;
}

.topic-list a:nth-child(4) {
  background: #5f5142;
}

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: end;
  gap: 28px;
  padding-block: clamp(46px, 7vw, 82px);
  color: #fffaf6;
  background: #1d1b18;
}

.newsletter .eyebrow {
  color: #ffb199;
}

.signup {
  display: flex;
  gap: 10px;
}

.signup input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  background: #fffaf6;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-block: 28px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .post-grid,
  .topic-list,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .post-card {
    min-height: 230px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .signup {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    justify-content: space-between;
  }

  .hero {
    min-height: 86vh;
    background:
      linear-gradient(0deg, rgba(18, 17, 15, 0.9), rgba(18, 17, 15, 0.44)),
      url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1200&q=80") center / cover;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
