/*
 * Shared editorial page styles: page hero (.phero), block-editor content (.entry-content), the FAQ block
 * (section.faq), legal pages, 404 and search. Loaded by page.php, index.php, 404.php, search.php and,
 * through stitchshell_enqueue_page_styles(), by category, About, Custom Printing, Contact and Applications.
 */

/* ---------- Page hero ---------- */
.phero { padding-block: clamp(24px, 3vw, 40px) clamp(40px, 6vw, 88px); border-bottom: 1px solid var(--line); }
.phero__inner { display: grid; gap: var(--space-5); }
.phero__title { font-size: clamp(3.2rem, 8vw, 7.5rem); font-weight: 300; line-height: 0.9; letter-spacing: -0.045em; max-width: 16ch; text-wrap: balance; }
.phero__title em { font-style: italic; color: var(--indigo-600); }
.phero__lead { margin: 0; max-width: 58ch; font-size: var(--step-0); line-height: 1.5; color: var(--text-muted); }
.phero__lead p { margin: 0; }
.phero__meta { margin: 0; font-size: var(--step--1); color: var(--text-subtle); }
.phero--dark { background: var(--indigo-950); color: var(--white); border: 0; --text-muted: rgb(255 255 255 / 0.78); --text-subtle: rgb(255 255 255 / 0.6); --line: var(--line-on-dark); }
.phero--dark .phero__title em { color: var(--accent); }
.phero--dark .breadcrumbs a { color: var(--text-muted); }

/* ---------- Block-editor content ---------- */
.entry { padding-block: clamp(40px, 6vw, 96px) var(--section); }
.entry-content { max-width: 72ch; margin-inline: auto; font-size: var(--step-0); line-height: 1.75; color: var(--ink-2); }
.entry-content > * { margin-block: 0; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content > h2 { margin-top: 2.2em; font-size: var(--step-3); color: var(--ink); line-height: 1.1; }
.entry-content > h3 { margin-top: 1.8em; font-size: var(--step-2); color: var(--ink); }
.entry-content > :first-child { margin-top: 0; }
.entry-content > h2 + *, .entry-content > h3 + * { margin-top: 0.7em; }
.entry-content a { color: var(--indigo-600); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--indigo-800); }
.entry-content strong { color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: 0.4em; }
.entry-content li::marker { color: var(--accent-ink); }
.entry-content blockquote { margin-inline: 0; padding: var(--space-2) 0 var(--space-2) var(--space-5); border-left: 2px solid var(--accent); font: italic 300 var(--step-2)/1.35 var(--font-display); color: var(--ink); }
.entry-content img { border-radius: var(--r-md); }
.entry-content figcaption { margin-top: var(--space-2); font-size: var(--step--1); color: var(--text-subtle); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.4em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.entry-content th, .entry-content td { padding: var(--space-3); border-bottom: 1px solid var(--line); text-align: left; }
.entry-content .wp-block-button__link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--space-5); border-radius: var(--r-pill); background: var(--indigo-600); color: var(--white); font-weight: 700; text-decoration: none; }
.entry-content > em:first-child, .entry-content > p:first-child em { color: var(--text-subtle); }
.alignwide { max-width: 1100px; }
.alignfull { max-width: none; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 6vw, 112px); align-items: start; }
.faq__head { display: grid; gap: var(--space-4); position: sticky; top: calc(var(--header-h) + var(--space-6)); }
.faq__head h2 em { font-style: italic; font-weight: 300; }
.faq__list { border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  min-height: 64px; padding-block: var(--space-4); font: 400 var(--step-1)/1.3 var(--font-display); letter-spacing: -0.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper-2) no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%2317131F' stroke-width='1.6'%3E%3Cpath d='M7 1v12M1 7h12'/%3E%3C/svg%3E");
  transition: rotate var(--dur-2) var(--ease-out), background-color var(--dur-2);
}
.faq__item[open] summary::after { rotate: 45deg; background-color: var(--accent-soft); }
.faq__item summary:hover::after { background-color: var(--indigo-100); }
.faq__answer { padding: 0 var(--space-8) var(--space-5) 0; color: var(--text-muted); max-width: 64ch; }
.faq__answer p { margin: 0; }
.faq__answer a { color: var(--indigo-600); }
@media (max-width: 900px) {
  .faq__inner { grid-template-columns: 1fr; }
  .faq__head { position: static; }
  .faq__answer { padding-right: 0; }
}

/* ---------- Split feature (image + copy), used by About and Custom Printing ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: center; }
.split--flip .split__media { order: 2; }
.split__media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__body { display: grid; gap: var(--space-5); align-content: center; justify-items: start; }
.split__body .ticks { justify-self: stretch; }
.split__body h2 em { font-style: italic; font-weight: 300; color: var(--indigo-600); }
.split__body p { margin: 0; color: var(--text-muted); }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media { aspect-ratio: 4 / 3; }
}

/* ---------- Tick list (About, Custom Printing) ---------- */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.ticks li { position: relative; padding: var(--space-3) 0 var(--space-3) 32px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: var(--step--1); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 12px; height: 7px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); rotate: -45deg; translate: 0 -70%; }

/* ---------- Not found / search ---------- */
.lost { min-height: 70vh; display: grid; align-items: center; padding-block: var(--section); }
.lost__inner { display: grid; gap: var(--space-6); max-width: 820px; }
.lost__code { font: italic 300 clamp(5rem, 18vw, 13rem)/0.8 var(--font-display); color: var(--indigo-200); letter-spacing: -0.05em; }
.lost__search { position: relative; max-width: 560px; }
.lost__search .icon { position: absolute; left: 20px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.lost__search input { width: 100%; height: 60px; padding: 0 140px 0 52px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--white); box-shadow: var(--shadow-1); }
.lost__search input:focus { outline: none; border-color: var(--indigo-600); box-shadow: 0 0 0 4px var(--indigo-100); }
.lost__search .btn { position: absolute; right: 6px; top: 6px; min-height: 48px; }
.lost__links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.results-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.results-list li { border-bottom: 1px solid var(--line); }
.results-list a { display: grid; gap: var(--space-1); padding-block: var(--space-5); text-decoration: none; }
.results-list strong { font: 400 var(--step-2)/1.15 var(--font-display); }
.results-list span { color: var(--text-muted); font-size: var(--step--1); }
.results-list small { font-size: var(--step--2); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-subtle); }
@media (max-width: 560px) {
  .lost__search input { padding-right: var(--space-4); }
  .lost__search .btn { position: static; width: 100%; margin-top: var(--space-3); }
}

/* ---------- Shared CTA band ---------- */
.pcta { background: var(--indigo-600); color: var(--white); padding-block: clamp(56px, 8vw, 112px); --text-muted: rgb(255 255 255 / 0.82); }
.pcta__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-7); align-items: end; }
.pcta h2 { font-weight: 300; max-width: 18ch; }
.pcta h2 em { font-style: italic; color: var(--accent); }
.pcta__actions { display: grid; gap: var(--space-5); }
.pcta__actions p { margin: 0; color: var(--text-muted); }
.pcta__btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.pcta .btn--ghost { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.45); }
.pcta .btn--ghost:hover { background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1.5px var(--white); }
@media (max-width: 900px) { .pcta__inner { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .pcta__btns .btn { flex: 1 1 100%; } }

/* ---------- Search results ---------- */
.search-products, .search-pages { display: grid; gap: var(--space-6); }
.search-pages { margin-top: var(--section); }
.search-products + .search-pages { margin-top: var(--section); }
.search-products:first-child, .search-pages:first-child { margin-top: 0; }
.search-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(20px, 2vw, 32px); }
@media (max-width: 1000px) { .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .search-grid { grid-template-columns: minmax(0, 1fr); } }
.phero__meta a { color: var(--indigo-600); font-weight: 700; }
.phero .lost__search { margin-top: var(--space-2); }
.lost__code { margin: 0; }
