/*
 * Homepage (page-home.php + inc/content/home-*.php).
 * Scoped to .cleeve-home, not .home: WordPress also puts "home" on <body> on the front page.
 * Plain CSS rather than SCSS so it doesn't depend on the WP-SCSS plugin compiling.
 * Colours follow scss/_vars.scss: $col-green (navy), $col-light-green, $col-dark-green.
 */

.cleeve-home {
  --h-navy: #201b4e;
  --h-navy-dark: #140f36;
  --h-green: #a1bf60;
  --h-green-dark: #7f8c4d;
  --h-green-soft: #eef4e2;
  --h-grey: #f6f6f9;
  --h-line: #e3e2ea;
  --h-muted: #6f6c85;
  --h-radius: 14px;

  overflow-x: clip;
}

.cleeve-home * {
  font-size: 17px;
  line-height: 1.55;
}

.cleeve-home h2 {
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 1.2;
}

.cleeve-home h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.3;
}

.cleeve-home p {
  margin: 0 0 14px;
}

/* Buttons and links */

.cleeve-home .home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.cleeve-home .home-btn:hover {
  transform: translateY(-1px);
}

.cleeve-home .home-btn--primary {
  background: var(--h-green);
  color: var(--h-navy);
}

.cleeve-home .home-btn--primary:hover {
  background: #b3cf78;
  color: var(--h-navy);
}

.cleeve-home .home-btn--ghost {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.cleeve-home .home-btn--ghost:hover {
  background: #fff;
  color: var(--h-navy);
}

.cleeve-home .home-btn--small {
  min-height: 44px;
  padding: 0 24px;
  background: var(--h-navy);
  color: #fff;
  font-size: 15px;
}

.cleeve-home .home-btn--small:hover {
  background: var(--h-navy-dark);
  color: #fff;
}

.cleeve-home .home-link {
  font-weight: 700;
  color: var(--h-green-dark);
  text-decoration: none;
}

.cleeve-home .home-link:hover {
  color: var(--h-navy);
}

/* Hero */

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(78vh, 760px);
  padding: 90px 0 110px;
  background: var(--h-navy);
  isolation: isolate;
}

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

.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(20, 15, 54, 0.85) 0%, rgba(20, 15, 54, 0.55) 45%, rgba(20, 15, 54, 0.1) 100%);
}

.home-hero__inner > * {
  max-width: 640px;
}

.cleeve-home .home-hero__title {
  margin: 0 0 18px;
  font-size: 60px;
  line-height: 1.08;
  color: #fff;
}

.cleeve-home .home-hero__intro {
  margin: 0 0 30px;
  font-size: 21px;
  color: rgba(255, 255, 255, 0.92);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Highlights strip, overlapping the bottom of the hero */

.cleeve-home .home-highlights {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin-top: -52px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--h-radius);
  background: #fff;
  box-shadow: 0 16px 40px rgba(32, 27, 78, 0.12);
}

.cleeve-home .home-highlights li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 26px;
  font-weight: 700;
}

.cleeve-home .home-highlights li + li {
  border-left: 1px solid var(--h-line);
}

.cleeve-home .home-highlights li::before {
  content: '';
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--h-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8c4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* Sections */

.home-section {
  padding: 84px 0 0;
}

.home-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.cleeve-home .home-section__head h2 {
  margin: 0;
}

.cleeve-home .home-section__lead {
  margin-bottom: 28px;
  color: var(--h-muted);
}

/* Next available sessions */

.home-sessions__days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cleeve-home .home-sessions__loading {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border-radius: var(--h-radius);
  background: var(--h-grey);
  color: var(--h-muted);
}

.home-sessions__day {
  padding: 22px;
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  background: #fff;
}

.cleeve-home .home-sessions__day h3 {
  margin-bottom: 14px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
}

.cleeve-home .home-sessions__day h3 span {
  font-size: inherit;
  font-weight: 400;
  color: var(--h-muted);
}

.cleeve-home .home-sessions__day ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cleeve-home .home-sessions__day a {
  display: inline-block;
  min-width: 68px;
  padding: 8px 12px;
  border: 2px solid var(--h-green);
  border-radius: 8px;
  background: var(--h-green-soft);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}

.cleeve-home .home-sessions__day a:hover {
  background: var(--h-green);
}

.cleeve-home .home-sessions__day a.is-more {
  border-color: var(--h-line);
  background: #fff;
  color: var(--h-muted);
}

/* How it works */

.cleeve-home .home-steps__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.home-steps__item {
  position: relative;
  padding: 30px 28px 26px;
  border-radius: var(--h-radius);
  background: var(--h-grey);
}

.cleeve-home .home-steps__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--h-navy);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
}

.cleeve-home .home-steps__item p {
  margin: 0;
  color: var(--h-muted);
}

/* Welcome (page content) */

.home-welcome__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.cleeve-home .home-welcome__content h3 {
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--h-green-dark);
}

.cleeve-home .home-welcome__content p.large {
  font-size: 20px;
}

.cleeve-home .home-welcome__content .rating:empty {
  display: none;
}

.cleeve-home .home-welcome__content .btn {
  margin: 10px 0 0;
  border-radius: 999px;
}

.home-welcome__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--h-radius);
}

/* Prices */

.cleeve-home .home-prices__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.home-prices__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 24px;
  border: 2px solid var(--h-green);
  border-radius: var(--h-radius);
  background: var(--h-green-soft);
  text-align: center;
}

.cleeve-home .home-prices__label {
  font-weight: 700;
}

.cleeve-home .home-prices__price {
  margin-bottom: 14px;
  font-family: 'Playfair Display', serif;
  font-size: 46px;
  line-height: 1.1;
}

.cleeve-home .home-prices__note {
  margin: 0;
  color: var(--h-muted);
}

.cleeve-home .home-prices__note a {
  font-weight: 700;
  color: var(--h-green-dark);
}

/* Photo mosaic (full width) */

.cleeve-home .home-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cleeve-home .home-gallery__grid li:first-child {
  grid-row: span 2;
}

.cleeve-home .home-gallery__link {
  display: block;
  height: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.cleeve-home .home-gallery__grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cleeve-home .home-gallery__link:hover img,
.cleeve-home .home-gallery__link:focus-visible img {
  transform: scale(1.04);
}

.cleeve-home .home-gallery__link:focus-visible {
  outline: 3px solid var(--h-green);
  outline-offset: -3px;
}

/* Reviews */

.home-stars {
  color: #e4a11b;
  letter-spacing: 2px;
}

.cleeve-home .home-reviews__summary {
  margin: 0;
  color: var(--h-muted);
}

.cleeve-home .home-reviews__summary a {
  font-weight: 700;
  color: var(--h-green-dark);
}

.cleeve-home .home-reviews__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-reviews__card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--h-radius);
  background: var(--h-grey);
}

.cleeve-home .home-reviews__card .home-stars {
  margin: 0 0 12px;
}

.cleeve-home .home-reviews__card blockquote {
  flex: 1;
  margin: 0 0 16px;
  font-size: 18px;
}

.cleeve-home .home-reviews__author {
  margin: 0;
  font-weight: 700;
}

.cleeve-home .home-reviews__author span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--h-muted);
}

/* Find us + final call to action */

.home-visit {
  padding-bottom: 84px;
}

.home-visit__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.home-visit__details,
.home-visit__cta {
  padding: 40px;
  border-radius: var(--h-radius);
}

.home-visit__details {
  background: var(--h-grey);
}

.cleeve-home .home-visit__address {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.cleeve-home .home-visit__note {
  margin: 18px 0 10px;
  color: var(--h-muted);
}

.cleeve-home .home-visit__contact {
  margin: 0;
}

.cleeve-home .home-visit__contact a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.home-visit__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: var(--h-navy);
}

.cleeve-home .home-visit__cta h2,
.cleeve-home .home-visit__cta p {
  color: #fff;
}

.cleeve-home .home-visit__cta p {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.85);
}

/* Tablet */

@media (max-width: 1000px) {
  .cleeve-home .home-hero__title {
    font-size: 46px;
  }

  .home-sessions__days,
  .cleeve-home .home-steps__list,
  .cleeve-home .home-reviews__list {
    grid-template-columns: 1fr;
  }

  .home-welcome__inner,
  .home-visit__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cleeve-home .home-highlights li + li {
    border-left: 0;
  }

  .cleeve-home .home-highlights li {
    padding: 16px 22px;
  }

  .cleeve-home .home-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

  .cleeve-home .home-gallery__grid li:first-child {
    grid-column: span 2;
  }
}

/* Phone */

@media (max-width: 600px) {
  .cleeve-home * {
    font-size: 16px;
  }

  .cleeve-home h2 {
    font-size: 28px;
  }

  .home-hero {
    min-height: 0;
    padding: 56px 0 96px;
  }

  /* Text spans the full width here, so shade the whole photo. */
  .home-hero::after {
    background: linear-gradient(180deg, rgba(20, 15, 54, 0.7) 0%, rgba(20, 15, 54, 0.8) 100%);
  }

  .cleeve-home .home-hero__title {
    font-size: 36px;
  }

  .cleeve-home .home-hero__intro {
    font-size: 18px;
  }

  .home-hero__actions .home-btn {
    flex: 1 1 100%;
  }

  .cleeve-home .home-highlights {
    grid-template-columns: 1fr;
  }

  .cleeve-home .home-highlights li {
    padding: 13px 18px;
  }

  .home-section {
    padding-top: 60px;
  }

  .cleeve-home .home-prices__list {
    grid-template-columns: 1fr;
  }

  .home-prices__card {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 18px 20px;
    text-align: left;
  }

  .cleeve-home .home-prices__price {
    margin: 0 0 0 auto;
    font-size: 30px;
  }

  .home-prices__card .home-btn--small {
    flex: 1 1 100%;
  }

  .home-visit {
    padding-bottom: 60px;
  }

  .home-visit__details,
  .home-visit__cta {
    padding: 28px 22px;
  }

  .home-visit__cta .home-btn {
    align-self: stretch;
  }
}
