/* =========================================================
   KODE — Marketing component styles
   Requires tokens.css
   ========================================================= */

.kode-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--s-8) var(--margin-x) 0;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Chrome ---------- */

.kode-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s-12);
  gap: var(--s-4);
}
.kode-chrome__title-block {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kode-chrome__title-block > * + *::before {
  content: "/";
  margin-right: 10px;
  color: var(--ink-3);
}
.kode-chrome__nav {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.kode-chrome__nav a {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.kode-chrome__nav a:hover { border-bottom-color: var(--hi-vis); }
.kode-chrome__nav a[aria-current="page"] { color: var(--hi-vis); border-bottom-color: transparent; }

/* ---------- Section starter ---------- */

.kode-section {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--s-4);
  border-bottom: 4px solid var(--ink);
  margin-bottom: var(--s-8);
  gap: var(--s-4);
}
.kode-section__left {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.kode-section__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kode-section__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.kode-section__meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------- Product grid ---------- */

.kode-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.kode-product-card {
  position: relative;
  background: var(--paper);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.kode-product-card:hover { background: var(--paper-2); }
.kode-product-card:hover .kode-product-card__more { border-bottom-color: var(--hi-vis); }
.kode-product-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.kode-product-card__code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kode-product-card__name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}
.kode-product-card__blurb {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  flex: 1;
  text-wrap: pretty;
}
.kode-product-card__more {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  align-self: flex-start;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}

/* ---------- Footer ---------- */

.kode-footer { padding-top: var(--s-12); padding-bottom: var(--s-6); }
.kode-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr 1fr 2fr;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.kode-footer__cell {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  border-right: 1px solid var(--rule);
}
.kode-footer__cell:last-child { border-right: 0; }
.kode-footer__val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.kode-footer__base {
  display: flex;
  justify-content: space-between;
  padding-top: var(--s-4);
  gap: var(--s-4);
}
.kode-footer__cell a { color: var(--ink); border-bottom: 1px solid transparent; }
.kode-footer__cell a:hover { border-bottom-color: var(--hi-vis); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .kode-shell { padding: var(--s-5) var(--s-5) 0; }
  .kode-product-grid { grid-template-columns: 1fr; }
  .kode-footer__grid { grid-template-columns: 1fr 1fr; }
  .kode-footer__cell { border-bottom: 1px solid var(--rule); }
  .kode-section__title { font-size: 40px; }
}

@media (max-width: 640px) {
  .kode-chrome { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .kode-chrome__nav { gap: var(--s-4); }
  .kode-chrome { margin-bottom: var(--s-8); }
  .kode-footer__grid { grid-template-columns: 1fr; }
  .kode-footer__base { flex-direction: column; gap: var(--s-2); }
  .kode-section { flex-direction: column; align-items: flex-start; }
  .kode-section__title { font-size: 32px; }
}
