/* Recipe page (gallery piece) */
.recipe-hero {
  margin-bottom: var(--space-12);
}

.recipe-hero__image-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--color-surface);
  box-shadow: 0 4px 24px var(--color-shadow);
}

@media (min-width: 48rem) {
  .recipe-hero__image-wrap {
    max-width: 48rem;
  }
}

.recipe-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-header {
  margin-top: var(--space-8);
}

.recipe-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-meta);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.recipe-meta__badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface);
  border-radius: 9999px;
  color: var(--color-text);
}

.recipe-source {
  margin: var(--space-4) 0 0;
  font-family: var(--font-meta);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.recipe-source a {
  color: var(--color-accent);
}

.recipe-meta__badge + .recipe-meta__badge {
  margin-left: 0;
}

/* Recipe sections */
.recipe-body {
  max-width: 42rem;
}

.recipe-section {
  margin-bottom: var(--space-12);
}

.recipe-section.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.recipe-section__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

.recipe-ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recipe-ingredients li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.recipe-ingredients li:last-child {
  border-bottom: none;
}

.recipe-ingredients__checkbox {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2em;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.recipe-ingredients__text {
  flex: 1;
}

.recipe-ingredients__text.checked {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.recipe-instructions {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.recipe-instructions li {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.recipe-instructions li:last-child {
  border-bottom: none;
}

.recipe-instructions__number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-meta);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  text-align: center;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  counter-increment: step;
}

.recipe-instructions__number::before {
  content: counter(step);
  line-height: 1;
}

.recipe-instructions__text {
  flex: 1;
}

.recipe-instructions li {
  flex-wrap: wrap;
}

.recipe-timer {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-meta);
  font-size: var(--text-sm);
  color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-accent);
  border-radius: 9999px;
  cursor: pointer;
  transition: color var(--duration-micro) var(--ease-out),
    background var(--duration-micro) var(--ease-out);
}

.recipe-timer:hover {
  color: white;
  background: var(--color-accent);
}

.recipe-timer--active {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.recipe-timer--active:hover {
  color: var(--color-text-muted);
  background: transparent;
  cursor: default;
}

.recipe-notes {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.recipe-notes ul {
  margin: 0;
  padding-left: var(--space-6);
}

.recipe-notes li {
  margin-bottom: var(--space-2);
}

.recipe-notes li:last-child {
  margin-bottom: 0;
}

/* Back link */
.recipe-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-8);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: 50%;
  border: 1px solid var(--color-border);
  transition: color var(--duration-micro) var(--ease-out),
    background var(--duration-micro) var(--ease-out),
    border-color var(--duration-micro) var(--ease-out),
    transform var(--duration-micro) var(--ease-out);
}

.recipe-back:hover {
  color: var(--color-accent);
  background: var(--color-bg-elevated);
  border-color: var(--color-accent);
}

.recipe-back:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.recipe-back__icon {
  transition: transform var(--duration-micro) var(--ease-out);
}

.recipe-back:hover .recipe-back__icon {
  transform: translateX(-2px);
}
