/* ==============================================
   ISSA BARBERSHOP — La Ligne
   Design Tokens (Primitive → Semantic → Component)
   ============================================== */

/* --- PRIMITIVE TOKENS --- */
:root {
  --steel-900: #0F1219;
  --steel-800: #181D27;
  --steel-700: #222838;
  --cream-100: #EDEAE5;
  --gray-400: #A3A8B4;
  --red-500: #C93D30;
  --red-400: #DB4E41;
  --slate-600: #2A3042;
  --white: #FFFFFF;

  --font-display: 'Big Shoulders Display', 'Impact', sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;

  /* --- SEMANTIC TOKENS --- */
  --color-base: var(--steel-900);
  --color-surface: var(--steel-800);
  --color-elevated: var(--steel-700);
  --color-text-primary: var(--cream-100);
  --color-text-secondary: var(--gray-400);
  --color-accent: var(--red-500);
  --color-accent-hover: var(--red-400);
  --color-border: var(--slate-600);

  /* --- COMPONENT TOKENS --- */
  --btn-primary-bg: var(--color-accent);
  --btn-primary-text: var(--color-text-primary);
  --btn-primary-hover: var(--color-accent-hover);
  --nav-bg-scrolled: rgba(15, 18, 25, 0.92);
  --clipper-line-color: var(--color-accent);
  --clipper-line-width: 2px;
  --card-bg: var(--color-elevated);
  --section-alt-bg: var(--color-surface);
  --stat-badge-bg: var(--color-elevated);
  --stat-badge-border: var(--color-border);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-base);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { display: block; max-width: 100%; }

/* --- FOCUS --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* --- TYPOGRAPHY --- */
.heading {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-text-primary);
}

.heading-700 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  line-height: 1.1;
}

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  transition: background-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
  background-color: transparent;
}

.site-header.scrolled {
  background-color: var(--nav-bg-scrolled);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

/* Diagonal overlay — like the angle of a clipper on a temple */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      215deg,
      rgba(15, 18, 25, 0.3) 0%,
      rgba(15, 18, 25, 0.65) 35%,
      rgba(15, 18, 25, 0.9) 65%,
      var(--color-base) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

/* Letter-by-letter animation */
.hero-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: letterReveal 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.hero-title .letter-space {
  display: inline-block;
  width: 0.25em;
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- THE CLIPPER LINE — Signature Element --- */
.clipper-line {
  height: var(--clipper-line-width);
  background-color: var(--clipper-line-color);
  width: 0;
  transition: none;
}

.clipper-line.animate {
  animation: clipperReveal 0.8s ease-out forwards;
}

@keyframes clipperReveal {
  from { width: 0; }
  to { width: 100%; }
}

/* Hero clipper line */
.clipper-line-hero {
  max-width: 280px;
  margin: 0 auto;
}

/* Section separator clipper line */
.clipper-line-section {
  max-width: 120px;
  margin: 0 auto;
}

/* Gallery hover clipper line */
.gallery-card .clipper-line-hover {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: var(--clipper-line-width);
  background-color: var(--clipper-line-color);
  z-index: 3;
  transition: width 0.4s ease-out;
  pointer-events: none;
}

.gallery-card:hover .clipper-line-hover,
.gallery-card:focus-within .clipper-line-hover {
  width: 100%;
}

/* --- STAT BADGES --- */
.stat-badge {
  background-color: var(--stat-badge-bg);
  border: 1px solid var(--stat-badge-border);
  padding: 1.75rem 2rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-badge:hover {
  transform: translateY(-3px);
  border-color: var(--color-accent);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.75rem;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-secondary);
  margin-top: 0.375rem;
}

/* --- SERVICE CARDS --- */
.service-card {
  background-color: var(--card-bg);
  border: 1px solid var(--color-border);
  padding: 2rem 1.75rem;
  transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-primary);
  margin: 0 0 0.75rem 0;
}

.service-card p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* --- HORIZONTAL GALLERY --- */
.gallery-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 8vw;
  scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  flex: 0 0 auto;
  scroll-snap-align: center;
  position: relative;
  width: 280px;
  height: 373px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-card:hover img,
.gallery-card:focus-within img {
  transform: scale(1.05);
}

/* --- REVIEW CARDS --- */
.reviews-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 8vw 1rem;
  scrollbar-width: none;
}

.reviews-scroll::-webkit-scrollbar {
  display: none;
}

.review-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 340px;
  background-color: var(--card-bg);
  border: 1px solid var(--color-border);
  padding: 2rem;
  position: relative;
}

.review-card .quote-mark {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--color-accent);
  line-height: 1;
  position: absolute;
  top: 0.75rem;
  left: 1.25rem;
  opacity: 0.6;
}

.review-stars {
  display: flex;
  gap: 2px;
}

.review-stars svg {
  width: 16px;
  height: 16px;
  fill: var(--color-accent);
}

/* --- HOURS BLOCK --- */
.hours-block {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}

.hours-item {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

.hours-item span {
  color: var(--color-text-primary);
}

/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.25rem;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 61, 48, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background-color: transparent;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* --- HAMBURGER --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  z-index: 201;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text-primary);
  transition: transform 0.35s ease, opacity 0.35s ease;
  transform-origin: center;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- MOBILE MENU --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(15, 18, 25, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  color: var(--color-accent);
}

/* --- SCROLL REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* --- RESPONSIVE --- */
@media (min-width: 640px) {
  .gallery-card {
    width: 300px;
    height: 400px;
  }
}

@media (min-width: 768px) {
  .gallery-card {
    width: 320px;
    height: 427px;
  }
}

@media (max-width: 768px) {
  .site-header { padding: 1rem 1.25rem; }
  .site-header.scrolled { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .hamburger { display: flex; }

  .review-card { width: 300px; }
  .stat-number { font-size: 2.25rem; }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html { scroll-behavior: auto; }

  .reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
  }

  .hero-title .letter {
    opacity: 1;
    transform: none;
  }

  .clipper-line {
    width: 100% !important;
  }

  .gallery-card .clipper-line-hover {
    display: none;
  }
}
