/* ==========================================================================
   Landing / catalogue page content
   --------------------------------------------------------------------------
   The category landing pages (Custom Kraft Boxes, Custom Soap Boxes, ...)
   carry long-form legacy copy: bare <h1>/<h2>/<p>/<img> with no classes.
   blog.css only loads on posts and archives, so this copy previously
   rendered with browser defaults and read like a plain document rather
   than the rest of the site.

   This file gives that markup the theme's own language: accent-barred
   headings, a proper reading measure, framed imagery and styled tables.
   It targets element selectors on purpose - the copy has no hooks.
   ========================================================================== */

.landing-copy {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.03rem;
  line-height: 1.85;
  color: #1f2937;
}

.landing-copy > *:first-child { margin-top: 0; }
.landing-copy > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Paragraphs
   -------------------------------------------------------------------------- */
.landing-copy p {
  color: #1f2937;
  margin: 0 0 22px;
}

/* Opening paragraph reads as a lede. */
.landing-copy > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #111827;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Headings

   Each h2 opens a new "section" of the copy, so it gets a hairline rule
   plus the theme's gold accent tab - the same visual cue .section-header
   gives designed sections elsewhere on the site.
   -------------------------------------------------------------------------- */
.landing-copy h2 {
  position: relative;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--primary);
  margin: 58px 0 20px;
  padding-top: 26px;
  border-top: 1px solid var(--border-color);
}

.landing-copy h2::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 64px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--accent);
}

/* First heading sits directly under the hero - no divider needed. */
.landing-copy > h2:first-child,
.landing-copy > *:first-child + h2 {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}

.landing-copy > h2:first-child::before,
.landing-copy > *:first-child + h2::before {
  display: none;
}

.landing-copy h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  color: var(--primary);
  margin: 38px 0 14px;
}

.landing-copy h4 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin: 28px 0 12px;
}

/* --------------------------------------------------------------------------
   Imagery

   Legacy copy drops in full-width photography (the lead banner is 1920px).
   Framing it and letting it breach the text measure slightly keeps the
   article from looking like a word-processor document.
   -------------------------------------------------------------------------- */
.landing-copy img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: 34px 0;
}

/* Lead image acts as the page's feature shot. */
.landing-copy > img:first-child,
.landing-copy > p:first-child > img {
  margin: 0 0 42px;
  box-shadow: var(--shadow-lg);
}

/* A paragraph that only wraps an image should not add its own spacing. */
.landing-copy p > img:only-child {
  margin-bottom: 0;
}

@media (min-width: 1100px) {
  /* Let figures breathe past the reading measure. */
  .landing-copy > img,
  .landing-copy > p > img:only-child {
    width: calc(100% + 120px);
    max-width: calc(100% + 120px);
    margin-left: -60px;
  }
}

/* --------------------------------------------------------------------------
   Lists

   style.css strips list markers globally, so they are restored here and
   given the theme's accent marker.
   -------------------------------------------------------------------------- */
.landing-copy ul,
.landing-copy ol {
  margin: 0 0 24px;
  padding-left: 26px;
}

.landing-copy ul { list-style: disc; }
.landing-copy ol { list-style: decimal; }

.landing-copy li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.landing-copy li::marker {
  color: var(--primary);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Tables (stock/GSM specification tables on several landing pages)
   -------------------------------------------------------------------------- */
.landing-copy .landing-table-wrap {
  overflow-x: auto;
  margin: 30px 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.landing-copy table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: #ffffff;
  margin: 0;
}

.landing-copy thead th {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.landing-copy th,
.landing-copy td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.landing-copy tbody tr:nth-child(even) {
  background: var(--bg-subtle);
}

.landing-copy tbody tr:last-child th,
.landing-copy tbody tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
   Inline elements
   -------------------------------------------------------------------------- */
.landing-copy strong,
.landing-copy b {
  color: var(--primary-dark);
  font-weight: 700;
}

.landing-copy a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(79 1 107 / 0.3);
  text-underline-offset: 3px;
}

.landing-copy a:hover {
  color: var(--primary-light);
  text-decoration-color: var(--accent);
}

.landing-copy blockquote {
  margin: 30px 0;
  padding: 20px 26px;
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--primary);
  font-style: italic;
}

.landing-copy hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 44px 0;
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .landing-copy {
    font-size: 1rem;
    line-height: 1.8;
  }

  .landing-copy > p:first-of-type {
    font-size: 1.06rem;
  }

  .landing-copy h2 {
    margin: 42px 0 16px;
    padding-top: 22px;
  }

  .landing-copy h3 {
    margin: 30px 0 12px;
  }

  .landing-copy img {
    margin: 26px 0;
    border-radius: var(--radius-md);
  }

  .landing-copy > img:first-child,
  .landing-copy > p:first-child > img {
    margin-bottom: 30px;
  }
}

/* ==========================================================================
   Landing page interface components
   --------------------------------------------------------------------------
   Hero actions, quick-fact cards, contents bar and FAQ accordion. These sit
   above and below the long-form copy so a buyer can reach products, specs
   and the quote form without reading an essay first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.landing-hero-intro {
  max-width: 660px;
  margin: 10px 0 0;
  font-size: 1.06rem;
  line-height: 1.65;
}

/* .section-bg-dark mutes paragraphs to slate; the hero lede needs to read. */
.section-bg-dark .landing-hero-intro {
  color: #ede9fe;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn-ghost-light {
  background: transparent;
  color: #ffffff;
  border-color: rgb(255 255 255 / 0.45);
}

.btn-ghost-light:hover {
  background: rgb(255 255 255 / 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Quick facts
   -------------------------------------------------------------------------- */
.landing-facts-section {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.landing-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.landing-fact {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--bg-subtle);
  border: 1px solid #ede4f5;
  border-radius: var(--radius-lg);
}

.landing-fact-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.landing-fact-icon svg {
  width: 19px;
  height: 19px;
}

.landing-fact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary-light);
  margin-bottom: 2px;
}

.landing-fact-value {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.3;
}

.landing-fact-note {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #52525b;
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   Products footer link
   -------------------------------------------------------------------------- */
.landing-products-more {
  margin: 26px 0 0;
  text-align: center;
}

.landing-products-more a {
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.landing-products-more a:hover {
  color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   Contents bar
   -------------------------------------------------------------------------- */
.landing-toc {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 18px 22px;
  background: var(--bg-subtle);
  border: 1px solid #ede4f5;
  border-radius: var(--radius-lg);
}

.landing-toc-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.landing-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.landing-toc li { margin: 0; }

.landing-toc a {
  display: inline-block;
  padding: 6px 13px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.landing-toc a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Anchored headings must clear the sticky header. */
.landing-copy h2[id] {
  scroll-margin-top: 110px;
}

/* --------------------------------------------------------------------------
   FAQ accordion (native <details> - no JavaScript)
   -------------------------------------------------------------------------- */
.landing-faq {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.landing-faq-item[open] {
  border-color: #d8b4f0;
  box-shadow: var(--shadow-md);
}

.landing-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  list-style: none;
}

.landing-faq-item summary::-webkit-details-marker { display: none; }

.landing-faq-item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}

.landing-faq-item[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.landing-faq-item summary:hover {
  background: var(--bg-subtle);
}

.landing-faq-item summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.landing-faq-answer {
  padding: 0 22px 20px;
}

.landing-faq-answer p {
  margin: 0;
  color: #334155;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .landing-facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .landing-facts { grid-template-columns: 1fr; }

  .landing-hero-actions .btn { width: 100%; }

  .landing-toc { padding: 16px 18px; }

  .landing-faq-item summary {
    padding: 15px 18px;
    font-size: 0.98rem;
  }

  .landing-faq-answer { padding: 0 18px 18px; }
}
