/* ==========================================================================
   kk-growth — styles for markup that has no equivalent in the Next source.
   Ported classes are styled by main.css; this file only adds WordPress-only parts,
   reusing the same tokens (--red, --ink, --line, --r-card, --shadow, fonts …).
   ========================================================================== */

/* ---------- Content flow: core blocks between KK sections + classic content ---------- */
.kk-flow { padding-block: clamp(40px, 6vw, 72px); }
.kk-flow + .kk-flow { padding-top: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content .alignwide { width: min(1280px - 2 * var(--gutter), 100vw - 2 * var(--gutter)); max-width: none; margin-inline: calc(50% - min(1280px - 2 * var(--gutter), 100vw - 2 * var(--gutter)) / 2); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); }
.entry-content .alignleft { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; text-align: center; }
.entry-content::after { content: ''; display: table; clear: both; }

/* Images, figures, captions */
.prose .wp-block-image, .prose .wp-caption { margin: 2em 0; }
.prose .wp-block-image img, .prose .wp-caption img, .prose > p img { border-radius: 20px; height: auto; }
.prose .wp-element-caption, .prose .wp-caption-text { font-size: .88rem; color: var(--ink-3); margin-top: 10px; text-align: center; }
.prose .wp-block-gallery { margin: 2em 0; gap: 12px; }
.prose .wp-block-gallery img { border-radius: 14px; }
.prose .wp-block-embed { margin: 2em 0; }
.prose .wp-block-embed iframe { border-radius: 16px; max-width: 100%; }

/* Quotes */
.prose .wp-block-quote { margin: 1.8em 0; padding-left: 20px; border-left: 3px solid var(--red); color: var(--ink); }
.prose .wp-block-quote cite, .prose blockquote cite { display: block; margin-top: 10px; font: 500 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--ink-3); }
.prose .wp-block-pullquote { margin: 2.2em 0; padding: 0; border: 0; text-align: left; }
.prose .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; font: 700 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.25 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.prose .wp-block-pullquote blockquote::before { content: ''; display: block; width: 48px; height: 4px; background: var(--red); border-radius: 4px; margin-bottom: 16px; }

/* Tables (core table block wraps the table in a figure) */
.prose .wp-block-table { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--line); border-radius: 16px; }
.prose .wp-block-table table { margin: 0; }
.prose .wp-block-table td, .prose .wp-block-table th { border: 0; border-bottom: 1px solid var(--line); }
.prose .wp-block-table tr:last-child td { border-bottom: 0; }
.prose .wp-block-table figcaption { padding: 10px 16px; }

/* Buttons, separators, code, details */
.prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }
.prose .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 999px; background: var(--red); color: #fff; font: 600 1rem/1 var(--body); text-decoration: none; transition: background .2s; }
.prose .wp-block-button__link:hover { background: var(--red-deep); color: #fff; }
.prose .is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.prose .wp-block-separator { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose .wp-block-code { background: var(--night); color: #f2eeee; padding: 20px; border-radius: 16px; overflow-x: auto; font: 400 .9rem/1.6 var(--mono); }
.prose .wp-block-details { margin: 1.2em 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.prose .wp-block-details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.prose .has-text-align-center { text-align: center; }
.prose .has-text-align-right { text-align: right; }

/* ---------- Header / footer variants ---------- */
.logo--image img { display: block; height: 40px; width: auto; max-width: 220px; }
.header--landing .header__cta { display: inline-flex; }
.footer--slim { padding-top: 0; }
.footer--slim .footer__bottom { margin-top: 0; }
.footer__consent { padding: 0; border: 0; background: none; font: inherit; color: var(--ink-3); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.footer__consent:hover { color: var(--ink); }

/* ---------- Media + text block ---------- */
.kk-media-text__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.kk-media-text--reverse .kk-media-text__media { order: -1; }
.kk-media-text__copy .btn-row { margin-top: 28px; }
.kk-media-text__media .media, .kk-media-text__media .placeholder { aspect-ratio: 4 / 3; min-height: 0; }
@media (max-width: 860px) {
  .kk-media-text__grid { grid-template-columns: 1fr; }
  .kk-media-text--reverse .kk-media-text__media { order: 0; }
}

/* ---------- Stats block ---------- */
.kk-stat .stat { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); margin-bottom: 14px; }
.kk-stat h3 { margin-bottom: 6px; }
.kk-stat .small { margin: 0; }

/* ---------- Project cards + single ---------- */
.project-card__result { position: absolute; left: 14px; bottom: 14px; z-index: 1; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgb(255 255 255 / .92); backdrop-filter: blur(8px); font-size: .82rem; color: var(--ink-2); box-shadow: var(--shadow); }
.project-card__result strong { font: 800 1.05rem/1 var(--display); color: var(--red); }
.kk-project__block + .kk-project__block { margin-top: 2.4em; }
.kk-project__block > h2:first-child { margin-top: 0; }
.kk-project .chips { margin: 0 0 1.3em; }
.kk-project .chips .chip svg { color: var(--red); }
.kk-gallery { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(12px, 2vw, 20px); }
.kk-gallery li { margin: 0; }
.kk-gallery__link { display: block; overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow); cursor: zoom-in; }
.kk-gallery__link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.kk-gallery__link:hover img { transform: scale(1.03); }
.kk-gallery__caption { margin: 10px 4px 0; font-size: .88rem; color: var(--ink-3); }
.kk-lightbox { padding: 0; border: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible; }
.kk-lightbox::backdrop { background: rgb(12 10 10 / .86); }
.kk-lightbox img { display: block; max-width: 100%; max-height: 88vh; width: auto; border-radius: 18px; }
.kk-lightbox__close { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.6rem; line-height: 1; box-shadow: var(--shadow-lg); }

/* ---------- Resources ---------- */
.resource-card__tag { position: absolute; left: 14px; top: 14px; z-index: 1; }
.kk-resource { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.kk-resource__aside { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 900px) {
  .kk-resource { grid-template-columns: 1fr; }
  .kk-resource__aside { position: static; order: -1; }
}
.kk-download { display: grid; gap: clamp(20px, 3vw, 36px); }
.section .container > .kk-download { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
.section .container > .kk-download:not(:has(.kk-download__cover)) { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
@media (max-width: 860px) { .section .container > .kk-download { grid-template-columns: 1fr; } }
.kk-download__cover { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--bg-2); }
.kk-download__cover img { width: 100%; height: auto; }
.kk-download__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); margin-bottom: 14px; }
.kk-download .tag { margin-bottom: 18px; }
.kk-download__label { font: 500 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.kk-download__list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.kk-download__list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; color: var(--ink); }
.kk-download__list svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--red-3); color: var(--red); }
.kk-download__form { margin-top: 8px; }
.kk-form-embed { min-height: 120px; }

/* ---------- Blog: newsletter box ---------- */
.kk-newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: clamp(24px, 4vw, 40px); background: var(--bg-2); border: 1px solid var(--line); }
.kk-newsletter h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); }
.kk-newsletter p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .kk-newsletter { grid-template-columns: 1fr; } }

/* ---------- Search form ---------- */
.kk-search { display: flex; gap: 10px; max-width: 520px; margin: 0 auto 24px; }
.kk-search input { flex: 1; min-width: 0; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); }
.kk-search input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- Comments ---------- */
.kk-comments { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.kk-comments__title { font-size: 1.4rem; }
.kk-comments__list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 18px; }
.kk-comments__list .children { list-style: none; padding-left: 24px; margin-top: 18px; display: grid; gap: 18px; }
.kk-comments .comment-body { padding: 20px 22px; border-radius: 18px; background: var(--bg-2); }
.kk-comments .comment-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-3); margin-bottom: 8px; }
.kk-comments .avatar { border-radius: 50%; }
.kk-comments .comment-respond { margin-top: 24px; }
.kk-comments .comment-form p { margin-bottom: 14px; }
.kk-comments .comment-form label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.kk-comments .comment-form :is(input[type="text"], input[type="email"], input[type="url"], textarea) { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: inherit; color: var(--ink); }

/* ---------- Classic WordPress classes ---------- */
.sticky, .bypostauthor { position: relative; }
.wp-caption { max-width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery img { border-radius: 12px; }
