/* Generic reset + layout utilities. No fixed visual style - Agent A builds
   the actual look on top of this using tokens.css + its own section CSS. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.5;
}
img, picture, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 var(--space-2); }
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
p { margin: 0 0 var(--space-2); }
a { color: inherit; }
button { font: inherit; }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--space-5); }

.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
}
@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
  padding: var(--space-3);
}

.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-bg);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.nav-links { display: flex; gap: var(--space-3); align-items: center; }
.nav-toggle { display: none; }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Bukit Bintang Barbershop site styles ---------- */

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  display: block;
  margin-bottom: var(--space-2);
}

/* Nav: solid dark bar with an appointment CTA button */
.site-header {
  background: var(--color-accent-2);
  color: #f2ede6;
  padding-block: var(--space-2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #f2ede6;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-header .nav-links a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e5ddd2;
}
.site-header .nav-links a:hover { color: var(--color-accent); }
.site-header .btn {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-header .nav-toggle { color: #f2ede6; background: none; border: none; font-size: 1.5rem; }
@media (max-width: 768px) {
  .site-header .nav-links.open {
    background: var(--color-accent-2);
    padding: var(--space-3);
    position: absolute;
    inset-inline: 0;
    top: 100%;
    gap: var(--space-2);
  }
}

/* Hero slider */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-accent-2);
  color: #fff;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34,34,39,0.55) 0%, rgba(34,34,39,0.75) 100%);
  z-index: 1;
}
.hero-numeral {
  position: absolute;
  right: 2vw;
  bottom: -4vw;
  font-family: var(--font-display);
  font-size: min(28vw, 380px);
  line-height: 1;
  color: rgba(255,255,255,0.16);
  z-index: 2;
  user-select: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-numeral.is-active { opacity: 1; }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: var(--space-3);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.3s ease;
}
.hero-dot.is-active { background: #fff; }
.hero-content { position: relative; z-index: 3; max-width: 640px; }
.hero .eyebrow { color: #d8c9b8; }
.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, var(--font-size-h1));
  color: #fff;
}
.hero p {
  font-size: 1.05rem;
  color: #eee6da;
}
.hero-ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.btn-outline {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
  text-decoration: none;
}

/* Intro */
.intro { text-align: center; }
.intro .container { max-width: 760px; }
.intro .eyebrow { display: block; text-align: center; }

/* Since-badge: vintage-Americana emblem in place of a fabricated founding year */
.since-badge {
  width: 128px;
  height: 128px;
  margin: 0 auto var(--space-3);
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.since-badge::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
}
.since-badge-text {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-align: center;
  line-height: 1.6;
}
.since-badge-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--color-ink);
  margin: 0.1rem 0;
}

/* Style cards */
.style-card { text-align: center; }
.style-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-2);
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--color-accent);
}

/* Appointment split section */
.appointment { background: var(--color-accent-2); color: #f2ede6; padding: 0; }
.appointment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}
.appointment-photo { min-height: 480px; background-size: cover; background-position: center; }
.appointment-panel { padding: var(--space-5) var(--space-4); }
.appointment-panel h2 { color: #fff; }
.appointment-panel .eyebrow { color: #cbb9a3; }
.appointment-panel p { color: #d8cfc3; }
@media (max-width: 900px) {
  .appointment-grid { grid-template-columns: 1fr; }
  .appointment-photo { min-height: 260px; }
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-3); }
.form-grid .field-full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #cbb9a3;
  margin-bottom: 0.35rem;
}
.field input, .field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input::placeholder { color: rgba(255,255,255,0.45); }
.form-success {
  display: none;
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--color-accent);
  color: #fff;
  font-size: 0.9rem;
}
.form-success.is-visible { display: block; }

/* Pricing list */
.pricing-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; max-width: 760px; margin-inline: auto; }
.pricing-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: var(--border);
  font-family: var(--font-ui);
}
.pricing-item .price { color: var(--color-accent); font-weight: 600; white-space: nowrap; }
.pricing-note { text-align: center; font-size: 0.85rem; color: var(--color-muted); margin-top: var(--space-3); }

/* Mission banner */
.mission-banner {
  background: var(--color-surface);
  text-align: center;
  border-top: var(--border);
  border-bottom: var(--border);
}
.mission-banner p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  max-width: 780px;
  margin-inline: auto;
  color: var(--color-ink);
}

/* Team: individual member cards (25% width x4 on desktop per wireframe) */
.team-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.team-card { text-align: center; }
.team-card-photo,
.team-card-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: var(--border);
  margin-bottom: var(--space-2);
}
.team-card-placeholder {
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card-placeholder svg {
  width: 30%;
  height: 30%;
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 1.4;
}
.team-card .role {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.35rem;
}
.team-card p { color: var(--color-muted); font-size: 0.88rem; margin-bottom: 0; }
@media (max-width: 900px) { .team-card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-card-grid { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; } }

/* Gallery */
.gallery-grid img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; cursor: zoom-in; }

/* Blog */
.blog-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: var(--space-2); }
.blog-card h3 { font-size: 1.1rem; }
.blog-card p { color: var(--color-muted); font-size: 0.92rem; }

/* Contact / footer */
.site-footer { background: var(--color-accent-2); color: #d8cfc3; }
.site-footer a { color: #f2ede6; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-4); }
.footer-brand { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-bottom: var(--space-2); }
.footer-meta { font-size: 0.85rem; color: #a99b8a; margin-top: var(--space-3); }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Motion: restrained, per the template's low motion dial ---------- */

/* Color/shadow transitions are cheap and harmless for reduced-motion users,
   so these run unconditionally. Transform-based effects (reveals, lift,
   zoom) are gated inside the no-preference query below. */
.site-header { transition: box-shadow 0.3s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,0.22); }
.site-header .nav-links a { transition: color 0.2s ease; }
.btn, .btn-outline {
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
}
.pricing-item { transition: background-color 0.25s ease; }
.pricing-item:hover { background-color: rgba(158, 138, 120, 0.08); }

@media (prefers-reduced-motion: no-preference) {
  /* Scroll reveals: sections/cards fade + rise into place once as they
     cross into view. main.js adds .is-visible via IntersectionObserver
     and only sets up the observer when motion isn't reduced. */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }

  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
  .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
  .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
  .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
  .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
  .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.4s; }
  .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.5s; }

  /* Button lift */
  .btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(48,49,51,0.2); }
  .btn-outline:hover, .btn-outline:focus-visible {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
  }

  /* Card lift */
  .card, .style-card, .team-card, .blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .style-card:hover, .blog-card:hover, .team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 26px rgba(48,49,51,0.16);
  }
  .style-card:hover .style-mark { border-color: var(--color-ink); transition: border-color 0.3s ease; }

  /* Gallery zoom-in on hover */
  .gallery-grid a.lightbox { display: block; overflow: hidden; }
  .gallery-grid a.lightbox img { transition: transform 0.5s ease; }
  .gallery-grid a.lightbox:hover img, .gallery-grid a.lightbox:focus-visible img {
    transform: scale(1.06);
  }

  /* Team photo/placeholder subtle zoom, matching gallery treatment */
  .team-card { overflow: hidden; }
  .team-card-photo, .team-card-placeholder { transition: transform 0.5s ease; }
  .team-card:hover .team-card-photo, .team-card:hover .team-card-placeholder { transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  /* Hero crossfade still runs (opacity-only, low intensity), but the
     autoplay interval itself is skipped in main.js so slides don't change
     without user action. */
  .hero-slide, .hero-numeral, .hero-dot { transition-duration: 0.01ms; }
}
