/* ============================================================
   Website UI kit — layout-only styles (prefix wk-).
   Component visuals come from the DS bundle + styles.css.
   ============================================================ */

.wk-app { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface-page); }
.wk-container { width: 100%; max-width: var(--container-xl); margin: 0 auto; padding: 0 var(--space-6); }
.wk-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.wk-ico svg { stroke-width: 2; }

/* ---- Header ---- */
.wk-header { position: sticky; top: 0; z-index: 30; background: rgba(245,242,234,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-default); }
.wk-header__row { display: flex; align-items: center; gap: var(--space-6); height: 72px; }
.wk-logo { display: flex; align-items: center; flex: none; background: none; border: 0; cursor: pointer; padding: 0; }
.wk-logo img { height: 42px; display: block; }
.wk-nav { display: flex; align-items: center; gap: var(--space-1); margin-left: var(--space-2); }
.wk-nav__link { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--ink-700); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-md); background: none; border: 0; cursor: pointer; transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard); }
.wk-nav__link:hover { background: var(--paper-200); color: var(--ink-900); }
.wk-nav__link--active { color: var(--green-800); background: var(--green-50); }
.wk-header__search { position: relative; margin-left: auto; display: flex; align-items: center; }
.wk-header__search .we-input { width: 210px; padding-left: 38px; height: 40px; background: var(--white); }
.wk-header__search .wk-ico { position: absolute; left: 12px; color: var(--ink-400); pointer-events: none; }
.wk-header__actions { display: flex; align-items: center; gap: var(--space-3); }

/* ---- Hero ---- */
.wk-hero { position: relative; overflow: hidden; background: var(--green-900); color: var(--paper-50); }
.wk-hero__bg { position: absolute; inset: 0; }
.wk-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.wk-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27,39,25,0.85) 0%, rgba(27,39,25,0.5) 50%, rgba(27,39,25,0.18) 100%), linear-gradient(180deg, rgba(27,39,25,0) 55%, rgba(27,39,25,0.88) 100%); }
.wk-hero__topo { position: absolute; inset: 0; background: url(assets/topo-pattern.svg); background-size: 700px; opacity: 0.12; mix-blend-mode: screen; }
.wk-hero__inner { position: relative; z-index: 2; padding: var(--space-24) 0 var(--space-20); max-width: 680px; }
.wk-hero h1 { color: #fff; font-size: clamp(2.75rem, 5.2vw, 4.25rem); line-height: 1.06; margin: var(--space-3) 0 var(--space-5); }
.wk-hero__sub { font-size: var(--text-xl); line-height: 1.5; color: var(--green-100); margin: 0 0 var(--space-8); max-width: 560px; }
.wk-hero__cta { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---- Sections ---- */
.wk-section { padding: var(--space-20) 0; }
.wk-section--sunken { background: var(--surface-sunken); }
.wk-section--brand { background: var(--green-800); color: var(--paper-50); }
.wk-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-8); flex-wrap: wrap; }
.wk-section__head h2 { margin: 6px 0 0; }
.wk-section__head p { margin: 0; color: var(--text-muted); max-width: 46ch; }

/* ---- Grids ---- */
.wk-grid { display: grid; gap: var(--space-6); }
.wk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.wk-grid--4 { grid-template-columns: repeat(4, 1fr); }
.wk-topics { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---- Guide card ---- */
.wk-guide { display: flex; flex-direction: column; height: 100%; }
.wk-guide__img { aspect-ratio: 16 / 10; background: var(--surface-sunken); position: relative; }
.wk-guide__img img { width: 100%; height: 100%; object-fit: cover; }
.wk-guide__body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.wk-guide__body h3 { margin: 0; font-size: var(--text-xl); line-height: 1.2; }
.wk-guide__meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }

/* ---- Article ---- */
.wk-article { max-width: var(--container-md); margin: 0 auto; padding: var(--space-12) var(--space-6) var(--space-20); }
.wk-breadcrumb { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-6); flex-wrap: wrap; }
.wk-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.wk-breadcrumb a:hover { color: var(--text-accent); }
.wk-article__title { font-size: var(--text-5xl); line-height: 1.04; margin: var(--space-3) 0 var(--space-5); }
.wk-byline { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-6); margin-bottom: var(--space-6); border-bottom: 1px solid var(--border-default); }
.wk-byline__meta { font-size: var(--text-sm); color: var(--text-muted); }
.wk-byline__meta strong { color: var(--text-heading); display: block; font-size: var(--text-md); }
.wk-article__hero { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-8); }
.wk-article__hero img { width: 100%; height: 100%; object-fit: cover; }
.wk-prose { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--text-body); }
.wk-prose > * + * { margin-top: var(--space-5); }
.wk-prose h2 { font-size: var(--text-2xl); margin-top: var(--space-10); }
.wk-prose ul { padding-left: var(--space-5); }
.wk-prose li { margin-bottom: var(--space-2); }

/* ---- Browse ---- */
.wk-browse { display: grid; grid-template-columns: 248px 1fr; gap: var(--space-10); align-items: start; padding: var(--space-10) 0 var(--space-20); }
.wk-filters { position: sticky; top: 96px; display: flex; flex-direction: column; gap: var(--space-6); }
.wk-filters__group h4 { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--text-muted); margin: 0 0 var(--space-3); }
.wk-filters__list { display: flex; flex-direction: column; gap: var(--space-3); }
.wk-browse__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-8); flex-wrap: wrap; }
.wk-browse__bar h1 { white-space: nowrap; line-height: 1.1; }
.wk-browse__count { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted); }

/* ---- Footer ---- */
.wk-footer { margin-top: auto; background: var(--green-900); color: var(--green-100); padding: var(--space-16) 0 var(--space-8); }
.wk-footer__row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); }
.wk-footer h5 { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--green-300); margin: 0 0 var(--space-4); }
.wk-footer a { display: block; color: var(--green-100); text-decoration: none; font-size: var(--text-sm); padding: 4px 0; }
.wk-footer a:hover { color: #fff; }
.wk-footer__brand img { height: 56px; margin-bottom: var(--space-4); }
.wk-footer__brand p { color: var(--green-300); font-size: var(--text-sm); max-width: 34ch; }
.wk-footer__legal { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--green-700); display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--green-300); flex-wrap: wrap; gap: var(--space-3); }

@media (max-width: 900px) {
  .wk-grid--3, .wk-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .wk-browse { grid-template-columns: 1fr; }
  .wk-filters { position: static; }
  .wk-footer__row { grid-template-columns: 1fr 1fr; }
  .wk-nav { display: none; }
  .wk-hero h1 { font-size: var(--text-4xl); }
}
