/* ==========================================================================
   Jo's Barbershop – design plan
   Identity: the shop's black marble floor with white veins, dark wood,
   brass handles and the pink-lit shelves. Only four photos exist, so the
   name itself carries the page: JO'S is the window you scroll through.
   Reference attitude (Blind Barber 10-Year): stark black / off-white
   alternation, huge numerals, a sticky chapter index, documentary photos
   that "develop" from black & white to colour, a loader, drag gestures.
   ========================================================================== */
:root {
  --black: #0d0d0e;
  --black-2: #18181a;
  --soap: #eeebe5;
  --grey: #9c9c9c;
  --brass: #c9a35a;
  --brass-ink: #8a6a2c;
  --pink: #ff5fa2;
  --line-d: rgba(238, 235, 229, .16);
  --line-l: rgba(13, 13, 14, .16);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --g: clamp(16px, 3.4vw, 50px);
  --section: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--soap);
  font-family: var(--text); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 400; background: var(--brass); color: var(--black); padding: 10px 16px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
[data-theme="light"] .eyebrow { color: #5d5d5d; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  padding: 1.15em 1.8em; border: 1.5px solid currentColor; border-radius: 0;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}
.btn--brass { background: var(--brass); border-color: var(--brass); color: var(--black); }
.btn--brass:hover { background: var(--soap); border-color: var(--soap); }
.btn--ink { background: var(--black); border-color: var(--black); color: var(--soap); }
.btn--ink:hover { background: var(--brass); border-color: var(--brass); color: var(--black); }
.btn--line { color: var(--black); }
.btn--line:hover { background: var(--black); color: var(--soap); border-color: var(--black); }
.btn--line-light { color: var(--soap); border-color: var(--line-d); }
.btn--line-light:hover { background: var(--soap); color: var(--black); border-color: var(--soap); }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 300; background: var(--black); display: none; place-items: center; }
.js .loader { display: grid; }
.no-intro .loader { display: none; }
.loader__glyph { font-family: var(--display); font-weight: 900; font-size: 74vh; line-height: 1; color: var(--soap); text-transform: uppercase; }
.loader__meta { position: absolute; left: var(--g); right: var(--g); bottom: 22px; display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }

/* ---------- film grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 250; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); } 40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); } 80% { transform: translate(5%, 4%); } 100% { transform: translate(0, 0); }
}

/* ---------- drag cursor ---------- */
.cursor { display: none; }
.has-cursor .cursor {
  display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 260; pointer-events: none;
  width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--brass); color: var(--black);
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transform: scale(0); transition: transform .45s var(--ease);
}
.has-cursor .cursor.is-on { transform: scale(1); }

/* ---------- header ---------- */
.head {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 68px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 var(--g);
  color: var(--soap); transition: color .4s;
}
.head::before { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(13, 13, 14, .82), rgba(13, 13, 14, 0)); transition: opacity .4s; }
.head::after { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(238, 235, 229, .92), rgba(238, 235, 229, 0)); opacity: 0; transition: opacity .4s; }
.head.is-light { color: var(--black); }
.head.is-light::before { opacity: 0; }
.head.is-light::after { opacity: 1; }
.head__logo { font-family: var(--display); font-weight: 900; font-size: 1.9rem; letter-spacing: .02em; text-decoration: none; line-height: 1; justify-self: start; }
.head__mid { font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.head__cta {
  justify-self: end; background: var(--brass); color: var(--black); text-decoration: none;
  font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; padding: .95em 1.4em;
  transition: background-color .35s;
}
.head__cta:hover { background: var(--soap); }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--black); }
.hero__stage { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__photo { position: absolute; inset: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.hero__grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 13, 14, .35) 0%, rgba(13, 13, 14, 0) 30%, rgba(13, 13, 14, .8) 100%); opacity: 0; }
.hero__mask { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__shade { fill: var(--black); }
.hero__jo { font-family: var(--display); font-weight: 900; font-size: 38vw; letter-spacing: 0; }
.hero__ui { position: absolute; inset: 0; pointer-events: none; padding: 92px var(--g) 26px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; }
.hero__ui a { pointer-events: auto; }
.hero__tag { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; line-height: 1.5; }
.hero__tag--r { text-align: right; }
.hero__bottom { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: space-between; align-items: center; }
.hero__hint { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey); }
.hero__after { display: none; }
.js .hero__after {
  display: block; position: absolute; left: var(--g); bottom: 96px; z-index: 2; pointer-events: none;
  font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.6rem, 10vw, 10rem); line-height: .82;
}
.hero__after-line { overflow: hidden; padding-bottom: .04em; }
.hero__after-line > * { display: inline-block; }
.hero__after em { color: var(--brass); font-size: .82em; line-height: 1; padding-right: .1em; }

/* ---------- intro (light) ---------- */
.intro { background: var(--soap); color: var(--black); padding: var(--section) var(--g); }
.intro__title { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(4rem, 14vw, 15rem); line-height: .82; letter-spacing: -.005em; margin: 28px 0 clamp(36px, 5vw, 70px); }
.intro__title em { color: var(--brass-ink); font-size: .78em; line-height: 1; }
.intro__cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--g); align-items: end; }
.intro__text { font-size: clamp(1.15rem, 1.6vw, 1.55rem); line-height: 1.45; max-width: 30em; }
.intro__ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(60px, 8vw, 120px); border-top: 1.5px solid var(--black); }
.stats > div { padding: 18px 0 0; border-right: 1px solid var(--line-l); padding-left: 18px; }
.stats > div:first-child { padding-left: 0; }
.stats > div:last-child { border-right: 0; }
.stats dt { font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #5d5d5d; }
.stats dd { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 7vw, 7rem); line-height: .95; margin-top: 6px; }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; background: var(--black); border-block: 1px solid var(--line-d); padding: 14px 0 8px; }
.ticker__track { display: flex; width: max-content; align-items: center; will-change: transform; }
.ticker__track span { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 7.5vw, 7.5rem); line-height: 1; padding: 0 .3em; color: var(--brass); white-space: nowrap; }
.ticker__track i { width: .9rem; height: .9rem; background: var(--pink); rotate: 45deg; flex: none; margin: 0 .6rem; }

/* ---------- chapters ---------- */
.chapters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); padding: var(--section) var(--g) calc(var(--section) * .6); position: relative; }
.chapters__head { grid-column: 1 / -1; margin-bottom: 40px; }
.index { grid-column: 1 / span 3; grid-row: 2 / span 5; align-self: start; position: sticky; top: 130px; display: flex; gap: 18px; }
.index ol { display: grid; gap: 6px; }
.index a { text-decoration: none; font-size: .95rem; font-weight: 600; color: var(--grey); display: flex; gap: 12px; transition: color .4s; }
.index a span { font-variant-numeric: tabular-nums; }
.index li.is-active a { color: var(--soap); }
.index li.is-active a span { color: var(--pink); }
.index__bar { width: 2px; background: var(--line-d); position: relative; order: -1; }
.index__bar i { position: absolute; inset: 0; background: var(--brass); transform-origin: 50% 0; transform: scaleY(0); }
.chapter { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: var(--g); align-items: end; min-height: 100vh; padding: 10vh 0; position: relative; }
.chapter__num {
  grid-column: 1 / -1; grid-row: 1; align-self: start;
  font-family: var(--display); font-weight: 900; font-size: clamp(9rem, 30vw, 30rem); line-height: .76; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(201, 163, 90, .75);
  user-select: none;
}
.chapter__body { grid-column: 1 / span 4; grid-row: 2; display: flex; flex-direction: column; gap: 18px; padding-bottom: 8px; position: relative; z-index: 1; }
.chapter__title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.6rem, 4.6vw, 4.8rem); line-height: .9; }
.chapter__title em { color: var(--brass); font-size: .86em; }
.chapter__body p { color: rgba(238, 235, 229, .82); font-size: clamp(1.02rem, 1.2vw, 1.2rem); max-width: 26em; }
.dev { grid-column: 5 / -1; grid-row: 1 / span 2; align-self: center; justify-self: end; position: relative; overflow: hidden; width: 100%; background: var(--black-2); }
.dev--portrait { aspect-ratio: 3 / 4; max-width: 520px; }
.dev--land { aspect-ratio: 4 / 3; max-width: 640px; }
.dev--tall { aspect-ratio: 9 / 16; max-width: 400px; }
.dev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dev__bw { filter: grayscale(1) contrast(1.35) brightness(.8); }
.dev__col { z-index: 1; }
.chapter--flip .chapter__body { grid-column: 6 / -1; }
.chapter--flip .dev { grid-column: 1 / span 5; justify-self: start; }
.chapter--type .chapter__word { grid-column: 5 / -1; grid-row: 1 / span 2; align-self: center; justify-self: end; text-align: right; font-size: clamp(4rem, 10vw, 10rem); line-height: .9; }
.chapter__word em { display: block; color: var(--brass); }
.chapter__word span { display: block; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 1.15em; line-height: .85; }

/* ---------- voices (light) ---------- */
.voices { background: var(--soap); color: var(--black); padding: var(--section) 0 calc(var(--section) * .8); overflow: hidden; }
.voices__head { padding: 0 var(--g); display: flex; flex-direction: column; gap: 22px; }
.voices__score { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.voices__num { font-family: var(--display); font-weight: 900; font-size: clamp(7rem, 20vw, 20rem); line-height: .78; }
.voices__of { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 2.4rem); padding-bottom: .4em; }
.drag { margin-top: clamp(48px, 6vw, 90px); cursor: grab; touch-action: pan-y; user-select: none; }
.drag:active { cursor: grabbing; }
.drag__track { display: flex; gap: clamp(20px, 3vw, 44px); padding: 0 var(--g); width: max-content; will-change: transform; }
.quote { width: clamp(280px, 36vw, 540px); border-top: 2px solid var(--black); padding-top: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 26px; }
.quote blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(1.45rem, 2.3vw, 2.3rem); line-height: 1.18; letter-spacing: -.01em; }
.quote p { font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #5d5d5d; }
.drag__hint { padding: 26px var(--g) 0; font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #5d5d5d; }
html:not(.js) .drag { overflow-x: auto; }

/* ---------- visit (dark) ---------- */
.visit { padding: var(--section) var(--g); }
.visit__top { display: flex; flex-direction: column; gap: 22px; margin-bottom: clamp(40px, 5vw, 70px); }
.visit__title { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.4rem, 9vw, 9.5rem); line-height: .85; }
.visit__title em { color: var(--brass); font-size: .8em; }
.visit__now { font-weight: 600; display: flex; align-items: center; gap: 10px; min-height: 1.5em; }
.visit__now::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #5fd38a; box-shadow: 0 0 0 4px rgba(95, 211, 138, .18); }
.visit__now.is-closed::before { background: var(--pink); box-shadow: 0 0 0 4px rgba(255, 95, 162, .18); }
.visit__now:empty { display: none; }
.week { border-top: 1px solid var(--line-d); }
.week__scale { display: grid; grid-template-columns: 90px 1fr 170px; position: relative; height: 30px; }
.week__scale span { position: absolute; top: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .1em; color: var(--grey); translate: -50% 0; }
.week__scale span:nth-child(1) { left: calc(90px + (100% - 260px) * 1 / 11); }
.week__scale span:nth-child(2) { left: calc(90px + (100% - 260px) * 4 / 11); }
.week__scale span:nth-child(3) { left: calc(90px + (100% - 260px) * 7 / 11); }
.week__scale span:nth-child(4) { left: calc(90px + (100% - 260px) * 10 / 11); }
.day { display: grid; grid-template-columns: 90px 1fr 170px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-d); }
.day__name { font-family: var(--display); font-weight: 800; font-size: 1.9rem; text-transform: uppercase; line-height: 1; }
.day__bar { position: relative; height: 12px; background: var(--black-2); }
.day__bar i { position: absolute; top: 0; bottom: 0; left: calc((var(--from) - 9) / 11 * 100%); width: calc((var(--to) - var(--from)) / 11 * 100%); background: var(--brass); transform-origin: 0 50%; }
.day__time { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.day.is-closed .day__name, .day.is-closed .day__time { color: #6d6d6d; }
.day.is-closed .day__bar { background: repeating-linear-gradient(90deg, var(--black-2) 0 6px, transparent 6px 12px); }
.day.is-today .day__name { color: var(--pink); }
.day.is-today .day__bar i { background: var(--soap); }
.book { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--g); margin-top: clamp(60px, 8vw, 120px); align-items: stretch; }
.book__big {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 300px;
  background: var(--brass); color: var(--black); text-decoration: none; padding: clamp(22px, 3vw, 40px);
  transition: background-color .4s var(--ease);
}
.book__big:hover { background: var(--soap); }
.book__label { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.book__word { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.2rem, 7.4vw, 8rem); line-height: .85; }
.book__word span { display: inline-block; transition: transform .5s var(--ease); }
.book__big:hover .book__word span { transform: translate(.08em, -.08em); }
.book__side { display: flex; flex-direction: column; gap: 26px; justify-content: space-between; }
.book__addr { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.8rem, 2.8vw, 2.8rem); line-height: 1.02; }
.book__links { display: flex; flex-direction: column; gap: 10px; }
.book__note { color: var(--grey); font-size: .95rem; }

/* ---------- footer ---------- */
.foot { padding: 0 var(--g) 26px; border-top: 1px solid var(--line-d); overflow: hidden; }
.foot__word { font-family: var(--display); font-weight: 900; color: var(--brass); font-size: 37vw; line-height: .78; text-align: center; letter-spacing: -.01em; padding-top: 4vw; }
.foot__row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 24px; align-items: end; border-top: 1px solid var(--line-d); padding-top: 18px; margin-top: 3vw; font-size: .9rem; }
.foot__credit { color: rgba(238, 235, 229, .7); }
.foot a { text-underline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .index { display: none; }
  .chapter { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .head { grid-template-columns: 1fr auto; height: 60px; }
  .head__mid { display: none; }
  .hero__ui { padding-top: 80px; }
  .hero__tag { font-size: .68rem; }
  .intro__cols { grid-template-columns: 1fr; }
  .intro__ctas { justify-content: flex-start; }
  .stats dd { font-size: 2.6rem; }
  .stats > div { padding-left: 12px; }
  .chapter { grid-template-columns: 1fr; min-height: 0; padding: 8vh 0 6vh; row-gap: 26px; }
  .chapter__num { grid-row: 1; font-size: 46vw; }
  .chapter__body, .chapter--flip .chapter__body { grid-column: 1; grid-row: 3; }
  .dev, .chapter--flip .dev { grid-column: 1; grid-row: 2; justify-self: stretch; max-width: none; margin-top: -18vw; }
  .dev--tall { aspect-ratio: 3 / 4; }
  .chapter--type .chapter__word { grid-column: 1; grid-row: 2; justify-self: start; text-align: left; font-size: 17vw; margin-top: -10vw; }
  .week__scale, .day { grid-template-columns: 54px 1fr 112px; }
  .week__scale span:nth-child(1) { left: calc(54px + (100% - 166px) * 1 / 11); }
  .week__scale span:nth-child(2) { left: calc(54px + (100% - 166px) * 4 / 11); }
  .week__scale span:nth-child(3) { left: calc(54px + (100% - 166px) * 7 / 11); }
  .week__scale span:nth-child(4) { left: calc(54px + (100% - 166px) * 10 / 11); }
  .day__name { font-size: 1.5rem; }
  .day__time { font-size: .86rem; }
  .book { grid-template-columns: 1fr; }
  .book__big { min-height: 220px; }
  .foot__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .js .hero__after { display: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
