/* Royal Barber 2.2 — branch media, directory, contact and per-site visual system */

:root {
  --rb-light-surface: #efe6d8;
  --rb-ease-out: cubic-bezier(.22,1,.36,1);
  --rb-ease-spring: cubic-bezier(.2,.8,.2,1.15);
}

/* Removed by product decision. */
.rb-marquee { display: none !important; }

/* Refined global motion and card treatment. */
.reveal {
  opacity: 0;
  transform: translateY(32px) scale(.985);
  transition: opacity .75s var(--rb-ease-out), transform .75s var(--rb-ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
[data-tilt-card] {
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
  transition: transform .35s var(--rb-ease-out), box-shadow .35s var(--rb-ease-out), border-color .35s ease;
}
[data-tilt-card]::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  opacity: 0;
  background: radial-gradient(circle at var(--rb-pointer-x,50%) var(--rb-pointer-y,50%), rgba(255,255,255,.11), transparent 38%);
  transition: opacity .25s ease;
}
[data-tilt-card]:hover::after { opacity: 1; }
[data-tilt-card]:hover { border-color: color-mix(in srgb, var(--rb-accent-bright) 55%, transparent); box-shadow: 0 28px 70px rgba(0,0,0,.3); }
.rb-network-content-media img,
.rb-team-card__media img,
.rb-directory-card__media::before,
.rb-philosophy__image,
.rb-branch-philosophy__visual > div { transition: transform .8s var(--rb-ease-out), filter .5s ease; }
article:hover .rb-network-content-media img,
.rb-team-card:hover .rb-team-card__media img,
.rb-directory-card:hover .rb-directory-card__media::before,
.rb-philosophy__visual:hover .rb-philosophy__image,
.rb-branch-philosophy__visual:hover > div { transform: scale(1.045); filter: saturate(1.05); }

/* Main-site philosophy redesign. */
.rb-philosophy {
  overflow: hidden;
  color: #17130f;
  background:
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--rb-accent) 20%, transparent), transparent 28%),
    var(--rb-light-surface);
}
.rb-philosophy p { color: rgba(23,19,15,.7); }
.rb-philosophy .eyebrow { color: var(--rb-accent-dark); }
.rb-philosophy__header {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(300px,.58fr);
  gap: clamp(45px,8vw,120px);
  align-items: end;
  margin-bottom: clamp(55px,8vw,110px);
}
.rb-philosophy__header h2 { max-width: 900px; margin: 0; font-size: clamp(3.2rem,6.6vw,7rem); line-height: .94; }
.rb-philosophy__header > p { max-width: 520px; margin: 0 0 10px; font-size: 1.04rem; }
.rb-philosophy__stage { display: grid; grid-template-columns: minmax(0,1.02fr) minmax(420px,.72fr); gap: clamp(40px,7vw,100px); align-items: stretch; }
.rb-philosophy__visual {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-radius: 52% 52% 12px 12px;
  background: #211b16;
  box-shadow: 0 45px 100px rgba(67,42,23,.24);
}
.rb-philosophy__image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 45%, rgba(7,7,6,.82) 100%),
    var(--rb-philosophy-image, radial-gradient(circle at 55% 25%, rgba(212,165,111,.28), transparent 25%), linear-gradient(145deg,#44301f,#11110f));
  background-position: center;
  background-size: cover;
}
.rb-philosophy__visual::before {
  position: absolute;
  inset: 24px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 52% 52% 6px 6px;
  content: "";
  pointer-events: none;
}
.rb-philosophy__quote {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  padding: 42px;
  color: #fff8ee;
}
.rb-philosophy__quote span { color: var(--rb-accent-bright); font-family: "Playfair Display",serif; font-size: 4rem; line-height: .8; }
.rb-philosophy__quote strong { max-width: 310px; font-family: "Playfair Display",serif; font-size: clamp(1.8rem,3vw,3rem); line-height: 1; text-align: right; }
.rb-philosophy__principles { display: flex; flex-direction: column; justify-content: center; gap: 0; }
.rb-philosophy__principles article {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid rgba(23,19,15,.18);
}
.rb-philosophy__principles article > span { color: var(--rb-accent-dark); font-family: "Playfair Display",serif; font-size: 1.8rem; }
.rb-philosophy__principles h3 { margin-bottom: 9px; font-size: 1.7rem; }
.rb-philosophy__principles p { margin: 0; }
.rb-philosophy__principles .button { align-self: flex-start; margin-top: 34px; color: #17130f; border-color: rgba(23,19,15,.38); }
.rb-philosophy__principles .button:hover { color: var(--rb-text); background: #17130f; }

/* Branch information strip and philosophy. */
.rb-branch-location {
  position: relative;
  z-index: 5;
  padding: 52px 0;
  color: #18130f;
  background: var(--rb-light-surface);
  box-shadow: 0 25px 70px rgba(0,0,0,.15);
}
.rb-branch-location p { color: rgba(24,19,15,.66); }
.rb-branch-location .eyebrow { color: var(--rb-accent-dark); }
.rb-branch-location__grid { display: grid; grid-template-columns: minmax(220px,.5fr) minmax(0,1.5fr); gap: 60px; align-items: center; }
.rb-branch-location__heading h2 { margin: 0; font-size: clamp(2.2rem,4vw,4.3rem); }
.rb-branch-location__facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid rgba(24,19,15,.16); background: rgba(255,255,255,.22); }
.rb-branch-location__facts article { min-height: 175px; padding: 27px; border-right: 1px solid rgba(24,19,15,.14); }
.rb-branch-location__facts article:last-child { border-right: 0; }
.rb-branch-location__facts span { display: block; margin-bottom: 14px; color: rgba(24,19,15,.55); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.rb-branch-location__facts strong { display: block; color: #18130f; font-size: .95rem; line-height: 1.65; }
.rb-branch-location__facts a { display: inline-block; margin-top: 16px; color: var(--rb-accent-dark); font-size: .78rem; font-weight: 800; }
.rb-inline-contact { display: flex; flex-wrap: wrap; gap: 15px; }

.rb-branch-philosophy { color: #15120f; background: var(--rb-light-surface); }
.rb-branch-philosophy p { color: rgba(21,18,15,.69); }
.rb-branch-philosophy .eyebrow { color: var(--rb-accent-dark); }
.rb-branch-philosophy__grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1fr); gap: clamp(55px,9vw,130px); align-items: center; }
.rb-branch-philosophy__visual { position: relative; min-height: 640px; overflow: hidden; border-radius: 52% 52% 8px 8px; background: #191511; box-shadow: 0 42px 90px rgba(60,36,18,.22); }
.rb-branch-philosophy__visual > div { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.75)), var(--rb-branch-about, radial-gradient(circle at 50% 25%, rgba(212,165,111,.26), transparent 25%), linear-gradient(145deg,#44301f,#11110f)); background-size: cover; background-position: center; }
.rb-branch-philosophy__visual::after { position: absolute; inset: 22px; border: 1px solid rgba(255,255,255,.22); border-radius: 52% 52% 4px 4px; content: ""; }
.rb-branch-philosophy__visual > span { position: absolute; right: 28px; bottom: 30px; left: 28px; z-index: 2; color: #f8ecdc; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.rb-branch-philosophy__content h2 { font-size: clamp(3rem,5.5vw,5.8rem); }
.rb-branch-philosophy__points { display: grid; gap: 0; margin: 34px 0 38px; }
.rb-branch-philosophy__points span { padding: 17px 0; border-top: 1px solid rgba(21,18,15,.18); font-weight: 700; }
.rb-branch-philosophy__content .button--outline { color: #15120f; border-color: rgba(21,18,15,.45); }

/* Dedicated branch directory. */
.rb-directory-hero { padding: calc(var(--rb-header-height) + 120px) 0 90px; overflow: hidden; background: radial-gradient(circle at 80% 20%, color-mix(in srgb,var(--rb-accent) 30%,transparent), transparent 30%), #0d0e0c; }
.rb-directory-hero__grid { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 80px; align-items: end; }
.rb-directory-hero h1 { max-width: 900px; font-size: clamp(4rem,8vw,8.5rem); line-height: .92; }
.rb-directory-hero p { max-width: 650px; font-size: 1.08rem; }
.rb-directory-hero__count { padding: 30px 0 10px 30px; border-left: 1px solid var(--rb-border); }
.rb-directory-hero__count strong { display: block; color: var(--rb-accent-bright); font-family: "Playfair Display",serif; font-size: 5rem; line-height: .8; }
.rb-directory-hero__count span { display: block; margin-top: 16px; color: var(--rb-muted); font-size: .76rem; text-transform: uppercase; }
.rb-directory-list { background: var(--rb-bg-soft); }
.rb-directory-grid { display: grid; gap: 34px; }
.rb-directory-card { display: grid; grid-template-columns: minmax(320px,.75fr) minmax(0,1fr); min-height: 490px; overflow: hidden; border: 1px solid var(--rb-border); background: var(--rb-panel); }
.rb-directory-card__media { position: relative; display: block; min-height: 100%; overflow: hidden; background: #171713; }
.rb-directory-card__media::before { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg,transparent 55%,rgba(0,0,0,.68)), var(--rb-directory-image, radial-gradient(circle at 50% 20%,rgba(212,165,111,.22),transparent 23%),linear-gradient(145deg,#2d281f,#0d0e0b)); background-size: cover; background-position: center; }
.rb-directory-card__media span { position: absolute; left: 30px; bottom: 24px; z-index: 2; color: #fff3e2; font-family: "Playfair Display",serif; font-size: 4rem; }
.rb-directory-card__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px,6vw,78px); }
.rb-directory-card__body h2 { font-size: clamp(2.7rem,4.5vw,5rem); }
.rb-directory-card__facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 12px 0 35px; }
.rb-directory-card__facts > div { padding-top: 18px; border-top: 1px solid var(--rb-border); }
.rb-directory-card__facts small { display: block; margin-bottom: 10px; color: var(--rb-muted); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.rb-directory-card__facts strong { font-size: .84rem; line-height: 1.65; }
.rb-directory-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.rb-directory-card__actions .text-link { margin-left: 6px; }

/* Gallery images and haircut videos. */
.rb-gallery-video-preview { position: relative; width: 100%; height: 100%; overflow: hidden; background: #0b0c0a; }
.rb-gallery-video-preview > img,
.rb-gallery-video-preview > video { width: 100%; height: 100%; object-fit: cover; }
.rb-gallery-video-preview::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg,transparent 45%,rgba(0,0,0,.62)); pointer-events: none; }
.rb-video-play { position: absolute; z-index: 4; top: 50%; left: 50%; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; color: #fff; background: rgba(8,8,7,.52); backdrop-filter: blur(10px); transform: translate(-50%,-50%); transition: transform .25s var(--rb-ease-spring), background .25s ease; }
a:hover .rb-video-play { transform: translate(-50%,-50%) scale(1.12); background: var(--rb-accent); }
.rb-gallery-video-preview > small { position: absolute; z-index: 4; left: 16px; bottom: 13px; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rb-masonry-gallery__item.is-video > span > small { display: block; margin-top: 4px; color: var(--rb-accent-bright); font-size: .62rem; text-transform: uppercase; }
.rb-network-masonry__item.is-video { isolation: isolate; }
.rb-gallery-video-player { width: 100%; height: 100%; min-height: 520px; background: #050505; }
.rb-gallery-video-player video { display: block; width: 100%; height: 100%; min-height: 520px; object-fit: contain; background: #050505; }
.rb-gallery-video-player--embed { position: relative; height: 0; min-height: 0; padding-bottom: 56.25%; }
.rb-gallery-video-player--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rb-gallery-video-fallback { display: grid; place-items: center; min-height: 480px; padding: 40px; text-align: center; background: var(--rb-panel); }
.content-card__media.is-video { position: relative; }

/* Contact UI and footer clarification. */
.rb-footer-professional { position: relative; background: #080906; }
.rb-footer-professional__lead { display: flex; justify-content: space-between; align-items: end; gap: 50px; padding-top: 90px; padding-bottom: 70px; border-bottom: 1px solid var(--rb-border); }
.rb-footer-professional__lead > div { max-width: 850px; }
.rb-footer-professional__lead h2 { margin: 0; font-size: clamp(2.7rem,5vw,5.4rem); }
.rb-footer-professional__grid { grid-template-columns: 1.18fr .8fr .8fr .8fr; padding-top: 68px; padding-bottom: 68px; }
.rb-footer-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rb-footer-contact-actions a { padding: 8px 13px; border: 1px solid var(--rb-border); border-radius: 999px; color: var(--rb-text-soft); font-size: .72rem; }
.rb-contact-dock { position: fixed; z-index: 999; right: 20px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--rb-border); border-radius: 18px; background: rgba(12,13,11,.86); box-shadow: 0 20px 55px rgba(0,0,0,.36); backdrop-filter: blur(18px); }
.rb-contact-dock a { display: grid; place-items: center; width: 56px; min-height: 56px; border-radius: 12px; color: var(--rb-text); transition: transform .2s ease, background .2s ease; }
.rb-contact-dock a:hover { transform: translateX(-3px); color: var(--rb-text); background: rgba(255,255,255,.08); }
.rb-contact-dock a.is-primary { color: var(--rb-dark); background: var(--rb-accent-bright); }
.rb-contact-dock span { font-size: 1.05rem; font-weight: 900; }
.rb-contact-dock small { margin-top: 2px; font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.mobile-booking-bar { display: none; }
.rb-final-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* Ensure site-specific colors override older hard-coded section colors. */
.rb-services-showcase,
.rb-team-section,
.rb-network-team,
.rb-network-blog { background: var(--rb-bg); }
.rb-products-section,
.rb-network-products { background: var(--rb-bg-soft); }
.rb-gallery-section,
.rb-network-gallery { background: color-mix(in srgb, var(--rb-bg) 88%, var(--rb-accent-dark)); }
.rb-discount-strip { background: color-mix(in srgb, var(--rb-bg-soft) 88%, var(--rb-accent-dark)); }
.rb-network-branches { background: color-mix(in srgb, var(--rb-bg-soft) 92%, var(--rb-accent)); }
.rb-review-section { color: #15120f; background: var(--rb-light-surface); }

@media (max-width: 1100px) {
  .rb-philosophy__stage { grid-template-columns: 1fr 1fr; }
  .rb-branch-location__grid { grid-template-columns: 1fr; gap: 30px; }
  .rb-footer-professional__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rb-directory-card { grid-template-columns: minmax(280px,.72fr) 1fr; }
  .rb-directory-card__facts { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  body.rb-network-branch { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .rb-philosophy__header,
  .rb-philosophy__stage,
  .rb-branch-philosophy__grid,
  .rb-directory-hero__grid,
  .rb-directory-card { grid-template-columns: 1fr; }
  .rb-philosophy__header { gap: 25px; }
  .rb-philosophy__visual,
  .rb-branch-philosophy__visual { min-height: 520px; }
  .rb-philosophy__quote { padding: 28px; }
  .rb-philosophy__principles article { grid-template-columns: 48px 1fr; }
  .rb-branch-location { padding: 42px 0; }
  .rb-branch-location__facts { grid-template-columns: 1fr; }
  .rb-branch-location__facts article { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(24,19,15,.14); }
  .rb-branch-location__facts article:last-child { border-bottom: 0; }
  .rb-directory-hero { padding-top: calc(var(--rb-header-height) + 90px); }
  .rb-directory-hero__count { padding-left: 0; border-left: 0; }
  .rb-directory-card__media { min-height: 330px; }
  .rb-footer-professional__lead { align-items: flex-start; flex-direction: column; }
  .rb-footer-professional__grid { grid-template-columns: 1fr; }
  .rb-contact-dock { display: none; }
  .mobile-booking-bar {
    position: fixed;
    z-index: 1200;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(0,1fr));
    gap: 1px;
    padding: 7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    border-top: 1px solid var(--rb-border);
    background: rgba(10,11,9,.94);
    box-shadow: 0 -12px 35px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
  }
  .mobile-booking-bar a { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; border-radius: 12px; color: var(--rb-text); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
  .mobile-booking-bar a span { font-size: .95rem; }
  .mobile-booking-bar a.is-primary { color: var(--rb-dark); background: var(--rb-accent-bright); }
  .rb-gallery-video-player,
  .rb-gallery-video-player video { min-height: 360px; }
}

@media (max-width: 520px) {
  .rb-philosophy__header h2,
  .rb-branch-philosophy__content h2 { font-size: clamp(2.7rem,13vw,4.5rem); }
  .rb-philosophy__visual,
  .rb-branch-philosophy__visual { min-height: 430px; }
  .rb-philosophy__quote strong { font-size: 1.7rem; }
  .rb-directory-card__body { padding: 30px 24px; }
  .rb-directory-card__actions .button { width: 100%; }
  .rb-video-play { width: 54px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  [data-tilt-card],
  .rb-network-content-media img,
  .rb-team-card__media img,
  .rb-directory-card__media::before,
  .rb-philosophy__image,
  .rb-branch-philosophy__visual > div { transition: none !important; transform: none !important; }
}
