/* ==========================================================================
   Low Key Comics — Components
   ========================================================================== */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5ch;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-0);
  line-height: 1; text-decoration: none; cursor: pointer;
  padding: 0.85em 1.35em; border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--sm { font-size: var(--step--1); padding: 0.6em 1em; }
.btn--lg { font-size: var(--step-1); padding: 0.9em 1.6em; }
@media (max-width: 520px) { .header-cta { display: none; } }

/* --- Chip / tag --- */
.chip {
  display: inline-block; font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: var(--tracking-wide); text-transform: uppercase; text-decoration: none;
  color: var(--brand); background: var(--brand-wash); padding: 0.3em 0.7em; border-radius: 100px;
}

/* --- Hero --- */
.hero { padding-block: clamp(2.5rem, 1rem + 7vw, 5.5rem); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-2xl); align-items: center; }
.hero__title { font-size: var(--step-5); font-weight: 800; }
.hero__lede { font-size: var(--step-1); color: var(--text-soft); margin-top: var(--space-md); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.hero__art { position: relative; aspect-ratio: 1 / 1; }
.hero__panel {
  position: absolute; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); background:
    repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--brand) 8%, transparent) 10px 20px),
    var(--surface);
}
.hero__panel--1 { inset: 0 30% 35% 0; background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%), var(--surface); transform: rotate(-3deg); }
.hero__panel--2 { inset: 20% 0 20% 42%; background:
    radial-gradient(circle at 70% 60%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 60%), var(--surface); transform: rotate(2deg); }
.hero__panel--3 { inset: 58% 34% 0 8%; background:
    repeating-linear-gradient(0deg, transparent 0 6px, color-mix(in srgb, var(--text) 6%, transparent) 6px 7px), var(--surface); transform: rotate(-1.5deg); }
.hero__panel { overflow: hidden; }
.hero__panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { display: none; }
}

/* --- Trust strip --- */
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); text-align: center; border-block: 1px solid var(--border); padding-block: var(--space-lg); }
.trust__item b { display: block; font-family: var(--font-display); font-size: var(--step-3); color: var(--text); line-height: 1; }
.trust__item span { font-size: var(--step--1); color: var(--text-muted); }
@media (max-width: 620px) { .trust__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); } }

/* --- Section head split --- */
.section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); max-width: none; }

/* --- Category cards (image tiles) --- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.cat-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); color: var(--text); }
.cat-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--wash-50); }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.cat-card:hover .cat-card__media img { transform: scale(1.04); }
.cat-card__body { display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-lg); flex: 1; }
.cat-card__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); line-height: 1.1; }
.cat-card__desc { color: var(--text-soft); font-size: var(--step--1); }
.cat-card__more { margin-top: var(--space-sm); font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); color: var(--brand); }
.cat-card:hover .cat-card__more { color: var(--brand-hover); }

/* --- Shop tiles (Amazon affiliate) --- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-md); }
.shop-tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--space-lg); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--pop);
  text-decoration: none; color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.shop-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); border-top-color: var(--pop); }
.shop-tile { position: relative; overflow: hidden; min-height: 128px; justify-content: flex-end; }
.shop-tile__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; z-index: 0; transition: transform 400ms ease, opacity var(--transition); }
.shop-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--surface), color-mix(in srgb, var(--surface) 45%, transparent)); z-index: 1; }
.shop-tile:hover .shop-tile__bg { transform: scale(1.05); opacity: 0.5; }
.shop-tile__label { position: relative; z-index: 2; font-family: var(--font-display); font-weight: 800; font-size: var(--step-0); line-height: 1.15; }
.shop-tile__cta { position: relative; z-index: 2; font-size: var(--step--1); font-weight: 600; color: var(--brand); }

/* --- Article cards --- */
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--wash-50); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__ph { display: block; width: 100%; height: 100%; background:
  repeating-linear-gradient(45deg, var(--wash-50) 0 12px, color-mix(in srgb, var(--brand) 7%, var(--wash-50)) 12px 24px); }
.card__body { padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-xs); flex: 1; }
.card__title { font-size: var(--step-1); line-height: var(--leading-snug); }
.card__title a { color: var(--text); text-decoration: none; }
.card__title a:hover { color: var(--brand); }
.card__excerpt { color: var(--text-soft); font-size: var(--step--1); }
.card__meta { margin-top: auto; padding-top: var(--space-xs); font-size: 0.78rem; color: var(--text-muted); }
.card--featured .card__title { font-size: var(--step-2); }

/* --- CTA band --- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg);
  background: var(--ink-900); color: #fff; border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 3vw, 3rem);
  position: relative; overflow: hidden;
}
:root[data-theme="dark"] .cta-band { border: 1px solid var(--border); }
.cta-band::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--brand) 45%, transparent), transparent 45%); pointer-events: none; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfd2d8; margin-top: var(--space-xs); max-width: 46ch; }
.cta-band .btn { position: relative; z-index: 1; flex: 0 0 auto; }
@media (max-width: 700px) { .cta-band { flex-direction: column; align-items: flex-start; } }

/* --- Empty state --- */
.empty-state { text-align: center; padding: var(--space-2xl); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-soft); }

/* ==========================================================================
   Single article
   ========================================================================== */
.single__header { padding-top: var(--space-xl); text-align: center; }
.single__title { font-size: var(--step-4); margin-top: var(--space-sm); }
.single__dek { font-size: var(--step-1); color: var(--text-soft); margin-top: var(--space-md); }
.post-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.6ch; font-size: var(--step--1); color: var(--text-muted); justify-content: center; }
.post-meta .dot { color: var(--border); }
.single__byline { display: inline-flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-md); font-size: var(--step--1); color: var(--text-soft); }
.single__byline img { border-radius: 50%; }
.single__hero { margin-block: var(--space-xl); }
.single__hero img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16/9; object-fit: cover; }
.single__body { padding-block: var(--space-md) var(--space-xl); }
.single__footer { padding-bottom: var(--space-2xl); }
.single--wide .single__body { max-width: var(--container); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; padding: 0; margin-block: var(--space-lg); }
.tag-list a { font-size: var(--step--1); color: var(--text-soft); text-decoration: none; border: 1px solid var(--border); padding: 0.25em 0.7em; border-radius: 100px; }
.tag-list a:hover { border-color: var(--brand); color: var(--brand); }
.affiliate-note, .single__footer .affiliate-note { font-size: var(--step--1); color: var(--text-muted); background: var(--bg-section); border-radius: var(--radius-sm); padding: var(--space-md); }

/* ==========================================================================
   Editorial components (shortcodes)
   ========================================================================== */
/* Rating */
.rating { display: inline-flex; align-items: center; gap: 0.5ch; font-family: var(--font-display); }
.rating__track { position: relative; width: 92px; height: 14px; background: var(--wash-50); border-radius: 100px; overflow: hidden; }
.rating__fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 70%, var(--brand))); }
.rating b { font-size: var(--step-0); color: var(--text); }
.rating small { color: var(--text-muted); }

/* Review box */
.review-box { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-lg); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: var(--space-lg); margin-block: var(--space-xl); }
.review-box__media img { border-radius: var(--radius-sm); box-shadow: var(--shadow); width: 100%; height: auto; object-fit: cover; }
.review-box__badge { display: inline-block; font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: #fff; background: var(--brand); padding: 0.25em 0.6em; border-radius: 4px; margin-bottom: var(--space-xs); }
.review-box__title { font-size: var(--step-2); margin-block: 0.1em; }
.review-box__rating { margin-block: var(--space-xs); }
.review-box__verdict { color: var(--text-soft); font-size: var(--step-0); }
.review-box__verdict p + p { margin-top: var(--space-sm); }
.review-box .aff-btn { margin-top: var(--space-md); }
@media (max-width: 560px) { .review-box { grid-template-columns: 1fr; } .review-box__media { max-width: 160px; } }

/* Affiliate button */
.aff-btn { display: inline-flex; align-items: center; gap: 0.5ch; font-family: var(--font-display); font-weight: 600; text-decoration: none; color: #fff; background: var(--gold); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 92%, #fff), var(--gold)); padding: 0.7em 1.15em; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: filter var(--transition), transform var(--transition); }
.aff-btn:hover { filter: brightness(0.95); color: #fff; transform: translateY(-1px); }
.aff-btn__store { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; padding-inline-end: 0.4ch; border-inline-end: 1px solid rgba(255,255,255,0.4); }

/* Pros / cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-block: var(--space-lg); }
.pc { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-md); }
.pc h4 { font-size: var(--step-0); margin-bottom: var(--space-xs); display: flex; align-items: center; gap: 0.5ch; }
.pc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4em; font-size: var(--step--1); }
.pc li { padding-inline-start: 1.5em; position: relative; }
.pc--pro { background: color-mix(in srgb, #12a150 8%, var(--surface)); }
.pc--pro h4 { color: #12a150; }
.pc--pro li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: #12a150; font-weight: 700; }
.pc--con { background: var(--brand-wash); }
.pc--con h4 { color: var(--brand); }
.pc--con li::before { content: "✕"; position: absolute; inset-inline-start: 0; color: var(--brand); font-weight: 700; }
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }

/* Key issue card */
.key-issue { border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: var(--space-md); background: var(--gold-wash); margin-block: var(--space-md); }
.key-issue__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); }
.key-issue__title { font-family: var(--font-display); font-weight: 700; }
.key-issue__year { font-size: var(--step--1); color: var(--text-muted); }
.key-issue__value { font-family: var(--font-display); font-size: var(--step-2); color: var(--text); margin-top: var(--space-2xs); }
.key-issue__note { font-size: var(--step--1); color: var(--text-soft); margin-top: 0.1em; }

/* Table of contents */
.toc { background: var(--bg-section); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-md) var(--space-lg); margin-block: var(--space-lg); }
.toc__head { font-family: var(--font-display); font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--text-muted); margin-bottom: var(--space-xs); }
.toc ol { margin: 0; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: 0.3em; font-size: var(--step--1); }
.toc a { color: var(--text-soft); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.toc .toc__l3 { margin-inline-start: 1em; list-style: circle; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: var(--space-md); }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); margin-bottom: var(--space-2xs); }
.field input, .field textarea, .search-form__input {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7em 0.9em; font-size: var(--step-0);
}
.field input:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-wash); }
.hp { position: absolute; left: -9999px; }
.form-notice { border-radius: var(--radius-sm); padding: var(--space-md); margin-bottom: var(--space-lg); font-size: var(--step--1); }
.form-notice--ok { background: color-mix(in srgb, #12a150 12%, var(--surface)); color: #0d7a3d; border: 1px solid color-mix(in srgb, #12a150 40%, transparent); }
.form-notice--err { background: var(--brand-wash); color: var(--brand-hover); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: start; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }

/* Search form */
.search-form { display: flex; gap: 0; max-width: 460px; margin-top: var(--space-md); }
.search-form__input { border-start-end-radius: 0; border-end-end-radius: 0; }
.search-form__btn { display: grid; place-items: center; width: 52px; background: var(--text); color: var(--bg); border: 1px solid var(--text); border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); cursor: pointer; }
.search-form__btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ==========================================================================
   Hub / contact / 404 / pagination
   ========================================================================== */
.hub-hero { padding-block: var(--space-2xl) var(--space-lg); text-align: center; }
.hub-hero h1 { font-size: var(--step-4); }
.hub-hero__dek { font-size: var(--step-1); color: var(--text-soft); margin-top: var(--space-md); max-width: 60ch; margin-inline: auto; }
.hub-more { margin-top: var(--space-lg); }

.error-404 { text-align: center; max-width: 620px; margin-inline: auto; }
.error-404 h1 { font-size: var(--step-4); margin-block: var(--space-xs) var(--space-sm); }
.error-404 .search-form { margin-inline: auto; }
.error-404__links { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; margin-top: var(--space-lg); }

.pagination { margin-top: var(--space-2xl); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--space-xs); justify-content: center; }
.pagination a, .pagination .current { display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 0.5em; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-family: var(--font-display); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* --- Theme toggle icon state --- */
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun, :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-moon { display: block; } :root:not([data-theme="light"]) .icon-sun { display: none; } }
:root[data-theme="light"] .icon-sun { display: block !important; }
:root[data-theme="light"] .icon-moon { display: none !important; }

/* --- Article content tables --- */
.prose table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin-block: var(--space-lg);
	font-size: var(--step--1);
	line-height: var(--leading-normal);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
.prose thead th {
	background: var(--bg-section);
	color: var(--text-soft);
	font-family: var(--font-display);
	font-weight: 600;
	text-align: left;
	letter-spacing: var(--tracking-tight);
}
.prose th,
.prose td {
	padding: var(--space-sm) var(--space-md);
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}
.prose tbody tr:nth-child(even) { background: var(--bg-section); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody th { font-weight: 600; color: var(--text); }

/* Let wide tables scroll on small screens instead of breaking the layout */
@media (max-width: 640px) {
	.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --- /shop storefront page --- */
.shop-page__note { color: var(--text-muted); font-size: var(--step--1); margin-bottom: var(--space-lg); }
.shop-page__section { margin-top: var(--space-xl); }
.shop-page__section:first-of-type { margin-top: var(--space-lg); }
.shop-page__heading {
	font-size: var(--step-1);
	margin-bottom: var(--space-md);
	padding-bottom: var(--space-xs);
	border-bottom: 1px solid var(--border);
}

/* Centered call-to-action under a grid/section */
.section-cta { text-align: center; margin-top: var(--space-xl); }

.shop-page__intro { color: var(--text-soft); font-size: var(--step--1); max-width: 70ch; margin-bottom: var(--space-md); }

/* Category/archive intro copy */
.archive-desc { max-width: 68ch; margin: var(--space-md) auto 0; text-align: left; color: var(--text-soft); }
.archive-desc > * + * { margin-top: var(--space-sm); }

/* --- /shop page: DGfloors-style product cards (square image, title, Amazon button) --- */
.shop-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-lg); }
.shop-card {
	display: flex;
	flex-direction: column;
	text-align: center;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px;
	text-decoration: none;
	color: var(--text);
	transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.shop-card__imgwrap { display: block; aspect-ratio: 1 / 1; background: var(--bg-section); border-radius: 10px; overflow: hidden; }
.shop-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms ease; }
.shop-card:hover .shop-card__img { transform: scale(1.04); }
.shop-card__title { font-family: var(--font-display); font-weight: 700; font-size: var(--step-0); line-height: 1.3; margin: 13px 6px 12px; }
.shop-card__btn {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 9px 14px;
	border-radius: var(--radius-sm);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--step--1);
}
.btn-amz { background: #febd69; color: #0f1012; }
.shop-card:hover .btn-amz { filter: brightness(0.96); }
