/* ==========================================================================
   Legends Barbershop — base layer
   Design tokens, reset, primitives. Values mirrored from the original build.
   ========================================================================== */

@import url("./fonts.css");

:root {
  /* palette */
  --bg:            #f2f2f2;
  --ink:           #111111;
  --white:         #ffffff;
  --black:         #000000;

  --body-grey:     #494949;   /* services + faq body copy */
  --body-grey-2:   #666666;   /* franchise + awards body copy */
  --price-grey:    #707070;   /* service price */
  --app-muted:     #94969d;   /* mobile-app section body */

  --ink-60:        rgba(0, 0, 0, .6);
  --ink-70:        rgba(0, 0, 0, .7);
  --ink-50:        rgba(0, 0, 0, .5);
  --white-60:      rgba(255, 255, 255, .6);
  --white-20:      rgba(255, 255, 255, .2);
  --white-10:      rgba(255, 255, 255, .1);

  /* type */
  --display: "Clash Display", "Inter", system-ui, sans-serif;
  --ui:      "Inter", system-ui, -apple-system, sans-serif;
  --alt:     "Instrument Sans", "Inter", system-ui, sans-serif;

  /* layout */
  --container: 1320px;
  --gutter: 60px;
  --radius-pill: 100px;

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --swap-dur: .42s;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--ink); color: var(--white); }

/* ----------------------------------------------------------- primitives -- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.section {
  position: relative;
  padding-inline: var(--gutter);
}

/* Small uppercase-ish eyebrow label used above most section headings. */
.eyebrow {
  font-family: var(--ui);
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink);
}

.display {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
}

/* --------------------------------------------------------------- swap --- */
/* Framer's masked label swap: two stacked copies inside a clipped box; on
   hover the stack slides up by exactly one line + gap. */
.swap {
  display: flex;
  flex-direction: column;
  gap: var(--swap-gap, 4px);
  overflow: hidden;
  height: var(--swap-line, 18px);
  /* Without these the clipped box collapses and long labels get cut off. */
  flex: none;
  min-width: max-content;
  transition: none;
}
.swap > span {
  flex: none;
  height: var(--swap-line, 18px);
  display: flex;
  align-items: center;
  transition: transform var(--swap-dur) var(--ease);
  white-space: nowrap;
}
.swap-host:hover .swap > span,
.swap:hover > span {
  transform: translateY(calc((var(--swap-line, 18px) + var(--swap-gap, 4px)) * -1));
}

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -.32px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease);
  --swap-line: 24px;
  --swap-gap: 5px;
}

/* outlined pill on dark imagery — "Shop Now" */
.btn--ghost {
  gap: 16px;
  padding: 16px 20px;
  color: var(--white);
  border: 1px solid var(--white-20);
  background: var(--white-10);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .22); }
.btn--ghost .dot {
  width: 6px; height: 6px; flex: none;
  border-radius: 50%;
  background: var(--white);
}

/* solid white pill with a dark arrow puck — "Book Now" */
.btn--solid {
  gap: 16px;
  padding: 4px 4px 4px 20px;
  background: var(--white);
  color: var(--ink);
  border-radius: 50px;
}
.btn--solid .puck {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: transform .4s var(--ease);
}
.btn--solid:hover .puck { transform: rotate(45deg); }

/* inverted: dark pill with white puck, used on light sections */
.btn--dark {
  gap: 16px;
  padding: 4px 4px 4px 20px;
  background: var(--ink);
  color: var(--white);
  border-radius: 50px;
}
.btn--dark .puck {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform .4s var(--ease);
}
.btn--dark:hover .puck { transform: rotate(45deg); }

/* ------------------------------------------------------------- marquee --- */
.marquee {
  display: flex;
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--marquee-gap, 56px);
  padding-right: var(--marquee-gap, 56px);
  flex: none;
  min-width: 100%;
  animation: marquee var(--marquee-dur, 32s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ------------------------------------------------------- reveal on scroll -- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
