/* flavours.css · section 01, the flavours. Owned with assets/js/flavours.js.
   Morning light from the upper left; a brass tray, six porcelain dishes, one flavour at a time. */

.flavours { position: relative; }
.flavours__pin { position: relative; height: 400vh; }
.flavours__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* ---------------------------------------------------------------- the copy */
.flavours__copy {
  position: relative;
  z-index: 30;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(84px, 12vh, 130px);
  padding-bottom: clamp(70px, 10vh, 110px);
  pointer-events: none;
}
.flavours__copy > * { max-width: min(500px, 37vw); pointer-events: auto; }
.flavours__title {
  margin-top: clamp(16px, 2.6vh, 26px);
  font-size: clamp(2.4rem, 4.3vw, 4.6rem);
  max-width: 9.5ch;
}
.flavours__lede {
  margin-top: clamp(14px, 2.2vh, 22px);
  font-family: var(--f-display);
  font-weight: 350;
  font-size: clamp(1.02rem, 1.15vw, 1.18rem);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 31ch;
}
.flavours__now {
  margin-top: clamp(26px, 4.6vh, 52px);
  padding-top: clamp(18px, 2.8vh, 26px);
  border-top: 1px solid var(--line-2);
}
.flavours__count { font-variant-numeric: tabular-nums; gap: 0; }
.flavours__i { color: var(--saffron-ink); }
.flavours__ar {
  margin-top: clamp(8px, 1.4vh, 14px);
  font-family: var(--f-ar);
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1.15;
  color: var(--saffron-ink);
}
.flavours__name {
  margin-top: 2px;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.flavours__line {
  margin-top: 12px;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 350;
  font-variation-settings: "WONK" 1;
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  line-height: 1.42;
  color: var(--ink);
  max-width: 32ch;
}
.flavours__in { margin-top: clamp(16px, 2.4vh, 22px); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.flavours__pieces { display: flex; flex-wrap: wrap; gap: 8px; }
.flavours__piece {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--f-display);
  font-size: 1rem;
  color: var(--ink);
  transition: background var(--t-snap) var(--ease-snap), color var(--t-snap) var(--ease-snap), border-color var(--t-snap) var(--ease-snap);
}
.flavours__piece span {
  font-family: var(--f-ui); font-weight: 500;
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--saffron-ink);
  transition: color var(--t-snap) var(--ease-snap);
}
.flavours__piece::after {
  content: "";
  width: 7px; height: 7px;
  margin-left: 2px;
  border-top: 1.4px solid currentColor; border-right: 1.4px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}
.flavours__piece:hover { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.flavours__piece:hover span { color: var(--saffron-hi); }

/* ---------------------------------------------------------------- the tray */
.flavours__tray-wrap {
  --d: min(96vh, 62vw);
  position: absolute;
  z-index: 10;
  width: var(--d);
  height: var(--d);
  left: calc(77% - var(--d) / 2);
  top: calc(53% - var(--d) / 2);
}
.flavours__tray {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  will-change: transform;
  /* brushed brass: the brushing is circular, so the tray can turn without its light turning */
  background:
    repeating-radial-gradient(circle at 50% 50%, rgb(255 244 214 / 0.07) 0 1px, rgb(90 58 18 / 0.05) 1px 3px),
    radial-gradient(circle at 50% 50%, #C99D5C 0%, #B98C4C 46%, #A87B3E 74%, #946A33 90%, #7A5528 100%);
  box-shadow:
    inset 0 0 0 calc(var(--d) * 0.012) rgb(122 86 34 / 0.55),
    inset 0 0 0 calc(var(--d) * 0.016) rgb(240 212 150 / 0.5),
    inset 0 0 calc(var(--d) * 0.05) calc(var(--d) * 0.02) rgb(110 74 28 / 0.35),
    0 calc(var(--d) * 0.004) calc(var(--d) * 0.006) rgb(70 42 16 / 0.35),
    calc(var(--d) * 0.035) calc(var(--d) * 0.05) calc(var(--d) * 0.09) calc(var(--d) * -0.01) rgb(92 56 22 / 0.4);
}
.flavours__engraving { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flavours__engraving * { vector-effect: non-scaling-stroke; }
.flavours__cut-lo { fill: none; stroke: rgb(92 58 18 / 0.5); stroke-width: 1.3; transform: translate(0, 0); }
.flavours__cut-hi { fill: none; stroke: rgb(255 238 196 / 0.45); stroke-width: 1; transform: translate(2px, 2px); }
/* Light on the brass, which stays where the window is while the tray turns */
.flavours__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(60% 46% at 28% 22%, rgb(255 246 220 / 0.55) 0%, rgb(255 246 220 / 0) 70%),
    conic-gradient(from 200deg at 50% 50%, rgb(255 248 228 / 0) 0deg, rgb(255 248 228 / 0.28) 26deg, rgb(255 248 228 / 0) 62deg, rgb(255 248 228 / 0) 176deg, rgb(255 236 196 / 0.2) 210deg, rgb(255 236 196 / 0) 250deg, rgb(255 248 228 / 0) 360deg),
    radial-gradient(circle at 70% 78%, rgb(80 50 18 / 0.22) 0%, rgb(80 50 18 / 0) 55%);
  mix-blend-mode: overlay;
  opacity: 0.9;
}

/* A dish: positioned and lifted by flavours.js; the drawing includes its own shadow */
.flavours__dish {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--d) * 0.25);
  height: calc(var(--d) * 0.25);
  margin: calc(var(--d) * -0.125) 0 0 calc(var(--d) * -0.125);
  border-radius: 50%;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.flavours__dish img, .flavours__dish-art {
  position: absolute;
  left: -12.5%; top: -12.5%;
  width: 125%; height: 125%;
  max-width: none;
  opacity: 0;
  transition: opacity 900ms var(--ease-flow);
  pointer-events: none;
}
.flavours__dish.is-ready .flavours__dish-art { opacity: 1; }
/* Before the drawing is ready: a quiet porcelain disc */
.flavours__dish::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #FBF7F1 0%, #EFE6D9 62%, #E2D5C3 100%);
  box-shadow: 4px 6px 12px rgb(80 48 18 / 0.28);
  transition: opacity 900ms var(--ease-flow);
}
.flavours__dish.is-ready::before { opacity: 0; }
/* Lifted a little when it comes to the front: a longer, softer shadow under it */
.flavours__dish-shadow {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: rgb(70 40 14 / 0.4);
  filter: blur(calc(var(--d) * 0.018));
  transform: translate(calc(var(--lift, 0) * var(--d) * 0.02), calc(var(--lift, 0) * var(--d) * 0.028));
  opacity: calc(var(--lift, 0) * 0.85);
  pointer-events: none;
}
.flavours__dish:focus-visible { outline: 1.5px solid var(--saffron-ink); outline-offset: 6px; }

/* ---------------------------------------------------------------- steps and hint */
.flavours__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin-bottom: clamp(6px, 1.4vh, 12px);
}
.flavours__step {
  position: relative;
  padding: 6px 0;
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color var(--t-snap) var(--ease-snap);
}
.flavours__step::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--saffron-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease-set);
}
.flavours__step:hover { color: var(--ink); }
.flavours__step.is-active { color: var(--ink); }
.flavours__step.is-active::after { transform: none; }
.flavours__hint {
  position: absolute;
  z-index: 30;
  right: var(--gutter);
  bottom: clamp(22px, 4.4vh, 44px);
  color: var(--ink-2);
  transition: opacity var(--t-base) var(--ease-flow);
}
.flavours__hint::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.flavours__hint.is-hidden { opacity: 0; }

/* The text list: the source for the tray, and what shows if scripts never run */
.flavours__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 28px;
  padding: 0 var(--gutter) var(--section);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}
.flavours__list li { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 0.95rem; color: var(--ink-2); }
.flavours__list strong { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; color: var(--ink); }
.flavours__list [lang="ar"] { font-size: 1.4rem; color: var(--saffron-ink); }
.flavours.is-live .flavours__list {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.flavours:not(.is-live) .flavours__pin { height: auto; }
.flavours:not(.is-live) .flavours__stage { position: relative; height: auto; }
.flavours:not(.is-live) .flavours__tray-wrap, .flavours:not(.is-live) .flavours__now,
.flavours:not(.is-live) .flavours__steps, .flavours:not(.is-live) .flavours__hint { display: none; }

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1180px) {
  .flavours__tray-wrap { --d: min(90vh, 60vw); left: calc(78% - var(--d) / 2); }
  .flavours__copy > * { max-width: min(460px, 40vw); }
}
@media (max-width: 900px) {
  .flavours__pin { height: 380vh; }
  /* The tray sits above, cut by the top of the screen; the dish in front points down at the copy */
  .flavours__tray-wrap {
    --d: min(142vw, 64svh, 680px);
    left: calc(50% - var(--d) / 2);
    top: calc(var(--d) * -0.37);
  }
  .flavours__copy {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: clamp(64px, 9svh, 90px);
  }
  .flavours__copy > * { max-width: none; }
  .flavours__title { font-size: clamp(1.9rem, 8.4vw, 2.8rem); max-width: 12ch; margin-top: 10px; }
  .flavours__lede { display: none; }
  .flavours__now { margin-top: 16px; padding-top: 14px; }
  .flavours__ar { font-size: clamp(2rem, 9vw, 2.8rem); margin-top: 4px; }
  .flavours__name { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .flavours__line { font-size: 1rem; margin-top: 8px; }
  .flavours__in { margin-top: 12px; }
  .flavours__in > .label { display: none; }
  .flavours__piece { min-height: 44px; }
  .flavours__steps { gap: 0 12px; margin-bottom: 2px; }
  .flavours__step { font-size: 0.58rem; letter-spacing: 0.13em; padding: 8px 0; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .flavours__title { display: none; }
}
