@import "tokens.css";

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule);
  padding-top: clamp(24px, 5vw, 48px);
}

.site-header__inner {
  width: min(var(--measure), calc(100% - (2 * var(--gutter))));
  margin: 0 auto;
  padding: 0;
}

.site-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  text-decoration: none;
}

.site-title:hover {
  opacity: 0.85;
  background: transparent;
}

.site-nav {
  margin-top: 0.8rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
}

.site-nav a {
  margin-right: 1.6rem;
  font-family: var(--ui-sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.page {
  padding: clamp(20px, 4vw, 48px) var(--gutter);
}

.recipe {
  max-width: var(--measure);
  margin: 0 auto;
}

.recipe__header {
  margin: 0 0 2rem;
}

.page-title,
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.recipe__deck {
  margin: 0.75rem 0 0;
  color: var(--ink-muted);
}

.meta {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.page-content {
  margin: 0;
}

.recipe__section {
  margin: 2.2rem 0 0;
}

h2 {
  margin: 2.4rem 0 1rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h3 {
  margin: 1.4rem 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

p,
ul,
ol,
table,
blockquote {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

.page-content ol li + li {
  margin-top: 0.9rem;
}

.recipe-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.recipe-list li + li {
  margin-top: 0.5rem;
}

.recipe-contents {
  padding-bottom: 1.2rem;
}

.recipe-contents__header {
  margin-bottom: 1.4rem;
}

.contents-nav {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--ui-sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contents-nav a {
  margin-right: 1rem;
  text-decoration: none;
  color: var(--ink-muted);
}

.contents-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contents-group {
  margin-top: 1.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: clamp(100px, 18vw, 180px);
}

.contents-group h2 {
  margin-top: 0.6rem;
}

.contents-list li {
  border-bottom: 1px dotted var(--rule);
  padding: 0.32rem 0;
}

.contents-list li + li {
  margin-top: 0;
}

.contents-list h3 {
  margin: 0;
  font-size: 1.2rem;
}

.home {
  text-align: center;
  padding-top: clamp(28px, 8vw, 72px);
}

.home__header {
  margin-bottom: 1.8rem;
}

.home-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.home-action {
  display: inline-block;
  min-width: 10.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--ui-sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
}

.home-action:hover {
  color: var(--ink);
  background: rgba(47, 95, 109, 0.08);
  text-decoration: none;
}

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

a:hover {
  background: rgba(47, 95, 109, 0.08);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.4rem;
}

.page-content th,
.page-content td {
  padding: 0.45rem 0.2rem;
  vertical-align: baseline;
}

.page-content thead th,
.page-content th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
}

.page-content tbody td {
  border-bottom: 1px dotted var(--rule);
}

.page-content td:nth-child(2),
.page-content th:nth-child(2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.page-content blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 1px solid var(--rule);
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink-muted);
}

::selection {
  background: rgba(47, 95, 109, 0.18);
  color: var(--ink);
}
