/* 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;
}

/* ---- The Real Barbershop: site-specific additions ---- */

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: var(--border);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-ink);
}
.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--color-accent); }
.nav-links .btn { color: var(--color-accent-2); }
@media (max-width: 768px) {
  .nav-links { background: var(--color-bg); padding: var(--space-2); border-top: var(--border); }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-color: var(--color-accent-2);
  padding-block: var(--space-5);
  min-height: 78vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.75) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #ffffff; }
.hero p { color: rgba(255,255,255,0.85); max-width: 46ch; }
.hero-actions { 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: #ffffff;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Dark band (visit / booking cta) */
.band-dark {
  background: var(--color-accent-2);
  color: #ffffff;
}
.band-dark .eyebrow { color: var(--color-accent); }
.band-dark a { color: #ffffff; }
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: baseline;
}
.info-row dt { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent); margin: 0; }
.info-row dd { margin: 0.25rem 0 0; font-size: 1.05rem; }
.info-row a { text-decoration: none; }
.info-row a:hover { color: var(--color-accent); }

/* Intro */
.intro-text { max-width: 68ch; font-size: 1.1rem; }

/* Services */
.service-card { padding: 0; background: transparent; border: none; box-shadow: none; }
.service-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin-bottom: var(--space-2); }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.service-card p { color: var(--color-muted); font-size: 0.95rem; }

/* Pricing / menu list */
.menu-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; border-top: var(--border); }
.menu-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border);
}
.menu-list .menu-name { font-family: var(--font-display); font-size: 1.05rem; }
.menu-list .menu-desc { color: var(--color-muted); font-size: 0.9rem; flex: 1; text-align: right; }
.menu-note { margin-top: var(--space-3); color: var(--color-muted); font-size: 0.9rem; }

/* Gallery */
.gallery-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-grid a { display: block; overflow: hidden; }
.gallery-grid img { transition: transform 0.35s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

/* Team */
.team-wrap { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.team-photo { width: 320px; flex-shrink: 0; aspect-ratio: 3 / 4; object-fit: cover; }
.team-caption { flex: 1 1 320px; max-width: 60ch; font-size: 1.1rem; line-height: 1.6; }

/* Editorial statement */
.editorial { max-width: 70ch; }
.editorial p { font-size: 1.15rem; line-height: 1.6; }

/* Journal */
.journal-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: var(--space-2); }
.journal-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.journal-card p { color: var(--color-muted); font-size: 0.9rem; margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: var(--border); }

/* Footer */
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--color-accent); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* ---- Motion: refined, deliberate reveals (taxonomy motion:3, formality:4) ---- */

/* Hero entrance: a slow, unhurried unveil rather than a snappy pop */
.hero-bg {
  transform: scale(1.06);
  animation: hero-settle 5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes hero-settle {
  to { transform: scale(1); }
}
.hero .eyebrow,
.hero h1,
.hero p,
.hero-actions {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-line-in 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero .eyebrow { animation-delay: 0.2s; }
.hero h1 { animation-delay: 0.4s; }
.hero p { animation-delay: 0.6s; }
.hero-actions { animation-delay: 0.8s; }
@keyframes hero-line-in {
  to { opacity: 1; transform: none; }
}

/* Scroll reveal: sections fade + rise into place once, as they enter view */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Staggered children within a revealed grid/list (services, gallery, journal, menu) */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.is-visible .reveal-stagger > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.14s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.23s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.32s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.41s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.5s; }
.reveal-stagger > *:nth-child(7) { transition-delay: 0.59s; }
.reveal-stagger > *:nth-child(8) { transition-delay: 0.68s; }

/* Microinteractions: buttons */
.btn,
.btn-outline {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease,
              box-shadow 0.35s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.35);
}
.btn-outline:hover, .btn-outline:focus-visible {
  transform: translateY(-2px);
}

/* Nav underline sweep */
.nav-links a:not(.btn) {
  position: relative;
  transition: color 0.3s ease;
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--color-accent);
  transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn):focus-visible::after {
  right: 0;
}

/* Card / image hover lift (services, journal) - restrained, no rotation or bounce */
.service-card img,
.journal-card img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover img,
.journal-card:hover img {
  transform: scale(1.035);
}
.service-card h3,
.journal-card h3 {
  transition: color 0.3s ease;
}
.service-card:hover h3,
.journal-card:hover h3 {
  color: var(--color-accent);
}

/* Menu list rows: quiet highlight on hover, not a jump */
.menu-list li {
  transition: background-color 0.35s ease, padding-left 0.35s ease;
}
.menu-list li:hover {
  background-color: rgba(204, 168, 118, 0.08);
  padding-left: var(--space-2);
}

/* Team photo: subtle settle on hover, matching gallery's restraint */
.team-photo { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.team-wrap:hover .team-photo { transform: scale(1.02); }

@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .hero .eyebrow,
  .hero h1,
  .hero p,
  .hero-actions,
  .reveal,
  .reveal-stagger > *,
  .gallery-grid img,
  .service-card img,
  .journal-card img,
  .team-photo {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
