/* Tropical Kveik Brews
   Palette: hop-leaf paper, stout-brown ink, hop green, amber.
   Type: Big Shoulders Display (headings), Source Serif 4 (text). Both self-hosted, SIL OFL. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #F2F5EA;
  --paper-2: #E4EAD5;
  --ink: #2B1B12;
  --ink-soft: #5E4D40;
  --hop: #3D6828;
  --amber: #9E580B;
  --line: #CBD3B9;
  --foam: #D9C3A0;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 40rem;
  --wide: 62rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1D1510;
    --paper-2: #2A2019;
    --ink: #EEE7D8;
    --ink-soft: #BCB09E;
    --hop: #A5CB76;
    --amber: #EFA23A;
    --line: #443830;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--hop);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.5rem 1rem;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.1rem;
  position: relative;
}
.site-header .wrap::after,
.site-footer .wrap::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  border-top: 2px solid var(--ink);
}
.site-header .wrap::after { bottom: 0; }
.site-footer .wrap::before { top: 0; }

.site-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.site-header ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.site-header nav a {
  color: var(--ink);
  font-size: 1.05rem;
  text-decoration: none;
}
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}

/* Type */

main { padding: 2.5rem 0 4rem; }

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
  margin: 0;
}
h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  margin: 3rem 0 0.9rem;
}
h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 1.75rem 0 0.25rem;
}

p { margin: 0 0 1.1rem; }

.prose { max-width: var(--measure); }
.prose ul { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.45rem; }

.lede {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34rem;
}

.crumbs {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}

/* Home hero and fermentation curve */

.hero-top {
  display: grid;
  gap: 1.25rem;
}
.hero h1 {
  font-size: clamp(3.4rem, 12vw, 7.75rem);
  line-height: 0.88;
  max-width: 8ch;
  margin: 0;
}
.hero .lede { margin: 0; }
@media (min-width: 52rem) {
  .hero-top {
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 3.5rem;
  }
  .hero .lede { padding-bottom: 0.5rem; }
}

.curve { margin: 2.25rem 0 0; }
.curve svg { width: 100%; height: auto; display: block; overflow: visible; }
.curve figcaption {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-top: 0.75rem;
}

.curve .axis { stroke: var(--line); stroke-width: 1.5; }
.curve .grav {
  fill: none;
  stroke: var(--hop);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.curve .temp {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
}
.curve .done {
  fill: var(--paper);
  stroke: var(--hop);
  stroke-width: 3;
}
.curve text {
  font-family: var(--text);
  font-size: 15px;
  fill: var(--ink-soft);
}
.curve .lbl-grav { fill: var(--hop); font-weight: 650; }
.curve .lbl-temp { fill: var(--amber); font-weight: 650; }

/* On small screens the SVG shrinks, so draw labels and lines larger in SVG units */
@media (max-width: 36rem) {
  .curve text { font-size: 30px; }
  .curve .grav { stroke-width: 11; }
  .curve .temp { stroke-width: 6; }
  .curve .done { stroke-width: 6; }
  .curve .axis { stroke-width: 3; }
}

@media (prefers-reduced-motion: no-preference) {
  .curve .grav {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: pour 1.8s 0.2s cubic-bezier(0.3, 0.7, 0.2, 1) forwards;
  }
  .curve .done,
  .curve .done-lbl {
    opacity: 0;
    animation: appear 0.4s 1.9s forwards;
  }
}
@keyframes pour { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Beer colour: a small glass with foam, and a wide "pour" band on brew posts */

.chip {
  display: inline-block;
  width: 1.3rem;
  height: 2.1rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px 2px 6px 6px;
  background:
    linear-gradient(var(--foam), var(--foam)) top / 100% 0.4rem no-repeat,
    var(--srm, #C8902E);
}

.pour {
  max-width: var(--measure);
  height: 1rem;
  margin: 0.25rem 0 1.75rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1.5px var(--ink);
  background:
    linear-gradient(var(--foam), var(--foam)) top / 100% 0.3rem no-repeat,
    var(--srm, #C8902E);
}

/* Brew log list (home) */

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.log li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.15rem 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.log .chip { grid-row: 1 / span 2; }
.log .name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.65rem;
  line-height: 1.05;
  color: var(--ink);
}
.log a.name { text-decoration: none; }
.log a.name:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.log .meta {
  grid-column: 2;
  font-size: 1rem;
  color: var(--ink-soft);
}
.log .status {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: right;
}

@media (max-width: 36rem) {
  .log li { grid-template-columns: auto 1fr; }
  .log .chip { grid-row: 1 / span 3; align-self: start; }
  .log .status { grid-column: 2; grid-row: auto; text-align: left; }
}

/* Tables */

.table-scroll {
  overflow-x: auto;
  margin: 0.5rem 0 1.5rem;
  max-width: var(--wide);
}
.table-scroll.narrow { max-width: var(--measure); }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
  font-variant-numeric: tabular-nums lining-nums;
}
th, td {
  text-align: left;
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
thead th {
  font-weight: 650;
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
th.num, td.num { text-align: right; }
tfoot td { font-weight: 650; border-bottom: none; }
td .chip { width: 1rem; height: 1.6rem; vertical-align: middle; }
td.when { color: var(--ink-soft); }
.recipe-list { min-width: 30rem; }
.recipe-list .soon { font-size: 0.9rem; color: var(--ink-soft); }

/* At-a-glance stats */

.glance {
  max-width: var(--measure);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  margin: 0.5rem 0 0;
  border-top: 2px solid var(--ink);
}
.glance div {
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.glance dt { font-size: 0.9rem; color: var(--ink-soft); }
.glance dd {
  margin: 0;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Tip callout */

.tip {
  max-width: var(--measure);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--paper-2);
  border-left: 4px solid var(--amber);
}
.tip p:last-child { margin-bottom: 0; }

/* Placeholders to fill in before sharing: search the files for class="fill" */

.fill {
  background: color-mix(in srgb, var(--amber) 22%, transparent);
  outline: 1.5px dashed var(--amber);
  outline-offset: 1px;
  border-radius: 2px;
  padding: 0 0.2em;
}
.shot-placeholder {
  max-width: var(--measure);
  margin: 1rem 0 1.5rem;
  padding: 2rem 1.25rem;
  border: 2px dashed var(--amber);
  color: var(--ink-soft);
  text-align: center;
}

figure { margin: 1rem 0 1.5rem; }
figure img { border: 1px solid var(--line); }
figure figcaption { font-size: 0.95rem; color: var(--ink-soft); margin-top: 0.5rem; }

.post-nav {
  max-width: var(--measure);
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

/* Footer */

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 3rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
