/* First Crack — notes on brewing better coffee at home */

:root {
  --paper: #eef1eb;
  --card: #ffffff;
  --ink: #1c2620;
  --muted: #5a675e;
  --green: #2e5c44;
  --green-soft: rgba(46, 92, 68, 0.35);
  --copper: #b4693b;
  --copper-soft: rgba(180, 105, 59, 0.14);
  --line: #d8ded6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--copper);
}

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- header ---------- */

.site-header {
  background: var(--ink);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

.wordmark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}

.wordmark .crack {
  color: var(--copper);
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(238, 241, 235, 0.75);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- hero ---------- */

.hero {
  padding: 4.25rem 0 3.75rem;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--copper);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(2.3rem, 5.5vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0 0 1.3rem;
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--green);
  border-bottom: 5px solid var(--copper);
}

.hero p {
  font-size: 1.15rem;
  max-width: 44ch;
  color: var(--muted);
  margin: 0;
}

/* the floating sample recipe card */
.hero-recipe {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px double var(--copper);
  padding: 1.5rem 1.6rem 1.4rem;
  transform: rotate(1.5deg);
  box-shadow: 0 14px 30px -18px rgba(28, 38, 32, 0.35);
}

.hero-recipe h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.hero-recipe dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}

.hero-recipe dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-recipe dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.hero-recipe .card-note {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.9rem 0 0;
}

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-recipe { transform: none; max-width: 400px; }
}

/* ---------- recipe-card article listing ---------- */

.section-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px double var(--copper);
  padding: 1.9rem 1.75rem 1.5rem;
}

.chips {
  position: absolute;
  top: -0.85rem;
  left: 1.1rem;
  display: flex;
  gap: 0.4rem;
}

.chip {
  background: var(--ink);
  color: var(--paper);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.55rem;
  white-space: nowrap;
}

.chip.copper {
  background: var(--copper);
  color: #fff;
}

.card h2,
.card h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0.2rem 0 0.7rem;
}

.card h2 { font-size: 1.7rem; }
.card h3 { font-size: 1.22rem; }

.card p {
  color: var(--muted);
  margin: 0 0 1rem;
  font-size: 0.98rem;
}

.card a.title-link {
  color: var(--ink);
  text-decoration: none;
}

.card a.title-link:hover {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-decoration-thickness: 2px;
}

.read-more {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.featured {
  margin: 0 0 3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem 1.5rem;
  padding: 0;
  margin: 0 0 4rem;
  list-style: none;
}

/* ---------- about strip ---------- */

.about-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 2.75rem 0;
}

.about-strip .section-label { color: rgba(238, 241, 235, 0.6); }

.about-strip p {
  max-width: 64ch;
  margin: 0;
  color: rgba(238, 241, 235, 0.85);
}

.about-strip a { color: #d9a273; }

/* ---------- article pages ---------- */

.article-header {
  padding: 3.25rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0;
  max-width: 26ch;
}

.article-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.article-meta .sep { color: var(--copper); }

article.post {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

article.post h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 2.4rem 0 0.8rem;
}

article.post h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin: 1.8rem 0 0.6rem;
}

article.post ul,
article.post ol {
  padding-left: 1.4rem;
}

article.post li {
  margin-bottom: 0.5rem;
}

article.post blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 4px solid var(--copper);
  color: var(--muted);
  font-style: italic;
}

article.post table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}

article.post th,
article.post td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

article.post th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

article.post code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  background: var(--copper-soft);
  padding: 0.1rem 0.3rem;
  font-size: 0.85em;
}

/* recipe block: the in-article version of the index card */
.recipe {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px double var(--copper);
  padding: 1.6rem 1.5rem 1.3rem;
  margin: 2rem 0;
}

.recipe .chips { top: -0.85rem; }

.recipe h3 {
  margin: 0.2rem 0 0.8rem;
}

.recipe dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.25rem;
  margin: 0 0 0.8rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.84rem;
}

.recipe dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.recipe dd {
  margin: 0;
  font-weight: 600;
}

.recipe ol {
  margin: 0.5rem 0 0;
  padding-left: 1.3rem;
  font-size: 0.95rem;
}

.callout {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
}

.callout p { margin: 0.4rem 0 0; font-size: 0.98rem; }

.back-link {
  display: inline-block;
  margin: 1rem 0 2rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- static pages ---------- */

.page-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.page-body h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.page-body h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 2.2rem 0 0.7rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(238, 241, 235, 0.85);
  margin-top: 2rem;
}

.site-footer .wrap {
  padding-top: 2.25rem;
  padding-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  max-width: 52ch;
}

.site-footer a { color: #d9a273; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-nav a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- logo mark ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wm-mark {
  width: 26px;
  height: 26px;
  flex: none;
}
