/* ============================================================
   Dapper Dave's Barber Lounge — Neon Noir
   ============================================================ */

:root {
  --bg:        #07070b;
  --bg-2:      #0d0d15;
  --bg-3:      #12121c;
  --ink:       #f4efe3;
  --ink-dim:   rgba(244, 239, 227, 0.74);
  --ink-faint: rgba(244, 239, 227, 0.56);
  --teal:      #25d6c4;
  --teal-deep: #0f9aa8;
  --amber:     #ff8a47;
  --amber-2:   #ffb168;
  --line:      rgba(244, 239, 227, 0.14);

  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  --script:  "Playfair Display", Georgia, serif;
  --body:    "Inter", system-ui, sans-serif;

  --maxw: 1180px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation; /* remove 300ms tap delay (ux: tap-delay) */
}

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  box-shadow: 0 0 14px rgba(37, 214, 196, 0.7);
  transition: width 0.1s linear;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-main {
  font-family: var(--script);
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}
.nav__brand-sub {
  font-family: var(--body);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 4px;
  padding-left: 2px;
}
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.5vw, 38px); }
.nav__links > a:not(.btn) {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav__links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--teal);
  transition: width 0.3s var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--ink); }
.nav__links > a:not(.btn):hover::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 26px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.btn--book {
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #1a0f06;
  box-shadow: 0 6px 22px rgba(255, 138, 71, 0.28);
}
.btn--book:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 138, 71, 0.5);
}
.btn--ghost {
  border-color: var(--ink-faint);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.btn--lg { padding: 17px 38px; font-size: 0.84rem; }

/* ---------- the film (one clip, scrubbed by scroll) ---------- */
.film { position: relative; height: 760vh; background: #000; }
.film__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.film__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #000;
  filter: brightness(0.74) saturate(1.06) contrast(1.04);
}
.film__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(6,6,10,0.60) 0%, rgba(6,6,10,0.12) 30%,
                    rgba(6,6,10,0.28) 64%, rgba(6,6,10,0.82) 100%);
}

/* captions crossfade as the film scrubs */
.caps { position: absolute; inset: 0; z-index: 2; }
.cap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 64px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.cap.is-active { opacity: 1; pointer-events: auto; }
.cap__inner { width: 100%; max-width: var(--maxw); margin: 0 auto; }
.cap__text { max-width: 620px; }
.cap--center { text-align: center; }
.cap--center .cap__text { max-width: 880px; margin: 0 auto; }
.cap--center .scene__body,
.cap--center .hero__tagline { margin-left: auto; margin-right: auto; }
.cap--right .cap__text { margin-left: auto; text-align: right; }
.cap--right .scene__body { margin-left: auto; }

/* ---------- typography ---------- */
.eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.cap--right .eyebrow { color: var(--amber-2); }

.hero__title {
  font-family: var(--display);
  font-size: clamp(4.2rem, 15vw, 12rem);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 40px rgba(0,0,0,0.6), 0 0 70px rgba(37,214,196,0.12);
}
.hero__script {
  font-family: var(--script);
  font-style: italic;
  font-size: clamp(1.4rem, 4.4vw, 2.9rem);
  color: var(--amber-2);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}
.hero__tagline {
  font-size: clamp(1.02rem, 2vw, 1.35rem);
  color: var(--ink-dim);
  max-width: 34ch;
  margin-top: 1.5rem;
  margin-bottom: 2.2rem;
}

.scene__title {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.015em;
  text-shadow: 0 2px 36px rgba(0,0,0,0.7);
}
.scene__title--xl { font-size: clamp(4rem, 13vw, 10.5rem); }
.scene__body {
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  line-height: 1.62;
  color: var(--ink-dim);
  max-width: 46ch;
  margin-top: 1.2rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.cta__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

/* ---------- scroll cue ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-cue__label {
  font-size: 0.64rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.scroll-cue__line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--teal), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--ink);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translateY(0); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(300%); opacity: 0; }
}

/* ---------- scene dots ---------- */
.dots {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dots a {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--ink-faint);
  transition: all 0.3s var(--ease);
}
.dots a:hover { border-color: var(--ink); }
.dots a.is-active {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 12px rgba(37, 214, 196, 0.8);
  transform: scale(1.25);
}

/* ---------- reveal (gated on JS) ---------- */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js-anim .reveal.is-in { opacity: 1; transform: none; }
.js-anim .reveal:nth-child(2) { transition-delay: 0.08s; }
.js-anim .reveal:nth-child(3) { transition-delay: 0.16s; }
.js-anim .reveal:nth-child(4) { transition-delay: 0.24s; }
.js-anim .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ---------- services ---------- */
.services {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(37,214,196,0.06), transparent 60%),
    var(--bg-2);
  padding: clamp(80px, 12vh, 150px) clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.section-head { max-width: var(--maxw); margin: 0 auto 3.5rem; text-align: center; }
.section-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.015em;
}
.section-sub { color: var(--ink-dim); margin-top: 0.8rem; }

.services__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.service:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 214, 196, 0.5);
  background: linear-gradient(180deg, rgba(37,214,196,0.06), rgba(255,255,255,0.01));
}
.service__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.7rem;
}
.service__top h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}
.service__price {
  font-family: var(--script);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--amber-2);
  white-space: nowrap;
}
.service p { color: var(--ink-dim); font-size: 0.96rem; line-height: 1.55; }
.service--feature {
  border-color: rgba(255, 138, 71, 0.45);
  background: linear-gradient(180deg, rgba(255,138,71,0.08), rgba(255,255,255,0.01));
}

/* ---------- visit ---------- */
.visit {
  background: var(--bg);
  padding: clamp(80px, 12vh, 150px) clamp(24px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.visit__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.visit__block { margin-top: 1.8rem; }
.visit__block h3 {
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.visit__block p { color: var(--ink); line-height: 1.7; }
.visit__block a:hover { color: var(--amber-2); }
.hours { list-style: none; max-width: 320px; }
.hours li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.96rem;
}
.hours li span:first-child { color: var(--ink); }
.visit .btn { margin-top: 2.2rem; }
.visit__map {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.visit__map iframe {
  width: 100%; height: 100%;
  border: 0;
  filter: grayscale(0.4) invert(0.92) hue-rotate(170deg) contrast(0.95);
}

/* ---------- footer ---------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 56px clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer__brand { display: flex; flex-direction: column; gap: 4px; }
.footer__main { font-family: var(--script); font-style: italic; font-size: 1.6rem; }
.footer__sub {
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal);
}
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer__links a {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.3s var(--ease);
}
.footer__links a:hover { color: var(--ink); }
.footer__legal { font-size: 0.8rem; color: var(--ink-faint); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .dots { display: none; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 4px;
    padding: 24px clamp(20px, 6vw, 40px) 34px;
    background: rgba(7, 7, 11, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links > a:not(.btn) { padding: 12px 0; font-size: 0.95rem; width: 100%; }
  .nav__links .btn--book { margin-top: 10px; width: 100%; }

  .cap--right .cap__text { text-align: left; margin-left: 0; }
  .cap--right .eyebrow { color: var(--teal); }
  .cap--right .scene__body { margin-left: 0; }
  .services__grid { grid-template-columns: 1fr; }
  .visit__inner { grid-template-columns: 1fr; }
  .visit__map { order: -1; }
}

@media (min-width: 821px) and (max-width: 1040px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue__line::after { animation: none; }
  .cap, .progress, .nav, .btn, .service, .dots a { transition: none; }
}

/* ---------- accessibility & touch polish (ui-ux-pro-max audit) ---------- */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}
.btn:focus-visible { outline: 2px solid var(--amber-2); outline-offset: 4px; }
.nav__brand:focus-visible { outline-offset: 5px; }

/* expand sub-44px touch targets without changing their appearance */
.dots a { position: relative; }
.dots a::after { content: ""; position: absolute; inset: -17px; }
.nav__toggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }

/* ---------- micro-interactions & scroll reveals (ui-ux-pro-max §7) ---------- */
.btn:active { transform: scale(0.97); }
.dots a:hover { transform: scale(1.25); }

.reveal-on .service,
.reveal-on .visit__block {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-on .service.is-in,
.reveal-on .visit__block.is-in { opacity: 1; transform: none; }
.services__grid .service:nth-child(2) { transition-delay: 0.06s; }
.services__grid .service:nth-child(3) { transition-delay: 0.12s; }
.services__grid .service:nth-child(4) { transition-delay: 0.18s; }
.services__grid .service:nth-child(5) { transition-delay: 0.24s; }
.services__grid .service:nth-child(6) { transition-delay: 0.30s; }
.visit__block:nth-child(3) { transition-delay: 0.08s; }
.visit__block:nth-child(4) { transition-delay: 0.16s; }

/* ---------- landscape phones: scale big type by height (ux: orientation-support) ---------- */
@media (orientation: landscape) and (max-height: 600px) {
  .hero__title { font-size: clamp(2.4rem, 13vh, 6rem); }
  .scene__title { font-size: clamp(2rem, 10vh, 4.5rem); }
  .scene__title--xl { font-size: clamp(2.6rem, 14vh, 6rem); }
  .hero__script { font-size: clamp(1.1rem, 5vh, 2rem); }
  .hero__tagline, .scene__body { font-size: clamp(0.95rem, 3.4vh, 1.2rem); }
}
