/*
Theme Name: Kinos X Rescue
Theme URI: /
Author: Lojer Oy / Rescue: KinosX
Description: Gutenberg-first Kinos X brand theme with Polylang-aware multilingual starter content.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: kinosx
*/

:root {
  --kx-carbon: #11171a;
  --kx-carbon-2: #182126;
  --kx-ink: #1f282d;
  --kx-muted: #667178;
  --kx-paper: #ffffff;
  --kx-fog: #f4f5f6;
  --kx-line: #dde2e5;
  --kx-yellow: #f8bd22;
  --kx-yellow-strong: #e7aa08;
  --kx-radius: 2px;
  --kx-content: 1320px;
  --kx-shadow: 0 18px 55px rgba(10, 17, 21, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--kx-ink);
  background: var(--kx-paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

/* Header */
.kx-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 18, 21, .96);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}
.kx-header-inner {
  width: min(calc(100% - 48px), var(--kx-content));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.kx-brand {
  display: inline-flex;
  flex-direction: column;
  line-height: .88;
  text-decoration: none;
  letter-spacing: -.035em;
}
.kx-brand-main { font-size: 25px; font-weight: 760; }
.kx-brand-main .kx-x { color: var(--kx-yellow); }
.kx-brand-by { margin-top: 7px; font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.kx-primary-nav { display: flex; justify-content: center; align-items: center; gap: 30px; }
.kx-primary-nav a { text-decoration: none; font-size: 13px; font-weight: 620; color: rgba(255,255,255,.78); transition: color .2s ease; }
.kx-primary-nav a:hover { color: #fff; }
.kx-header-actions { display: flex; align-items: center; gap: 16px; }
.kx-language-list { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kx-language-list a { text-decoration: none; font-size: 11px; text-transform: uppercase; color: rgba(255,255,255,.58); }
.kx-language-list .current-lang a { color: #fff; }
.kx-header-cta,
.kx-button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(248,189,34,.85);
  border-radius: var(--kx-radius);
  text-decoration: none;
  color: var(--kx-yellow);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.kx-menu-toggle { display: none; appearance: none; background: none; color: #fff; border: 0; font-size: 23px; padding: 8px; cursor: pointer; }

/* WordPress content frame */
.kx-main { overflow: hidden; }
.kx-main > .wp-block-group.alignfull,
.kx-main > .wp-block-cover.alignfull { margin-left: 0; margin-right: 0; }
.kx-main .wp-block-group__inner-container { box-sizing: border-box; }
.kx-shell,
.kx-main .kx-shell { width: min(calc(100% - 64px), var(--kx-content)); margin-inline: auto; }
.kx-section { padding: 84px 0; }
.kx-section-tight { padding: 56px 0; }
.kx-section-soft { background: var(--kx-fog); }
.kx-section-white { background: #fff; }
.kx-eyebrow {
  margin: 0 0 11px;
  color: var(--kx-yellow-strong);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}
.kx-section-title { margin: 0; font-size: clamp(31px, 3.2vw, 46px); line-height: 1.04; letter-spacing: -.035em; font-weight: 560; }
.kx-section-lead { max-width: 650px; color: var(--kx-muted); font-size: 17px; line-height: 1.65; }

/* Hero */
.kx-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 74% 40%, rgba(76, 92, 101, .25), transparent 34%),
    linear-gradient(115deg, #0b1114 0%, #111a1f 54%, #0c1215 100%);
}
.kx-hero:after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
}
.kx-hero .wp-block-columns {
  width: min(calc(100% - 64px), var(--kx-content));
  min-height: 570px;
  margin: 0 auto;
  padding: 58px 0 42px;
  align-items: center !important;
  gap: 42px;
}
.kx-hero-copy { position: relative; z-index: 3; flex-basis: 42% !important; }
.kx-hero-media { position: relative; z-index: 2; flex-basis: 58% !important; }
.kx-hero h1 {
  margin: 0 0 21px;
  max-width: 570px;
  color: #fff;
  font-size: clamp(51px, 6vw, 82px);
  line-height: .99;
  letter-spacing: -.045em;
  font-weight: 420;
}
.kx-hero-copy > p:not(.kx-eyebrow) { max-width: 530px; margin: 0 0 28px; color: rgba(255,255,255,.74); font-size: 18px; line-height: 1.55; }
.kx-hero .wp-block-buttons { gap: 12px; }
.kx-hero .wp-block-button__link,
.kx-cta .wp-block-button__link {
  border-radius: var(--kx-radius) !important;
  padding: 14px 24px !important;
  font-size: 12px !important;
  font-weight: 760 !important;
  letter-spacing: .025em;
  text-transform: uppercase;
  transition: transform .18s ease, background .18s ease;
}
.kx-hero .is-style-fill .wp-block-button__link,
.kx-cta .is-style-fill .wp-block-button__link { background: var(--kx-yellow) !important; color: #11171a !important; }
.kx-hero .is-style-outline .wp-block-button__link,
.kx-cta .is-style-outline .wp-block-button__link { border-color: rgba(255,255,255,.42) !important; color: #fff !important; background: transparent !important; }
.kx-hero .wp-block-button__link:hover,
.kx-cta .wp-block-button__link:hover { transform: translateY(-2px); }
.kx-hero-figure { margin: 0 !important; }
.kx-hero-figure img { width: 100%; min-height: 390px; object-fit: cover; object-position: center; filter: drop-shadow(0 30px 30px rgba(0,0,0,.24)); }
.kx-hero-trust { margin-top: 28px !important; display: flex; gap: 24px; flex-wrap: wrap; }
.kx-hero-trust p { margin: 0 !important; color: rgba(255,255,255,.62) !important; font-size: 12px !important; }
.kx-hero-trust strong { color: #fff; font-weight: 650; }

/* Models */
.kx-models-heading { text-align: center; margin-bottom: 38px; }
.kx-models-heading .kx-section-lead { margin-inline: auto; }
.kx-model-grid { gap: 20px !important; }
.kx-model-card {
  position: relative;
  min-height: 320px;
  padding: 34px 34px 24px;
  background: #fff;
  border: 1px solid var(--kx-line);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.kx-model-card h3 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.025em; font-weight: 620; }
.kx-model-card p { max-width: 360px; margin: 0 0 18px; color: var(--kx-muted); line-height: 1.55; }
.kx-model-card .wp-block-image { margin: 0; }
.kx-model-card .kx-model-image img { width: 100%; height: 175px; object-fit: contain; }
.kx-model-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px !important; }
.kx-model-meta span { display: inline-flex; padding: 6px 9px; background: var(--kx-fog); border: 1px solid var(--kx-line); font-size: 11px; font-weight: 650; color: #49535a; }
.kx-text-link { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; }
.kx-text-link:after { content: " →"; }

/* Feature cards */
.kx-feature-grid { gap: 16px !important; margin-top: 36px !important; }
.kx-feature-card { height: 100%; background: #fff; border: 1px solid var(--kx-line); }
.kx-feature-card .wp-block-image { margin: 0; overflow: hidden; }
.kx-feature-card .wp-block-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.kx-feature-card:hover .wp-block-image img { transform: scale(1.025); }
.kx-feature-body { padding: 22px 22px 25px; }
.kx-feature-body h3 { margin: 0 0 8px; font-size: 17px; font-weight: 690; }
.kx-feature-body p { margin: 0; color: var(--kx-muted); font-size: 14px; line-height: 1.55; }
.kx-icon-line { margin: 0 0 13px; color: var(--kx-yellow-strong); font-size: 19px; font-weight: 800; }

/* Comparison */
.kx-compare-wrap { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.7fr); gap: 54px; align-items: start; }
.kx-compare-copy { padding-top: 18px; }
.kx-compare-copy .wp-block-buttons { margin-top: 24px; }
.kx-compare-table table { width: 100%; border-collapse: collapse; background: #fff; }
.kx-compare-table th,
.kx-compare-table td { padding: 14px 17px; border-bottom: 1px solid var(--kx-line); font-size: 13px; text-align: left; }
.kx-compare-table th { color: var(--kx-ink); font-weight: 730; background: #fafbfb; }
.kx-compare-table td:first-child { width: 42%; color: var(--kx-muted); }
.kx-compare-table tr:last-child td { border-bottom: 0; }

/* Video + quality */
.kx-split-panels { gap: 0 !important; box-shadow: var(--kx-shadow); }
.kx-video-panel,
.kx-quality-panel { min-height: 390px; padding: 46px; }
.kx-video-panel { position: relative; overflow: hidden; color: #fff; background: #0e1519; }
.kx-video-panel:before { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(9,14,17,.94) 0%, rgba(9,14,17,.68) 45%, rgba(9,14,17,.18) 100%); z-index:1; }
.kx-video-panel > * { position: relative; z-index: 2; }
.kx-video-panel h2 { max-width: 430px; margin: 4px 0 12px; color: #fff; font-size: 38px; line-height: 1.05; letter-spacing: -.035em; font-weight: 500; }
.kx-video-panel p { max-width: 420px; color: rgba(255,255,255,.70); }
.kx-video-panel .kx-video-bg { position: absolute; inset: 0; z-index: 0; margin: 0; }
.kx-video-panel .kx-video-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.kx-play { width: 62px; height: 62px; margin-top: 25px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.62); color: #fff; font-size: 22px; text-decoration: none; }
.kx-quality-panel { background: #fff; }
.kx-quality-panel h2 { margin: 4px 0 14px; font-size: 38px; line-height: 1.05; letter-spacing: -.035em; font-weight: 500; }
.kx-quality-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; margin-top: 30px; }
.kx-quality-item { padding-top: 14px; border-top: 1px solid var(--kx-line); }
.kx-quality-item strong { display: block; margin-bottom: 5px; font-size: 14px; }
.kx-quality-item span { display: block; color: var(--kx-muted); font-size: 12px; line-height: 1.4; }

/* Resources */
.kx-resources-grid { gap: 16px !important; margin-top: 32px !important; }
.kx-resource-card { padding: 24px; background: #fff; border: 1px solid var(--kx-line); }
.kx-resource-card .kx-resource-type { margin: 0 0 18px; color: var(--kx-yellow-strong); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kx-resource-card h3 { margin: 0 0 8px; font-size: 18px; }
.kx-resource-card p { color: var(--kx-muted); font-size: 13px; line-height: 1.5; }

/* CTA */
.kx-cta { color: #fff; background: linear-gradient(100deg, #10171b 0%, #1b252b 100%); }
.kx-cta .wp-block-columns { width: min(calc(100% - 64px), var(--kx-content)); margin: 0 auto; padding: 38px 0; align-items: center !important; }
.kx-cta h2 { margin: 0 0 4px; color: #fff; font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.kx-cta p { margin: 0; color: rgba(255,255,255,.65); }
.kx-cta .wp-block-buttons { justify-content: flex-end; }

/* Footer */
.kx-site-footer { color: rgba(255,255,255,.66); background: #0c1114; }
.kx-footer-inner { width: min(calc(100% - 64px), var(--kx-content)); margin: 0 auto; padding: 56px 0 38px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.kx-site-footer h3 { margin: 0 0 16px; color: #fff; font-size: 14px; font-weight: 700; }
.kx-site-footer p, .kx-site-footer a { font-size: 12px; line-height: 1.7; }
.kx-site-footer a { text-decoration: none; color: rgba(255,255,255,.66); }
.kx-site-footer a:hover { color: #fff; }
.kx-footer-links { display: grid; gap: 6px; }
.kx-footer-bottom { width: min(calc(100% - 64px), var(--kx-content)); margin: 0 auto; padding: 18px 0 28px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; }

/* Generic pages */
.kx-default-page { width: min(calc(100% - 48px), 900px); margin: 0 auto; padding: 72px 0; }
.kx-default-page h1 { font-size: clamp(38px, 6vw, 62px); }
.kx-admin-note { font-size: 13px; color: var(--kx-muted); }

/* Gutenberg editor parity */
.editor-styles-wrapper .kx-hero { padding-inline: 20px; }
.editor-styles-wrapper .kx-shell { width: 100%; }

@media (max-width: 1020px) {
  .kx-primary-nav { display: none; }
  .kx-menu-toggle { display: inline-flex; }
  .kx-site-header.is-open .kx-primary-nav { display: flex; position: absolute; top: 76px; left: 0; right: 0; padding: 24px; flex-direction: column; align-items: flex-start; background: #0d1215; border-top: 1px solid rgba(255,255,255,.08); }
  .kx-header-inner { grid-template-columns: auto 1fr auto; }
  .kx-header-actions .kx-header-cta { display: none; }
  .kx-hero .wp-block-columns { min-height: auto; padding: 58px 0; flex-direction: column; }
  .kx-hero-copy, .kx-hero-media { flex-basis: 100% !important; width: 100%; }
  .kx-hero-figure img { min-height: 0; }
  .kx-feature-grid { flex-wrap: wrap !important; }
  .kx-feature-grid > .wp-block-column { flex-basis: calc(50% - 8px) !important; }
  .kx-compare-wrap { grid-template-columns: 1fr; gap: 26px; }
  .kx-split-panels { flex-direction: column; }
  .kx-footer-inner { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 720px) {
  .kx-header-inner { width: min(calc(100% - 30px), var(--kx-content)); min-height: 68px; gap: 14px; }
  .kx-site-header.is-open .kx-primary-nav { top: 68px; }
  .kx-language-list li:not(.current-lang) { display: none; }
  .kx-shell, .kx-main .kx-shell, .kx-hero .wp-block-columns, .kx-cta .wp-block-columns, .kx-footer-inner, .kx-footer-bottom { width: min(calc(100% - 34px), var(--kx-content)); }
  .kx-section { padding: 58px 0; }
  .kx-hero .wp-block-columns { padding: 44px 0 34px; }
  .kx-hero h1 { font-size: 49px; }
  .kx-hero-copy > p:not(.kx-eyebrow) { font-size: 16px; }
  .kx-model-grid, .kx-feature-grid, .kx-resources-grid { flex-direction: column; }
  .kx-feature-grid > .wp-block-column { flex-basis: 100% !important; }
  .kx-model-card { padding: 26px 22px 18px; }
  .kx-compare-table { overflow-x: auto; }
  .kx-compare-table table { min-width: 650px; }
  .kx-video-panel, .kx-quality-panel { min-height: 340px; padding: 32px 25px; }
  .kx-quality-list { grid-template-columns: 1fr; }
  .kx-cta .wp-block-columns { padding: 32px 0; flex-direction: column; align-items: flex-start !important; gap: 22px; }
  .kx-cta .wp-block-buttons { justify-content: flex-start; }
  .kx-footer-inner { grid-template-columns: 1fr 1fr; padding-top: 42px; }
  .kx-footer-inner > div:first-child { grid-column: 1 / -1; }
}

/* Keep Gutenberg's constrained-layout defaults from narrowing the wide brand sections. */
.kx-shell > * { max-width: none !important; }
.kx-hero .wp-block-columns,
.kx-cta .wp-block-columns { max-width: var(--kx-content) !important; }
.kx-compare-wrap > * { max-width: none !important; width: 100%; }
