/* ============================================================
   BOOKSBYAMA — REDESIGNED FOOTER
   footer.css
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --ftr-bg:            #1B1936;
  --ftr-bg-elevated:   #232042;
  --ftr-purple:        #7B74C6;
  --ftr-purple-dark:   #5E57A6;
  --ftr-gold:          #FFC93B;
  --ftr-text:          rgba(255, 255, 255, 0.78);
  --ftr-muted:         rgba(255, 255, 255, 0.52);
  --ftr-border:        rgba(255, 255, 255, 0.09);
  --ftr-radius:        18px;
  --font-head:         'Poppins', system-ui, sans-serif;
  --font-body:         'Inter',   system-ui, sans-serif;
}

/* ── RESET (footer-scoped) ──────────────────────────────── */
.footer *,
.footer *::before,
.footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE FOOTER ────────────────────────────────────────── */
.footer {
  background: var(--ftr-bg);
  color: var(--ftr-text);
  font-family: var(--font-body);
  padding: 96px 0 0;
  position: relative;
}

/* Top wave accent */
.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath fill='%231B1936' d='M0,0 L1440,0 L1440,48 Q720,72 0,48 Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: 100% 100%;
  z-index: 1;
}

/* ── CONTAINER ──────────────────────────────────────────── */
.footer__container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 28px;
}

/* ── TOP GRID ───────────────────────────────────────────── */
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 64px;
  padding-bottom: 64px;
}

/* ── BRAND COLUMN ───────────────────────────────────────── */
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  outline-offset: 4px;
}

.footer__logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.footer__logo:hover .footer__logo-icon {
  transform: rotate(-3deg) scale(1.06);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.28);
}

.footer__logo-text {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.footer__logo-text span {
  color: var(--ftr-gold);
}

.footer__tagline {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ftr-muted);
  max-width: 280px;
}

/* Social icons row */
.footer__social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.footer__social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ftr-border);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ftr-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  outline-offset: 3px;
}

.footer__social-link:hover {
  background: var(--ftr-purple);
  border-color: var(--ftr-purple);
  color: #fff;
  transform: translateY(-3px);
}

/* ── LINK COLUMNS ───────────────────────────────────────── */
.footer__column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer__column-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.footer__column-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--ftr-gold);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__link {
  font-size: 0.9rem;
  color: var(--ftr-muted);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  outline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer__link:hover {
  color: #ffe600;
  padding-left: 4px;
}

/* ── CONNECT COLUMN ─────────────────────────────────────── */
.footer__column--connect {
  gap: 18px;
}

.footer__connect-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__connect-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ftr-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  outline-offset: 3px;
}

.footer__connect-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--ftr-border);
  color: #fff;
}

/* ── NEWSLETTER ─────────────────────────────────────────── */
.footer__newsletter {
  padding: 24px;
  background: var(--ftr-bg-elevated);
  border: 1px solid var(--ftr-border);
  border-radius: var(--ftr-radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.footer__column-title--newsletter {
  margin-top: 0;
  padding-bottom: 0;
}

.footer__column-title--newsletter::after {
  display: none;
}

.footer__newsletter-desc {
  font-size: 0.85rem;
  color: var(--ftr-muted);
  line-height: 1.55;
}

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

.footer__newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__newsletter-row {
  display: flex;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ftr-border);
  background: rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.footer__newsletter-row:focus-within {
  border-color: var(--ftr-purple);
  box-shadow: 0 0 0 3px rgba(123, 116, 198, 0.22);
}

.footer__newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #fff;
  background: transparent;
  border: none;
  outline: none;
}

.footer__newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.footer__newsletter-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #1B1936;
  background: var(--ftr-gold);
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  outline-offset: 3px;
}

.footer__newsletter-btn:hover {
  background: #FFD96C;
  transform: translateX(2px);
}

.footer__newsletter-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

/* ── DIVIDER ────────────────────────────────────────────── */
.footer__divider {
  border: none;
  border-top: 1px solid var(--ftr-border);
  margin: 0;
}

/* ── BOTTOM BAR ─────────────────────────────────────────── */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 5% 34px;
}

.footer__copyright {
  font-size: 0.82rem;
  color: var(--ftr-muted);
}

.footer__bottom-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer__bottom-link {
  font-size: 0.82rem;
  color: var(--ftr-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  outline-offset: 3px;
}

.footer__bottom-link:hover {
  color: #fff;
}

.footer__bottom-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

.footer__made-with {
  font-size: 0.82rem;
  color: var(--ftr-muted);
}

/* ── FOCUS STYLES ───────────────────────────────────────── */
.footer__logo:focus-visible,
.footer__social-link:focus-visible,
.footer__link:focus-visible,
.footer__connect-link:focus-visible,
.footer__bottom-link:focus-visible {
  outline: 2px solid var(--ftr-purple);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
  .footer__brand {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px;
  }
  .footer__tagline {
    max-width: 360px;
  }
  .footer__newsletter {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .footer {
    padding-top: 72px;
  }
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer__brand {
    flex-direction: column;
    gap: 16px;
  }
  .footer__column--connect {
    grid-column: 1 / -1;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .footer__container {
    padding-inline: 18px;
  }
  .footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer__brand {
    grid-column: auto;
  }
  .footer__newsletter-row {
    flex-direction: column;
    border-radius: 14px;
    overflow: visible;
    background: none;
    border: none;
    gap: 10px;
  }
  .footer__newsletter-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ftr-border);
    border-radius: 12px;
    padding: 14px 16px;
  }
  .footer__newsletter-btn {
    width: 100%;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
  }
}
