/* Cape & Fade Gents Salon */

@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #4d5c4f;
  --header-h: 100px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Libre Baskerville", serif;
  font-size: 14px;
  line-height: 24px;
  color: #fff;
  background: #000;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
svg { fill: currentColor; }

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #000;
  transition: opacity .5s, visibility .5s;
}
.preloader img { width: 114px; }
.preloader-bar {
  width: 120px;
  height: 4px;
  background: #fff;
  transform-origin: left;
  animation: preload 1.2s ease-out forwards;
}
@keyframes preload { from { transform: scaleX(0); } }
body:not(.is-loading) .preloader { opacity: 0; visibility: hidden; }

/* Header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--header-h);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .1);
  transition: background-color .3s;
}
.site-header.is-scrolled { position: fixed; background: #000; }
.header-inner { position: relative; display: flex; height: 100%; }
.brand { position: absolute; top: 10px; left: 15px; z-index: 1; }
.brand img { display: block; width: 160px; height: 160px; }

.site-nav { display: flex; margin-left: auto; }
.nav-links { display: flex; }
.nav-links a {
  display: block;
  padding: 38px 45px;
  color: rgba(255, 255, 255, .8);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.is-active { color: #fff; }
.nav-social { display: flex; align-items: center; }
.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  color: rgba(255, 255, 255, .8);
  transition: color .2s;
}
.nav-social a:hover { color: #fff; }
.nav-social svg { width: 14px; height: 16px; }

.nav-toggle { display: none; }

/* Sections */
.section {
  position: relative;
  padding-top: var(--pt);
  padding-bottom: var(--pb);
  background: var(--bg) 50% 0 / cover no-repeat;
  text-align: center;
}
.section-fixed { background-attachment: fixed; }
[id] { scroll-margin-top: var(--header-h); }

.heading { font-size: 36px; line-height: 48px; }
.heading-normal { line-height: 54px; }
.heading-super { font-size: 60px; line-height: 72px; }

.btn-row { margin-bottom: 22px; }
.btn {
  display: inline-block;
  padding: 14px 20px;
  border: 1px solid transparent;
  font: inherit;
  line-height: 18px;
  color: #fff;
  cursor: pointer;
  transition: background-color .1s ease-in-out;
}
.btn-icon svg { width: 16px; height: 18px; margin-right: 10px; vertical-align: top; }
.btn-black { background: #2a2a2a; }
.btn-black:hover { background: #1b1b1b; }
.btn-green { background: var(--green); }
.btn-green:hover { background: #3f4b41; }

/* Hero */
.hero { --pt: 620px; --pb: 260px; }
.hero-title { margin-bottom: 30px; font-size: 64px; line-height: 64px; }

/* Our story */
.story { --pt: 220px; --pb: 280px; }
.story-panel { padding: 75px 15px; background: rgba(2, 2, 2, .55); }
.story-text { margin-top: 20px; }
.story-text p + p { margin-top: 11.5px; }

/* Tagline */
.tagline { --pt: 220px; --pb: 269px; }
.tagline img { display: block; width: 360px; margin: 0 auto 40px; }
.tagline p { margin-bottom: 14px; font-size: 22px; }

/* Services */
.services { --pt: 210px; --pb: 180px; }
.services .heading { margin-bottom: 80px; }
.menu-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }

/* Products */
.products { --pt: 210px; --pb: 250px; }
.products-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 30px; align-items: start; }
/* Lines up with the product tiles: they start 34px down and are (column width - 32px) square */
.products-intro { display: block; width: calc((100% - 32px) * 285 / 275); margin: 34px auto 0; }
.carousel { position: relative; margin: 20px 0 62px; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform .6s ease; }
.carousel-track li { flex: 0 0 calc(100% / var(--per-view)); padding: 14px 16px; }
.carousel-track img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 24px;
  object-fit: contain;
  background: rgba(0, 0, 0, .45);
}
.carousel-track h3 {
  display: inline-block;
  padding: 25px 25px 36.5px;
  background: rgba(0, 0, 0, .2);
  font-size: 18px;
  line-height: 27px;
}
.carousel-arrow {
  position: absolute;
  top: 42%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: -7px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .2);
  color: #fff;
  cursor: pointer;
}
.carousel-arrow svg { height: 30px; flex: none; }
.carousel-arrow.prev { left: 0; }
.carousel-arrow.next { right: 0; }

/* Social */
.social { --pt: 210px; --pb: 250px; }
.social-handle { margin-top: 14px; font-size: 18px; }
.social-handle svg { width: 22px; height: 22px; margin-right: 10px; vertical-align: -4px; }
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 34px 0; }
.social-grid a { position: relative; display: block; overflow: hidden; }
.social-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .35s ease-in-out;
}
.social-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .35s ease-in-out;
}
.social-icon svg { width: 44px; height: 44px; }
.social-grid a:hover img { transform: scale(1.1); }
.social-grid a:hover .social-icon { opacity: 1; }
.social-invite { margin-bottom: 18px; font-size: 16px; }

/* Touch screens have no hover: keep a small icon on each photo */
@media (hover: none) {
  .social-icon {
    inset: auto 0 0 auto;
    padding: 8px;
    opacity: 1;
  }
  .social-icon svg { width: 20px; height: 20px; }
}

/* Contact */
.contact { --pt: 130px; --pb: 180px; }
.contact .heading { margin-bottom: 10px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; }
.contact-form { padding-top: 24px; }
.contact-form input, .contact-form textarea {
  display: block;
  width: 100%;
  height: 36px;
  margin-bottom: 15px;
  padding: 6px 16px;
  border: 1px solid #000;
  border-radius: 4px;
  background: rgba(0, 0, 0, .44);
  font: inherit;
  color: #fff;
}
.contact-form textarea { height: 396px; resize: vertical; }
.contact-form ::placeholder { color: #fff; opacity: 1; }
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--green); }
.contact-form .form-honey { display: none; }
.btn-send { padding: 14px 68px; border: 0; line-height: 24px; }
.btn-send:disabled { opacity: .6; cursor: default; }
.form-status { min-height: 24px; margin-top: 12px; }
.contact-info { padding-top: 20px; }
.branch-tabs { display: flex; }
.branch-tabs button {
  flex: 1;
  padding: 10px 20px;
  border: 0;
  background: rgba(0, 0, 0, .44);
  font: inherit;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.branch-tabs button:hover { color: #fff; }
.branch-tabs button[aria-selected="true"] { background: var(--green); color: #fff; }
.branch-panel > a, .branch-panel > a img { display: block; width: 100%; }
.branch-panel p { margin: 30px 0 8px; }
.branch-panel p img { float: left; margin-right: 21px; }

/* See you soon */
.see-you { --pt: 370px; --pb: 290px; }
.see-you .heading { margin-bottom: 20px; }
.hours { margin: 20px 0 11.5px; font-size: 24px; line-height: 35.5px; }

/* Branch chooser */
.branch-dialog {
  width: min(360px, calc(100% - 30px));
  padding: 40px 30px 30px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: #111;
  color: #fff;
  text-align: center;
}
.branch-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.branch-dialog h2 { margin-bottom: 24px; font-size: 22px; line-height: 30px; }
.branch-dialog .btn { display: block; margin-top: 12px; }
.branch-dialog-close {
  position: absolute;
  top: 6px;
  right: 10px;
  padding: 4px 8px;
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
}
.branch-dialog-close:hover { color: #fff; }

/* Footer */
.site-footer { padding: 20px 0; background: #212121; text-align: center; }

/* Floating elements */
.book-tab {
  position: fixed;
  top: 350px;
  left: -2px;
  z-index: 1000;
  padding: 6px 13px 8px;
  border-radius: 0 0 10px 10px;
  background: var(--green);
  font-size: 15px;
  line-height: 25.7px;
  white-space: nowrap;
  transform: rotate(-90deg);
  transform-origin: left top;
  transition: background-color .2s;
}
.book-tab:hover { background: #a4a4a4; }

.whatsapp {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
}
.whatsapp svg { height: 28px; }

.go-top {
  position: fixed;
  right: 12px;
  bottom: -44px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--green);
  opacity: 0;
  transition: all .5s;
}
.go-top.is-visible { bottom: 12px; opacity: 1; }
.go-top svg { height: 16px; }

/* Layout widths */
@media (min-width: 768px) { .container { width: 750px; } }
@media (min-width: 992px) { .container { width: 970px; } }
@media (min-width: 1200px) { .container { width: 1170px; } }

/* Medium desktop: 992 to 1199 */
@media (max-width: 1199px) {
  .nav-links a { padding-left: 24px; padding-right: 24px; }
  .hero { --pt: 590px; --pb: 160px; }
  .story { --pt: 210px; }
  .tagline { --pt: 170px; --pb: 220px; }
  .tagline img { width: 293px; }
  .services { --pb: 160px; }
  .products, .social { --pb: 200px; }
  .products-intro { width: 100%; margin-top: calc(18px + 26.75%); }
  .contact { --pb: 140px; }
  .see-you { --pt: 320px; --pb: 250px; }
}

/* Tablet and mobile: single column, collapsible menu */
@media (max-width: 991px) {
  :root { --header-h: 110px; }
  [id] { scroll-margin-top: 0; }

  .site-header, .site-header.is-scrolled { position: relative; height: auto; background: #000; }
  .section-fixed { background-attachment: scroll; }
  .header-inner { display: flow-root; min-height: var(--header-h); }
  .brand { position: static; float: left; margin: 10px 0 0; }
  .brand img { width: 100px; height: 100px; }

  .nav-toggle {
    display: block;
    float: right;
    width: 24px;
    height: 16px;
    margin: 42px 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
  }
  .nav-toggle span {
    position: absolute;
    left: 0;
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, .8);
    transition: transform .2s, opacity .2s;
  }
  .nav-toggle span:nth-child(1) { top: 0; }
  .nav-toggle span:nth-child(2) { top: 7px; }
  .nav-toggle span:nth-child(3) { top: 14px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none;
    clear: both;
    margin: 0 -15px;
    padding: 10px 0 0;
  }
  .site-nav.is-open { display: block; }
  .nav-links { display: block; }
  .nav-links a { padding: 8px 45px; text-align: left; }
  .nav-social {
    justify-content: center;
    margin: 10px 15px 0;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .hero { --pt: 460px; --pb: 70px; }
  .story { --pt: 125px; --pb: 180px; }
  .tagline { --pt: 120px; --pb: 170px; }
  .services { --pt: 110px; --pb: 120px; }
  .products, .social { --pt: 110px; --pb: 150px; }
  .contact { --pt: 60px; --pb: 100px; }
  .see-you { --pt: 220px; --pb: 190px; }

  .products-row { display: block; }
  .products-intro { width: auto; margin-top: 70px; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-row { display: block; }
  .go-top { display: none; }
}

/* Phones */
@media (max-width: 767px) {
  .heading { font-size: 24px; line-height: 24px; }
  .heading-normal { line-height: 36px; }
  .heading-super { font-size: 36px; line-height: 43.2px; }

  .hero { --pt: 350px; --pb: 30px; }
  .story { --pt: 80px; --pb: 80px; }
  .tagline { --pt: 120px; --pb: 139px; }
  .services { --pt: 60px; --pb: 70px; }
  .products, .social { --pt: 60px; --pb: 100px; }
  .contact { --pt: 20px; --pb: 50px; }
  .see-you { --pt: 170px; --pb: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0s !important; animation-duration: 0s !important; }
}
