/*
Theme Name: Kari Roller — Stitched in Sin
Theme URI: https://wordpress.com/theme/assembler
Description: A dark, gritty author-site child theme for Kari Roller, built on Automattic's Assembler block theme.
Author: Custom build for Kari Roller
Template: assembler
Version: 1.2.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: kari-roller-assembler
*/

:root {
  --kr-black: #0b0b0c;
  --kr-charcoal: #171719;
  --kr-gunmetal: #4a484a;
  --kr-silver: #848586;
  --kr-wine: #6e0f1b;
  --kr-red: #ce2232;
  --kr-ivory: #f3f1ef;
  --kr-muted: #bbb8b8;
}

html { scroll-behavior: smooth; }
body { background: var(--kr-black); color: var(--kr-ivory); }
body, button, input, textarea, select { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, h3, h4, .kr-display { font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; }
a { text-underline-offset: .22em; }

.kr-shell { max-width: 1440px; margin: 0 auto; }
.kr-section { padding: clamp(64px, 8vw, 120px) clamp(22px, 5vw, 72px); }
.kr-section-tight { padding: clamp(42px, 6vw, 80px) clamp(22px, 5vw, 72px); }
.kr-kicker { color: var(--kr-red); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 800; }
.kr-muted { color: var(--kr-muted); }
.kr-rule { border: 0; border-top: 1px solid rgba(255,255,255,.14); margin: 0; }
.kr-card { background: linear-gradient(145deg, #1a1a1d, #101012); border: 1px solid rgba(132,133,134,.24); border-radius: 4px; padding: clamp(24px, 3.5vw, 42px); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.kr-card:hover { border-color: rgba(206,34,50,.45); }
.kr-book-cover img { width: min(100%, 430px); height: auto; display: block; box-shadow: 0 24px 65px rgba(0,0,0,.55); }
.kr-author-photo img { filter: grayscale(100%); border: 1px solid rgba(255,255,255,.16); }
.kr-eyebrow { color: var(--kr-silver); letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; }
.kr-hero { position: relative; overflow: hidden; background: radial-gradient(circle at 72% 18%, rgba(110,15,27,.32), transparent 31%), linear-gradient(135deg, #09090a 0%, #171719 62%, #0b0b0c 100%); }
.kr-hero:before { content:""; position:absolute; inset:0; opacity:.23; pointer-events:none; background-image: linear-gradient(115deg, transparent 0 44%, rgba(255,255,255,.03) 45%, transparent 46% 100%); }
.kr-hero h1 { font-size: clamp(3.5rem, 8vw, 7.5rem); line-height: .92; margin: .1em 0 .2em; }
.kr-hero .kr-subhead { font-size: clamp(1.25rem, 2.2vw, 2rem); max-width: 760px; color: #ddd9d9; }
.kr-quote { border-left: 3px solid var(--kr-red); padding-left: 22px; color: #e6e3e3; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.kr-black { background: var(--kr-black); }
.kr-charcoal { background: var(--kr-charcoal); }
.kr-wine { background: linear-gradient(135deg, #3d080f, #6e0f1b); }
.kr-center { text-align:center; }
.kr-maxcopy { max-width: 760px; }
.kr-stitch { width: 80px; height: 2px; background: repeating-linear-gradient(90deg, var(--kr-red) 0 9px, transparent 9px 15px); margin: 24px 0; }

.wp-block-button__link { border-radius: 2px !important; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; padding: 16px 24px; background: var(--kr-red); color: #fff; border: 1px solid var(--kr-red); transition: all .2s ease; }
.wp-block-button__link:hover { background: #a71725; border-color: #a71725; transform: translateY(-1px); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--kr-ivory); border-color: var(--kr-silver); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--kr-red); color: #fff; }

.kr-site-header { background: rgba(11,11,12,.96); border-bottom: 1px solid rgba(255,255,255,.09); position: sticky; top: 0; z-index: 99; backdrop-filter: blur(10px); }
.kr-site-header .wp-block-site-title { font-family: Georgia, "Times New Roman", serif; letter-spacing: .08em; text-transform: uppercase; }
.kr-site-header a { text-decoration:none; }
.kr-site-footer { background: #070708; border-top: 1px solid rgba(255,255,255,.09); }
.kr-site-footer a { color: var(--kr-ivory); }

.kr-coming-card { min-height: 340px; display:flex; flex-direction:column; justify-content:flex-end; background: radial-gradient(circle at 80% 10%, rgba(206,34,50,.18), transparent 35%), #121214; border: 1px solid rgba(132,133,134,.23); padding: clamp(30px, 4vw, 54px); }
.kr-newsletter { background: radial-gradient(circle at 15% 20%, rgba(206,34,50,.15), transparent 28%), #101012; }
.kr-social-row a { text-decoration:none; font-weight:700; }

@media (max-width: 781px) {
  .kr-section { padding: 58px 22px; }
  .kr-section-tight { padding: 42px 22px; }
  .kr-hero h1 { font-size: clamp(3rem, 17vw, 5.2rem); }
  .kr-book-cover { text-align:center; }
  .kr-site-header { position: relative; }
}


/* v1.1 layout system */
.kr-grid { display:grid; gap:clamp(28px,4vw,64px); align-items:center; }
.kr-grid-2 { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.kr-grid-hero { grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); }
.kr-hero-cover { justify-self:end; }
.kr-book-grid { margin-top:clamp(36px,5vw,64px); align-items:start; }
.kr-book-grid .kr-card { height:100%; box-sizing:border-box; }
.kr-book-grid .kr-book-cover img { margin-inline:auto; }
.kr-coming-grid { align-items:stretch; margin-top:36px; }
.kr-feature-split, .kr-author-split, .kr-newsletter-split { margin-top:clamp(38px,6vw,76px); }
.kr-feature-image img, .kr-author-photo img, .kr-gaming-art img { width:100%; height:auto; display:block; }
.kr-feature-image img { max-height:620px; object-fit:cover; object-position:center; }
.kr-author-photo img { max-height:640px; object-fit:cover; object-position:center 28%; }
.kr-gaming-art { overflow:hidden; border:1px solid rgba(255,255,255,.10); background:#0b0b0c; }
.kr-gaming-art img { max-height:560px; object-fit:cover; object-position:center 38%; }
.kr-page-shell { max-width:1100px; }
.kr-page-copy { max-width:920px; }
.kr-book-detail, .kr-author-detail { display:grid; grid-template-columns:minmax(260px,.72fr) minmax(0,1.28fr); gap:clamp(30px,5vw,70px); align-items:start; }
.kr-link-cards { margin-top:34px; }
.kr-link-card { display:block; padding:28px; border:1px solid rgba(132,133,134,.3); background:#121214; text-decoration:none; }
.kr-link-card:hover { border-color:var(--kr-red); }
.kr-link-card strong { font-family:Georgia,"Times New Roman",serif; font-size:1.35rem; }
.kr-page-copy > .wp-block-buttons, .kr-page-copy .wp-block-buttons { margin-top:24px; }
.kr-section .wp-block-buttons { gap:12px; margin-top:26px; }

@media (max-width: 781px) {
  .kr-grid, .kr-grid-2, .kr-grid-hero, .kr-book-detail, .kr-author-detail { grid-template-columns:1fr; }
  .kr-grid { gap:30px; }
  .kr-hero-copy { order:1; }
  .kr-hero-cover { order:2; justify-self:stretch; }
  .kr-hero-cover img { width:min(100%,420px); margin-inline:auto; }
  .kr-book-cover img { width:min(100%,360px); }
  .kr-book-grid .kr-card { padding:24px 20px; }
  .kr-coming-card { min-height:0; padding:30px 24px; }
  .kr-feature-split, .kr-author-split, .kr-newsletter-split { margin-top:32px; }
  .kr-feature-image img { max-height:520px; }
  .kr-author-photo img { max-height:520px; object-position:center 22%; }
  .kr-gaming-art img { max-height:420px; object-position:center 32%; }
  .kr-quote { font-size:1.15rem; line-height:1.55; }
  .kr-section h2 { font-size:clamp(2.25rem,11vw,4rem); overflow-wrap:normal; word-break:normal; hyphens:none; }
  .kr-section h3 { font-size:clamp(1.65rem,8vw,2.4rem); }
  .kr-page-shell h1 { font-size:clamp(2.6rem,13vw,4.8rem); overflow-wrap:normal; word-break:normal; }
  .wp-block-button, .wp-block-button__link { width:100%; box-sizing:border-box; }
  .wp-block-button__link { text-align:center; }
}


/* v1.2 mobile-first refinements and correct book/character-art pairing */
.kr-book-media {
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:18px;
  align-items:stretch;
  margin-bottom:26px;
}
.kr-book-media .kr-book-cover img,
.kr-book-media .kr-character-art img {
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:none;
}
.kr-book-media .kr-book-cover,
.kr-book-media .kr-character-art {
  aspect-ratio:2/3;
  overflow:hidden;
  background:#0b0b0c;
}
.kr-book-media .kr-character-art img { object-position:center; }
.kr-book-grid h3 { margin-top:0; }
.kr-newsletter-compact { max-width:860px; }
.kr-newsletter-compact .wp-block-jetpack-subscriptions,
.kr-newsletter-compact form { max-width:620px; }

@media (max-width: 781px) {
  html, body { overflow-x:hidden; }
  body { font-size:16px; line-height:1.65; }
  .kr-shell { width:100%; max-width:100%; }
  .kr-section { padding:44px 18px; }
  .kr-section-tight { padding:34px 18px; }
  .kr-grid { gap:24px; }

  .kr-hero { min-height:auto; }
  .kr-hero h1 { font-size:clamp(3rem,15vw,4.6rem); line-height:.94; }
  .kr-hero .kr-subhead { font-size:1.2rem; line-height:1.45; }
  .kr-hero-cover img { width:min(82vw,340px); }

  .kr-section h2 { font-size:clamp(2rem,9.8vw,3.25rem); line-height:1.02; letter-spacing:0; }
  .kr-section h3 { font-size:clamp(1.55rem,7.4vw,2.15rem); line-height:1.1; }
  .kr-page-shell h1 { font-size:clamp(2.35rem,11vw,4rem); line-height:1; }

  .kr-book-grid { margin-top:28px; }
  .kr-book-grid .kr-card { padding:20px 16px 22px; }
  .kr-book-media { grid-template-columns:1fr 1fr; gap:10px; margin-bottom:20px; }
  .kr-book-media .kr-book-cover,
  .kr-book-media .kr-character-art { aspect-ratio:2/3; }
  .kr-book-media .kr-book-cover img,
  .kr-book-media .kr-character-art img { max-height:none; }
  .kr-quote { padding-left:16px; font-size:1.05rem; line-height:1.55; }

  .kr-coming-grid { margin-top:24px; }
  .kr-coming-card { padding:24px 18px; }

  .kr-author-split { gap:22px; }
  .kr-author-photo { max-width:300px; margin-inline:auto; }
  .kr-author-photo img { width:100%; aspect-ratio:4/5; max-height:none; object-fit:cover; object-position:center 20%; }

  .kr-newsletter { padding-bottom:52px; }
  .kr-newsletter h2 { max-width:12ch; }
  .kr-newsletter-compact { max-width:100%; }

  .wp-block-buttons { display:grid !important; grid-template-columns:1fr; width:100%; }
  .wp-block-button { width:100%; }
  .wp-block-button__link { width:100%; padding:14px 18px; font-size:.92rem; }

  .kr-kicker, .kr-eyebrow { font-size:.72rem; letter-spacing:.15em; }
  .kr-card, .kr-coming-card, .kr-link-card { border-radius:2px; }
}

@media (max-width: 430px) {
  .kr-section { padding-inline:16px; }
  .kr-book-media { gap:8px; }
  .kr-book-grid .kr-card { padding-inline:14px; }
  .kr-hero-cover img { width:min(88vw,320px); }
  .kr-section h2 { font-size:clamp(1.9rem,9.2vw,2.8rem); }
  .kr-author-photo { max-width:260px; }
}
