:root {
  --jb-gold: #b99769;
  --jb-dark: #222324;
  --jb-paper: #f6f4f1;
  --jb-text: #343434;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--jb-text);
  font-family: Lato, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.jb-star-modal-open { overflow: hidden; }

.stars-main { overflow: hidden; }

.stars-hero {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 130px 24px 90px;
  background:
    linear-gradient(rgba(24, 25, 26, .58), rgba(24, 25, 26, .68)),
    url("../images/demo/portfolio-1.jpg") center 38% / cover no-repeat;
  color: #fff;
  text-align: center;
}

.stars-hero__inner {
  width: min(820px, 100%);
}

.stars-eyebrow {
  margin: 0 0 16px;
  color: #e4d2ba;
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.stars-hero h1 {
  margin: 0 0 22px;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: .01em;
}

.stars-hero p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(255, 255, 255, .86);
  font-size: 17px;
}

.stars-section {
  padding: 96px 24px 110px;
  background: var(--jb-paper);
}

.stars-section__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.stars-section__heading {
  max-width: 720px;
  margin: 0 auto 54px;
  text-align: center;
}

.stars-section__heading h2 {
  margin: 0 0 14px;
  color: var(--jb-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
}

.stars-section__heading p {
  margin: 0;
  color: #747474;
}

.stars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.star-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 34px rgba(34, 35, 36, .08);
}

.star-card__button {
  -webkit-appearance: none;
  appearance: none;
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.star-card__button::after {
  position: absolute;
  inset: 0;
  content: "";
}

.star-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 800 / 533;
  height: auto;
  object-fit: cover;
  transition: transform .45s ease, opacity .3s ease;
}

.star-card__content {
  min-height: 174px;
  padding: 26px 26px 30px;
}

.star-card h3 {
  margin: 0 0 8px;
  color: var(--jb-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.25;
}

.star-card h3 .star-card__button {
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
}

.star-card p {
  margin: 0 0 18px;
  color: #777;
  font-size: 14px;
  line-height: 1.55;
}

.star-card__more {
  color: var(--jb-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.star-card:hover .star-card__image,
.star-card:focus-within .star-card__image {
  opacity: .86;
  transform: scale(1.025);
}

.star-card__button:focus-visible {
  outline: 1px solid var(--jb-gold);
  outline-offset: 3px;
}

.star-modal[hidden] { display: none !important; }

.star-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(18, 19, 20, .72);
  overflow-x: hidden;
  overflow-y: auto;
}

.star-modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  width: min(980px, 100%);
  max-height: calc(100vh - 56px);
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .34);
  overflow: auto;
}

.star-modal__image {
  display: block;
  width: 100%;
  min-height: 100%;
  object-fit: cover;
}

.star-modal__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 46px 46px;
}

.star-modal__content h2 {
  margin: 0 0 8px;
  color: var(--jb-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
}

.star-modal__role {
  margin: 0 0 24px;
  color: var(--jb-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.star-modal__description {
  margin: 0 0 32px;
  color: #666;
}

.star-modal__close {
  -webkit-appearance: none;
  appearance: none;
  align-self: flex-start;
  min-width: 110px;
  padding: 10px 22px;
  border: 1px solid var(--jb-dark);
  background: transparent;
  color: var(--jb-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.star-modal__close:hover,
.star-modal__close:focus-visible {
  border-color: var(--jb-gold);
  color: var(--jb-gold);
  outline: none;
}

.star-modal__x {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .88);
  color: var(--jb-dark);
  cursor: pointer;
  font: 300 27px/38px Arial, sans-serif;
  text-align: center;
}

@media (max-width: 900px) {
  .stars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .star-modal__dialog { grid-template-columns: 1fr; }
  .star-modal__image { max-height: 42vh; min-height: 0; }
}

@media (max-width: 600px) {
  .stars-hero { min-height: 440px; padding: 100px 22px 66px; }
  .stars-hero h1 { font-size: 42px; }
  .stars-hero p:last-child { font-size: 15px; }
  .stars-section { padding: 68px 18px 80px; }
  .stars-section__heading { margin-bottom: 34px; }
  .stars-grid { grid-template-columns: 1fr; gap: 22px; }
  .star-card__content { min-height: 0; padding: 23px 22px 26px; }
  .star-modal { padding: 14px; }
  .star-modal__dialog { max-height: calc(100vh - 28px); }
  .star-modal__content { padding: 38px 26px 30px; }
  .star-modal__content h2 { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .star-card__image { transition: none; }
}
