/* The Matcha Journal — shared styles */

:root {
  --paper: #f4efe2;
  --paper-2: #ebe4d1;
  --ink: #1e2418;
  --ink-soft: #5b6150;
  --rule: #d6ccb4;
  --matcha: #55732a;
  --matcha-deep: #26361a;
  --matcha-bright: #9ab846;
  --cream: #f4efe2;
  --shu: #b6452c;
  --measure: 40rem;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --jp: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14180f;
    --paper-2: #1c2116;
    --ink: #ebe7da;
    --ink-soft: #a8ac9b;
    --rule: #333a2a;
    --matcha: #a9c56f;
    --shu: #e0775c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
}

a { color: var(--matcha); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
img, svg { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .wrap { padding: 0 2rem; } }
.measure { max-width: var(--measure); }

/* Header (sits on the dark band) */
.site-header { background: var(--matcha-deep); color: var(--cream); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(244, 239, 226, 0.15);
}
.logo {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 1.4rem; font-weight: 600; color: var(--cream);
  text-decoration: none; letter-spacing: -0.01em;
}
.logo em { font-weight: 400; color: var(--matcha-bright); }
.seal {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; background: var(--shu); color: #fff;
  font-family: var(--jp); font-size: 1.05rem; font-weight: 600; line-height: 1;
}
.site-nav { display: flex; gap: 1.5rem; font-family: var(--sans); font-size: 0.9rem; }
.site-nav a { color: rgba(244, 239, 226, 0.75); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cream); }

/* Hero (home) */
.hero { background: var(--matcha-deep); color: var(--cream); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  padding-top: 3.5rem; padding-bottom: 4rem; align-items: center;
}
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; padding-top: 5rem; padding-bottom: 5.5rem; }
}
.hero .kicker { color: var(--matcha-bright); }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; font-weight: 500;
  letter-spacing: -0.025em; margin: 0 0 1.5rem;
}
.hero h1 em { color: var(--matcha-bright); }
.hero p.lede { font-size: 1.25rem; color: rgba(244, 239, 226, 0.8); max-width: 32rem; margin: 0 0 2rem; }
.hero-art { position: relative; justify-self: center; width: min(100%, 26rem); }
.hero-art img { width: 100%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35)); }
.hero-art .vertical {
  position: absolute; top: 0; right: -0.5rem;
  writing-mode: vertical-rl; font-family: var(--jp); font-size: 1.1rem;
  letter-spacing: 0.4em; color: rgba(244, 239, 226, 0.6);
}

.button {
  display: inline-block; font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  padding: 0.85rem 1.4rem; background: var(--cream); color: var(--matcha-deep);
  text-decoration: none; border: 1px solid var(--cream);
}
.button:hover { background: transparent; color: var(--cream); }

/* Labels */
.kicker {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--matcha); margin: 0 0 0.9rem;
}

/* Section headings */
.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 500; margin: 0; letter-spacing: -0.015em; }
.section-head .jp { font-family: var(--jp); color: var(--shu); font-size: 1rem; letter-spacing: 0.2em; }

/* Three facts */
.facts { display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: fact; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { padding: 1.5rem 0; border-top: 2px solid var(--ink); counter-increment: fact; }
@media (min-width: 760px) { .fact { padding: 1.5rem 1.75rem 0 0; } }
.fact::before {
  content: "0" counter(fact); display: block; font-family: var(--sans);
  font-size: 0.85rem; color: var(--shu); margin-bottom: 0.75rem; letter-spacing: 0.08em;
}
.fact h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.25; margin: 0 0 0.5rem; }
.fact p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }

/* Featured article */
.feature {
  display: grid; grid-template-columns: 1fr; background: var(--paper-2);
  border: 1px solid var(--rule); text-decoration: none; color: inherit;
}
@media (min-width: 760px) { .feature { grid-template-columns: 0.8fr 1.2fr; } }
.feature-art { background: var(--matcha-deep); display: grid; place-items: center; padding: 2rem; min-height: 14rem; }
.feature-art .compare { display: flex; gap: 1.25rem; align-items: center; }
.feature-art .swatch { width: 6rem; height: 6rem; border-radius: 50%; }
.feature-art .swatch.a { background: #8db23a; box-shadow: inset 0 0 0 6px #6b8d22; }
.feature-art .swatch.b { background: #8f9440; box-shadow: inset 0 0 0 6px #6f7330; }
.feature-art .vs { font-family: var(--serif); font-style: italic; color: var(--cream); font-size: 1.3rem; }
.feature-body { padding: 2rem; }
@media (min-width: 760px) { .feature-body { padding: 2.5rem 3rem; } }
.feature h3 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 500; line-height: 1.15; margin: 0 0 0.8rem; letter-spacing: -0.015em; }
.feature p { color: var(--ink-soft); margin: 0 0 1.25rem; }
.feature .more { font-family: var(--sans); font-size: 0.9rem; color: var(--matcha); }
.feature:hover h3 { color: var(--matcha); }

/* Article list */
.entry {
  display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem;
  padding: 1.5rem 0; border-top: 1px solid var(--rule);
}
.entry time { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); padding-top: 0.35rem; }
.entry h3 { font-size: 1.5rem; font-weight: 500; line-height: 1.2; margin: 0 0 0.4rem; }
.entry h3 a { color: var(--ink); text-decoration: none; }
.entry h3 a:hover { color: var(--matcha); }
.entry p { margin: 0; color: var(--ink-soft); }
@media (max-width: 600px) { .entry { grid-template-columns: 1fr; gap: 0.25rem; } }

/* Article and plain pages */
.page-head { background: var(--matcha-deep); color: var(--cream); }
.page-head .wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.page-head .kicker { color: var(--matcha-bright); }
.page-head h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem); line-height: 1.08; font-weight: 500;
  letter-spacing: -0.02em; margin: 0 0 1rem; max-width: 22ch;
}
.page-head .dek { font-size: 1.3rem; color: rgba(244, 239, 226, 0.8); margin: 0 0 1.5rem; line-height: 1.5; max-width: 36rem; }
.byline { font-family: var(--sans); font-size: 0.85rem; color: rgba(244, 239, 226, 0.65); }

.article { padding: 3rem 0 4rem; }
.article h2 { font-size: 1.75rem; font-weight: 500; line-height: 1.25; margin: 3rem 0 0.9rem; letter-spacing: -0.01em; }
.article h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 0.5rem; }
.article p, .article ul, .article ol { margin: 0 0 1.15rem; }
.article li { margin-bottom: 0.5rem; }

.answer { background: var(--paper-2); border-left: 4px solid var(--shu); padding: 1.5rem 1.5rem 1.5rem 1.75rem; margin: 0 0 2.5rem; }
.answer .label { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shu); margin: 0 0 0.5rem; }
.answer p:last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; margin-bottom: 1.25rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--matcha-deep); color: var(--cream); font-family: var(--sans); font-size: 0.9rem;
}

table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 1rem; }
th, td { text-align: left; padding: 0.75rem 0.75rem 0.75rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; border-bottom: 2px solid var(--ink); }
tbody td:first-child { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }
.table-scroll { overflow-x: auto; }

.note { font-size: 1rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 3rem; }

/* Footer */
.site-footer { background: var(--matcha-deep); color: rgba(244, 239, 226, 0.7); font-family: var(--sans); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 2.5rem; padding-bottom: 3rem; }
.site-footer a { color: rgba(244, 239, 226, 0.7); }
.site-footer .logo { font-size: 1.1rem; }
