/* Shared accessibility and utility styles for the Tiara Salon rebuild.
   Page layout and typography come from the original site CSS. */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

img, video, iframe { max-width: 100%; }

iframe { border: 0; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid #936A14;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10000;
  padding: 0.6rem 1rem;
  background: #0c0c0c;
  color: #fff;
  text-decoration: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 0.75rem;
  top: 0.75rem;
  color: #fff;
  outline: 2px solid #936A14;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Keep original typography, but prevent phone overflow from fixed-width containers. */
@media (max-width: 1200px) {
  .container {
    width: auto !important;
    max-width: 1100px;
    box-sizing: border-box;
  }
}
@media (max-width: 992px) {
  .container {
    width: auto !important;
    max-width: 892px;
    box-sizing: border-box;
  }
}
@media (max-width: 768px) {
  .container {
    width: auto !important;
    max-width: 668px;
    box-sizing: border-box;
  }
}
@media (max-width: 736px) {
  .container { width: auto !important; max-width: 100%; }
}
@media (max-width: 600px) {
  .container {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Masonry service thumbs: JS packs like Isotope; CSS keeps images fluid
   and lays wrapping anchors in a row if JS has not run yet. */
.works-masonry-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.works-masonry-container > a {
  display: block;
  float: left;
  width: 25%;
}
.works-masonry-container > a .masonry-item {
  width: 100% !important;
}
@media (max-width: 992px) {
  .works-masonry-container > a { width: 50%; }
}
.works-masonry-container .masonry-item picture,
.works-masonry-container .masonry-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* JS-sized helpers have CSS fallbacks so content is visible before/without script. */
[class~="halfheight"] { height: 50vh; min-height: 280px; }
[class~="90percheight"] { height: 90vh; min-height: 90vh; }
#map { width: 100%; }
#map iframe { width: 100%; height: 100%; min-height: 280px; display: block; }

/* Testimonials: transform slider (one card on mobile, two on desktop).
   Overflow is hidden so adjacent cards never peek. Heights are equalized in JS. */
.testimonial-carousel.tiara-carousel {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
.tiara-carousel-track {
  display: flex;
  align-items: stretch;
  will-change: transform;
  transition: transform 0.45s ease;
}
.tiara-carousel-track .testimonial-carousel-item {
  flex: 0 0 50%;
  max-width: 50%;
  box-sizing: border-box;
}
@media (max-width: 599px) {
  .tiara-carousel-track .testimonial-carousel-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
.tiara-carousel-dots {
  text-align: center;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tiara-carousel-dots button {
  width: 12px;
  height: 12px;
  margin: 0 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}
.tiara-carousel-dots button.is-active { background: #0c0c0c; }
.tiara-carousel-dots button:focus-visible { outline: 2px solid #936A14; outline-offset: 2px; }

/* Inactive accordion items were opacity 0.4 (#161618 over white = 2.55:1). 0.62 meets WCAG AA 4.5:1 when mobile shrinks these headings below large-text size. */
.studio-approach-item { cursor: pointer; opacity: 0.62; }

.studio-approach-item-details { display: none; }
.studio-approach-item.active-item .studio-approach-item-details { display: block; }

/* Product logo display sizes from the original inline styles */
.logo-phyto { width: 200px; height: 156px; object-fit: contain; }

/* Layout fixes so original hero / overlay rules work after optimization */
section.mastwrap { position: relative; }
.contact-page .contact-header picture {
  display: block;
  width: 100%;
}
.contact-page .contact-header picture img {
  height: 30%;
  max-height: 500px;
  min-height: 435px;
  width: 100%;
  object-fit: cover;
  opacity: .1;
}
.promo-text, .team, .studio-approach, .features-item, .works-container {
  position: relative;
  z-index: 2;
}


/* v22: richer, warmer gold (was #7e6719 / credits #9c8843; hover was #8d7b3e) */
.gold { color: #C9A43B; }
.credits p { color: #C9A43B !important; }

/* Copyright same size as Designed by ArtVersion (remove <sup> shrink) */
.credits p,
.credits p sup {
    font-size: 14px;
    line-height: 21px;
}
.credits p sup {
    vertical-align: baseline;
    top: 0;
    font-size: 14px;
}

/* Footer left-aligned on mobile */
@media (max-width: 767px) {
    footer.mastfoot,
    footer.mastfoot .text-centre,
    footer.mastfoot .text-left,
    footer.mastfoot .text-right,
    .credits,
    .credits .text-centre,
    .credits .text-left,
    .credits .text-right {
        text-align: left !important;
    }
}

/* Post-footer white space: .slant-bg-wrap was height:150% (desktop only,
   >992px), an absolutely positioned layer 50% taller than mastwrap that
   extended the document scroll past the footer. */
body.page-inner section.mastwrap {
    height: auto;
    min-height: 0;
}
body.page-inner .slant-bg-wrap {
    /* v50: pointer-events none + bottom:auto keep this overlay from
       stealing clicks on Fine Print / Site by ArtVersion in WebKit.
       v53: height:auto collapsed the wrap to 0px and removed the hero
       background image on every slant page. The original site has no
       positioned mastwrap, so this box is sized from the viewport, not
       the page (wrap 150% x ::before 50% of the viewport = 75vh on
       desktop, 100vh on tablet/phone). Same here, capped at the page so
       it never adds scroll space after the footer. */
    height: 100vh !important;
    max-height: 100%;
    top: 0;
    bottom: auto;
    pointer-events: none;
    overflow: hidden;
}
body.page-inner .slant-layer::before {
    height: 100%;
}
@media (min-width: 993px) {
    body.page-inner .slant-bg-wrap {
        /* Match the original 1440-wide image crop, but keep the left
           100px rail white as on the original. */
        left: -100px;
        width: calc(100% + 100px);
        height: 75vh !important;
        clip-path: inset(0 0 0 100px);
    }
}
body.page-inner .slant-layer,
body.page-inner .slant-layer::before {
    pointer-events: none;
}


/* v23: site-wide mobile containment.
   Root cause of iPhone left-edge clipping was the desktop -100px full-bleed
   breakout (fixed in menu.css so it only applies at min-width:993px). These
   rules keep text, tiles, footers and heroes inside the viewport at all
   phone and tablet widths, including WebKit. */
@media (max-width: 992px) {
  html, body {
    overflow-x: clip;
    max-width: 100%;
  }
  img, picture, video, iframe, embed, object {
    max-width: 100%;
  }
  /* Prevent stacked Bootstrap .row negative margins from slipping past the container. */
  .row {
    margin-left: 0;
    margin-right: 0;
  }
  .container,
  .container-fluid {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
  }
  footer.mastfoot,
  .credits,
  .studio-services,
  .studio-services-inner,
  .works-container,
  .works-masonry-container,
  .contact-header,
  .fold-promo,
  .promo-text,
  .testimonials,
  .clients-logos,
  .team,
  .belowfold {
    max-width: 100%;
    box-sizing: border-box;
  }
  footer.mastfoot,
  .credits {
    overflow-x: hidden;
  }
  footer.mastfoot .container,
  .credits .container {
    width: 100% !important;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
  .contact-header-text {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
  .contact-header h1,
  .fold-promo h1,
  .studio-services h2,
  .studio-services h3,
  .studio-services p,
  .services-item,
  .services-item h3 {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }
  .contact-header h1,
  .fold-promo h1 {
    padding-left: 20px;
    padding-right: 20px;
  }
  .contact-header h1 {
    width: auto !important;
    left: 0;
    right: 0;
  }
  .studio-services-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 600px) {
  .credits {
    padding: 24px 0;
  }
}


/* v26: full-tile gold overlay on service tiles (hair/nails/face/body).
   Replaces the radial glow. A translucent gold wash sweeps across the
   entire tile, holds, then eases out. Opacity/transform only. */
.service-tiles .masonry-item {
  position: relative;
  overflow: hidden;
}
.service-tiles .masonry-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #C9A43B;
  opacity: 0;
  transform: translateX(-100%);
  will-change: opacity, transform;
}
.service-tiles .masonry-item.is-overlay::before {
  animation: tiara-tile-overlay 1.15s ease-in-out;
}
@keyframes tiara-tile-overlay {
  0%   { opacity: 0; transform: translateX(-100%); }
  40%  { opacity: 0.4; transform: translateX(0); }
  65%  { opacity: 0.4; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0); }
}
@media (hover: hover) and (pointer: fine) {
  .service-tiles .masonry-item::before {
    transition: opacity 0.45s ease, transform 0.55s ease;
  }
  .service-tiles > a:hover .masonry-item::before,
  .service-tiles > a:focus-visible .masonry-item::before,
  .service-tiles > a:focus .masonry-item::before {
    animation: none;
    opacity: 0.4;
    transform: translateX(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .service-tiles .masonry-item::before,
  .service-tiles .masonry-item.is-overlay::before,
  .service-tiles > a:hover .masonry-item::before,
  .service-tiles > a:focus-visible .masonry-item::before {
    animation: none;
    transition: none;
    opacity: 0;
    transform: none;
    will-change: auto;
  }
}


/* Mobile dots: larger hit targets. Swipe is transform-based, not scroll-snap. */
@media (max-width: 599px) {
  .testimonial-carousel.tiara-carousel {
    overflow: hidden;
  }
  .tiara-carousel-dots {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
  }
  .tiara-carousel-dots button,
  .tiara-carousel-dots button.is-active {
    position: relative;
    width: 44px;
    height: 44px;
    margin: 0;
    background: transparent;
    border-radius: 0;
    flex: 0 0 44px;
    vertical-align: middle;
  }
  .tiara-carousel-dots button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #ccc;
  }
  .tiara-carousel-dots button.is-active::after {
    background: #0c0c0c;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tiara-carousel-track {
    transition: none;
  }
}

/* Promotions: New Client Offer */
.new-client-offer .offer-heading,
.fold-promo h1 .offer-heading {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.new-client-offer p {
  margin: 0 0 16px;
  max-width: 40em;
}
.new-client-offer .offer-cta {
  margin-top: 8px;
}
.new-client-offer .offer-cta a {
  color: #936A14;
  text-decoration: none;
}
.new-client-offer .offer-cta a:hover,
.new-client-offer .offer-cta a:focus-visible {
  text-decoration: underline;
}


/* v23: inner-page titles clear the fixed top-left logo on mobile.
   .pad-top is only 40px, which sits the "News and Press" / "Product
   selection" headings under the wordmark. */
@media (max-width: 992px) {
  body.page-inner main > .promo-text.pad-top,
  body.page-inner main > .team.pad-top,
  body.page-inner section.mastwrap > .promo-text.pad-top,
  body.page-inner section.mastwrap > .team.pad-top,
  body.page-inner .belowfold > .promo-text.pad-top:first-child,
  body.page-inner .belowfold > .team.pad-top:first-child {
    padding-top: 100px;
  }
}


/* v23: founder note on Experience Tiara, in the dark band above Innovation. */
.founder-section {
  align-items: center;
  margin-bottom: 40px;
}
.founder-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
}
.founder-section .founder-heading,
.promo-text h2.founder-heading {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 21px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.founder-quote {
  display: block;
  width: 100%;
  margin: 0;
  overflow-wrap: break-word;
}
.founder-sign {
  display: block;
  width: 100%;
  margin: 22px 0 0;
  font-style: italic;
  letter-spacing: 0.04em;
}
@media (max-width: 767px) {
  .founder-section .founder-photo,
  .founder-section .founder-message {
    width: 100%;
    float: none;
    margin-bottom: 24px;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .founder-section {
    margin-bottom: 16px;
  }
}


/* v26: Products logo wall — larger marks, tight hairline grid.
   2 columns on mobile, 3 on tablet, 4 on desktop. Equal square-ish
   cells, 1px #e5e5e5 dividers. Odd count (7) leaves the last cell
   in place with no empty gray hole. */
.product-logo-grid,
.product-logo-grid.row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-left: 0;
  margin-right: 0;
  border-top: 1px solid #e5e5e5;
  border-left: 1px solid #e5e5e5;
  background: transparent;
}
.product-logo-grid:before,
.product-logo-grid:after {
  content: none;
  display: none;
}
.product-logo-grid > article {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  float: none;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  aspect-ratio: 1 / 1;
  min-height: 0;
  text-align: center;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}
.product-logo-grid picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
}
.product-logo-grid img {
  display: block;
  width: 66%;
  max-width: 66%;
  height: auto;
  max-height: 54%;
  margin: 0 auto;
  object-fit: contain;
}
/* Optical weight: thin wide wordmarks fill 80–85% of the cell.
   Bold or compact marks stay smaller so they don't overpower. */
.product-logo-grid img[src*="dermalogica"],
.product-logo-grid img[src*="opi"],
.product-logo-grid img[src*="schwarzkopf"],
.product-logo-grid img[src*="essie"],
.product-logo-grid .logo-youngblood {
  width: 84%;
  max-width: 84%;
  height: auto;
  max-height: 46%;
}
.product-logo-grid img[src*="moroccanoil"],
.product-logo-grid .logo-phyto {
  width: 60%;
  max-width: 60%;
  height: auto;
  max-height: 62%;
}
@media (min-width: 768px) {
  .product-logo-grid,
  .product-logo-grid.row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 993px) {
  .product-logo-grid,
  .product-logo-grid.row {
    grid-template-columns: repeat(4, 1fr);
  }
}



/* v29: lead-in titles inside headings sit on their own line.
   .fold-promo h1 > span already does this in the original CSS.
   .promo-text h2 > span was commented out there, which ran
   "Product selectionAt" and "ones.Bridal" together. Keep the
   original type size; only break the line. */
.fold-promo h1 > span.font2,
.fold-promo h1 > span.font2bold,
.promo-text h2 > span.font2,
.promo-text h2 > span.font2bold,
.contact-header h1 > span.font2,
.contact-header h1 > span.font2bold {
    display: block;
    margin-bottom: 0.45em;
}

/* Project/hero gallery: one full-viewport slide at a time, with dots like the original. */
.project-carousel-wrap {
  position: relative;
  overflow: hidden;
}
.project-carousel.tiara-project-carousel,
.project-carousel-wrap.tiara-project-ready {
  overflow: hidden;
}
.project-carousel .tiara-project-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.project-carousel.tiara-project-carousel .project-carousel-item {
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.project-carousel-wrap .owl-dots {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 3;
  margin: 0;
  line-height: 0;
}
.project-carousel-wrap .owl-dot {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  vertical-align: top;
}
.project-carousel-wrap .owl-dot span {
  display: block;
  width: 10px;
  height: 10px;
  margin: 5px 7px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.45);
}
.project-carousel-wrap .owl-dot.active span,
.project-carousel-wrap .owl-dot.is-active span {
  background: #ffffff;
}
.project-carousel-wrap .owl-dot:focus-visible span {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .project-carousel-wrap.tiara-project-ready {
    height: 100vh !important;
  }
}

.approach-toggle{font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:inherit;}
.studio-approach-item-details[hidden]{display:none!important;}

/* v74 (t335u): reserve masonry tile space from the first paint so the
   grid does not stack and then jump. Images already carry width/height.
   ROLLBACK: delete this block and restore the layoutMasonry invocations
   in js/inner.js. */
.works-masonry-container.clearfix::before,
.works-masonry-container.clearfix::after {
  display: none !important;
  content: none !important;
}
.works-masonry-container {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: row dense;
  align-items: start;
  width: 100%;
}
@media screen and (max-width: 992px) {
  .works-masonry-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
.works-masonry-container > a,
.works-masonry-container > .masonry-item {
  float: none;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
  position: relative;
  box-sizing: border-box;
}
.works-masonry-container > a .masonry-item {
  width: 100% !important;
}
.works-masonry-container .masonry-item picture,
.works-masonry-container .masonry-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* 6-tile mixed packing (750/250/750/500/500/250) matches the previous
   JS shortest-column layout, with container height reserved up front. */
@media screen and (min-width: 993px) {
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) {
    display: block;
    aspect-ratio: 16 / 5;
    overflow: hidden;
  }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > .masonry-item,
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > a {
    position: absolute;
    width: 25% !important;
    box-sizing: border-box;
  }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(1) { left: 0; top: 0; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(2) { left: 25%; top: 0; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(3) { left: 50%; top: 0; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(4) { left: 75%; top: 0; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(5) { left: 25%; top: 33.3333%; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(6) { left: 75%; top: 66.6667%; }
}
@media screen and (max-width: 992px) {
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) {
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
  }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > .masonry-item,
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > a {
    position: absolute;
    width: 50% !important;
    box-sizing: border-box;
  }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(1) { left: 0; top: 0; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(2) { left: 50%; top: 0; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(3) { left: 50%; top: 16.6667%; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(4) { left: 0; top: 50%; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(5) { left: 50%; top: 66.6667%; }
  .works-masonry-container:has(> :nth-child(6)):not(:has(> :nth-child(7))) > :nth-child(6) { left: 0; top: 83.3333%; }
}
