@import './tokens.css';

/* Layout */
.bb-section { padding: var(--pad-section) 0; }
.bb-section--oat { background: var(--bb-oat); }
.bb-container { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--container-padding); }
.bb-container--narrow { max-width: var(--container-narrow); }
.bb-container--mid { max-width: 720px; }

/* Typography */
.bb-label {
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
  font-size: var(--t-eyebrow);
  font-weight: var(--w-med);
  color: var(--bb-terracotta);
  display: block;
}
.bb-display {
  font-family: 'Fraunces', serif;
  font-weight: var(--w-light);
  font-size: clamp(var(--t-3xl), 5vw, var(--t-5xl));
  line-height: var(--lh-heading);
  letter-spacing: -.01em;
  color: var(--bb-charcoal);
}
.bb-h2 {
  font-family: 'Fraunces', serif;
  font-weight: var(--w-light);
  font-size: var(--t-h2);
  line-height: var(--lh-heading);
  color: var(--bb-charcoal);
}
.bb-body {
  font-size: var(--t-lg);
  line-height: var(--lh-body);
  color: var(--bb-ink);
  font-weight: var(--w-light);
}
body { line-height: var(--lh-body); }
h1, h2, h3 { line-height: var(--lh-heading); }
.bb-rule {
  border: 0;
  height: 1px;
  background: var(--bb-line);
  margin: var(--s-12) 0;
}

/* Button: bare text-link style */
.bb-btn {
  display: inline-block;
  color: var(--bb-terracotta);
  text-decoration: none;
  letter-spacing: var(--btn-tracking);
  text-transform: uppercase;
  font-size: var(--t-eyebrow);
  font-weight: var(--w-med);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .3s ease;
  background: transparent;
  border-radius: 0;
  padding-inline: 0;
}
.bb-btn:hover { border-bottom-color: var(--bb-terracotta); }
/* Ghost variant for dark/hero backgrounds */
.bb-btn--ghost {
  color: var(--bb-cream);
  border-bottom-color: transparent;
}
.bb-btn--ghost:hover { border-bottom-color: var(--bb-cream); }
/* Nav CTA: outlined bordered button */
.bb-nav .bb-btn {
  border: 1px solid var(--bb-terracotta);
  padding: var(--s-2) var(--s-6);
  color: var(--bb-terracotta);
  transition: background .2s ease, color .2s ease;
}
.bb-nav .bb-btn:hover { background: var(--bb-terracotta); color: var(--bb-cream); border-bottom-color: var(--bb-terracotta); }

/* Navigation */
.bb-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(242,234,220,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bb-nav__brand {
  font-size: var(--t-lg);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--bb-charcoal);
  text-decoration: none;
  font-weight: var(--w-reg);
}
.bb-nav__links {
  display: flex;
  gap: var(--s-8);
  list-style: none;
  align-items: center;
}
.bb-nav__links a {
  color: var(--bb-charcoal);
  text-decoration: none;
  font-size: var(--nav-link-size);
  letter-spacing: var(--nav-tracking);
  text-transform: uppercase;
  font-weight: var(--w-med);
  font-family: 'Fraunces', serif;
}
/* Services dropdown */
.bb-nav__dropdown-wrap { position: relative; }
.bb-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bb-cream);
  border: 1px solid var(--bb-line);
  min-width: 220px;
  list-style: none;
  padding: var(--s-3) 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  z-index: 200;
}
.bb-nav__dropdown-wrap:hover .bb-nav__dropdown,
.bb-nav__dropdown-wrap:focus-within .bb-nav__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity .2s ease, transform .2s ease;
}
.bb-nav__dropdown li a {
  display: block;
  padding: var(--s-2) var(--s-5);
  font-size: var(--nav-link-size);
  letter-spacing: var(--nav-tracking);
  text-transform: uppercase;
  color: var(--bb-charcoal);
  text-decoration: none;
  font-family: 'Fraunces', serif;
  transition: color .2s;
}
.bb-nav__dropdown li a:hover { color: var(--bb-terracotta); }
/* Hamburger */
.bb-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-2);
}
.bb-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bb-charcoal);
  transition: transform .3s ease, opacity .3s ease;
}
.bb-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bb-hamburger.open span:nth-child(2) { opacity: 0; }
.bb-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Mobile nav drawer */
.bb-mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bb-cream);
  border-left: 1px solid var(--bb-line);
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 99;
  overflow-y: auto;
  padding: var(--s-8) var(--s-6);
}
.bb-mobile-nav.open { transform: none; }
.bb-mobile-nav ul { list-style: none; }
.bb-mobile-nav a {
  display: block;
  padding: var(--s-4) 0;
  font-size: var(--nav-link-size);
  letter-spacing: var(--nav-tracking);
  text-transform: uppercase;
  font-family: 'Fraunces', serif;
  color: var(--bb-charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--bb-line);
}
.bb-mobile-nav a:hover { color: var(--bb-terracotta); }
.bb-mobile-nav .bb-mobile-nav__sub { padding-left: var(--s-4); }
.bb-mobile-nav .bb-mobile-nav__sub a { font-size: var(--t-xs); color: var(--bb-ink); }

/* Hero */
.bb-hero {
  min-height: var(--hero-min-height);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--hero-margin-bottom);
}
.bb-hero__media { position: absolute; inset: 0; z-index: -1; }
.bb-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.bb-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(42,37,32,.2), rgba(42,37,32,.5));
}
.bb-hero__content {
  position: relative;
  color: var(--bb-cream);
  max-width: 900px;
  padding: 0 var(--container-padding);
}
.bb-hero__title {
  font-size: var(--t-hero);
  font-weight: var(--w-light);
  line-height: var(--lh-heading);
  letter-spacing: var(--hero-tracking);
}

/* Image statement */
.bb-image-statement {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-16);
  align-items: center;
}
.bb-image-statement__img img { width: 100%; height: auto; display: block; }

/* Reveal: hidden only when JS is active; visible by default for no-JS / screenshots */
html.js .bb-reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
html.js .bb-reveal--in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .bb-reveal { opacity: 1; transform: none; transition: none; }
}

/* Footer */
.bb-footer {
  background: var(--bb-charcoal);
  color: var(--bb-cream);
  padding: var(--s-24) 0 var(--s-12);
}
.bb-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-16);
}

.bb-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-8);
  margin-top: var(--s-8);
}
.bb-service-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-8);
  border: 1px solid var(--bb-line);
  background: var(--bb-cream);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.bb-service-card:hover { border-color: var(--bb-terracotta); transform: translateY(-2px); }
.bb-service-card h3 {
  font-size: var(--t-xl);
  font-weight: var(--w-light);
  color: var(--bb-charcoal);
  letter-spacing: -.01em;
  margin: 0;
}
.bb-service-card p {
  font-size: var(--t-sm);
  color: var(--bb-ink);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.bb-service-card__more {
  font-size: var(--t-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bb-terracotta);
  margin-top: var(--s-4);
}

.bb-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-8);
  margin-top: var(--s-8);
}
.bb-event-card {
  display: flex;
  flex-direction: column;
  background: var(--bb-cream);
  border: 1px solid var(--bb-line);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.bb-event-card:hover { border-color: var(--bb-terracotta); transform: translateY(-2px); }
.bb-event-card__media {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: var(--bb-oat);
}
.bb-event-card__body { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); }
.bb-event-card__body h3 { font-size: var(--t-lg); font-weight: var(--w-light); color: var(--bb-charcoal); letter-spacing: -.01em; margin: 0; }
.bb-event-card__meta { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--bb-ink); margin: 0; }
.bb-event-card__blurb { font-size: var(--t-sm); color: var(--bb-ink); line-height: 1.55; margin: 0; flex: 1; }
.bb-event-card__more {
  align-self: flex-start;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: var(--t-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bb-terracotta);
  cursor: pointer;
  padding: 0;
  margin-top: var(--s-2);
}
.bb-event-card__more:hover { text-decoration: underline; }

.bb-slider { position: relative; display: flex; align-items: center; gap: var(--s-4); }
.bb-slider__track {
  display: flex;
  gap: var(--s-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--s-4);
  flex: 1;
  scrollbar-width: thin;
}
.bb-slide { flex: 0 0 clamp(280px, 32vw, 360px); scroll-snap-align: start; }
.bb-slider__btn {
  background: var(--bb-cream);
  border: 1px solid var(--bb-line);
  color: var(--bb-charcoal);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: var(--t-base);
  flex-shrink: 0;
  transition: border-color .2s ease, color .2s ease;
}
.bb-slider__btn:hover { border-color: var(--bb-terracotta); color: var(--bb-terracotta); }

.bb-event-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--s-6); }
.bb-event-modal[hidden] { display: none; }
.bb-event-modal__backdrop { position: absolute; inset: 0; background: rgba(20,15,10,.6); }
.bb-event-modal__panel {
  position: relative;
  background: var(--bb-cream);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--s-10);
}
.bb-event-modal__close {
  position: absolute;
  top: var(--s-3);
  right: var(--s-4);
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--bb-ink);
}
.bb-event-modal__hero { aspect-ratio: 16 / 9; background-size: cover; background-position: center; margin-bottom: var(--s-6); }
.bb-event-modal__panel h2 { font-size: var(--t-2xl); font-weight: var(--w-light); margin: var(--s-3) 0 var(--s-4); color: var(--bb-charcoal); }
.bb-event-modal__meta { font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--bb-ink); margin-bottom: var(--s-4); }
.bb-event-modal__blurb { font-size: var(--t-base); color: var(--bb-ink); line-height: 1.6; margin-bottom: var(--s-6); }

/* Responsive */
@media (max-width: 960px) {
  .bb-services-grid { grid-template-columns: repeat(2, 1fr); }
  .bb-events-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .bb-nav__links { display: none; }
  .bb-hamburger { display: flex; }
  .bb-mobile-nav { display: block; }
  .bb-footer__grid { grid-template-columns: 1fr; }
  .bb-services-grid { grid-template-columns: 1fr; }
}

