/* ============================================================
   Story Tapers · Reubyn Story, Edmonton barber
   Minimal, editorial. Bone + ink. Newsreader (story) + Geist (everything else).
   ============================================================ */

:root {
  --bone: #f2f0eb;
  --bone-2: #e9e6df;
  --ink: #111111;
  --ash: #6c6861;
  --line: rgba(17, 17, 17, 0.14);
  --night: #0e0e0e;
  --night-2: #1a1a1a;
  --night-line: rgba(242, 240, 235, 0.14);
  --night-ash: #9c978e;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bone); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- shared type ---------- */
.eyebrow, .label, .chapter__no, .chair__type, .footer__h, .pillars__no {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow { color: var(--ash); }
.label { display: flex; align-items: center; gap: 14px; color: var(--ash); }
.label span {
  font-family: var(--serif); font-style: italic; font-size: 18px; letter-spacing: 0; color: var(--ink);
}
.label::after { content: ""; flex: 0 0 48px; height: 1px; background: currentColor; opacity: 0.5; }

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 16ch;
}
.display em { color: var(--ash); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px;
  background: var(--ink); color: var(--bone);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn span { transition: transform 0.25s var(--ease); }
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover span { transform: translateX(4px); }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bone); }
.btn--light { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.btn--light:hover { background: transparent; color: var(--bone); }

.link {
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.3s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(242, 240, 235, 0.88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.nav__links { display: flex; gap: 34px; }
.nav__links a { font-size: 14px; text-decoration: none; color: var(--ash); transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  min-height: 100svh;
  padding: 120px var(--gutter) 64px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: end;
  gap: clamp(32px, 6vw, 96px);
}
.hero__text { padding-bottom: 24px; }
.hero__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  line-height: 0.92; letter-spacing: -0.035em;
  margin: 28px 0 36px;
}
.hero__title span, .hero__title em { display: block; white-space: nowrap; }
.hero__title em { color: var(--ash); padding-left: 0.42em; }
.hero__lede { max-width: 34ch; font-size: 18px; color: #3b3935; }
.hero__cta { display: flex; align-items: center; gap: 28px; margin-top: 40px; flex-wrap: wrap; }

.hero__media { position: relative; }
.hero__media img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%;
  filter: grayscale(0.15) contrast(1.02);
}
.hero__media figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 14px; border-top: 1px solid var(--line); margin-top: 14px;
  font-size: 13px; color: var(--ash);
}
.hero__media figcaption span:first-child { color: var(--ink); font-weight: 500; }

/* ---------- ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 18px 0;
}
.ticker__track {
  display: inline-flex; align-items: center; gap: 36px;
  animation: ticker 38s linear infinite;
  font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}
.ticker__track i { font-style: normal; font-size: 0.6em; color: var(--ash); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { position: relative; }
.story, .work, .words, .book, .approach {
  padding: clamp(96px, 13vw, 180px) var(--gutter);
}
.story > *, .work > *, .words > *, .book > *, .approach > * { max-width: var(--max); margin-inline: auto; }
.section-head { display: grid; gap: 28px; margin-bottom: clamp(56px, 8vw, 112px); }
.section-head--row { grid-template-columns: 1fr auto; align-items: end; }

/* ---------- story chapters ---------- */
.chapter {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.chapter--flip { grid-template-columns: 5fr 7fr; }
.chapter--flip .chapter__media { order: 2; }
.chapter__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.chapter__media--tall { max-width: 480px; justify-self: center; width: 100%; }
.chapter__media--tall img { aspect-ratio: 4 / 5; }
.chapter__media--pair { position: relative; padding-left: 18%; padding-bottom: 12%; }
.chapter__inset {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  width: 42% !important; aspect-ratio: 5 / 4 !important;
  border: 6px solid var(--bone);
}
.chapter--flip .chapter__media img { filter: grayscale(1); }
.chapter__no { color: var(--ash); margin-bottom: 14px; }
.chapter__text h3 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.chapter__text p + p { margin-top: 16px; }
.chapter__text p:not(.chapter__no) { color: #3b3935; max-width: 42ch; }

.lessons {
  border-top: 1px solid var(--line);
  padding-top: clamp(56px, 8vw, 104px);
  margin-top: clamp(24px, 4vw, 48px);
  text-align: center;
}
.lessons__intro { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.lessons ul { margin: 28px 0; }
.lessons li {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 300;
}
.lessons li:nth-child(even) { font-style: italic; color: var(--ash); }
.lessons__outro { max-width: 30ch; margin-inline: auto !important; color: #3b3935; }

/* ---------- approach (dark) ---------- */
.approach { background: var(--night); color: var(--bone); }
.approach .label, .approach .pillars__no { color: var(--night-ash); }
.approach .label span { color: var(--bone); }
.approach .display em { color: var(--night-ash); }
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--night-line);
}
.pillars li { padding: 36px 36px 8px 0; }
.pillars li + li { padding-left: 36px; border-left: 1px solid var(--night-line); }
.pillars h3 {
  font-family: var(--serif); font-weight: 300; font-size: 2.4rem; line-height: 1;
  margin: 18px 0 16px;
}
.pillars p { color: var(--night-ash); max-width: 34ch; }
.mission {
  margin-top: clamp(72px, 10vw, 140px) !important;
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--night-line);
  display: grid; grid-template-columns: 1fr 3fr; gap: 32px;
}
.mission p {
  grid-column: 2;
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 2.9vw, 2.5rem); line-height: 1.2; letter-spacing: -0.01em;
}
.mission cite {
  grid-column: 1; grid-row: 1;
  font-style: normal; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--night-ash);
  padding-top: 12px;
}

/* ---------- work ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 24px);
}
.gallery__item { overflow: hidden; }
.gallery__item img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
  filter: grayscale(0.2);
}
.gallery__item:hover img { transform: scale(1.03); filter: grayscale(0); }
.gallery__item figcaption {
  display: flex; justify-content: space-between;
  padding-top: 12px; font-size: 13px; color: var(--ash);
}
.g2, .g4 { margin-top: clamp(32px, 6vw, 96px); }
.g2 img { object-position: 50% 60%; }

/* ---------- words ---------- */
.words { background: var(--bone-2); }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.quote .stars { font-size: 14px; letter-spacing: 0.3em; margin-bottom: 24px; }
.quote blockquote {
  font-family: var(--serif);
  font-weight: 300; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.3;
}
.quote--lead blockquote { font-size: clamp(2rem, 3.9vw, 3.4rem); line-height: 1.08; letter-spacing: -0.02em; }
.quote figcaption {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; font-size: 14px; font-weight: 500;
}
.quote figcaption span { color: var(--ash); font-weight: 400; }

/* ---------- book ---------- */
.chairs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); }
.chair {
  border: 1px solid var(--line);
  padding: clamp(28px, 4vw, 52px);
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, 0.35);
}
.chair__type { color: var(--ash); }
.chair h3 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1;
  margin: 18px 0 18px;
}
.chair__addr { color: #3b3935; font-size: 15px; }
.menu { margin: 36px 0 40px; flex: 1; }
.menu li {
  display: grid; grid-template-columns: auto 1fr auto 64px; align-items: baseline; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.menu li:first-child { border-top: 1px solid var(--line); }
.menu i { border-bottom: 1px dotted rgba(17, 17, 17, 0.25); transform: translateY(-4px); }
.menu li > span:nth-of-type(2) { color: var(--ash); font-size: 13px; }
.menu strong { font-weight: 500; text-align: right; }
.chair__note { margin-top: 16px; font-size: 13px; color: var(--ash); text-align: center; }
.chair__note a { color: var(--ink); }

/* ---------- close ---------- */
.close {
  background: var(--night); color: var(--bone);
  text-align: center;
  padding: clamp(110px, 15vw, 200px) var(--gutter);
  display: flex; flex-direction: column; align-items: center;
}
.close__mark { width: 84px; height: 84px; margin-bottom: 40px; opacity: 0.95; }
.close__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.8rem, 7.6vw, 7.2rem); line-height: 0.96; letter-spacing: -0.035em;
}
.close__title em { display: block; color: var(--night-ash); }
.close__sub { margin: 28px 0 44px; color: var(--night-ash); }

/* ---------- footer ---------- */
.footer { background: var(--night); color: var(--night-ash); padding: 0 var(--gutter) 32px; font-size: 14px; }
.footer__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  padding: 56px 0; border-top: 1px solid var(--night-line);
}
.footer__brand { display: flex; gap: 14px; align-items: flex-start; }
.footer__brand img { filter: invert(1); opacity: 0.9; }
.footer__brand strong { color: var(--bone); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; }
.footer__h { color: var(--bone); margin-bottom: 12px; }
.footer a { text-decoration: none; color: var(--night-ash); transition: color 0.2s; }
.footer a:hover { color: var(--bone); }
.footer__base {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid var(--night-line); font-size: 12px;
}

/* ---------- mobile book bar ---------- */
.mobile-book { display: none; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ticker__track { animation: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr 0.9fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .g2, .g4 { margin-top: 0; }
  .g2 { margin-top: clamp(32px, 8vw, 72px); }
  .g3 { margin-top: calc(-1 * clamp(32px, 8vw, 72px)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding-block: 12px; }
  .nav .btn--sm { padding: 8px 14px; font-size: 13px; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 96px;
    gap: 40px;
  }
  .hero__text { padding-bottom: 0; }
  .hero__title { margin: 20px 0 24px; font-size: 15vw; }
  .hero__title em { padding-left: 0.35em; }
  .hero__media img { aspect-ratio: 4 / 5; }
  .section-head--row { grid-template-columns: 1fr; }

  .chapter, .chapter--flip { grid-template-columns: 1fr; gap: 28px; }
  .chapter--flip .chapter__media { order: 0; }
  .chapter__media--tall { max-width: none; }
  .chapter__media--pair { padding-left: 12%; padding-bottom: 14%; }

  .pillars { grid-template-columns: 1fr; }
  .pillars li, .pillars li + li { padding: 28px 0 24px; border-left: 0; }
  .pillars li + li { border-top: 1px solid var(--night-line); }
  .mission { grid-template-columns: 1fr; gap: 16px; }
  .mission p, .mission cite { grid-column: 1; grid-row: auto; }
  .mission cite { order: 2; }

  .quotes, .chairs { grid-template-columns: 1fr; }
  .menu li { grid-template-columns: auto 1fr auto 56px; gap: 8px; }

  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding-bottom: 96px; }

  .mobile-book {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
    padding: 16px; border-radius: 999px;
    background: var(--ink); color: var(--bone);
    font-weight: 500; font-size: 15px; text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(140%); transition: transform 0.4s var(--ease);
  }
  .mobile-book.is-visible { transform: none; }
}

@media (max-width: 380px) {
  .nav__brand { font-size: 12px; letter-spacing: 0.1em; gap: 8px; }
  .nav__brand img { width: 28px; height: 28px; }
  .nav .btn--sm { padding: 8px 12px; font-size: 12px; }
}
