/* ========================================
   LUMORA BOOKS — CATEGORIES PAGE
   Premium Bookstore Design System
======================================== */


/* ========================================
   DESIGN TOKENS
======================================== */

:root {
  --ink: #17231e;
  --ink-soft: #68736c;

  --green: #214d3c;
  --green-deep: #14352a;

  --cream: #f8f8f4;
  --paper: #fffefa;

  --line: #e3e7df;

  --orange: #d99852;
  --orange-light: #f3e5d3;

  --white: #ffffff;

  --shadow-soft: 0 18px 45px rgba(23, 35, 30, 0.06);
  --shadow-hover: 0 24px 55px rgba(23, 35, 30, 0.13);

  --radius-large: 28px;
  --radius-medium: 20px;

  --container-width: 1280px;

  --transition: 280ms ease;
}

[data-theme="dark"] {
  --ink: #e4ebe6;
  --ink-soft: #9aa8a0;
  --green: #5cb88a;
  --green-deep: #7dd4a6;
  --cream: #0f1410;
  --paper: #1a2420;
  --line: #2a3a30;
  --orange: #e8b06a;
  --orange-light: #2e2518;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 24px 55px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] body {
  background: var(--cream);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 20, 16, 0.85);
  border-bottom-color: rgba(228, 235, 230, 0.06);
}

[data-theme="dark"] .nav-icon:hover,
[data-theme="dark"] .cart-icon:hover {
  background: var(--paper);
  border-color: var(--line);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--paper);
}

[data-theme="dark"] .primary-button {
  background: var(--green);
  color: var(--cream);
}

[data-theme="dark"] .primary-button:hover {
  background: var(--green-deep);
}

[data-theme="dark"] .category-card {
  background: var(--paper);
  border-color: var(--line);
}

[data-theme="dark"] .category-card:hover {
  border-color: var(--green);
}

[data-theme="dark"] .site-footer {
  background: #0a0f0b;
  border-top-color: var(--line);
}


/* ========================================
   RESET
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(
      circle at 8% 12%,
      rgba(33, 77, 60, 0.055),
      transparent 25rem
    ),
    radial-gradient(
      circle at 95% 75%,
      rgba(217, 152, 82, 0.07),
      transparent 25rem
    ),
    var(--cream);

  font-family: "Manrope", sans-serif;
  overflow-x: hidden;

  animation: pageEnter 550ms ease both;
}

body.page-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ========================================
   GLOBAL CONTAINER
======================================== */

.container {
  width: min(
    var(--container-width),
    calc(100% - 112px)
  );

  margin-inline: auto;
}


/* ========================================
   HEADER
======================================== */

.site-header {
  height: 84px;
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid var(--line);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar {
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}


/* Brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  color: var(--white);
  background: var(--green);

  border-radius: 12px;

  font-size: 17px;

  box-shadow:
    0 8px 20px rgba(33, 77, 60, 0.16);
}

.brand-name {
  font-family: "DM Serif Display", serif;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.8px;
}

.brand-name span {
  color: var(--orange);
}


/* Navigation */

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  position: relative;

  color: #6c766f;

  font-size: 13px;
  font-weight: 800;

  padding: 32px 0;

  transition: color var(--transition);
}

.nav-links a::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;

  height: 2px;

  background: var(--orange);

  transform: scaleX(0);
  transform-origin: center;

  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}


/* Header Actions */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}

.nav-icon {
  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  position: relative;

  color: var(--ink);
  font-size: 17px;

  transition:
    color var(--transition),
    transform var(--transition);
}

.nav-icon:hover {
  color: var(--green);
  transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: all 280ms ease;
}

.theme-toggle:hover {
  color: var(--green);
  border-color: var(--line);
  background: var(--paper);
  transform: translateY(-2px);
}

.theme-toggle i {
  font-size: 1rem;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:active i {
  transform: rotate(30deg) scale(0.85);
}

.cart-icon {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -7px;
  right: -8px;

  min-width: 17px;
  height: 17px;

  padding: 0 4px;

  display: grid;
  place-items: center;

  border-radius: 50px;

  color: var(--white);
  background: var(--orange);

  font-size: 9px;
  font-weight: 800;
}

.menu-toggle {
  display: none;

  width: 35px;
  height: 35px;

  border: 0;
  border-radius: 10px;

  color: var(--green);
  background: transparent;

  font-size: 18px;
}


/* ========================================
   CATEGORY HERO
======================================== */

.category-hero {
  padding: 78px 0 40px;
}

.hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  color: var(--orange);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";

  width: 32px;
  height: 1px;

  background: var(--orange);
}

.page-title {
  max-width: 700px;

  margin-top: 25px;

  color: var(--ink);

  font-family: "DM Serif Display", serif;
  font-size: clamp(54px, 6vw, 82px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -3px;
}

.page-title em {
  color: var(--green);
  font-style: italic;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding-bottom: 7px;

  color: var(--green);

  border-bottom: 1px solid var(--orange);

  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;

  transition:
    gap var(--transition),
    color var(--transition);
}

.hero-link:hover {
  gap: 14px;
  color: var(--orange);
}

.hero-link i {
  font-size: 12px;
}

.hero-description {
  max-width: 560px;

  margin-top: 28px;

  color: var(--ink-soft);

  font-size: 14px;
  line-height: 1.8;
}


/* ========================================
   CATEGORIES GRID
======================================== */

.categories-section {
  padding: 25px 0 100px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}


/* Category Card */

.category-card {
  min-height: 270px;

  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 24px;

  border: 1px solid rgba(180, 190, 180, 0.42);
  border-radius: var(--radius-medium);

  box-shadow: 0 7px 18px rgba(23, 35, 30, 0.025);

  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}


/* Decorative circle */

.category-card::after {
  content: "";

  position: absolute;

  width: 230px;
  height: 230px;

  right: -85px;
  bottom: -110px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.43);

  transition:
    transform 500ms ease,
    background var(--transition);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(33, 77, 60, 0.18);
}

.category-card:hover::after {
  transform: scale(1.18);
  background: rgba(255, 255, 255, 0.55);
}


/* Card Colors */

.category-fiction {
  background:
    linear-gradient(
      145deg,
      #e6f0e7,
      #f1f5ed
    );
}

.category-business {
  background:
    linear-gradient(
      145deg,
      #f3ead8,
      #f8f3e9
    );
}

.category-wellness {
  background:
    linear-gradient(
      145deg,
      #e6e6f4,
      #f1f0f8
    );
}

.category-art {
  background:
    linear-gradient(
      145deg,
      #f2dfd8,
      #f8eee8
    );
}

.category-science {
  background:
    linear-gradient(
      145deg,
      #dcebe8,
      #edf5f1
    );
}

.category-history {
  background:
    linear-gradient(
      145deg,
      #e8e0d4,
      #f4eee5
    );
}

.category-lifestyle {
  background:
    linear-gradient(
      145deg,
      #f5e7c9,
      #fbf4e5
    );
}

.category-poetry {
  background:
    linear-gradient(
      145deg,
      #e8e0ee,
      #f4eff7
    );
}


/* Card Top */

.card-top {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-icon {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  color: var(--green);
  background: rgba(255, 255, 255, 0.72);

  font-size: 19px;

  box-shadow:
    0 7px 20px rgba(33, 77, 60, 0.04);

  transition:
    transform var(--transition),
    background var(--transition);
}

.category-card:hover .category-icon {
  transform: rotate(-7deg) scale(1.06);
  background: rgba(255, 255, 255, 0.95);
}

.card-arrow {
  position: relative;
  z-index: 2;

  color: #8b968f;
  font-size: 14px;

  transition:
    color var(--transition),
    transform var(--transition);
}

.category-card:hover .card-arrow {
  color: var(--green);
  transform: translate(3px, -3px);
}


/* Card Content */

.card-content {
  position: relative;
  z-index: 2;
}

.card-content h2 {
  max-width: 250px;

  color: var(--ink);

  font-family: "DM Serif Display", serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.7px;
}

.card-content p {
  max-width: 230px;

  margin-top: 9px;

  color: #6f7972;

  font-size: 12px;
  line-height: 1.6;
}

.book-count {
  display: block;

  margin-top: 24px;

  color: #8b968f;

  font-size: 11px;
  font-weight: 800;
}


/* ========================================
   BOTTOM CTA
======================================== */

.category-cta {
  padding: 0 0 100px;
}

.category-cta .container {
  min-height: 330px;

  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;

  padding: 55px 65px;

  border-radius: var(--radius-large);

  color: var(--white);
  background: var(--green);

  box-shadow: var(--shadow-soft);
}

.cta-content {
  position: relative;
  z-index: 2;

  max-width: 600px;
}

.cta-content .eyebrow {
  color: #e8b477;
}

.cta-content h2 {
  max-width: 560px;

  margin-top: 18px;

  font-family: "DM Serif Display", serif;
  font-size: clamp(38px, 4vw, 57px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -1.5px;
}

.cta-content p {
  max-width: 470px;

  margin-top: 20px;

  color: rgba(255, 255, 255, 0.68);

  font-size: 13px;
  line-height: 1.8;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  margin-top: 27px;
  padding: 14px 21px;

  color: var(--green);
  background: var(--white);

  border-radius: 999px;

  font-size: 12px;
  font-weight: 800;

  transition:
    transform var(--transition),
    box-shadow var(--transition),
    gap var(--transition);
}

.primary-button:hover {
  gap: 17px;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.14);
}

.primary-button i {
  font-size: 11px;
}


/* CTA Decorative Elements */

.cta-decoration {
  width: 330px;
  height: 330px;

  position: absolute;
  right: 35px;
  top: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-decoration::before,
.cta-decoration::after {
  content: "";

  position: absolute;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.cta-decoration::before {
  width: 290px;
  height: 290px;
}

.cta-decoration::after {
  width: 205px;
  height: 205px;
}

.cta-decoration span {
  position: absolute;

  color: rgba(255, 255, 255, 0.25);

  font-family: "DM Serif Display", serif;
  font-size: 80px;

  animation: floatSymbol 5s ease-in-out infinite;
}

.cta-decoration span:nth-child(1) {
  top: 45px;
  right: 25px;
  font-size: 35px;
}

.cta-decoration span:nth-child(2) {
  left: 20px;
  bottom: 65px;
  font-size: 55px;
  animation-delay: 1s;
}

.cta-decoration span:nth-child(3) {
  right: 65px;
  bottom: 20px;
  font-size: 28px;
  animation-delay: 2s;
}

@keyframes floatSymbol {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-12px) rotate(8deg);
  }
}


/* ========================================
   FOOTER
======================================== */

.site-footer {
  padding: 50px 0 25px;

  border-top: 1px solid var(--line);

  background: rgba(255, 255, 255, 0.5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 35px;
}

.footer-brand p {
  max-width: 290px;

  margin-top: 18px;

  color: var(--ink-soft);

  font-size: 12px;
  line-height: 1.8;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.footer-column h3 {
  margin-bottom: 8px;

  color: var(--ink);

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.footer-column a,
.footer-column span {
  color: var(--ink-soft);

  font-size: 12px;
  line-height: 1.5;

  transition: color var(--transition);
}

.footer-column a:hover {
  color: var(--green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-top: 38px;
  padding-top: 22px;

  border-top: 1px solid var(--line);

  color: #8a948d;

  font-size: 11px;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1100px) {

  .container {
    width: min(
      var(--container-width),
      calc(100% - 64px)
    );
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 11px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-card {
    min-height: 260px;
  }

  .cta-decoration {
    right: -30px;
    opacity: 0.8;
  }

}


/* ========================================
   MOBILE NAVIGATION
======================================== */

@media (max-width: 760px) {

  .container {
    width: calc(100% - 36px);
  }

  .site-header {
    height: 72px;
  }

  .nav-links {
    display: none;

    position: absolute;
    top: 82px;
    left: 18px;
    right: 18px;

    flex-direction: column;
    align-items: stretch;
    gap: 0;

    padding: 12px;

    border: 1px solid var(--line);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.96);

    box-shadow: var(--shadow-hover);

    animation: menuIn 220ms ease both;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px;
    border-radius: 10px;
  }

  .nav-links a:hover {
    background: #f2f5f0;
  }

  .nav-links a::after {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  @keyframes menuIn {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .category-hero {
    padding: 55px 0 30px;
  }

  .hero-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
  }

  .page-title {
    margin-top: 22px;

    font-size: clamp(51px, 14vw, 72px);
    letter-spacing: -2px;
  }

  .hero-description {
    margin-top: 23px;
  }

  .categories-section {
    padding: 20px 0 70px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .category-card {
    min-height: 235px;
    padding: 17px;
    border-radius: 17px;
  }

  .category-icon {
    width: 41px;
    height: 41px;
    border-radius: 12px;
    font-size: 16px;
  }

  .card-content h2 {
    font-size: 23px;
  }

  .card-content p {
    font-size: 11px;
  }

  .book-count {
    margin-top: 18px;
    font-size: 10px;
  }

  .category-cta {
    padding-bottom: 70px;
  }

  .category-cta .container {
    min-height: 390px;
    padding: 35px 28px;
    border-radius: 23px;
  }

  .cta-content h2 {
    font-size: 43px;
  }

  .cta-decoration {
    width: 240px;
    height: 240px;

    right: -65px;
    bottom: -45px;
    top: auto;

    opacity: 0.65;
  }

  .cta-decoration::before {
    width: 220px;
    height: 220px;
  }

  .cta-decoration::after {
    width: 150px;
    height: 150px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 430px) {

  .brand-name {
    font-size: 25px;
  }

  .nav-actions {
    gap: 7px;
  }

  .nav-icon {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }

  .categories-grid {
    gap: 10px;
  }

  .category-card {
    min-height: 220px;
    padding: 14px;
  }

  .category-card::after {
    width: 170px;
    height: 170px;
    right: -80px;
    bottom: -85px;
  }

  .category-icon {
    width: 37px;
    height: 37px;
    font-size: 14px;
  }

  .card-arrow {
    font-size: 11px;
  }

  .card-content h2 {
    font-size: 20px;
    letter-spacing: -0.4px;
  }

  .card-content p {
    font-size: 10px;
    line-height: 1.5;
  }

  .book-count {
    font-size: 9px;
  }

  .cta-content h2 {
    font-size: 38px;
  }

  .cta-content p {
    font-size: 12px;
  }

}


/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

}