@import url(./root.css);

/* Underground Books - local store page.
   Uses the site's --black and --red variables from root.css, with
   fallbacks so the page still renders if a variable is missing.
   Font is inherited from the site; nothing is loaded here. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

body {
  background-color: var(--black, #000);
}

.ub-page {
  --ub-red: var(--red, #f24a4a);
  --ub-white: #fff;
  --ub-gray: #b3b3b3;
  --ub-gray-2: #a3a3a3;
  --ub-card: #141414;
  --ub-line: #2a2a2a;

  color: var(--ub-white);
  background: var(--black, #000);
  overflow: hidden;
}

/* ---------- Shared ---------- */
.ub-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.ub-heading {
  font-weight: 600;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.2;
}

.ub-center {
  text-align: center;
}

.ub-lead {
  font-size: 20px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ub-gray);
  max-width: 760px;
}

.ub-accent {
  color: var(--ub-red);
  font-weight: 800;
}

.ub-accent-strong {
  color: var(--ub-red);
  font-weight: 700;
}

.ub-highlight {
  color: var(--ub-white);
}

.ub-label {
  font-size: 14px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ub-gray-2);
}

.ub-label-red {
  color: var(--ub-red);
}

/* Decorative red glows, matching the ellipse accents on other pages */
.ub-glow {
  position: absolute;
  border-radius: 50%;
  background: var(--ub-red);
  pointer-events: none;
}

.ub-glow-hero {
  left: 50%;
  top: 40px;
  width: 560px;
  height: 560px;
  margin-left: -280px;
  opacity: 0.22;
  filter: blur(140px);
}

.ub-glow-shelves {
  right: -160px;
  top: 120px;
  width: 420px;
  height: 420px;
  opacity: 0.16;
  filter: blur(130px);
}

.ub-glow-donate {
  left: -120px;
  bottom: -160px;
  width: 380px;
  height: 380px;
  opacity: 0.2;
  filter: blur(120px);
}

/* ---------- Buttons ---------- */
.ub-btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.ub-btn {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ub-white);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ub-btn svg {
  flex: none;
}

.ub-btn-primary {
  background: var(--ub-red);
  border: 1.5px solid var(--ub-red);
}

.ub-btn-primary:hover {
  background: #d93b3b;
  border-color: #d93b3b;
  color: var(--ub-white);
}

.ub-btn-outline {
  border: 1.5px solid var(--ub-white);
}

.ub-btn-outline:hover {
  background: var(--ub-white);
  color: #000;
}

.ub-btn:focus-visible {
  outline: 2px solid var(--ub-red);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */
.ub-hero {
  position: relative;
  padding: 112px 24px 96px;
  text-align: center;
}

.ub-hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.ub-logo {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
}

.ub-hero-title {
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.15;
}

/* ---------- About ---------- */
.ub-about {
  padding: 64px 24px 96px;
}

.ub-about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: center;
}

.ub-about-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 20px;
  line-height: 1.7;
  font-weight: 500;
  color: var(--ub-gray);
}

.ub-about-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--ub-line);
  display: block;
}

/* ---------- Cards (shelves + steps) ---------- */
.ub-shelves {
  position: relative;
  padding: 96px 24px;
}

.ub-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ub-card {
  background: var(--ub-card);
  border: 1px solid var(--ub-line);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ub-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--ub-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ub-card-title {
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
}

.ub-card-text {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ub-gray-2);
}

/* ---------- Donate ---------- */
.ub-donate {
  padding: 96px 24px;
}

.ub-donate-panel {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--ub-card);
  border: 1px solid var(--ub-line);
  border-radius: 24px;
  padding: clamp(36px, 5vw, 72px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.ub-donate-panel > *:not(.ub-glow) {
  position: relative;
}

.ub-hours-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.ub-hours-box {
  background: var(--black, #000);
  border: 1px solid var(--ub-line);
  border-radius: 16px;
  padding: 24px 36px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ub-hours-value {
  font-size: 26px;
  font-weight: 600;
}

/* ---------- Visit ---------- */
.ub-visit {
  position: relative;
  padding: 96px 24px 128px;
}

.ub-visit-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ub-visit-title {
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.3;
}

.ub-visit-head .ub-btn {
  margin-top: 8px;
}

.ub-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ub-step {
  gap: 16px;
}

.ub-step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ub-red);
  color: var(--ub-white);
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ub-step .ub-card-title {
  font-size: 26px;
  line-height: 1.25;
}

.ub-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--ub-line);
  padding-top: 40px;
}

.ub-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ub-info p {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
}

.ub-contact-link {
  color: var(--ub-white);
  text-decoration: none;
}

.ub-contact-link:hover {
  color: var(--ub-red);
}

.ub-underline {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .ub-about-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .ub-card-grid,
  .ub-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ub-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .ub-hero {
    padding: 72px 16px 64px;
  }

  .ub-about,
  .ub-shelves,
  .ub-donate,
  .ub-visit {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ub-shelves,
  .ub-donate,
  .ub-visit {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .ub-lead,
  .ub-about-text {
    font-size: 17px;
  }

  .ub-card-grid,
  .ub-steps,
  .ub-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ub-card {
    padding: 28px;
  }

  .ub-hours-box {
    min-width: 0;
    width: 100%;
  }

  .ub-btn {
    font-size: 16px;
    padding: 14px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ub-btn {
    transition: none;
  }
}
