/* Public "explore the library" marketing page — matches how-it-works.css conventions.
   Reuses shared components already defined in css/style.css verbatim:
   .site-header/.site-footer, .btn/.btn-brand/.btn-outline-brand/.btn-light/.btn-outline-light,
   .library-container/.library-grid/.media-card/.book-feature, .cta-wrap/.cta-panel. */

.explore-page {
  color: var(--ink);
  background: var(--surface);
}

.explore-page .btn {
  border-radius: var(--radius-sm);
}

/* Shared section heading pattern reused across explore-* sections */
.explore-section-heading {
  width: 100%;
  margin-bottom: 24px;
  text-align: right;
}

.explore-section-heading:not(:has(p)) {
  margin-bottom: 16px;
}

.explore-section-heading h2 {
  margin: 0;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}

.explore-section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.explore-section-heading-left {
  text-align: left;
}

/* Hero */
.explore-hero {
  padding: 56px 0 72px;
  background: var(--canvas);
}

.explore-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 48px;
  align-items: center;
}

.explore-hero-copy {
  text-align: right;
}

.explore-kicker {
  display: inline-flex;
  padding: 7px 16px;
  color: var(--brand);
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.explore-hero-copy h1 {
  margin: 18px 0 0;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.28;
}

.explore-hero-copy > p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.explore-search {
  max-width: 560px;
  margin-top: 28px;
}

.explore-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-brand);
  font-size: 14px;
  font-weight: 600;
}

.explore-search-row {
  display: flex;
  gap: 10px;
}

.explore-search-row > div {
  position: relative;
  flex: 1;
  min-width: 0;
}

.explore-search-row input {
  width: 100%;
  height: 54px;
  padding: 12px 50px 12px 18px;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  font-size: 15px;
}

.explore-search-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.08);
}

.explore-search-row input::placeholder {
  color: rgba(27, 67, 50, 0.42);
}

.explore-search-row svg {
  position: absolute;
  top: 50%;
  right: 18px;
  color: rgba(27, 67, 50, 0.5);
  transform: translateY(-50%);
  pointer-events: none;
}

.explore-search-row button {
  min-width: 90px;
  padding: 0 20px;
  color: var(--surface);
  background: var(--brand);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
}

.explore-search-row button:hover,
.explore-search-row button:focus-visible {
  background: var(--brand-deep);
}

.explore-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.explore-quick-chips a {
  padding: 9px 16px;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
}

.explore-quick-chips a:hover,
.explore-quick-chips a:focus-visible {
  border-color: var(--brand);
}

.explore-hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}

.explore-hero-visual {
  display: flex;
  gap: 20px;
  min-height: 340px;
}

.explore-photo-main {
  flex: 1.9 1 0%;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.explore-photo-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-photo-stack {
  display: flex;
  flex: 1 1 0%;
  flex-direction: column;
  gap: 20px;
}

.explore-photo-accent {
  flex: 1;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.explore-photo-accent img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content-type nav (picks) */
.explore-picks {
  padding: 72px 0;
}

/* .book-feature is shared with index.html's homepage pattern (css/style.css) and is fixed at
   height: 353px there. On this page the panel looked artificially tall/oversized next to its
   own content, so it's scoped here to hug its content instead — index.html is left untouched. */
.explore-picks .book-feature {
  height: auto;
  align-items: center;
}

.explore-type-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.explore-type-nav button {
  padding: 10px 20px;
  color: var(--brand);
  background: var(--canvas);
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.explore-type-nav button.is-active,
.explore-type-nav button:hover,
.explore-type-nav button:focus-visible {
  color: var(--surface);
  background: var(--brand);
}

/* Topic explorer */
.explore-topics {
  padding: 72px 0;
  background: var(--canvas);
}

.explore-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.explore-topic-chips button {
  padding: 9px 18px;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.explore-topic-chips button.is-active {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.explore-topic-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.explore-topic-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.explore-topic-preview > div {
  min-width: 190px;
  flex: 1;
  padding: 16px;
  background: var(--canvas);
  border-radius: var(--radius-md);
  text-align: right;
}

.explore-topic-preview span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.explore-topic-preview strong {
  display: block;
  color: var(--brand);
  font-size: 15px;
  line-height: 1.5;
}

.explore-topic-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--line);
  text-align: right;
}

.explore-topic-summary > span {
  color: var(--muted-brand);
  font-size: 13px;
}

.explore-topic-summary strong {
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.explore-topic-summary a {
  margin-top: 6px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Q&A */
.explore-qna {
  padding: 72px 0;
}

.explore-qna-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.explore-qna-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explore-qna-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  color: var(--brand);
  background: var(--canvas);
  border-radius: var(--radius-md);
  text-align: right;
}

.explore-qna-list strong {
  font-size: 16px;
  font-weight: 700;
}

.explore-qna-list small {
  color: var(--muted-brand);
  font-size: 12.5px;
}

.explore-qna-featured {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px;
  background: var(--brand);
  border-radius: var(--radius-lg);
  text-align: right;
}

.explore-qna-featured span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 700;
}

.explore-qna-featured h3 {
  margin: 10px 0 0;
  color: var(--surface);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.explore-qna-featured p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.explore-qna-featured .btn {
  margin-top: 18px;
}

/* Keepsakes */
.explore-keepsakes {
  padding: 72px 0;
  background: var(--canvas);
}

.explore-keepsakes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.explore-keepsake-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.explore-keepsake-card figure {
  margin: 0;
  height: 160px;
  overflow: hidden;
}

.explore-keepsake-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-keepsake-card > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  text-align: right;
}

.explore-keepsake-card h3 {
  margin: 0;
  color: var(--brand);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

/* Published analyses */
.explore-analyses {
  padding: 72px 0;
}

.explore-analyses-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
  gap: 20px;
}

.explore-analyses-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explore-analyses-list a {
  padding: 16px 20px;
  color: var(--brand);
  background: var(--canvas);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: right;
}

.explore-analyses-featured {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: right;
}

.explore-analyses-featured span {
  color: var(--muted-brand);
  font-size: 13px;
}

.explore-analyses-featured strong {
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.explore-analyses-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

/* Closing row */
.explore-closing {
  padding: 56px 0;
  background: var(--canvas);
}

.explore-closing-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.explore-closing-links {
  display: flex;
  gap: 12px;
}

.explore-closing-links a {
  padding: 13px 22px;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
}

.explore-closing-copy {
  text-align: right;
}

.explore-closing-copy h2 {
  margin: 0;
  color: var(--brand);
  font-size: 22px;
  font-weight: 700;
}

.explore-closing-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

@media (max-width: 1199.98px) {
  .explore-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .explore-hero-visual {
    order: -1;
    min-height: 280px;
  }

  .explore-keepsakes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .explore-topic-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .explore-topic-summary {
    padding-inline-start: 0;
    border-inline-start: 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .explore-qna-grid,
  .explore-analyses-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .explore-hero {
    padding: 40px 0 56px;
  }

  .explore-hero-copy h1 {
    font-size: 32px;
  }

  .explore-search-row {
    flex-direction: column;
  }

  .explore-search-row button {
    order: 2;
  }

  .explore-hero-actions {
    flex-direction: column;
  }

  .explore-keepsakes-grid {
    grid-template-columns: 1fr;
  }

  .explore-closing-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .explore-closing-links {
    width: 100%;
    flex-direction: column;
  }

  .explore-closing-links a {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .explore-page * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
