/* ==========================================================================
   The Big Night Events -- review generator
   Hand-written translation of the original Tailwind utility classes.
   Breakpoints match Tailwind: sm 640px, md 768px, lg 1024px.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid #e5e5e5;
}

html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #e9e9e9;
  color: #1a1a1a;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

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

button {
  font: inherit;
  color: inherit;
  margin: 0;
  background: none;
  text-transform: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -- shared layout ------------------------------------------------------- */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.wrap {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
}

.wrap--6xl { max-width: 72rem; }
.wrap--5xl { max-width: 64rem; }

.main {
  flex: 1 1 auto;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke-width: 1.5;
}

/* -- header -------------------------------------------------------------- */

.site-header {
  background-color: #0a0a0a;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 0.75rem;
}

.site-header__logo {
  height: 3rem;
  object-fit: contain;
}

/* -- hero ---------------------------------------------------------------- */

.hero {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.hero__head {
  text-align: center;
  margin-bottom: 2rem;
}

.hero__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.625rem;
}

.hero__subtitle {
  color: #737373;
  font-size: 0.875rem;
  line-height: 1.625;
  max-width: 28rem;
  margin-inline: auto;
}

/* -- category cards ------------------------------------------------------ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.category-card {
  display: block;
  width: 100%;
  text-align: left;
  background-color: #ffffff;
  border: 1px solid #d1d1d1;
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition:
    transform 300ms cubic-bezier(0, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0, 0, 0.2, 1),
    border-color 300ms cubic-bezier(0, 0, 0.2, 1),
    opacity 300ms cubic-bezier(0, 0, 0.2, 1);
}

.category-card:hover:not(:disabled) {
  transform: translateY(-0.125rem);
  border-color: #737373;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.category-card:active:not(:disabled) {
  transform: scale(0.98);
}

.category-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.category-card.is-active {
  border-color: #1a1a1a;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.category-card:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.category-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  background-color: #f0f0f0;
  color: #404040;
  transition: background-color 200ms, color 200ms;
}

.category-card__icon .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.category-card:hover:not(:disabled) .category-card__icon,
.category-card.is-active .category-card__icon {
  background-color: #1a1a1a;
  color: #ffffff;
}

.category-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.125rem;
  line-height: 1.375;
}

.category-card__desc {
  display: none;
  font-size: 0.75rem;
  line-height: 1.625;
  color: #a3a3a3;
}

/* -- loading ------------------------------------------------------------- */

.loading {
  padding-block: 3.5rem;
  text-align: center;
}

.loading__spinner {
  width: 2.5rem;
  height: 2.5rem;
  color: #525252;
  margin-inline: auto;
  animation: bn-spin 1s linear infinite;
}

.loading__text {
  margin-top: 1rem;
  color: #525252;
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes bn-spin {
  to { transform: rotate(360deg); }
}

/* -- reviews ------------------------------------------------------------- */

.reviews {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

.reviews__head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.reviews__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.375rem;
}

.reviews__subtitle {
  color: #737373;
  font-size: 0.875rem;
}

.reviews__grid {
  display: grid;
  gap: 0.75rem;
}

.review-card {
  background-color: #ffffff;
  border: 1px solid #d1d1d1;
  border-radius: 0.75rem;
  padding: 1.25rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition:
    transform 300ms cubic-bezier(0, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0, 0, 0.2, 1),
    border-color 300ms cubic-bezier(0, 0, 0.2, 1);
}

.review-card:hover {
  border-color: #737373;
  transform: translateY(-0.125rem);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.review-card:active {
  transform: scale(0.98);
}

.review-card:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.review-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.review-card__stars {
  display: flex;
  gap: 0.125rem;
}

.review-card__stars .icon {
  width: 1rem;
  height: 1rem;
  fill: #1a1a1a;
  color: #1a1a1a;
}

.review-card__state {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #d1d1d1;
  transition: color 200ms;
}

.review-card__state span {
  font-size: 0.75rem;
  font-weight: 500;
}

.review-card.is-copied .review-card__state {
  color: #1a1a1a;
}

.review-card__body {
  display: block;
  color: #404040;
  font-size: 0.875rem;
  line-height: 1.625;
}

.review-card__note {
  margin-top: 0.75rem;
  color: #525252;
  font-size: 0.75rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 0.375rem;
}

.review-card__note .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.review-card.is-copied .review-card__note {
  display: flex;
}

/* -- footer -------------------------------------------------------------- */

.site-footer {
  background-color: #0a0a0a;
  color: #ffffff;
  margin-top: auto;
}

.site-footer__inner {
  padding-block: 2.5rem;
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.site-footer__logo {
  height: 3rem;
  object-fit: contain;
  margin-bottom: 1rem;
}

.site-footer__blurb {
  color: #888888;
  font-size: 0.875rem;
  line-height: 1.625;
  max-width: 20rem;
}

.site-footer__heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.contact-list > * + * {
  margin-top: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #a3a3a3;
  font-size: 0.875rem;
  transition: color 150ms;
}

.contact-item .icon {
  color: #6d6d6d;
}

a.contact-item:hover {
  color: #ffffff;
}

.contact-item--address {
  align-items: flex-start;
}

.contact-item--address .icon {
  margin-top: 0.125rem;
}

.site-footer__bottom {
  border-top: 1px solid #2a2a2a;
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
}

.site-footer__bottom p {
  color: #525252;
  font-size: 0.75rem;
}

/* -- entrance animation -------------------------------------------------- */

@keyframes bn-fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: bn-fade-in-up 0.4s ease-out forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  .animate-in {
    opacity: 1;
    animation: none;
  }
  .loading__spinner { animation-duration: 2s; }
  .category-card,
  .review-card { transition: none; }
}

/* -- inline error (replaces the original alert()) ------------------------ */

.notice {
  max-width: 34rem;
  margin: 0 auto;
  background-color: #ffffff;
  border: 1px solid #d1d1d1;
  border-left: 3px solid #1a1a1a;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #404040;
  font-size: 0.875rem;
  line-height: 1.625;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notice .icon {
  margin-top: 0.1875rem;
  color: #737373;
}

.notice__retry {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: underline;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

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

/* ==========================================================================
   sm: 640px
   ========================================================================== */
@media (min-width: 640px) {
  .site-header__inner { padding-block: 1rem; }
  .site-header__logo  { height: 3.5rem; }

  .hero { padding-top: 3.5rem; }
  .hero__head { margin-bottom: 2.5rem; }
  .hero__title { font-size: 1.875rem; }
  .hero__subtitle { font-size: 1rem; }

  .category-grid { gap: 1rem; }
  .category-card { padding: 1.5rem; }
  .category-card__icon { width: 2.75rem; height: 2.75rem; }
  .category-card__title { font-size: 1rem; }
  .category-card__desc { display: block; font-size: 0.875rem; }

  .reviews { padding-bottom: 4rem; }
  .reviews__head { margin-bottom: 2rem; }
  .reviews__title { font-size: 1.5rem; }
  .reviews__grid { gap: 1rem; }
  .review-card { padding: 1.5rem; }
  .review-card__body { font-size: 0.9375rem; }

  .site-footer__inner { padding-block: 3rem; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__logo { height: 3.5rem; }
}

/* ==========================================================================
   md: 768px
   ========================================================================== */
@media (min-width: 768px) {
  .hero__title { font-size: 2.25rem; }
  .reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header__logo { height: 4rem; }
}

/* ==========================================================================
   lg: 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
