/* Katalia redesign 2026 — Katalia Elementor widgets (markup from katalia-core
   includes/widgets/render.php). Values from tokens.css; layout from the approved Home mockup. */

/* ── Marquee ────────────────────────────────────────────────────────── */
@keyframes k-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.k-marquee {
  overflow: hidden;
  padding: 36px 0;
}
.k-marquee--cream {
  background: var(--k-cream);
  color: var(--k-black);
  border-bottom: 1px solid var(--k-line-on-cream);
}
.k-marquee--dark {
  background: var(--k-black);
  color: var(--k-cream);
  border-bottom: 1px solid var(--k-line);
}
.k-marquee__track {
  display: flex;
  width: max-content;
  animation: k-marquee 38s linear infinite;
}
.k-marquee__group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 56px;
  padding-right: 56px;
}
.k-marquee__item {
  font: 400 clamp(3rem, 2.2rem + 3.4vw, 5.5rem) / 1 var(--k-font-display);
  letter-spacing: -0.035em;
  white-space: nowrap;
}
/* Muted phrases: grey kept at ≥ 3:1 (large text) on both backgrounds. */
.k-marquee--cream .k-marquee__item.is-muted { color: var(--k-grey); }
.k-marquee--dark .k-marquee__item.is-muted { color: var(--k-grey-light); }
.k-marquee__dot {
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--k-green);
}

/* ── Statement ──────────────────────────────────────────────────────── */
.k-statement {
  padding: 120px 0 110px;
}
.k-statement__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1280px;
}
.k-statement .k-eyebrow {
  color: var(--k-black);
}
.k-statement__title {
  margin: 0;
  line-height: 0.95;
}
.k-statement__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.k-statement__text {
  max-width: 560px;
  color: #1D2A24;
  font: 400 clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem) / 1.5 var(--k-font-text);
}
.k-statement__text p {
  margin: 0;
}

/* ── Comparison table ───────────────────────────────────────────────── */
.k-compare {
  background: #0B0D0E;
  border-top: 1px solid var(--k-surface-strong);
  color: var(--k-cream);
}
.k-compare__inner {
  max-width: 1120px;
}
.k-compare__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
  text-align: center;
}
.k-compare__head .k-h2 {
  color: var(--k-cream);
}
.k-compare__head .k-lead {
  max-width: 560px;
  font-size: 17px;
}
.k-table-wrap {
  overflow-x: auto;
}
.k-compare__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font: 400 16px / 1.4 var(--k-font-text);
}
.k-compare__table thead th {
  padding: 18px 20px;
  border: 0;
  background: none;
  color: var(--k-grey-light);
  font-weight: 400;
  text-align: center;
}
.k-compare__table thead th.k-compare__feature {
  position: relative;
  width: 46%;
  text-align: left;
}
.k-compare__table thead th.is-highlight {
  background: var(--k-green);
  color: var(--k-black);
  font-weight: 500;
}
.k-compare__table tbody tr {
  border-top: 1px solid var(--k-line);
}
.k-compare__table tbody th,
.k-compare__table tbody td {
  padding: 22px 20px;
  border: 0;
  background: none;
}
.k-compare__table tbody th {
  color: var(--k-cream);
  font-weight: 400;
  text-align: left;
}
.k-compare__sub {
  display: block;
  margin-top: 4px;
  color: var(--k-grey);
  font-size: 14px;
}
.k-compare__table tbody td {
  color: var(--k-grey-light);
  text-align: center;
}
.k-compare__table tbody td.is-highlight {
  background: rgba(106, 235, 171, 0.12);
  color: var(--k-green);
}
.k-compare__yes {
  display: inline-block;
  vertical-align: middle;
}

/* ── CTA band ───────────────────────────────────────────────────────── */
.k-cta-band {
  position: relative;
  overflow: hidden;
  padding: 140px 48px;
  background: var(--k-surface);
  border-top: 1px solid var(--k-surface-strong);
  color: var(--k-cream);
}
.k-cta-band__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}
/* The background image can be swapped later: keep the text side dark enough to read. */
.k-cta-band.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.82) 0%, rgba(5, 5, 5, 0.55) 55%, rgba(5, 5, 5, 0.1) 100%);
}
.k-cta-band__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.k-cta-band__eyebrow {
  color: var(--k-green);
}
.k-cta-band__title {
  max-width: 900px;
  color: var(--k-cream);
  font-size: clamp(2.5rem, 1.6rem + 3.8vw, 5.5rem);
}
.k-cta-band__text {
  max-width: 560px;
  color: #C9CDD1;
}
.k-cta-band__text p {
  margin: 0;
}
.k-cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 640px) {
  .k-marquee { padding: 24px 0; }
  .k-statement { padding: 80px 0 72px; }
  .k-cta-band { padding: 96px 20px; }
  /* Phones: narrow feature column that stays put while the table scrolls sideways. */
  .k-compare__table { min-width: 560px; font-size: 15px; }
  .k-compare__table thead th.k-compare__feature { width: 160px; }
  .k-compare__table thead th.k-compare__feature,
  .k-compare__table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #0B0D0E;
  }
  .k-compare__table thead th,
  .k-compare__table tbody th,
  .k-compare__table tbody td { padding-left: 12px; padding-right: 12px; }
}

/* ── Hero with background video ─────────────────────────────────────── */
.k-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(720px, calc(100vh - 116px));
  overflow: hidden;
  background: radial-gradient(120% 80% at 70% 30%, #1D2A24 0%, #0B0F0D 45%, var(--k-black) 100%);
  color: var(--k-cream);
}
.k-hero__media,
.k-hero__poster,
.k-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.k-hero__poster,
.k-hero__video {
  object-fit: cover;
}
.k-hero__poster {
  transition: opacity 600ms ease;
}
/* Beats Elementor/WooCommerce "img { height: auto }" rules, which made the poster a short band on phones. */
.k-hero .k-hero__media .k-hero__poster {
  height: 100%;
  max-width: none;
}
.k-hero.is-playing .k-hero__poster {
  opacity: 0;
}
/* No background video: the poster drifts very slowly instead, so the hero still feels alive. */
.k-hero:not(:has(.k-hero__video)) .k-hero__poster {
  transform-origin: 50% 40%;
  animation: k-hero-drift 32s ease-in-out infinite alternate;
}
@keyframes k-hero-drift {
  from { transform: scale(1); }
  to { transform: scale(1.07) translate3d(-1%, -0.5%, 0); }
}
/* Data map background (hero widget "Background: data map"): drawn by katalia-core hero-map.js,
   above the darkening layer so the dots and arcs keep their colour; fades out at the bottom. */
.k-hero__map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 90%, transparent 100%);
}
.k-hero--map:not(:has(.k-hero__poster)) {
  background: var(--k-black);
}
.k-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(5, 5, 5, var(--k-hero-overlay, 0.5)) 0%,
    rgba(5, 5, 5, calc(var(--k-hero-overlay, 0.5) + 0.25)) 70%,
    var(--k-black) 100%);
}
.k-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: var(--k-container);
  padding: 150px 0 64px;
  text-align: center;
}
.k-hero__eyebrow {
  color: var(--k-green);
}
.k-hero__title {
  max-width: 1080px;
  color: var(--k-cream);
}
.k-hero__text {
  max-width: 640px;
  color: #C9CDD1;
}
.k-hero__search {
  width: 100%;
  max-width: 720px;
  margin-top: 8px;
}
.k-hero .katalia-hero-search {
  display: flex;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.k-hero .katalia-hero-search__field {
  flex: 1;
  min-height: 60px;
  padding: 0 22px;
  border: 1px solid var(--k-line-strong);
  border-right: 0;
  border-radius: 0;
  background: rgba(17, 17, 17, 0.85);
  color: var(--k-cream);
  font: 400 17px / 1 var(--k-font-text);
}
.k-hero .katalia-hero-search__field::placeholder {
  color: var(--k-grey-light);
}
.k-hero .katalia-hero-search__field:focus-visible {
  outline: 2px solid var(--k-green);
  outline-offset: -2px;
}
.k-hero .katalia-hero-search__button {
  min-width: 0;
  min-height: 60px;
  padding: 0 30px;
  border: 0;
  border-radius: 0;
  background: var(--k-green);
  color: var(--k-black);
  font: 500 15px / 1 var(--k-font-text);
  white-space: nowrap;
  transition: background var(--k-transition);
}
.k-hero .katalia-hero-search__button:hover,
.k-hero .katalia-hero-search__button:focus-visible {
  background: var(--k-cream);
}

/* ── Live figures bar ───────────────────────────────────────────────── */
.k-figures {
  width: var(--k-container);
  margin: 0 auto;
  padding: 0 0 40px;
  color: var(--k-cream);
}
.k-figures__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--k-line);
}
.k-figures__item {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px 24px 0;
  border-left: 1px solid var(--k-line);
}
.k-figures__item:first-child {
  padding-left: 0;
  border-left: 0;
}
.k-figures__value {
  margin: 0;
  font: 400 clamp(2rem, 1.6rem + 1.4vw, 2.75rem) / 1 var(--k-font-display);
  letter-spacing: -0.035em;
}
.k-figures__label {
  color: var(--k-grey-light);
  font: 400 14px / 1.4 var(--k-font-text);
}
.k-figures__source {
  margin: 20px 0 0;
  color: var(--k-grey);
  font: 400 12px / 1.4 var(--k-font-text);
}

/* ── Market Data teaser ─────────────────────────────────────────────── */
.k-teaser__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 72px;
  max-width: 1280px;
}
.k-teaser__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}
.k-section--cream .k-teaser__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #3D444A;
}
.k-teaser__live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--k-red);
  animation: k-pulse 1.8s ease-in-out infinite;
}
@keyframes k-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.k-teaser__sentence {
  margin: 0;
  font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.75rem);
}
.k-highlight {
  padding: 0 0.12em;
  background: var(--k-green);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.k-teaser__chart-title {
  margin: 0 0 16px;
  font: 500 15px / 1.4 var(--k-font-text);
}
.k-teaser__bars {
  margin: 0;
  padding: 0;
  list-style: none;
}
.k-teaser__bar {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #CFCAC0;
}
.k-teaser__name {
  font: 400 16px / 1.2 var(--k-font-text);
}
.k-teaser__track {
  display: block;
  height: 14px;
  background: #E4E0D6;
}
.k-teaser__fill {
  display: block;
  height: 14px;
  background: var(--k-black);
}
.k-teaser__fill.is-first {
  background: var(--k-green-text-on-cream);
}
.k-teaser__value {
  font: 500 15px / 1 var(--k-font-text);
  text-align: right;
  white-space: nowrap;
}
.k-teaser__footnote {
  margin: 14px 0 0;
  color: var(--k-grey-on-cream);
  font: 400 12px / 1.4 var(--k-font-text);
}

@media (max-width: 1000px) {
  .k-figures__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .k-figures__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .k-teaser__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

@media (max-width: 640px) {
  .k-hero__inner { width: calc(100vw - 40px); padding: 96px 0 48px; gap: 24px; }
  .k-hero .katalia-hero-search { flex-direction: column; }
  .k-hero .katalia-hero-search__field { border-right: 1px solid var(--k-line-strong); }
  .k-figures { width: calc(100vw - 40px); }
  .k-figures__grid { grid-template-columns: minmax(0, 1fr); }
  .k-figures__item { padding: 20px 0 0; border-left: 0; }
  .k-figures__item + .k-figures__item { margin-top: 20px; border-top: 1px solid var(--k-line); }
  .k-teaser__bar { grid-template-columns: 92px minmax(0, 1fr) 76px; gap: 10px; }
  .k-hero .katalia-hero-search__field { font-size: 15px; padding: 0 16px; }
}

/* ── Feature list with changing image ───────────────────────────────── */
.k-feature-list__inner {
  max-width: 1280px;
}
.k-feature-list__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 72px;
  text-align: center;
}
.k-feature-list__head .k-h2 { max-width: 980px; }
.k-feature-list__head .k-lead { max-width: 620px; }
.k-feature-list__items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #CFCAC0;
}
.k-feature-list__item {
  padding: 22px 0;
  border-top: 1px solid #CFCAC0;
}
.k-feature-list__heading {
  margin: 0;
}
.k-feature-list__toggle {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.k-feature-list__toggle:focus-visible {
  outline: 2px solid var(--k-black);
  outline-offset: 4px;
}
.k-feature-list__dot {
  flex: none;
  width: 10px;
  height: 10px;
  background: #CFCAC0;
  transition: background var(--k-transition);
}
.k-feature-list__title {
  font: 400 clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem) / 1.1 var(--k-font-display);
  letter-spacing: -0.02em;
  color: var(--k-grey-on-cream);
  transition: color var(--k-transition);
}
.k-feature-list__item.is-active .k-feature-list__dot,
.k-feature-list:not(.is-enhanced) .k-feature-list__dot { background: var(--k-green-text-on-cream); }
.k-feature-list__item.is-active .k-feature-list__title,
.k-feature-list:not(.is-enhanced) .k-feature-list__title,
.k-feature-list__toggle:hover .k-feature-list__title { color: var(--k-black); }
.k-feature-list__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0 4px 26px;
}
.k-feature-list__text {
  margin: 0;
  color: #3D444A;
  font: 400 17px / 1.55 var(--k-font-text);
}
.k-feature-list__figure {
  width: 100%;
  margin: 4px 0 0;
}
.k-feature-list__stage { display: none; }

/* Enhanced: only the active panel is open */
.k-feature-list.is-enhanced .k-feature-list__item:not(.is-active) .k-feature-list__panel { display: none; }

@media (min-width: 1024px) {
  .k-feature-list.is-enhanced .k-feature-list__body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
  }
  .k-feature-list.is-enhanced .k-feature-list__stage {
    position: sticky;
    top: calc(var(--k-header-height) + 24px);
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--k-surface);
    background-image: linear-gradient(var(--k-surface-strong) 1px, transparent 1px), linear-gradient(90deg, var(--k-surface-strong) 1px, transparent 1px);
    background-size: 48px 48px;
  }
  .k-feature-list__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 400ms ease;
  }
  .k-feature-list__slide.is-active { opacity: 1; }
  .k-feature-list__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .k-feature-list.is-enhanced .k-feature-list__figure { display: none; }
}

/* ── Latest articles ────────────────────────────────────────────────── */
.k-latest .k-section__inner { max-width: 1280px; }
.k-latest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.k-latest__head .k-h2 { color: var(--k-cream); }
.k-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}
.k-post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 250ms ease;
}
.k-post-card:hover { transform: translateY(-4px); }
.k-post-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  margin-bottom: 4px;
}
.k-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.k-post-card__term {
  margin: 0;
  color: var(--k-green);
  font: 500 12px / 1 var(--k-font-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.k-post-card__title {
  margin: 0;
  font: 400 clamp(1.5rem, 1.35rem + 0.6vw, 1.75rem) / 1.1 var(--k-font-display);
  letter-spacing: -0.02em;
}
.k-post-card__title a {
  color: var(--k-cream);
  text-decoration: none;
}
/* Whole card clickable through the title link */
.k-post-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.k-post-card__title a:focus-visible {
  outline: none;
}
.k-post-card:focus-within {
  outline: 2px solid var(--k-green);
  outline-offset: 6px;
}
.k-post-card__meta {
  margin: 0;
  color: var(--k-grey);
  font: 400 14px / 1 var(--k-font-text);
}

@media (max-width: 1000px) {
  .k-latest__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .k-marquee__track,
  .k-teaser__live { animation: none; }
  .k-hero__poster,
  .k-feature-list__slide,
  .k-post-card { transition: none; }
  .k-hero__poster { animation: none !important; }
  .k-post-card:hover { transform: none; }
}
