/* ==========================================================================
   Mindset Barbershop — urban redesign
   Palette pulled from the shop: concrete floor, slate wall, gold slats,
   white LED hexagons.
   ========================================================================== */

:root {
  --asphalt: #1a1b1d;
  --asphalt-2: #222427;
  --slate: #3a3e44;
  --concrete: #dddcd7;
  --chalk: #f4f4f1;
  --led: #ffffff;
  --gold: #c9a15b;
  --gold-light: #dcbb80;

  --muted-dark: #a3a6ab;
  /* secondary text on dark */
  --muted-light: #55595f;
  /* secondary text on light */

  --font: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;

  --header-h: 88px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-pad: clamp(72px, 11vw, 140px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--chalk);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html, body { overflow-x: clip; }

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.container {
  width: min(1240px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 52px;
  padding-inline: 28px;
  background: var(--gold);
  color: var(--asphalt);
  border: 2px solid var(--gold);
  font: 600 .95rem/1 var(--font);
  font-variation-settings: "wdth" 100;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}

.button:hover {
  background: transparent;
  color: var(--chalk);
}

.button--light {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--asphalt);
}

.button--light:hover {
  background: transparent;
  color: var(--chalk);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color .3s;
}

.site-header.scrolled {
  background: var(--asphalt);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  block-size: var(--header-h);
}

.site-header__logo img {
  inline-size: 75px;
  block-size: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.site-nav a:not(.button) {
  font-weight: 500;
  font-size: 1.1rem;
  text-decoration: none;
  padding-block: 6px;
  border-block-end: 2px solid transparent;
  transition: border-color .2s;
}

.site-nav a:not(.button):hover {
  border-color: var(--chalk);
}

.site-nav__cta {
  min-block-size: 44px;
  padding-inline: 20px;
}

.site-header__toggle {
  display: none;
  position: relative;
  inline-size: 44px;
  block-size: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}

.site-header__toggle span {
  position: absolute;
  inset-inline: 8px;
  block-size: 2px;
  background: var(--chalk);
  transition: transform .25s, top .25s;
  transition: transform .25s, top .25s, opacity .2s;
}

.site-header__toggle span:nth-child(1) { top: 14px; }
.site-header__toggle span:nth-child(2) { top: 21px; }
.site-header__toggle span:nth-child(3) { top: 28px; }

.site-header__toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-block-size: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero__photo {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: -2;
  filter: grayscale(1) contrast(1.05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(26, 27, 29, .55) 0%, rgba(26, 27, 29, .35) 40%, rgba(26, 27, 29, .95) 100%);
}

.hero__content {
  padding-block: calc(var(--header-h) + 20px) clamp(40px, 7vw, 80px);
}

.hero__place {
  font-weight: 500;
  color: var(--concrete);
  margin-block-end: 12px;
}

.hero__title {
  font-size: clamp(4rem, 21vw, 6rem);
  line-height: .78;
  letter-spacing: -.01em;
}

.hero__sub {
  display: block;
  margin-block-start: .35em;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  font-variation-settings: "wdth" 125;
  letter-spacing: .02em;
  line-height: 1;
  color: var(--concrete);
}

.hero__bottom {
  margin-block-start: clamp(28px, 4vw, 48px);
  padding-block-start: 28px;
  border-block-start: 1px solid rgba(244, 244, 241, .3);
}

.hero__bottom .button {
  margin-block-start: 28px; /* space between the text and the button */
}

.hero__copy {
  max-inline-size: 25rem;
  font-size: 1.125rem;
  color: var(--concrete);
}

/* Line-mask reveal */
.line {
  display: block;
  overflow: hidden;
  padding-block: .08em; /* your line-height is .78, so this stops the glyphs being clipped */
}

.line__inner {
  display: block;
  transform: translateY(110%);
  animation: line-up 1s cubic-bezier(.2, .7, .2, 1) .2s forwards;
}

.hero__sub .line__inner {
  animation-delay: .4s;
}

@keyframes line-up {
  to { transform: translateY(0); }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--section-pad);
}

.section--concrete {
  background: var(--concrete);
  color: var(--asphalt);
}

.section--dark {
  background: var(--asphalt);
  color: var(--chalk);
}

.section--slate {
  background: var(--slate);
  color: var(--chalk);
}

.reviews__more {
  margin-top: 1rem;
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px 48px;
  margin-block-end: clamp(40px, 6vw, 72px);
}

.section__title {
  font-size: clamp(3rem, 6vw, 6.5rem);
}

.section__lead {
  max-inline-size: 42ch;
  font-size: 1.125rem;
  justify-self: end;
}

.section--concrete .section__lead {
  color: var(--muted-light);
}

.section--dark .section__lead,
.section--slate .section__lead {
  color: var(--muted-dark);
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /*border-block-start: 2px solid rgba(26, 27, 29, .25);*/
}

.service {
  padding: 36px 32px 8px;
  border-inline-start: 1px solid rgba(26, 27, 29, .25);
}

.service:first-child {
  border-inline-start: 0;
  padding-inline-start: 0;
}

.service__icon {
  inline-size: 56px;
  block-size: 56px;
  object-fit: contain;
  filter: brightness(0);
  /* turns the gold icons asphalt-black */
  opacity: .88;
  margin-block-end: 28px;
}

.service__name {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-block-end: 12px;
}

.service p {
  color: var(--muted-light);
  max-inline-size: 30ch;
}

/* ---------- Prices ---------- */
.prices__layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}

.prices__photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.prices__photo img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.prices__body .section__lead {
  justify-self: start;
  margin-block: 16px 40px;
}

.price-list {
  list-style: none;
  margin: 0 0 44px;
  padding: 0;
  border-block-start: 1px solid rgba(244, 244, 241, .2);
}

.price-list__item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-block: 18px;
  border-block-end: 1px solid rgba(244, 244, 241, .2);
}

.price-list__name {
  font-size: 1.125rem;
  font-weight: 500;
}

.price-list__dots {
  flex: 1;
  border-block-end: 2px dotted rgba(244, 244, 241, .25);
  transform: translateY(-5px);
}

.price-list__price {
  font-size: 2rem;
  font-weight: 700;
  font-variation-settings: "wdth" 62;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Team ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.person__photo {
  inline-size: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1);
  margin-block-end: 20px;
}

.person__photo--empty {
  display: grid;
  place-items: center;
  background: var(--slate);
  color: var(--concrete);
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: 1;
}

.person {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
}

.person__photo {
  grid-column: 1 / -1;
}

.person__name {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
}

.person__role {
  color: var(--muted-light);
  font-weight: 500;
}

/* ---------- Reviews ---------- */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px);
}

.review {
  margin: 0;
  padding-block-start: 28px;
  border-block-start: 2px solid var(--chalk);
}

.review__stars {
  color: var(--gold);
  letter-spacing: .15em;
  margin-block-end: 18px;
  filter: brightness(1.4);
}

.review blockquote {
  margin: 0 0 24px;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.35;
  font-weight: 500;
}

.review figcaption {
  color: var(--muted-dark);
  font-weight: 500;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--asphalt);
}

.gallery__item {
  margin: 0;
  overflow: hidden;
}

.gallery__item img {
  inline-size: 100%;
  block-size: auto;   /* natural height, so nothing is cropped */
  transition: filter .4s;
}



/* ---------- Contact ---------- */
.contact__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-block-end: clamp(48px, 7vw, 88px);
}

.contact__title {
  font-size: clamp(4rem, 13vw, 6rem);
  line-height: .82;
}

/* The signature: the shop's hexagon light rig, switching on when it scrolls into view */
.contact__hex {
  flex-shrink: 0;
  inline-size: min(36vw, 420px);
  color: var(--led);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .9)) drop-shadow(0 0 20px rgba(255, 255, 255, .4));
}

.contact__hex polygon {
  opacity: 0;
}

.contact__hex.is-on polygon {
  animation: led-on 1.4s steps(1, end) both;
}

.contact__hex.is-on polygon:nth-child(2) {
  animation-delay: .15s;
}

.contact__hex.is-on polygon:nth-child(3) {
  animation-delay: .35s;
}

.contact__hex.is-on polygon:nth-child(4) {
  animation-delay: .5s;
}

.contact__hex.is-on polygon:nth-child(5) {
  animation-delay: .7s;
}

@keyframes led-on {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  28% {
    opacity: .15;
  }

  40% {
    opacity: 1;
  }

  46% {
    opacity: .3;
  }

  56%,
  100% {
    opacity: 1;
  }
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block-start: 32px;
  border-block-start: 1px solid rgba(244, 244, 241, .2);
  margin-block-end: 56px;
}

.contact__item h3 {
  font-size: 1.75rem;
  margin-block-end: 16px;
}

.contact__item p+p {
  margin-block-start: 8px;
}

.contact__item a {
  text-decoration: none;
  /*border-block-end: 1px solid rgba(244, 244, 241, .35);
  transition: border-color .2s;*/
}

.contact__item a:hover {
  border-color: var(--chalk);
}

.contact__item i {
  inline-size: 1.25em;
  /*color: var(--muted-dark);*/
}

.hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 24px;
  margin: 0;
}

.hours dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */
.site-footer {
  border-block-start: 1px solid rgba(244, 244, 241, .12);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
  color: var(--muted-dark);
  font-size: .9rem;
}

/* ---------- Responsive ---------- */
/* ---------- Desktop header: links left, logo centre, CTA right ---------- */
@media (min-width: 901px) {
  :root {
    --header-h: 108px;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .site-header__logo img {
    inline-size: 88px; /* was 64px */
  }

  /* Nav spans the full width: links sit on the left, CTA is pushed right */
  .site-nav {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .site-nav__cta {
    margin-inline-start: auto;
  }

  /* Logo sits in the middle column, on top of the nav row */
  .site-header__logo {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 1;
  }

  .contact .container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .contact__grid {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  /* logo drops to the bottom row, left */
  .contact__top {
    grid-column: 1;
    grid-row: 2;
    margin-block-end: 0;
  }

  .contact__top img {
    inline-size: 140px;
    block-size: auto;
  }

  /* button on the same row, right */
  .contact__cta {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .hero {
     min-block-size: min(70svh, 640px);
  }

  .hero__content {
    padding-block: calc(var(--header-h) + 140px) 60px; 
  }

  .site-header__toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px var(--gutter) 32px;
    background: var(--asphalt);
    border-block-end: 1px solid rgba(244, 244, 241, .12);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }

  .site-nav.open {
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .site-nav a:not(.button) {
    font-size: 1.3rem;
    font-weight: 600;
  }

  .site-nav__cta {
    margin-block-start: 16px;
  }

  .site-header:has(.site-nav.open) {
    background: var(--asphalt);
  }

  .section__head {
    grid-template-columns: 1fr;
  }

  .section__lead {
    justify-self: start;
  }

  .services {
    grid-template-columns: 1fr;
  }

  .service,
  .service:first-child {
    padding-inline: 0;
    padding-block: 28px;
    border-inline-start: 0;
    border-block-end: 1px solid rgba(26, 27, 29, .25);
  }

  .prices__layout {
    grid-template-columns: 1fr;
  }

  .prices__photo {
    aspect-ratio: 16 / 10;
  }

  .reviews {
    grid-template-columns: 1fr;
  }

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

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery__item img {
  inline-size: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top; /* crops from the bottom only if needed */
}

  .contact__hex {
    inline-size: 55vw;
    opacity: .8;
  }

  .contact__top {
    flex-direction: column-reverse;
    align-items: center;
  }

  .contact__hex {
    inline-size: min(60vw, 260px);
    opacity: .8;
  }

}

@media (max-width: 560px) {
  .team {
    grid-template-columns: 1fr;
  }

  .hero__bottom .button {
    inline-size: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .contact__hex polygon {
    opacity: 1;
  }
}