/* TOKENS */
:root {
  --ink:          #2a1f18;
  --ink-light:    #4a3728;
  --orange-bar:   #c1600a;
  --orange-deep:  #b05508;
  --orange-mid:   #e8a55a;
  --page-bg:      #fdf4e7;
  --page-rule:    #c8a06040;
  --rule:         #2a1f1833;
  --cream:        #fef9f1;
  --card-bg:      #fdf0d8;
  --radius:       4px;
  --max-w:        860px;
  --pad:          clamp(1rem, 4vw, 2.5rem);
  --section-gap:  2.5rem;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* BASE */
html { scroll-behavior: smooth; }
body {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 330;
  font-size: 18px;
  color: var(--ink);
  background: var(--orange-mid);
  min-height: 100vh;
  padding-top: 56px;
}

/* STICKY HEADER */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 56px;
  background: var(--orange-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2rem);
  box-shadow: 0 2px 8px #0004;
}
#site-header .header-title {
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Print button */
#print-btn {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
#print-btn:hover { background: #fff; color: var(--orange-bar); }

/* Hamburger */
#menu-btn {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  transition: background .2s;
}
#menu-btn:hover { background: #fff4; }
#menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
  transition: transform .25s, opacity .25s;
}

/* Nav drawer */
#nav-drawer {
  position: fixed;
  top: 56px; right: 0;
  z-index: 190;
  background: var(--orange-deep);
  width: 240px;
  padding: 1rem 0;
  box-shadow: -4px 4px 20px #0003;
  transform: translateX(110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  border-radius: 0 0 0 6px;
}
#nav-drawer.open { transform: translateX(0); }
#nav-drawer a {
  display: block;
  padding: 10px 1.5rem;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .06em;
  color: #fff;
  transition: background .15s;
}
#nav-drawer a:hover { background: #fff2; }

/*  PAGE WRAPPER */
#page-wrapper {
  max-width: calc(var(--max-w) + var(--pad)*2);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) var(--pad);
}

/* PAPER */
#recipe-paper {
  background: var(--page-bg);
  border-radius: 6px;
  box-shadow: 0 4px 32px #0002;
  overflow: hidden;
}

/* SECTION WRAPPER */
.recipe-section {
  border-bottom: 1px solid var(--rule);
}
.recipe-section:last-child { border-bottom: none; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  cursor: pointer;
  user-select: none;
  gap: 1rem;
}
.section-header:hover { background: #0001; }
.section-header h2 {
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 330;
  letter-spacing: .04em;
}
.toggle-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform .35s ease;
  color: var(--ink-light);
}
.section-header.open .toggle-icon { transform: rotate(180deg); }

/* Collapsible body */
.section-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .55s cubic-bezier(.4,0,.2,1);
}
.section-body.open {
  max-height: 9999px;
  transition: max-height .7s cubic-bezier(.4,0,.2,1);
}
.section-inner {
  padding: 0 var(--pad) var(--section-gap);
  opacity: 0;
  transition: opacity .5s ease .1s;
}
.section-body.open .section-inner { opacity: 1; }

/* TITLE SECTION */
#section-title {
  padding: clamp(2rem, 5vw, 3rem) var(--pad) var(--section-gap);
  border-bottom: 1px solid var(--rule);
}
.title-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}
.hero-img-wrap {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.hero-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.title-text .recipe-label {
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--orange-bar);
  margin-bottom: .5rem;
}
.title-text h1.page-title {
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 380;
  line-height: 1.1;
  letter-spacing: .02em;
  margin-bottom: 1.2rem;
}
.title-text .intro {
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 330;
  line-height: 1.55;
  color: var(--ink-light);
}

/* META BAR */
#meta-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
  flex-wrap: wrap;
}
.meta-cell {
  flex: 1 1 120px;
  padding: 1rem var(--pad);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.meta-cell:last-child { border-right: none; }
.meta-label {
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-bar);
}
.meta-value {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 330;
  line-height: 1.4;
}
.stars { color: var(--orange-bar); font-size: 16px; letter-spacing: 2px; }

/* TYPOGRAPHY */
h1 { font-size: clamp(28px, 4vw, 45px); font-weight: 380; }
h3 { font-size: clamp(18px, 2.5vw, 30px); font-weight: 390; line-height: 1.3; }
p, li {
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 330;
  line-height: 1.55;
}

/* EQUIPMENT */
.equip-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.equip-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: start;
}
.equip-check {
  display: flex;
  align-items: baseline;
  gap: .7rem;
}
.equip-check input[type=checkbox] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--orange-bar);
  width: 16px; height: 16px;
  cursor: pointer;
}
.equip-name {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 390;
  line-height: 1.3;
}
.equip-desc {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 330;
  line-height: 1.5;
  color: var(--ink-light);
  margin-top: .2rem;
}
.equip-thumb {
  width: clamp(70px, 12vw, 100px);
  height: clamp(70px, 12vw, 100px);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.equip-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* PREP */
.prep-summary {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 330;
  line-height: 1.55;
  color: var(--ink-light);
  margin-bottom: 1.4rem;
}
.prep-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}
.prep-img {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.prep-img img { width: 100%; height: 100%; object-fit: cover; }

/* OUTDENTED LIST */
.outdented-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.outdented-list li {
  display: grid;
  grid-template-columns: 1.4em 1fr;
  gap: .4em;
}
.outdented-list li .bullet {
  font-weight: 500;
  color: var(--orange-bar);
  padding-top: .05em;
}

/* INGREDIENTS */
.ing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.ing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.ing-item {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: .5em;
  padding: .55em 0;
  border-bottom: 1px solid var(--page-rule);
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s;
  border-radius: 2px;
}
.ing-item:hover { background: #e8910010; }
.ing-item:last-child { border-bottom: none; }
.ing-amount {
  font-size: clamp(12px, 1.4vw, 17px);
  font-weight: 500;
  color: var(--orange-bar);
  white-space: nowrap;
  padding-right: .5em;
  text-align: right;
}
.ing-name {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 330;
  line-height: 1.4;
}
.ing-note {
  grid-column: 2;
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 330;
  color: var(--ink-light);
  font-style: italic;
}
.ing-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ing-mosaic img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
}
.ing-hint {
  margin-top: .9rem;
  font-size: clamp(11px, 1.2vw, 14px);
  color: var(--ink-light);
  font-style: italic;
}

/* INSTRUCTIONS */
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.step-item {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: .6em 1em;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--page-rule);
  align-items: start;
}
.step-item:last-child { border-bottom: none; }
.step-num {
  font-size: clamp(18px, 2.5vw, 30px);
  font-weight: 500;
  color: var(--orange-bar);
  line-height: 1.2;
  padding-top: .05em;
}
.step-title {
  font-size: clamp(15px, 1.7vw, 21px);
  font-weight: 390;
  margin-bottom: .35rem;
}
.step-text {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 330;
  line-height: 1.55;
}
.step-text strong { font-weight: 380; }
.step-img {
  grid-column: 2;
  margin-top: .75rem;
  border-radius: 3px;
  overflow: hidden;
  max-width: 340px;
}
.step-img img { width: 100%; display: block; }

/* ENJOY */
.enjoy-msg {
  text-align: center;
  padding: 2.5rem var(--pad) 1.5rem;
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 380;
  letter-spacing: .08em;
  color: var(--orange-bar);
  border-bottom: 1px solid var(--rule);
}

/* ORIGIN */
.origin-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.origin-text p {
  font-size: clamp(14px, 1.6vw, 20px);
  line-height: 1.6;
}
.origin-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 8px;
}
.origin-gallery figure {
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.origin-gallery figure img { width: 100%; height: 100%; object-fit: cover; }

/* OTHER RECIPES */
.other-intro {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 330;
  line-height: 1.55;
  color: var(--ink-light);
  margin-bottom: 1.4rem;
}
.other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 1rem;
}
.other-card {
  background: var(--card-bg);
  border: 1px solid var(--page-rule);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.other-card-title {
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 390;
  line-height: 1.3;
}
.other-card-desc {
  font-size: clamp(12px, 1.3vw, 16px);
  font-weight: 330;
  line-height: 1.5;
  color: var(--ink-light);
}

/* FOOTER */
#site-footer {
  text-align: center;
  padding: 1.5rem var(--pad);
}
#back-top-btn {
  display: inline-block;
  background: var(--orange-bar);
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .7rem 2.2rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}
#back-top-btn:hover { background: var(--orange-deep); }

/* PRINT MODE */
body.print-mode .section-body { max-height: none !important; }
body.print-mode .section-inner { opacity: 1 !important; }
body.print-mode .section-header { cursor: default; }
body.print-mode .toggle-icon { display: none; }
body.print-mode #site-header { display: none; }
body.print-mode { padding-top: 0; }
body.print-mode #page-wrapper { padding-top: 1rem; }

@media print {
  body { padding-top: 0; background: white; }
  #site-header, #back-top-btn, .toggle-icon, #print-btn, #menu-btn { display: none !important; }
  #recipe-paper { box-shadow: none; }
  .section-body { max-height: none !important; }
  .section-inner { opacity: 1 !important; }
}

/* RESPONSIVE */
@media (max-width: 620px) {
  .title-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .prep-layout { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .ing-layout { grid-template-columns: 1fr; }
  .step-item { grid-template-columns: 1.8em 1fr; }
  .step-img { max-width: 100%; }
}
@media (max-width: 500px) {
  .equip-item { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .meta-cell { flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--rule); }
  .meta-cell:last-child { border-bottom: none; }
}
