/* recipe.aizu.my - The Software Chef. A warm cookbook, light only. */
:root {
  --paper: #F5EDE0;
  --paper-2: #ECE1CF;
  --paper-3: #E3D4BC;
  --ink: #2B2118;
  --ink-2: #5C4A39;
  --ink-3: #8A7862;
  --tomato: #C4462B;
  --tomato-deep: #9E3620;
  --herb: #5E7A4A;
  --rule: rgba(43, 33, 24, .18);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  /* faint paper grain, baked into the background colour's own layer */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tomato-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tomato); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
strong { font-weight: 600; }

.kicker {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tomato);
  margin: 0 0 14px;
}

/* ---------------- home ---------------- */
.hero { position: relative; }
.hero-img { width: 100%; height: min(92vh, 860px); object-fit: cover; object-position: 70% 50%; }
.hero::after { /* soften the top-left of the table so the title sits on calm ground */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 237, 224, .94) 0%, rgba(245, 237, 224, .86) 26%, rgba(245, 237, 224, .4) 42%, rgba(245, 237, 224, 0) 56%),
    radial-gradient(ellipse 60% 70% at 0% 0%, rgba(245, 237, 224, .6) 0%, rgba(245, 237, 224, 0) 70%);
}
.hero-text {
  position: absolute; z-index: 1; top: clamp(48px, 10vh, 120px); left: var(--gutter);
  max-width: 520px;
}
.hero h1 { font-size: clamp(52px, 7.4vw, 104px); font-weight: 400; font-style: italic; color: var(--ink); }
.hero-by { font-family: var(--hand); font-size: 34px; color: var(--tomato-deep); margin: 6px 0 22px; transform: rotate(-2deg); transform-origin: left; }
.hero-lede { font-size: 21px; line-height: 1.55; color: var(--ink); margin: 0; max-width: 30ch; }

.home { padding-inline: var(--gutter); }

.menu { max-width: 760px; margin: 0 auto; padding-block: clamp(72px, 12vw, 140px) 88px; text-align: center; }
.menu h2 { font-size: clamp(44px, 6vw, 72px); font-style: italic; font-weight: 400; }
.menu h2::after { /* a small hand-set ornament under the title */
  content: '~ \2766 ~'; display: block; font-size: 20px; font-style: normal; color: var(--tomato); margin-top: 12px; letter-spacing: .3em;
}
.menu-sub { color: var(--ink-3); font-style: italic; margin: 14px 0 0; }
.menu-dish { width: min(380px, 84%); margin: 32px auto 8px; }
.menu-dish, .dish-img {
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}
.menu-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.menu-item { padding-block: 26px; }
.menu-item + .menu-item { border-top: 1px dashed var(--rule); }
.menu-item a { display: block; color: inherit; text-decoration: none; }
.mi-no { display: block; font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--tomato); }
.mi-line { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; }
.mi-name { font-family: var(--display); font-size: clamp(28px, 3.6vw, 38px); }
.mi-dots { flex: 1; border-bottom: 2px dotted var(--ink-3); transform: translateY(-8px); min-width: 24px; }
.mi-serves { font-style: italic; color: var(--ink-2); white-space: nowrap; }
.mi-note { display: block; color: var(--ink-2); margin-top: 4px; }
.menu-item a:hover .mi-name { color: var(--tomato-deep); }
.menu-item a:hover .mi-name::after { content: ' \2192'; }
.stove { opacity: .52; }
.stove .mi-no { color: var(--ink-3); }

.rules {
  margin-inline: calc(var(--gutter) * -1);
  padding: clamp(64px, 10vw, 112px) var(--gutter);
  background: var(--paper-2);
}
.rules h2 { text-align: center; font-size: clamp(38px, 5vw, 56px); font-style: italic; font-weight: 400; }
.rules-list {
  list-style: none; counter-reset: r; padding: 0; margin: 56px auto 0; max-width: 1100px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 5vw, 72px);
}
.rules-list li { counter-increment: r; color: var(--ink-2); }
.rules-list li::before {
  content: counter(r); display: block; font-family: var(--display); font-style: italic; font-size: 76px; line-height: 1; color: var(--tomato); margin-bottom: 12px;
}
.rules-list strong { display: block; font-family: var(--display); font-weight: 500; font-size: 26px; color: var(--ink); margin-bottom: 8px; line-height: 1.2; }
.rules-more { text-align: center; margin: 56px 0 0; font-family: var(--display); font-size: 21px; }

/* EPL: the only programming language you already know */
.epl { max-width: 1100px; margin: 0 auto; padding-block: clamp(72px, 12vw, 140px) 0; text-align: center; }
.epl h2 { font-size: clamp(40px, 5.6vw, 76px); font-weight: 400; max-width: 16ch; margin: 0 auto; }
.epl-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(20px, 4vw, 56px); margin: 64px auto 0; max-width: 980px; text-align: left; }
.epl-code { justify-self: end; }
.epl-lang { font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.epl-code .epl-lang { font-size: 18px; letter-spacing: .14em; }
.epl-english .epl-lang {
  display: inline-block; font-size: clamp(40px, 4.6vw, 56px); font-weight: 700; letter-spacing: .06em; line-height: 1;
  color: var(--tomato-deep); margin-bottom: 14px; padding: 2px 12px 6px 10px;
  /* a highlighter swash behind the word */
  background: linear-gradient(100deg, rgba(196, 70, 43, 0) 2%, rgba(196, 70, 43, .2) 6%, rgba(196, 70, 43, .16) 92%, rgba(196, 70, 43, 0) 98%) 0 72% / 100% 55% no-repeat;
  transform: rotate(-2deg); transform-origin: left;
}
.epl-mark { color: var(--tomato-deep); font-weight: 700; font-size: 1.35em; letter-spacing: .1em; }
.epl-code pre { margin: 0; overflow-x: auto; font: 15px/1.65 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--ink-3); }
.epl-or { font-family: var(--hand); font-size: 30px; color: var(--ink-3); }
.epl-sentence { font-family: var(--display); font-style: italic; font-size: clamp(26px, 3vw, 36px); line-height: 1.25; margin: 0; }
.epl-caption { font-family: var(--hand); font-size: 30px; color: var(--tomato-deep); margin: 40px 0 0; transform: rotate(-1.5deg); }
.epl-spec {
  display: grid; grid-template-columns: repeat(3, 1fr); margin: 72px auto 0; max-width: 900px; text-align: left;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
}
.epl-spec > div { padding: 18px 20px; border-bottom: 1px dotted var(--rule); }
.epl-spec > div:nth-last-child(-n+3) { border-bottom: 0; }
.epl-spec dt { font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--herb); }
.epl-spec dd { margin: 4px 0 0; font-family: var(--display); font-size: 22px; }
.epl-more { margin: 32px 0 0; font-family: var(--display); font-size: 20px; }

/* ---------------- recipe + kitchen shared top bar ---------------- */
.rtop { display: flex; justify-content: space-between; align-items: baseline; padding: 26px var(--gutter); }
.back { font-family: var(--display); text-decoration: none; font-size: 18px; }
.rtop-brand { font-family: var(--display); font-style: italic; color: var(--ink-3); }

/* ---------------- recipe ---------------- */
.recipe { padding-inline: var(--gutter); max-width: 1280px; margin: 0 auto; }
.dish { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: 24px 48px; }
.dish h1 { font-size: clamp(56px, 8vw, 112px); font-weight: 400; font-style: italic; }
.tagline { font-size: 24px; line-height: 1.45; color: var(--ink-2); margin: 20px 0 0; max-width: 28ch; }
.dish-img { width: 100%; }

.card {
  display: grid; grid-template-columns: repeat(6, 1fr); margin: 0;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
}
.card > div { padding: 18px 18px 20px; }
.card > div + div { border-left: 1px solid var(--rule); }
.card dt { font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--tomato); }
.card dd { margin: 6px 0 0; font-size: 17px; line-height: 1.4; }

.rgrid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-block: 64px 96px; }
.side-h { font-size: 30px; font-style: italic; font-weight: 400; margin-top: 48px; }
.side-h:first-child { margin-top: 0; }
.side-sub { font-size: 16px; color: var(--ink-3); font-style: italic; margin: 8px 0 0; line-height: 1.5; }
.ingredients { padding-left: 1.1em; margin: 14px 0 0; font-size: 17px; }
.ingredients li { margin-bottom: 8px; }
.ingredients li::marker { color: var(--herb); }
.allergens { list-style: none; padding: 0; margin: 16px 0 0; }
.allergens li { padding-block: 10px; border-top: 1px dotted var(--rule); font-size: 16px; line-height: 1.45; }
.al-k { display: block; font-family: var(--display); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--herb); }
.al-v { display: block; }

.stamps { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stamp {
  width: 92px; height: 92px; border-radius: 50%; padding: 6px; flex: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  border: 2px dashed var(--ink-3); color: var(--ink-3); line-height: 1.1;
}
.stamp:nth-child(2) { transform: rotate(-6deg); }
.stamp:nth-child(3) { transform: rotate(5deg); }
.stamp-model { font-family: var(--display); font-size: 13px; font-weight: 600; }
.stamp-status { font-family: var(--hand); font-size: 16px; line-height: 1; margin-top: 4px; }
.stamp-passed { border: 3px double var(--tomato); color: var(--tomato); }

.toc { padding-left: 1.4em; margin: 14px 0 0; font-size: 16px; }
.toc li { margin-bottom: 6px; }
.toc li::marker { color: var(--ink-3); font-family: var(--display); }
.toc a { text-decoration: none; }

.howto h2 { font-size: clamp(34px, 4vw, 46px); font-style: italic; font-weight: 400; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; }
.steps li { counter-increment: s; position: relative; padding-left: 64px; margin-bottom: 26px; font-size: 20px; min-height: 48px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -10px;
  font-family: var(--display); font-style: italic; font-size: 48px; line-height: 1; color: var(--tomato);
}
.btn {
  display: inline-block; background: var(--tomato); color: var(--paper); text-decoration: none;
  font-family: var(--display); font-size: 19px; padding: 12px 26px; border-radius: 999px;
}
.btn:hover { background: var(--tomato-deep); color: var(--paper); }
.prompt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-top: 12px; }
.prompt q { font-family: var(--hand); font-size: 30px; line-height: 1.25; color: var(--ink); quotes: '\201C' '\201D'; }
.copy {
  font: inherit; font-family: var(--display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 0; color: var(--tomato-deep); cursor: pointer; padding: 4px 0;
  text-decoration: underline; text-underline-offset: 4px;
}
.howto-note { color: var(--ink-3); font-style: italic; font-size: 17px; margin: 8px 0 0; max-width: 60ch; }

.rbody { margin-top: 72px; padding-top: 40px; border-top: 3px double var(--ink); max-width: 72ch; }
.rbody-label { font-family: var(--hand); font-size: 26px; color: var(--tomato-deep); margin: 0 0 12px; transform: rotate(-1deg); transform-origin: left; }
.rbody p, .rbody li { color: var(--ink); }
.rbody h2 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 400; margin: 64px 0 20px; }
.rbody h3 { font-size: 24px; font-style: italic; font-weight: 500; margin: 40px 0 12px; }
.rbody ul, .rbody ol { padding-left: 1.4em; }
.rbody li { margin-bottom: 10px; }
.rbody li::marker { color: var(--tomato); font-family: var(--display); }
.part-intro p:first-child { font-size: 22px; line-height: 1.5; }
.part-rules h2 { color: var(--tomato-deep); }

/* Chef's notes: a background shift, notes in the chef's own hand */
.part-notes {
  background: var(--paper-2); margin: 64px 0; padding: 8px clamp(20px, 4vw, 48px) 32px;
  margin-inline: calc(clamp(20px, 4vw, 48px) * -1);
}
.part-notes h2 { font-family: var(--hand); font-size: 48px; font-weight: 700; color: var(--tomato-deep); margin-top: 32px; }
.part-notes li { font-style: italic; }
.part-notes li strong { display: block; font-family: var(--hand); font-style: normal; font-size: 27px; font-weight: 700; color: var(--ink); line-height: 1.2; margin-bottom: 2px; }

/* How to know it's cooked: a checklist with hand-drawn boxes */
.part-cooked ol { list-style: none; padding-left: 0; counter-reset: c; }
.part-cooked li { counter-increment: c; position: relative; padding-left: 66px; }
.part-cooked li::before {
  content: ''; position: absolute; left: 30px; top: 6px; width: 22px; height: 22px;
  border: 2px solid var(--ink-2); border-radius: 3px 5px 2px 6px; transform: rotate(-3deg);
}
.part-cooked li::after {
  content: counter(c); position: absolute; left: 0; width: 22px; text-align: right; top: 3px; font-family: var(--display); font-size: 15px; color: var(--ink-3);
}

/* ---------------- kitchen ---------------- */
.kitchen { max-width: 68ch; margin: 0 auto; padding: 24px var(--gutter) 96px; box-sizing: content-box; }
.kitchen h1 { font-size: clamp(48px, 7vw, 88px); font-style: italic; font-weight: 400; margin-bottom: 36px; }
.kitchen h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 400; margin: 56px 0 16px; }
.kitchen h2::before { content: '\2766'; display: block; color: var(--tomato); font-size: 20px; margin-bottom: 14px; }
.kitchen > p:first-of-type + h1 + p { font-size: 22px; }

/* ---------------- footer ---------------- */
.foot { text-align: center; padding: 56px var(--gutter) 64px; border-top: 1px solid var(--rule); font-family: var(--display); }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot-small { font-family: var(--body); font-style: italic; color: var(--ink-3); font-size: 15px; margin-top: 10px !important; }

/* ---------------- narrow screens ---------------- */
@media (max-width: 900px) {
  .rgrid { grid-template-columns: 1fr; }
  .side { order: 2; }
  .card { grid-template-columns: repeat(2, 1fr); }
  .card > div + div { border-left: 0; }
  .card > div { border-bottom: 1px solid var(--rule); }
  .card > div:nth-child(even) { border-left: 1px solid var(--rule); }
  .card > div:nth-last-child(-n+2) { border-bottom: 0; }
  .rules-list { grid-template-columns: 1fr; max-width: 560px; }
  .epl-spec { grid-template-columns: repeat(2, 1fr); }
  .epl-spec > div:nth-last-child(-n+3) { border-bottom: 1px dotted var(--rule); }
  .epl-spec > div:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 720px) {
  .epl-vs { grid-template-columns: 1fr; gap: 16px; }
  .epl-or { text-align: center; }
  .epl-code { justify-self: stretch; }
  .epl-code pre { font-size: 13px; }
}
@media (max-width: 720px) {
  body { font-size: 18px; }
  .hero-img { height: auto; aspect-ratio: 16 / 10; object-position: 70% 50%; }
  .hero::after { display: none; }
  .hero-text { position: static; padding: 40px var(--gutter) 0; max-width: none; }
  .dish { grid-template-columns: 1fr; }
  .dish-img { order: -1; width: min(420px, 100%); margin: 0 auto; }
  .mi-line { flex-wrap: wrap; }
  .mi-dots { display: none; }
  .mi-serves { width: 100%; }
  .steps li { padding-left: 48px; font-size: 18px; }
  .prompt q { font-size: 26px; }
}
.kitchen li { margin-bottom: 12px; }
.kitchen li::marker { color: var(--tomato); }
