/* ==========================================================================
   KahunaCart newsroom
   --------------------------------------------------------------------------
   Styles for /news, the single post page, and the homepage news-teaser
   module. Loaded by those templates only, at priority 89 so it lands right
   after kahuna.css and reads the same `--ks-*` tokens.

   Same house rules as kahuna.css: plain CSS on `kc-` classes, no Tailwind
   utilities, custom properties only ever `--ks-*` (the storefront's stylesheet
   owns the other prefix), light-only.

   Note `.kc-news` is already the newsletter band in kahuna.css. Nothing in
   here uses that name: the listing is `.kc-newsroom`, a listed post is
   `.kc-entry`, the post page is `.kc-article`, the homepage module is
   `.kc-teaser`.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared bits: date, version pill, kind label, "Read more"
   -------------------------------------------------------------------------- */

.kc-entry-date {
    font-family: var(--ks-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ks-koa-soft);
    white-space: nowrap;
}

.kc-ver,
.kc-kind {
    display: inline-flex;
    align-items: center;
    font-family: var(--ks-mono);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    padding: 5px 9px;
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: middle;
}
.kc-ver { background: var(--ks-lagoon-mist); color: var(--ks-lagoon-deep); }
.kc-kind { background: var(--ks-sand); color: var(--ks-koa-soft); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; }

.kc-entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.kc-entry-more {
    display: inline-block;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ks-lagoon);
    text-decoration: none;
}
.kc-entry-more:hover { color: var(--ks-lagoon-deep); text-decoration: underline; text-underline-offset: 3px; }
.kc-entry-more span { display: inline-block; transition: transform 140ms ease; }
.kc-entry-more:hover span { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Listing hero
   -------------------------------------------------------------------------- */

.kc-newsroom-hero { padding-bottom: 8px; }
.kc-newsroom-feed {
    margin: 22px 0 0;
    font-family: var(--ks-mono);
    font-size: 12.5px;
    letter-spacing: 0.04em;
}
.kc-newsroom-feed a { color: var(--ks-koa-soft); text-decoration: none; border-bottom: 1px solid var(--ks-line); padding-bottom: 1px; }
.kc-newsroom-feed a:hover { color: var(--ks-lagoon); border-color: var(--ks-lagoon); }

.kc-newsroom.kc-block.kc-tight { padding-top: 36px; }
.kc-newsroom .kc-wrap { max-width: 920px; }

.kc-newsroom-empty {
    text-align: center;
    color: var(--ks-koa-soft);
    padding: 48px 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Featured card: the newest post
   -------------------------------------------------------------------------- */

.kc-entry-featured {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
    background: var(--ks-card);
    border: 1px solid var(--ks-line);
    border-radius: 16px;
    padding: 40px 44px 40px 40px;
    margin-bottom: 8px;
}
.kc-entry-featured .kc-waves2 {
    position: absolute;
    right: -40px;
    bottom: -30px;
    width: 340px;
    pointer-events: none;
}
.kc-entry-featured .kc-entry-meta { flex-direction: column; align-items: flex-start; gap: 12px; position: relative; }
.kc-entry-featured .kc-entry-body { position: relative; }
.kc-entry-featured .kc-entry-title {
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 800;
    line-height: 1.06;
    margin: -4px 0 14px;
}
.kc-entry-featured .kc-entry-summary { font-size: 17px; color: var(--ks-koa-soft); max-width: 58ch; margin: 0 0 22px; }

.kc-entry-title a { color: var(--ks-koa); text-decoration: none; }
.kc-entry-title a:hover { color: var(--ks-lagoon); }

/* --------------------------------------------------------------------------
   The rest of the list: hairline rows
   -------------------------------------------------------------------------- */

.kc-entry-list { margin-top: 24px; }

.kc-entry-list .kc-entry {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
    padding: 30px 0;
    border-top: 1px solid var(--ks-line);
}
.kc-entry-list .kc-entry:last-child { border-bottom: 1px solid var(--ks-line); }
.kc-entry-list .kc-entry-meta { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.kc-entry-list .kc-entry-title {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
}
.kc-entry-list .kc-entry-summary { font-size: 15.5px; color: var(--ks-koa-soft); max-width: 62ch; margin: 0 0 12px; }

@media (max-width: 720px) {
    .kc-entry-featured { grid-template-columns: 1fr; gap: 18px; padding: 28px 24px; }
    .kc-entry-featured .kc-entry-meta,
    .kc-entry-list .kc-entry-meta { flex-direction: row; align-items: center; padding-top: 0; }
    .kc-entry-list .kc-entry { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
    .kc-entry-list .kc-entry-title { font-size: 20px; }
}

/* --------------------------------------------------------------------------
   Single post
   -------------------------------------------------------------------------- */

.kc-article .kc-wrap { max-width: 800px; }
.kc-article.kc-block { padding-top: 64px; padding-bottom: 72px; }

.kc-article-head { margin-bottom: 36px; padding-bottom: 30px; border-bottom: 1px solid var(--ks-line); }
.kc-article-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.kc-article-kicker a { color: var(--ks-koa-soft); text-decoration: none; }
.kc-article-kicker a:hover { color: var(--ks-lagoon); }
.kc-article-slash { color: var(--ks-line); font-weight: 400; }
.kc-article-kicker .kc-ver { letter-spacing: 0.04em; text-transform: none; }

.kc-article-head h1 {
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.04;
    margin: 0 0 16px;
}
.kc-article-lede { font-size: 19px; max-width: 60ch; margin: 0 0 22px; }

.kc-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    color: var(--ks-koa-soft);
}
.kc-article-meta .kc-entry-date { font-size: 13.5px; }
.kc-article-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ks-line); }
.kc-article-author { font-weight: 600; color: var(--ks-koa); }

/* "What changed in this release" */
.kc-article-aside {
    background: var(--ks-sand-soft);
    border: 1px solid var(--ks-line);
    border-radius: 16px;
    padding: 24px 28px;
    margin: 0 0 36px;
}
.kc-article-aside-title {
    font-family: var(--ks-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ks-lagoon);
    margin: 0 0 12px;
}
.kc-article-aside ul { margin: 0; padding-left: 20px; font-size: 15.5px; list-style: disc; }
.kc-article-aside li { margin-bottom: 6px; }
.kc-article-aside li::marker { color: var(--ks-lagoon); }
.kc-article-aside li:last-child { margin-bottom: 0; }
.kc-article-aside-links { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; font-weight: 600; }
.kc-article-aside-links a { text-decoration: none; }
.kc-article-aside-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.kc-article-body { font-size: 17px; line-height: 1.7; }
.kc-article-body > p:first-child { font-size: 18px; }
.kc-article-body h2 { margin-top: 44px; }
.kc-article-body hr { border: 0; border-top: 1px solid var(--ks-line); margin: 36px 0; }

/* Screenshots: wider than the text column where there is room, with a caption */
.kc-article-body figure { margin: 32px 0 36px; }
.kc-article-body figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
.kc-article-body figure a[data-lightbox] { display: block; cursor: zoom-in; }
.kc-article-body figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ks-koa-soft); text-align: center; }
@media (min-width: 1100px) {
    .kc-article-body figure { margin-left: -80px; margin-right: -80px; }
}

/* Older / newer */
.kc-article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--ks-line);
}
.kc-article-nav-card {
    display: block;
    background: var(--ks-card);
    border: 1px solid var(--ks-line);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    color: var(--ks-koa);
}
.kc-article-nav-card:hover { border-color: var(--ks-lagoon); }
.kc-article-nav-newer { text-align: right; }
.kc-article-nav-label {
    display: block;
    font-family: var(--ks-mono);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ks-lagoon);
    margin-bottom: 6px;
}
.kc-article-nav-card b { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.kc-article-nav-sub { display: block; margin-top: 4px; }
.kc-article-nav-blank { display: block; }

.kc-article-all { text-align: center; margin: 22px 0 0; font-size: 14.5px; font-weight: 600; }
.kc-article-all a { text-decoration: none; }
.kc-article-all a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 600px) {
    .kc-article-nav { grid-template-columns: 1fr; }
    .kc-article-nav-blank { display: none; }
    .kc-article-nav-newer { text-align: left; }
}

.kc-article-cta {
    border-top: 1px solid var(--ks-line);
    background: var(--ks-sand-soft);
}

/* --------------------------------------------------------------------------
   Homepage module: latest news cards
   -------------------------------------------------------------------------- */

.kc-teaser-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}
.kc-teaser-head .kc-h2 { margin-bottom: 0; }
.kc-teaser-head .kc-h2 + .kc-intro { margin-top: 14px; }
.kc-teaser-all {
    flex: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--ks-lagoon);
    text-decoration: none;
    padding-bottom: 6px;
    white-space: nowrap;
}
.kc-teaser-all:hover { color: var(--ks-lagoon-deep); text-decoration: underline; text-underline-offset: 3px; }

.kc-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kc-teaser-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.kc-teaser-grid[data-count="1"] { grid-template-columns: minmax(0, 560px); }

.kc-teaser-card {
    display: flex;
    flex-direction: column;
    background: var(--ks-card);
    border: 1px solid var(--ks-line);
    border-radius: 16px;
    padding: 24px 22px;
    color: var(--ks-koa);
    text-decoration: none;
    transition: transform 140ms ease, box-shadow 140ms ease;
}
.kc-teaser-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(43, 28, 12, 0.08); }
.kc-teaser-card .kc-entry-meta { margin-bottom: 14px; }
.kc-teaser-card h3 { font-size: 19px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
.kc-teaser-card:hover h3 { color: var(--ks-lagoon); }
.kc-teaser-card p { font-size: 14.5px; color: var(--ks-koa-soft); margin: 0 0 16px; flex: 1; }

@media (max-width: 880px) {
    .kc-teaser-grid { grid-template-columns: repeat(2, 1fr); }
    .kc-teaser-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 600px) {
    .kc-teaser-grid,
    .kc-teaser-grid[data-count="2"] { grid-template-columns: 1fr; }
}
