@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff; --bg2: #f4f4f5; --bg3: #f0f0f1;
  --border: #e0e0e2; --border2: #d0d0d3;
  --text: #0b0b0c; --text2: #3a3a3c; --text3: #6b6b6e;
  --accent: #2F626F;
  --accent-dark: #BAD2D7;
  --tint: #EAEFF1;
  --nav-h: 56px;
}
html { scroll-behavior: smooth; overflow-x: hidden; scroll-padding-top: var(--nav-h); }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-weight: 400; overflow-x: hidden; }
a { color: inherit; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 6px; font-size: 13px; text-decoration: none; }
.skip-link:focus { left: 8px; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
}
.nav-logo { display: inline-flex; align-items: center; line-height: 0; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 4px; }
.nav-link {
  font-size: 12px; font-weight: 500; color: var(--text3); text-decoration: none;
  padding: 6px 12px; border-radius: 6px; transition: background .15s, color .15s; white-space: nowrap;
}
.nav-link:hover { background: var(--bg2); color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 8px; }
.nav-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer;
}
.nav-menu-btn .icon-close { display: none; }
.nav-menu-btn[aria-expanded="true"] .icon-open { display: none; }
.nav-menu-btn[aria-expanded="true"] .icon-close { display: block; }

/* ── LANG SWITCH ── */
.lang-toggle {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 3px; flex-shrink: 0;
}
.lang-btn {
  font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text3); padding: 4px 10px; border-radius: 5px; text-decoration: none;
  transition: background .15s, color .15s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-current="page"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ── SECTIONS ── */
section { padding: 100px 80px; max-width: 1200px; margin: 0 auto; }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text3); margin-bottom: 16px;
}
.eyebrow.accent { color: var(--accent); }

.h1 { font-size: clamp(42px, 6vw, 72px); font-weight: 700; line-height: 1.08; letter-spacing: -2px; margin-bottom: 28px; }
.h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 700; line-height: 1.12; letter-spacing: -1.5px; }
.h3 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -.5px; }
.lead { font-size: clamp(15px, 1.6vw, 18px); color: var(--text3); line-height: 1.7; font-weight: 400; }

.section-head .h2 { margin-bottom: 16px; }
.section-head .lead { max-width: 600px; margin-bottom: 48px; }
.section-head.wide-gap .lead { margin-bottom: 80px; }

/* ── VIDEO FRAMES ── */
video { display: block; background: #1a1a1c; cursor: pointer; }
.screen-video {
  width: 100%; border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);
  max-height: 75vh; object-fit: contain; aspect-ratio: 16/10;
}
.screen-frame {
  background: #1a1a1c; border-radius: 12px; padding: 10px 10px 8px;
  box-shadow: 0 32px 100px rgba(0,0,0,0.2);
  contain: layout;
}
.screen-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 0 2px; }
.screen-dot { width: 10px; height: 10px; border-radius: 50%; }
.screen-dot.red { background: #ff5f57; }
.screen-dot.yellow { background: #febc2e; }
.screen-dot.green { background: #28c840; }

.phone-frame {
  display: block; position: relative;
  background: #1a1a1c; border-radius: 36px; padding: 8px 0;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.08);
  max-width: 280px; width: 100%; margin: 0 auto;
}
.phone-notch {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 26px; background: #1a1a1c;
  border-radius: 0 0 16px 16px; z-index: 2;
}
.phone-screen { overflow: hidden; border-radius: 34px; position: relative; }
.phone-screen video { width: 100%; }

/* ── HERO ── */
.hero {
  min-height: 100vh; padding: calc(var(--nav-h) + 80px) 40px 80px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
}
.hero-divider { width: 48px; height: 3px; background: var(--accent); border-radius: 2px; margin: 0 auto 28px; }
.hero-video-wrap { width: 100%; max-width: 900px; margin: 0 auto; }

/* ── LOGO + LOCKUP ── */
.kialy-mark { width: auto; aspect-ratio: 1379 / 557; display: block; }
.nav-logo .kialy-mark { height: 25px; color: var(--text); }
.hero-logo .kialy-mark { height: clamp(34px, 4.2vw, 48px); color: var(--text); margin: 0 auto 28px; }
.cta-logo .kialy-mark { height: clamp(56px, 9vw, 112px); color: #fff; margin: 0 auto; }
.lockup-descriptor { font-size: clamp(17px, 1.9vw, 21px); font-weight: 500; color: var(--text2); letter-spacing: -.3px; line-height: 1.4; margin-bottom: 8px; }
.lockup-support { font-size: clamp(14px, 1.4vw, 16px); font-weight: 400; color: var(--text3); line-height: 1.6; }
.hero .lockup-support { margin-bottom: 48px; }

/* ── PROBLEM ── */
.problem-section { background: var(--bg2); padding: 100px 0; }
.problem-inner { max-width: 1200px; margin: 0 auto; padding: 0 80px; text-align: center; }
.problem-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 48px; text-align: left; }
.prob-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 32px 28px; transition: box-shadow .2s, border-color .2s;
}
.prob-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); border-color: var(--border2); }
.prob-icon { margin-bottom: 20px; width: 40px; height: 40px; background: var(--bg2); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.prob-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; line-height: 1.3; }
.prob-body { font-size: 13px; color: var(--text3); line-height: 1.7; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 20px; }

/* ── FEATURE ROWS ── */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center; margin-bottom: 100px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse > .feature-text { order: 2; }
.feature-row.boxed { background: var(--bg2); border-radius: 16px; padding: 48px; margin-left: -48px; margin-right: -48px; }
.feature-text .h3 { margin-bottom: 14px; }
.feature-text .lead + .lead { margin-top: 20px; }
.feature-label {
  display: inline-block; margin-bottom: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); background: var(--tint);
  padding: 4px 10px; border-radius: 4px;
}

/* ── HARDWARE ── */
.hw-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 48px; }
.hw-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px 24px; transition: box-shadow .2s, border-color .2s;
}
.hw-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); border-color: var(--border2); }
.hw-icon { margin-bottom: 16px; width: 36px; height: 36px; background: var(--bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.hw-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.hw-body { font-size: 12.5px; color: var(--text3); line-height: 1.65; }
.hw-body em { font-style: normal; font-weight: 600; color: var(--text); }

/* ── CHAINS (DARK) ── */
.dark-section { background: var(--text); padding: 100px 0; }
.dark-inner { max-width: 1200px; margin: 0 auto; padding: 0 80px; }
.dark-section .eyebrow { color: rgba(255,255,255,0.4); }
.dark-section .h2 { color: #fff; }
.dark-section .lead { color: rgba(255,255,255,0.5); }
.dark-section .screen-frame { margin-bottom: 60px; }
.chain-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.chain-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 28px 24px; transition: background .2s, border-color .2s;
}
.chain-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.chain-icon { margin-bottom: 16px; opacity: .6; }
.chain-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.chain-body { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.65; }

/* ── PMS + WIDE CARDS ── */
.pms-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.pms-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 28px; display: flex; gap: 16px; align-items: flex-start;
  transition: box-shadow .2s, border-color .2s;
}
.pms-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.07); border-color: var(--border2); }
.pms-card.standalone { margin-top: 60px; }
.pms-icon { width: 36px; height: 36px; background: var(--bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); flex-shrink: 0; margin-top: 2px; }
.pms-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pms-body { font-size: 12.5px; color: var(--text3); line-height: 1.65; }
.pms-note {
  margin-top: 28px; padding: 16px 20px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; color: var(--text3); line-height: 1.6;
  display: flex; align-items: flex-start; gap: 10px;
}
.pms-note svg { flex-shrink: 0; margin-top: 1px; opacity: .5; }

.pms-diagram { margin-top: 56px; }
.pms-diagram svg { width: 100%; height: auto; display: block; margin: 0 auto; }
.pms-diagram-desktop svg { max-width: 780px; }
.pms-diagram-mobile { display: none; }
.pms-diagram-mobile svg { max-width: 360px; }

/* ── CTA ── */
.cta-section {
  background: var(--text); min-height: 60vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 100px 40px;
}
.cta-logo { margin-bottom: 24px; }
.cta-tagline { font-size: clamp(28px, 4.2vw, 48px); font-weight: 700; letter-spacing: -1.5px; line-height: 1.1; color: #fff; margin: 0 0 14px; }
.cta-section .lockup-descriptor { color: rgba(255,255,255,0.75); }
.cta-section .lockup-support { color: rgba(255,255,255,0.5); margin-bottom: 36px; }
.cta-divider { width: 40px; height: 2px; background: rgba(255,255,255,0.2); border-radius: 2px; margin: 0 auto 28px; }
.cta-h { font-size: clamp(24px, 3.5vw, 40px); font-weight: 600; color: #fff; letter-spacing: -.5px; margin-bottom: 14px; }
.cta-sub { font-size: 16px; color: rgba(255,255,255,0.45); margin-bottom: 40px; max-width: 480px; line-height: 1.6; }
.cta-btn {
  display: inline-block; background: var(--accent-dark); color: var(--text); font-weight: 600;
  font-size: 14px; padding: 14px 32px; border-radius: 8px; text-decoration: none;
  transition: opacity .2s; letter-spacing: -.2px;
}
.cta-btn:hover { opacity: .9; }
.cta-note { margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,0.45); }

/* ── FOOTER ── */
.site-footer {
  background: var(--text); border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); font-size: 12.5px; line-height: 1.6;
  padding: 28px 40px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
}
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; }

.section-divider { height: 1px; background: var(--border); max-width: 1200px; margin: 0 auto; }

/* ── SCROLL ANIMATIONS ── */
.js .fade-up { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.js .fade-up.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ── LEGAL PAGES ── */
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 64px) 40px 96px; color: var(--text2); font-size: 15px; line-height: 1.7; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 700; letter-spacing: -1px; line-height: 1.15; color: var(--text); margin-bottom: 8px; }
.legal .updated { font-size: 13px; color: var(--text3); margin-bottom: 40px; }
.legal h2 { font-size: 18px; font-weight: 600; letter-spacing: -.2px; color: var(--text); margin: 40px 0 12px; }
.legal p, .legal ul { margin-bottom: 14px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); }
.table-wrap { overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--border); border-radius: 10px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.55; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); min-width: 120px; }
.legal th { background: var(--bg2); color: var(--text); font-weight: 600; }
.legal tr:last-child td { border-bottom: 0; }

.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; gap: 16px; }
.not-found .kialy-mark { height: 40px; color: var(--text); margin-bottom: 12px; }
.not-found p { color: var(--text3); }
.not-found a { color: var(--accent); font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  section { padding: 80px 40px; }
  .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse > .feature-text { order: 0; }
  .feature-row.boxed { margin-left: 0; margin-right: 0; padding: 40px 32px; }
  .hw-grid { grid-template-columns: repeat(2,1fr); }
  .problem-grid, .chain-grid, .pms-grid, .card-grid-3 { grid-template-columns: 1fr; }
  .problem-inner, .dark-inner { padding: 0 40px; }
  .nav-menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 15px; padding: 12px; }
}
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .site-footer { padding: 24px 16px; }
}
@media (max-width: 640px) {
  section { padding: 64px 16px; }
  .hero { padding: calc(var(--nav-h) + 48px) 16px 56px; min-height: auto; }
  .problem-section, .dark-section { padding: 64px 0; }
  .problem-inner, .dark-inner { padding: 0 16px; }
  .hw-grid { grid-template-columns: 1fr; }
  .feature-row { margin-bottom: 64px; }
  .feature-row.boxed { padding: 28px 20px; }
  .section-head.wide-gap .lead { margin-bottom: 48px; }
  .cta-section { padding: 72px 16px; }
  .pms-diagram-desktop { display: none; }
  .pms-diagram-mobile { display: block; }
  .legal { padding: calc(var(--nav-h) + 40px) 16px 72px; }
}
