/* Home page sections and the review card. */

/* --- Hero --- */

.home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 640px;
  background-color: var(--night);
  color: var(--paper);
  overflow: hidden;
}

.home-hero__still {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: rgba(20, 12, 10, 0.4);
  background-image:
    linear-gradient(90deg, rgba(20, 12, 10, 0.78) 0%, rgba(20, 12, 10, 0.45) 45%, rgba(20, 12, 10, 0) 75%),
    linear-gradient(0deg, rgba(20, 12, 10, 0.55) 0%, rgba(20, 12, 10, 0) 40%);
}

.home-hero__content {
  position: relative;
  z-index: 1;
  padding-block: 64px 96px;
  text-align: left;
}

.home-hero__title {
  color: var(--paper);
  max-width: 16ch;
  margin-inline: 0;
}

.home-hero__text {
  max-width: 40ch;
  margin-top: 16px;
  margin-inline: 0;
  font-size: 20px;
  line-height: 1.5;
}

.home-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}

.home-hero__actions .btn {
  width: 100%;
}

.home-hero__rating {
  position: absolute;
  bottom: 24px;
  left: var(--gutter);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background-color: rgba(28, 18, 16, 0.55);
  color: var(--paper);
  font-size: var(--fs-small);
  line-height: 1.3;
}

.home-hero__stars {
  display: inline-flex;
  gap: 1px;
  color: var(--tint-2);
}

.home-hero__stars svg {
  width: 16px;
  height: 16px;
}

.home-hero__video-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background-color: rgba(28, 18, 16, 0.5);
  color: var(--paper);
}

.home-hero__video-toggle:hover {
  background-color: rgba(28, 18, 16, 0.75);
}

.home-hero__video-toggle svg {
  width: 16px;
  height: 16px;
}

.home-hero__toggle-icon[data-video-icon-pause] {
  display: none;
}

.home-hero__video-toggle[aria-pressed="true"] [data-video-icon-pause] {
  display: inline-flex;
}

.home-hero__video-toggle[aria-pressed="true"] [data-video-icon-play] {
  display: none;
}

/* --- Story --- */

.home-story {
  padding-block: var(--section);
}

.home-story__grid {
  display: grid;
  gap: 32px;
}

.home-story__signature {
  margin-top: 16px;
  font-family: var(--script);
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
}

.home-story__text .link-arrow {
  margin-top: 16px;
}

.home-story__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

/* --- Two ways to visit --- */

.home-visit__grid {
  display: grid;
  gap: 24px;
}

.home-visit__card {
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.home-visit__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.home-visit__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
}

.home-visit__body p {
  color: var(--muted);
}

/* --- Dishes --- */

.home-dishes__intro {
  max-width: 60ch;
}

.home-dishes__list {
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.home-dishes__item {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.home-dishes__item:last-child {
  border-bottom: 1px solid var(--line);
}

.home-dishes__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-dishes__name {
  font-size: var(--fs-h3);
}

.home-dishes__dots {
  display: none;
  flex: 1;
  border-bottom: 1px dotted var(--line);
}

.home-dishes__price {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.home-dishes__desc {
  margin-top: 6px;
  color: var(--muted);
}

/* --- Atmosphere --- */

.home-atmo__grid {
  display: grid;
  gap: 32px;
}

.home-atmo__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

/* --- Reviews --- */

.home-reviews__grid {
  display: flex;
  gap: 16px;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.home-reviews__grid > * {
  flex: 0 0 85%;
  scroll-snap-align: start;
}

.home-reviews__more {
  margin-top: 24px;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: var(--paper);
}

.review-card__stars {
  display: inline-flex;
  gap: 2px;
  color: var(--accent);
}

.review-card__stars svg {
  width: 18px;
  height: 18px;
}

.review-card__text {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.4;
}

.review-card__text p {
  max-width: none;
}

.review-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: auto;
  font-size: var(--fs-small);
  color: var(--muted);
}

.review-card__author {
  font-weight: 700;
  color: var(--ink);
}

/* --- Booking --- */

.home-book__grid {
  display: grid;
  gap: 40px;
}

.home-book__form {
  display: grid;
  gap: 16px;
  max-width: 420px;
  margin-top: 24px;
}

.home-book__field {
  display: grid;
  gap: 4px;
  font-size: var(--fs-small);
  font-weight: 600;
}

.home-book__field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--paper);
}

.home-book__hours-title {
  margin-bottom: 12px;
  font-size: var(--fs-h3);
}

.home-book__find {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

/* --- Phone first, then wider screens --- */

@media (max-width: 719px) {
  /* One top to bottom gradient on phones, darkest behind the text at the bottom. */
  .home-hero__overlay {
    background-image: linear-gradient(
      0deg,
      rgba(20, 12, 10, 0.85) 0%,
      rgba(20, 12, 10, 0.55) 50%,
      rgba(20, 12, 10, 0.15) 100%
    );
  }
}

@media (min-width: 720px) {
  /* Wider screens get the video; phones keep the still and never fetch it. */
  .home-hero__still {
    display: none;
  }

  .home-hero__video {
    display: block;
  }

  .home-hero__video-toggle {
    display: inline-flex;
  }

  .home-visit__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .home-dishes__dots {
    display: block;
  }

  .home-hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .home-hero__actions .btn {
    width: auto;
  }

  .home-reviews__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    overflow: visible;
  }

  .home-reviews__grid > * {
    flex: none;
  }

  .home-story__grid {
    gap: 40px;
  }
}

@media (min-width: 1024px) {
  .home-hero {
    align-items: center;
    height: min(760px, calc(100svh - var(--header-h) - 40px));
    min-height: 560px;
  }

  .home-hero__content {
    padding-block: 0;
    text-align: left;
  }

  .home-hero__title {
    margin-inline: 0;
  }

  .home-hero__text {
    margin-inline: 0;
  }

  /* Line the rating and the video button up with the container edges. */
  .home-hero__rating {
    bottom: 32px;
    left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  }

  .home-hero__video-toggle {
    bottom: 32px;
    right: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  }

  .home-story__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
  }

  .home-atmo__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }

  .home-reviews__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-book__grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}
