/* Fade Factory: a neighborhood barbershop.
   Layout: left-aligned, big condensed type on white tile; the price list is a black felt letter board;
   Dante (the AI) is the one dark, glowing object on the page. */
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-display: swap; src: url(fonts/big-shoulders-display-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 700; font-display: swap; src: url(fonts/big-shoulders-display-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url(fonts/archivo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url(fonts/archivo-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url(fonts/archivo-latin-700-normal.woff2) format('woff2'); }

:root {
  --tile: #f3f4f1;        /* white subway tile */
  --paper: #ffffff;
  --ink: #16181d;         /* barber-chair black */
  --steel: #5d636d;       /* chrome, for secondary text */
  --pole-red: #c42330;
  --pole-blue: #1f3a93;
  --felt: #1c1d21;        /* letter board */
  --felt-line: rgba(243, 244, 241, 0.06);
  --chalk: #eef0ec;       /* letters on the board */
  --glow: #3ccff0;        /* Dante, and only Dante */
  --line: #d9dbd6;

  --display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1220px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tile); color: var(--ink); font: 400 17px/1.55 var(--body); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--pole-blue); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--tile); padding: 10px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- moving background ---------- */
#fadeBg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.no-webgl #fadeBg { display: none; }
.no-webgl body { background-image: radial-gradient(circle, rgba(31, 58, 147, 0.22) 2.6px, transparent 3px); background-size: 14px 14px; background-attachment: fixed; background-position: 0 100%; }
.ribbon, .top, main, .foot, .noscript { position: relative; z-index: 1; }

/* ---------- ribbon + header ---------- */
.ribbon { background: var(--ink); color: #c9ccd2; font-size: 13px; padding: 7px var(--gutter); text-align: center; }
.ribbon a { color: var(--paper); font-weight: 500; text-underline-offset: 3px; margin-left: 6px; white-space: nowrap; }

.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(243, 244, 241, 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-word { font: 900 30px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.pole { width: 14px; height: 36px; border-radius: 7px; border: 2px solid var(--ink); overflow: hidden; background: var(--paper); }
.pole span {
  display: block; height: 200%; width: 100%;
  background: repeating-linear-gradient(-35deg, var(--pole-red) 0 6px, var(--paper) 6px 10px, var(--pole-blue) 10px 13px, var(--paper) 13px 17px);
  animation: pole 2.6s linear infinite;
}
@keyframes pole { to { transform: translateY(-50%); } }
.nav { display: flex; gap: 22px; font-weight: 500; font-size: 15px; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--pole-red); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; transition: transform 0.15s, background-color 0.15s, color 0.15s; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--pole-red); border-color: var(--pole-red); color: var(--paper); }
.btn-red:hover { background: #a81c28; border-color: #a81c28; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--tile); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-line { background: var(--paper); color: var(--ink); min-height: 44px; font-size: 15px; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-line-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-line-light:hover { background: var(--paper); color: var(--ink); }

/* ---------- hero ---------- */
main > section { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(28px, 5vw, 72px); align-items: end;
  padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 96px);
}
.where { font-weight: 500; color: var(--steel); margin-bottom: 18px; }
.hero h1 { font: 900 clamp(3.5rem, 8.2vw, 7.8rem)/0.86 var(--display); text-transform: uppercase; letter-spacing: -0.005em; }
.hero h1 span { display: block; }
.lede { font-size: clamp(18px, 1.6vw, 21px); max-width: 34em; margin-top: 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.today { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 6px 6px 0 var(--ink); }
.today-status { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.today-status::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--steel); flex: none; }
.today-status.is-open::before { background: #1e9b57; box-shadow: 0 0 0 4px rgba(30, 155, 87, 0.18); }
.today-label { font: 500 14px/1.3 var(--body); color: var(--steel); margin-top: 18px; }
.today-list { list-style: none; margin: 8px 0 16px; padding: 0; }
.today-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.tb-name { font: 700 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.tb-hours { color: var(--steel); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.today-ask { width: 100%; min-height: 46px; border-radius: 10px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; }
.today-ask:hover { background: var(--pole-blue); border-color: var(--pole-blue); }

/* ---------- price board ---------- */
.prices { padding-block: clamp(24px, 4vw, 48px); }
.board-frame {
  background-color: var(--felt);
  background-image: repeating-linear-gradient(0deg, var(--felt-line) 0 1px, transparent 1px 9px);
  border: 14px solid #2a2b30; border-radius: 14px;
  box-shadow: inset 0 0 0 2px #0d0e10, 0 22px 40px -24px rgba(22, 24, 29, 0.55);
  color: var(--chalk);
  padding: clamp(22px, 4vw, 48px) clamp(18px, 4.5vw, 64px) clamp(24px, 3.5vw, 40px);
}
.board-title { font: 900 clamp(44px, 6vw, 72px)/0.9 var(--display); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: clamp(18px, 3vw, 30px); }
.board { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: auto minmax(24px, 1fr) auto 5.5ch auto; align-items: baseline; column-gap: 16px;
  padding: 14px 0; border-bottom: 1px solid rgba(238, 240, 236, 0.12);
}
.svc, .price { font: 700 clamp(24px, 2.6vw, 32px)/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.price { text-align: right; font-variant-numeric: tabular-nums; }
.leader { border-bottom: 2px dotted rgba(238, 240, 236, 0.3); transform: translateY(-6px); }
.mins { font-size: 14px; color: #a9adb5; font-variant-numeric: tabular-nums; white-space: nowrap; }
.desc { grid-column: 1 / -2; font-size: 14.5px; color: #b8bcc3; margin-top: 4px; max-width: 60ch; }
.is-popular .svc::after { content: 'Most booked'; display: inline-block; vertical-align: 0.35em; margin-left: 10px; padding: 3px 8px; border-radius: 4px; background: var(--pole-red); color: var(--paper); font: 700 11px/1.2 var(--body); letter-spacing: 0.02em; text-transform: none; }
.row-book { align-self: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(238, 240, 236, 0.55); background: transparent; color: var(--chalk); font-weight: 700; font-size: 14px; }
.row-book:hover { background: var(--chalk); color: var(--felt); }
.row-book:focus-visible { outline-color: var(--chalk); }
.board-note { margin-top: 22px; font-size: 15px; color: #b8bcc3; }

/* ---------- barbers ---------- */
.barbers { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 6vw, 72px); }
.section-title { font: 900 clamp(40px, 5.6vw, 68px)/0.92 var(--display); text-transform: uppercase; max-width: 14ch; margin-bottom: clamp(24px, 3.5vw, 40px); }
.crew { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.barber { display: flex; flex-direction: column; gap: 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 24px; }
.mono { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 900 38px/1 var(--display); margin-bottom: 4px; }
.barber h3 { font: 900 40px/0.95 var(--display); text-transform: uppercase; }
.barber .title { font-weight: 700; color: var(--pole-red); }
.barber .bio { color: #33363d; }
.barber .does { font-size: 14px; color: var(--steel); }
.barber .btn { margin-top: auto; align-self: flex-start; }
.week { list-style: none; display: flex; gap: 5px; padding: 0; margin: 6px 0 2px; }
.week li { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; font: 700 13px/1 var(--body); }
.week .on { background: var(--pole-blue); color: var(--paper); }
.week .off { background: transparent; color: #a3a7ae; border: 1.5px dashed #c4c7c1; }
.week .today { outline: 2px solid var(--pole-red); outline-offset: 2px; }

/* ---------- Dante ---------- */
.dante {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center;
  max-width: none; margin-inline: 0; margin-block: clamp(24px, 4vw, 48px);
  background: radial-gradient(120% 90% at 20% 50%, #10202a 0%, var(--ink) 60%);
  color: var(--chalk);
  padding-block: clamp(40px, 7vw, 96px);
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
}
.dante-art { position: relative; }
.dante-art img { width: 100%; max-width: 460px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(60, 207, 240, 0.55), 0 0 60px rgba(60, 207, 240, 0.28), 0 0 140px rgba(60, 207, 240, 0.12); }
.dante h2 { font: 900 clamp(40px, 5.4vw, 66px)/0.92 var(--display); text-transform: uppercase; color: var(--paper); }
.dante-copy > p { margin-top: 18px; max-width: 36em; color: #c9cdd3; font-size: 18px; }
.dante-does { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.dante-does li { padding-left: 26px; position: relative; }
.dante-does li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--glow); box-shadow: 0 0 10px rgba(60, 207, 240, 0.6); }
.dante-copy > .dante-try { margin-top: 28px; font-size: 15px; color: #9ea3ab; }
.dante-asks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.dante-asks button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid rgba(60, 207, 240, 0.6); background: rgba(60, 207, 240, 0.06); color: var(--paper); font-size: 15px; text-align: left; }
.dante-asks button:hover { background: rgba(60, 207, 240, 0.18); border-color: var(--glow); }
.dante :focus-visible { outline-color: var(--glow); }

/* ---------- visit ---------- */
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); padding-block: clamp(56px, 8vw, 104px); align-items: start; }
.visit-area { font-size: 20px; font-weight: 700; }
.visit-phone { margin-top: 6px; color: var(--steel); font-variant-numeric: tabular-nums; }
.hours { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; font-variant-numeric: tabular-nums; }
.hours-title { font: 900 28px/1 var(--display); text-transform: uppercase; margin-bottom: 12px; }
.hours th, .hours td { padding: 11px 16px; text-align: left; border-top: 1px solid var(--line); font-size: 15.5px; }
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }
.hours th { font-weight: 500; }
.hours td { text-align: right; white-space: nowrap; }
.hours tr.today th, .hours tr.today td { font-weight: 700; background: #eef1fa; }
.today-tag { margin-left: 8px; font-size: 12px; font-weight: 700; color: var(--pole-blue); }
.policies { margin: 0; display: grid; gap: 16px; }
.policies div { background: rgba(255, 255, 255, 0.82); border-radius: 12px; padding: 14px 16px; }
.policies dt { font-weight: 700; }
.policies dd { margin: 4px 0 0; color: #33363d; font-size: 15.5px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #c9ccd2; padding: clamp(40px, 6vw, 72px) var(--gutter) calc(96px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; justify-items: start; }
.foot-title { font: 900 clamp(34px, 4.6vw, 56px)/0.95 var(--display); text-transform: uppercase; color: var(--paper); }
.foot-note { max-width: 46em; }
.foot-small { font-size: 13px; color: #8d929a; }
.foot-small a { color: #c9ccd2; }
.noscript { padding: 16px var(--gutter); background: var(--paper); }

/* ---------- Dante chat widget ---------- */
.ac-launcher {
  position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 5px 20px 5px 5px; border-radius: 999px;
  border: 0; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 16px;
  box-shadow: 0 0 0 2px rgba(60, 207, 240, 0.65), 0 10px 30px rgba(22, 24, 29, 0.35);
}
.ac-launcher:hover { box-shadow: 0 0 0 2px var(--glow), 0 0 26px rgba(60, 207, 240, 0.45), 0 10px 30px rgba(22, 24, 29, 0.35); }
.ac-launcher-face { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ac-panel {
  position: fixed; z-index: 50; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 120px)); height: min(640px, calc(100dvh - 120px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #121419; color: var(--chalk); border-radius: 20px;
  box-shadow: 0 0 0 1.5px rgba(60, 207, 240, 0.5), 0 0 40px rgba(60, 207, 240, 0.18), 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: ac-in 0.22s ease-out;
}
@keyframes ac-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.ac-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ac-face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(60, 207, 240, 0.6); }
.ac-who { flex: 1; min-width: 0; }
.ac-name { font: 900 24px/1 var(--display); text-transform: uppercase; display: flex; align-items: center; gap: 8px; color: var(--paper); }
.ac-live { width: 8px; height: 8px; border-radius: 50%; background: #8d929a; }
.is-ai .ac-live { background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.ac-role { font-size: 13px; color: #9ea3ab; margin-top: 3px; }
.ac-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.07); color: var(--paper); font-size: 24px; line-height: 1; }
.ac-close:hover { background: rgba(255, 255, 255, 0.15); }
.ac-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ac-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ac-msg.bot { background: #22262e; border-bottom-left-radius: 6px; align-self: flex-start; }
.ac-msg.user { background: var(--chalk); color: var(--ink); border-bottom-right-radius: 6px; align-self: flex-end; }
.ac-msg b { color: var(--paper); }
.ac-msg.user b { color: var(--ink); }
.ac-msg.typing { display: flex; gap: 5px; padding: 14px; }
.ac-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); opacity: 0.4; animation: ac-dot 1s infinite; }
.ac-msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.ac-msg.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ac-dot { 50% { opacity: 1; transform: translateY(-3px); } }
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.ac-chips:not(:empty) { padding-bottom: 10px; }
.ac-chip { min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1.5px solid rgba(60, 207, 240, 0.55); background: transparent; color: var(--paper); font-size: 14px; }
.ac-chip:hover { background: rgba(60, 207, 240, 0.15); }
.ac-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ac-input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, 0.16); background: #1b1e25; color: var(--paper); font: 16px var(--body); }
.ac-input:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 3px rgba(60, 207, 240, 0.2); }
.ac-send { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--glow); color: #06222b; font-weight: 700; }
.ac-foot { padding: 0 16px 12px; font-size: 12px; color: #8d929a; }
.ac-panel :focus-visible { outline-color: var(--glow); }
.ac-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .today { max-width: 420px; }
  .crew { grid-template-columns: 1fr; max-width: 560px; }
  .dante { grid-template-columns: 1fr; }
  .dante-art img { max-width: 300px; }
  .visit { grid-template-columns: 1fr 1fr; }
  .policies { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .brand-word { font-size: 26px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .leader { display: none; }
  .svc { grid-column: 1; }
  .price { grid-column: 2; grid-row: 1; }
  .mins { grid-column: 1; grid-row: 2; }
  .row-book { grid-column: 2; grid-row: 2; justify-self: end; }
  .desc { grid-column: 1 / -1; grid-row: 3; }
  .board-frame { border-width: 8px; }
  .is-popular .svc::after { display: block; width: max-content; margin: 6px 0 0; }
  .visit { grid-template-columns: 1fr; }
  .policies { grid-template-columns: 1fr; }
  .ac-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .ac-open { overflow: hidden; }
  .ac-launcher-label { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pole span, .ac-msg.typing i, .ac-panel { animation: none; }
  .btn { transition: none; }
}
