/*
  A 计划 · What's inside（首屏分界线以下第一节）：分界线、小标题、大标题、五张拱形原料卡（照片＋斜体名＋西语小字＋一句作用）、"Contains dairy."
  作用句只讲风味，不做营养/健康声称（见 findings.md）。卡片排布：≥1024px 一排 5 张两头贴边线；600–1023px 3+2 居中；<600px 两列、第 5 张居中。
*/
.inside {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(100% - 2 * var(--gutter));
  margin: 0 auto;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.divider img {
  width: 1.3rem;
  height: auto;
}

.divider__dots {
  width: 2.4rem;
  height: 6px;
  background: radial-gradient(circle, var(--terracotta) 0 2.2px, transparent 2.6px) 0 50% / 0.8rem 6px repeat-x;
}

.inside__title {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.3;
  letter-spacing: 0.3em;
}

.inside .section-title {
  margin-top: clamp(0.35rem, 0.6vw, 0.6rem);
  text-align: center;
}

.ingredients {
  display: flex;
  justify-content: space-between;
  gap: clamp(1rem, 3.4vw, 3.5rem);
  width: 100%;
  margin: clamp(1.25rem, 2vw, 2.25rem) 0 0;
  padding: 0;
  list-style: none;
}

.ingredient {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: clamp(8.5rem, 14vw, 15rem);
  min-height: calc(var(--card-h) + 2.6rem); /* room for the one-line role under the names */
  padding-bottom: clamp(0.9rem, 1.35vw, 1.5rem);
  border-radius: 999px 999px 0 0;
  /* recessed arch: darker under the curve, lighter towards the bottom */
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgb(150 105 55 / 0.16), rgb(150 105 55 / 0) 100%),
    linear-gradient(180deg, #ECDFCB 0%, #F5ECDE 42%, #F6EEE1 70%, #F1E5D3 100%);
  box-shadow:
    inset 0 16px 22px -14px rgb(110 70 25 / 0.24),
    inset 0 -1px 0 rgb(255 255 255 / 0.5);
  text-align: center;
}

.ingredient::before,
.ingredient::after {
  content: "";
  position: absolute;
  top: calc(var(--card-h) * 0.4);
  width: 1.35rem;
  height: 1.35rem;
  background: center / contain no-repeat;
}

.ingredient::before {
  left: 8%;
  background-image: url("../assets/img/ornaments/petal-left.webp");
}

.ingredient::after {
  right: 8%;
  background-image: url("../assets/img/ornaments/petal-right.webp");
}

.ingredient__img {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 62%;
  height: calc(var(--card-h) * 0.46);
}

.ingredient__img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  filter: drop-shadow(0 8px 10px rgb(42 26 16 / 0.14));
}

/* name: italic serif; Spanish: small tracked capitals */
.ingredient b {
  margin-top: clamp(0.5rem, 0.8vw, 0.9rem);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.6rem); /* 5 cards: longest name "Evaporated milk" keeps ~10px side room */
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
}

.ingredient i {
  margin-top: 0.35rem;
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}


.ingredient__role {
  margin-top: clamp(0.45rem, 0.7vw, 0.75rem);
  padding: 0 0.6rem;
  font-family: var(--serif);
  font-size: clamp(0.875rem, 1.05vw, 1.0625rem);
  line-height: 1.3;
  color: var(--ink-soft);
}

.inside__note {
  margin-top: clamp(1rem, 1.6vw, 1.75rem);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

@media (max-width: 1023px) {
  .inside {
    margin-top: 0.5rem;
  }

  /* 5 cards are too narrow in one row here ("Evaporated milk" wrapped into the petals): 3 + 2, centred */
  .ingredients {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 1.25rem;
  }

  .ingredient {
    width: clamp(9.5rem, 26vw, 13rem);
  }
}

@media (max-width: 599px) {
  .ingredients {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .ingredient {
    width: 100%;
  }

  /* odd card count (5 recipe ingredients): the lone last card sits centred, same width as the others */
  .ingredient:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 1rem) / 2);
  }
}
