/* Home page: the front door for every Bakes & Brews café. Uses the tokens in css/site.css. */

/* Hero */
.hero {
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(3rem, 6vw, 4.75rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero .lede {
  margin-top: 1.1rem;
}

/* The full logo: cup, wordmark and caption, built from the same files as bbantioch.com */
.hero-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.5rem;
  background: radial-gradient(closest-side, rgba(229, 185, 116, 0.24), rgba(229, 185, 116, 0) 72%);
}

.hero-icon {
  width: min(100%, 21rem);
}

.hero-word {
  width: min(100%, 25rem);
  margin-top: 0.4rem;
}

.hero-lockup .tagline {
  margin-top: 0.85rem;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

/* Café chooser */
.cafes {
  min-width: 0;
  margin: 2.25rem 0 0;
  padding: 0;
  border: 0;
}

.cafes legend {
  margin: 0 0 0.25rem;
  padding: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.25;
}

.cafes-hint {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.cafe-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cafe {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cafe:hover {
  border-color: var(--line-strong);
}

.cafe:has(.cafe-radio:checked) {
  border-color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 3px 0 var(--gold), var(--shadow);
}

.cafe-radio {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  z-index: 1;
  left: 1.25rem;
  top: 1.4rem;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}

.cafe-radio:checked {
  background: var(--ink);
  box-shadow: inset 0 0 0 0.3rem var(--paper);
}

/* Where :has() works, ring the whole card instead of the small circle */
@supports selector(:has(*)) {
  .cafe-radio:focus-visible {
    outline: none;
  }

  .cafe:has(.cafe-radio:focus-visible) {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
  }
}

.cafe-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.2rem 1rem;
  padding: 1.2rem 1.25rem 1.25rem 3.35rem;
}

.cafe-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  cursor: pointer;
}

/* The whole card head picks the café, not just the name */
.cafe-name::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.cafe-meta {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cafe-meta span {
  display: block;
}

.cafe-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.cafe-status:empty {
  display: none;
}

.cafe-status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--terracotta);
}

.cafe-status[data-state="open"]::before {
  background: var(--forest);
}

/* What opens once a café is picked */
.cafe-go {
  display: none;
  padding: 0 1.25rem 1.25rem;
}

.cafe-radio:checked ~ .cafe-go {
  display: block;
  animation: rise 0.22s ease-out;
}

.go-label {
  margin: 0 0 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}

.go-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.go {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 11rem;
  padding: 1.1rem 1.15rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.go:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.go-cafe {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}

.go-cafe:hover {
  border-color: var(--cocoa);
  background: var(--cocoa);
}

.go-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.7rem;
  border-radius: 50%;
  background: var(--sand);
  color: var(--roast);
}

.go-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.go-cafe .go-icon {
  background: rgba(229, 185, 116, 0.16);
  color: var(--honey);
}

.go-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
}

.go-desc {
  margin-top: 0.3rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}

.go-cafe .go-desc {
  color: var(--cream-soft);
}

.go-url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--roast);
}

.go-cafe .go-url {
  color: var(--honey);
}

.go-arrow {
  transition: transform 0.15s ease;
}

.go:hover .go-arrow {
  transform: translateX(3px);
}

.cafe-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.cafe-extra a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.cafes-soon {
  margin: 0.9rem 0 0;
  padding: 0.8rem 1.1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  color: var(--muted);
  font-size: 0.95rem;
}

/* The Community Shelf band */
.band {
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.band-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 2.5rem;
  overflow: hidden;
  padding: clamp(1.75rem, 4.5vw, 3rem);
  border-radius: var(--radius-panel);
  background: var(--ink);
  color: var(--cream);
}

.band-mark {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border: 1px solid rgba(229, 185, 116, 0.45);
  border-radius: 50%;
  color: var(--honey);
}

.band-mark svg {
  width: 2.5rem;
  height: 2.5rem;
}

.band h2 {
  margin-top: 0.45rem;
  color: var(--cream);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.band p:not(.eyebrow) {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--cream-soft);
}

.band .actions {
  flex-direction: column;
  margin-top: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Layout changes */
@media (max-width: 64rem) {
  .band-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .band .actions {
    grid-column: 2;
    flex-direction: row;
  }
}

@media (max-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-lockup {
    order: -1;
    padding-top: 0;
  }

  .hero-icon {
    width: 10rem;
  }

  .hero-word {
    width: 15rem;
  }

  .hero-copy {
    width: min(100%, 40rem);
    margin-inline: auto;
  }

  .hero-copy > .eyebrow,
  .hero h1,
  .hero .lede {
    text-align: center;
  }

  .hero .lede {
    margin-inline: auto;
  }

  .cafes legend {
    text-align: left;
  }
}

@media (max-width: 40rem) {
  .band-inner {
    grid-template-columns: 1fr;
  }

  .band-mark {
    width: 4.25rem;
    height: 4.25rem;
  }

  .band .actions {
    grid-column: auto;
  }
}

@media (max-width: 34rem) {
  .go-grid {
    grid-template-columns: 1fr;
  }

  .go {
    min-height: 0;
  }

  .cafe-head {
    grid-template-columns: 1fr;
  }

  .cafe-status {
    justify-self: start;
    grid-row: 3;
  }
}

@media (max-width: 22rem) {
  .hero-icon {
    width: 8rem;
  }

  .hero-word {
    width: 12rem;
  }

  .hero-lockup .tagline {
    font-size: 0.95rem;
  }

  .cafe-head {
    padding-left: 3rem;
  }

  .cafe-radio {
    left: 1rem;
  }

  .cafe-go {
    padding-inline: 1rem;
  }
}

@media (prefers-contrast: more) {
  .cafe,
  .go {
    border-color: var(--ink);
  }
}

@media (forced-colors: active) {
  .cafe,
  .go,
  .cafes-soon,
  .band-inner {
    border: 1px solid CanvasText;
  }

  .cafe-radio {
    forced-color-adjust: none;
    border-color: CanvasText;
    background: Canvas;
  }

  .cafe-radio:checked {
    background: Highlight;
    box-shadow: inset 0 0 0 0.28rem Canvas;
  }

  .cafe:has(.cafe-radio:checked) {
    border: 3px solid Highlight;
  }
}
