/* Letterboxd-inspired dark landing layout */

:root {
  --landing-bg: #0c100c;
  --landing-bg-soft: #101812;
  --landing-panel: #192218;
  --landing-stroke: rgba(130, 156, 118, 0.26);
  --landing-text: #f2f7f0;
  --landing-muted: #a5b7a2;
  --landing-green: #7bbf7a;
}

body {
  background:
    radial-gradient(1100px 620px at 40% -15%, rgba(90, 128, 84, 0.22), transparent 62%),
    radial-gradient(900px 520px at 90% 5%, rgba(128, 92, 68, 0.22), transparent 62%),
    repeating-linear-gradient(90deg, rgba(19, 30, 20, 0.4) 0px, rgba(19, 30, 20, 0.4) 2px, transparent 2px, transparent 18px),
    linear-gradient(180deg, #0b0f0c 0%, #0f1511 45%, #0a0f0b 100%);
  color: var(--landing-text);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  background: rgba(10, 14, 11, 0.9);
  border-bottom: 1px solid rgba(130, 156, 118, 0.24);
  backdrop-filter: blur(10px);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.nav__name {
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f6fbff;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav__links a {
  color: #cbdeef;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: #ffffff;
}

.nav__cta {
  background: rgba(87, 201, 122, 0.16);
  border: 1px solid rgba(87, 201, 122, 0.42);
  color: #91eba4;
  border-radius: 999px;
  padding: 7px 16px;
}

.hero {
  position: relative;
  min-height: 86vh;
  padding: 150px 20px 78px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.hero__bg,
.hero__grain {
  position: absolute;
  inset: 0;
}

.hero__bg {
  background:
    radial-gradient(70% 58% at 50% 38%, rgba(88, 118, 90, 0.55), rgba(10, 14, 11, 0.2)),
    repeating-linear-gradient(90deg, rgba(29, 41, 28, 0.5) 0px, rgba(29, 41, 28, 0.5) 2px, transparent 2px, transparent 22px),
    linear-gradient(180deg, rgba(10, 14, 11, 0.35), rgba(9, 12, 10, 0.86));
}

.hero__grain {
  opacity: 0.28;
  mix-blend-mode: soft-light;
  background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.11) 1.2px, transparent 0);
  background-size: 8px 8px;
}

.hero__content {
  position: relative;
  z-index: 3;
  max-width: 820px;
  text-align: center;
}

.hero__eyebrow {
  color: #bfe2a7;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 0.72rem;
  margin-bottom: 18px;
}

.hero__title {
  font-family: var(--font-serif);
  color: #f9fcff;
  font-size: clamp(2rem, 5.6vw, 4rem);
  line-height: 1.14;
  margin-bottom: 16px;
}

.hero__sub {
  color: var(--landing-muted);
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__note {
  margin-top: 16px;
  color: #a8bdd1;
  font-size: 0.9rem;
}

.btn--primary {
  background: linear-gradient(135deg, #6aa36a, #b3d29e);
  color: #0d1a12;
  box-shadow: 0 12px 28px rgba(80, 140, 90, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(58, 170, 96, 0.4);
}

.btn--ghost {
  background: rgba(216, 231, 214, 0.08);
  border: 1px solid var(--landing-stroke);
  color: #dce9d8;
}

.hero__books {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-book {
  position: absolute;
  opacity: 0.34;
  animation: leafFall 8s ease-in-out infinite;
  --leaf-scale-x: 1;
}

.hero-book--leaf {
  width: 40px;
  height: 66px;
  clip-path: polygon(50% 0%, 73% 11%, 88% 31%, 90% 48%, 82% 70%, 66% 86%, 50% 100%, 35% 85%, 18% 69%, 10% 48%, 12% 30%, 29% 10%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04) 52%, rgba(0, 0, 0, 0.18)),
    var(--leaf-color, #243645);
}

.hero-book--leaf::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8%;
  width: 2px;
  height: 78%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.34);
}

.hero-book--right {
  --leaf-scale-x: -1;
}

@keyframes leafFall {
  0%,
  100% { transform: translate3d(0, 0, 0) scaleX(var(--leaf-scale-x)) rotate(var(--rot, -7deg)); }
  50% { transform: translate3d(8px, -18px, 0) scaleX(var(--leaf-scale-x)) rotate(var(--drift-rot, 8deg)); }
}

.recommendations {
  position: relative;
  padding: 0 20px 84px;
}

.recommendations__inner {
  max-width: 1150px;
  margin: -20px auto 0;
}

.section-kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #75beff;
  margin-bottom: 10px;
  font-weight: 700;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 24px;
  color: #f8fbff;
}

.book-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.book-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.book-link:focus-visible .book-card {
  outline: 2px solid rgba(179, 210, 158, 0.7);
  outline-offset: 3px;
}

.book-card {
  position: relative;
  min-height: 178px;
  border-radius: 10px;
  border: 1px solid rgba(238, 246, 255, 0.22);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.42);
}

.book-card--with-cover {
  color: #fff;
  background-image:
    linear-gradient(180deg, rgba(6, 10, 14, 0.15) 0%, rgba(5, 8, 12, 0.84) 74%),
    var(--book-cover);
  background-size: cover;
  background-position: center;
}

.book-card h3 {
  font-size: 1rem;
  line-height: 1.25;
}

.book-card__author {
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(244, 251, 255, 0.9);
}

.book-card__meta {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.86;
  margin-bottom: 6px;
}

.book-card--gold { background: linear-gradient(155deg, #f8b33f, #b03d22 76%); }
.book-card--teal { background: linear-gradient(150deg, #3dd1cb, #055a80 74%); }
.book-card--orange { background: linear-gradient(155deg, #fc7f38, #7e1f35 76%); }
.book-card--rose { background: linear-gradient(150deg, #ef84c2, #772f6f 74%); }
.book-card--blue { background: linear-gradient(155deg, #68b4ff, #164f95 74%); }
.book-card--green { background: linear-gradient(155deg, #98d650, #30742d 72%); }

/* Keep real book covers visible even when tone classes are also present */
.book-card--with-cover,
.book-card--with-cover.book-card--gold,
.book-card--with-cover.book-card--teal,
.book-card--with-cover.book-card--orange,
.book-card--with-cover.book-card--rose,
.book-card--with-cover.book-card--blue,
.book-card--with-cover.book-card--green {
  background-image:
    linear-gradient(180deg, rgba(6, 10, 14, 0.12) 0%, rgba(5, 8, 12, 0.86) 74%),
    var(--book-cover) !important;
  background-size: cover;
  background-position: center;
}

.preview,
.features,
.community,
.cta-section {
  padding: 86px 20px;
}

.preview__inner,
.features__inner,
.community__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.preview__copy {
  text-align: center;
  margin-bottom: 28px;
}

.section-sub {
  color: var(--landing-muted);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.7;
}

.preview__canvas {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--landing-stroke);
  background:
    radial-gradient(600px 260px at 60% 25%, rgba(72, 112, 74, 0.28), transparent 70%),
    repeating-linear-gradient(90deg, rgba(31, 41, 30, 0.35) 0px, rgba(31, 41, 30, 0.35) 2px, transparent 2px, transparent 20px),
    linear-gradient(180deg, #0d140e, #101812);
  min-height: 360px;
}

#miniTree {
  width: 100%;
  height: 360px;
  display: block;
}

.preview__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 24px;
  background: linear-gradient(0deg, rgba(8, 11, 16, 0.58), transparent 56%);
}

.features {
  background: linear-gradient(180deg, rgba(23, 31, 41, 0.75), rgba(15, 20, 27, 0.45));
  border-top: 1px solid var(--landing-stroke);
  border-bottom: 1px solid var(--landing-stroke);
}

.features__inner {
  text-align: center;
}

.content-scroll {
  margin-top: 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(310px, 390px);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 6px 4px 20px;
}

.content-card {
  scroll-snap-align: start;
  text-align: left;
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(16, 24, 18, 0.98), rgba(8, 12, 10, 0.98));
  border: 1px solid var(--landing-stroke);
  color: inherit;
  text-decoration: none;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  border-color: rgba(179, 210, 158, 0.55);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.46);
}

.content-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(320px 160px at 70% 20%, rgba(149, 231, 102, 0.2), transparent 65%),
    linear-gradient(145deg, #182419, #0c120d);
  overflow: hidden;
}

.content-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.content-card:hover .content-card__media img {
  transform: scale(1.04);
}

.content-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 9, 7, 0.08), rgba(5, 9, 7, 0.66));
}

.content-card__type {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0b120d;
  background: #b9ec90;
  border-radius: 999px;
  padding: 7px 10px;
}

.content-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 18px 20px;
}

.content-card__source {
  color: #9fc98d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.content-card__body h3 {
  color: #f5f9ff;
  font-size: 1.22rem;
  line-height: 1.25;
  margin-bottom: 10px;
}

.content-card__body p {
  color: #c8d8e8;
  line-height: 1.6;
  font-size: 0.92rem;
  flex: 1;
}

.community__head {
  text-align: center;
  margin-bottom: 24px;
}

.community__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.share-card {
  border: 1px solid var(--landing-stroke);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(24, 33, 43, 0.94), rgba(13, 18, 24, 0.96));
  padding: 18px;
  color: #d3e3f2;
}

.share-card p {
  font-size: 0.93rem;
  margin-top: 10px;
  line-height: 1.6;
}

.share-card__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #061018;
}

.avatar--a { background: #65d0ff; }
.avatar--b { background: #95e766; }
.avatar--c { background: #ffbe66; }

.cta-section {
  text-align: center;
  padding-top: 74px;
}

.cta-section h2 {
  font-family: var(--font-serif);
  max-width: 760px;
  margin: 0 auto 12px;
  font-size: clamp(1.8rem, 3.3vw, 2.4rem);
  line-height: 1.25;
}

.cta-section p {
  color: var(--landing-muted);
  margin-bottom: 30px;
}

.footer {
  border-top: 1px solid var(--landing-stroke);
  padding: 26px 30px;
  color: #9fb5cb;
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
}

[data-aos] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-aos].aos-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .book-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .community__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav {
    padding: 12px 14px;
    gap: 12px;
  }

  .nav__links {
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav__links a {
    flex: 0 0 auto;
    font-size: 0.78rem;
  }

  .hero {
    min-height: 72vh;
    padding-top: 130px;
  }

  .hero__sub {
    font-size: 0.95rem;
  }

  .book-strip,
  .community__grid {
    grid-template-columns: 1fr;
  }

  .content-scroll {
    grid-auto-columns: minmax(245px, 84vw);
  }

  .preview,
  .features,
  .community,
  .cta-section {
    padding: 58px 16px;
  }

  .preview__canvas,
  #miniTree {
    min-height: 300px;
    height: 300px;
  }

  .book-card {
    min-height: 150px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
