/* ==========================================================================
   Recipe App — a Figma-only design exercise
   Warm and quiet: phones on a dark table, one small interaction, nothing oversold.
   ========================================================================== */

.theme-recipe {
  --accent: #7bd88f;
  --accent-2: #a8e6b5;
  --warm: #f0b168;
}

.theme-recipe ::selection {
  background: rgba(123, 216, 143, 0.35);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.rcp-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 56px);
  overflow: hidden;
  isolation: isolate;
}

.rcp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42% 46% at 76% 42%, rgba(240, 177, 104, 0.12), transparent 70%),
    radial-gradient(34% 40% at 18% 84%, rgba(123, 216, 143, 0.08), transparent 70%);
}

.rcp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  margin-top: 36px;
}

.rcp-hero h1 {
  margin-top: 22px;
  font-size: clamp(44px, 5.4vw, 78px);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}

.rcp-promise {
  margin-top: 20px;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.24;
}

.rcp-promise .dim {
  color: rgba(255, 255, 255, 0.42);
}

.rcp-hero .lead {
  margin-top: 20px;
  max-width: 540px;
}

/* Three screens, fanned like cards on a table. */
.rcp-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0 40px;
}

.rcp-stage .phone {
  --pw: clamp(150px, 15vw, 218px);
  transition: transform 0.9s var(--ease-out);
}

.rcp-stage .phone:nth-child(1) {
  transform: rotate(-7deg) translate(14%, 4%);
  z-index: 1;
}

.rcp-stage .phone:nth-child(2) {
  z-index: 3;
  transform: translateY(-3%);
}

.rcp-stage .phone:nth-child(3) {
  transform: rotate(7deg) translate(-14%, 4%);
  z-index: 2;
}

.rcp-stage:hover .phone:nth-child(1) {
  transform: rotate(-10deg) translate(6%, 2%);
}

.rcp-stage:hover .phone:nth-child(3) {
  transform: rotate(10deg) translate(-6%, 2%);
}

@media (max-width: 900px) {
  .rcp-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── The pantry demo ─────────────────────────────────────────────────────── */

.pantry {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 44px);
  padding: clamp(22px, 3vw, 36px);
}

.pantry__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}

.pantry__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pantry__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  font-size: 14px;
  color: var(--fg-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}

.pantry__item i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid var(--line-3);
  color: #06281b;
  transition: background-color 0.25s, border-color 0.25s;
}

.pantry__item .i {
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.pantry__item:hover {
  color: var(--fg);
  border-color: var(--line-2);
}

.pantry__item[aria-pressed="true"] {
  color: var(--fg);
  border-color: rgba(123, 216, 143, 0.35);
  background: rgba(123, 216, 143, 0.08);
}

.pantry__item[aria-pressed="true"] i {
  background: var(--accent);
  border-color: var(--accent);
}

.pantry__item[aria-pressed="true"] .i {
  opacity: 1;
}

.pantry__recipes {
  display: grid;
  gap: 8px;
  align-content: start;
}

.rcp-recipe {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.4s, background-color 0.4s;
}

.rcp-recipe.is-ready {
  border-color: rgba(123, 216, 143, 0.42);
  background: linear-gradient(90deg, rgba(123, 216, 143, 0.1), transparent 60%), var(--surface);
}

.rcp-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1turn), rgba(255, 255, 255, 0.09) 0);
  transition: background 0.5s var(--ease-out);
}

.rcp-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
}

.rcp-ring b {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
}

.rcp-recipe.is-ready .rcp-ring b {
  color: var(--accent-2);
}

.rcp-recipe h4 {
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.rcp-recipe p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--fg-3);
}

.rcp-recipe.is-ready p {
  color: var(--accent-2);
}

.rcp-recipe__go {
  font-size: 12px;
  color: var(--fg-4);
}

@media (max-width: 760px) {
  .pantry {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── The screens ─────────────────────────────────────────────────────────── */

.rcp-set + .rcp-set {
  margin-top: clamp(48px, 6vw, 80px);
}

.rcp-set h3 {
  font-size: clamp(19px, 1.8vw, 23px);
  letter-spacing: -0.025em;
}

.rcp-set > p {
  margin-top: 8px;
  max-width: 62ch;
  color: var(--fg-2);
}

.rcp-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  justify-items: center;
  margin-top: 32px;
}

.rcp-shot {
  display: grid;
  justify-items: center;
}

.rcp-shot .phone {
  --pw: min(100%, 268px);
  cursor: zoom-in;
}

.rcp-shot figcaption {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-3);
  text-align: center;
}

@media (max-width: 720px) {
  .rcp-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .rcp-row::-webkit-scrollbar {
    display: none;
  }

  .rcp-shot {
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .rcp-shot .phone {
    --pw: 232px;
  }
}

.rcp-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--fg-3);
}
