/* ==========================================================
   Kilion Tech — Reusable components (nav, buttons, forms, footer)
   ========================================================== */

/* ----- Navigation ----- */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklch, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-size: 19px; letter-spacing: -0.01em; font-weight: 500;
}
.brand-mark {
  width: 34px; height: 34px;
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><polygon points='100,15 170,55 170,145 100,185 30,145 30,55' fill='%232a1838' stroke='%23c8a8e9' stroke-width='3' stroke-linejoin='round'/><line x1='128' y1='62' x2='82' y2='100' stroke='%23f0e0ff' stroke-width='4' stroke-linecap='round'/><line x1='82' y1='100' x2='128' y2='138' stroke='%23f0e0ff' stroke-width='4' stroke-linecap='round'/><circle cx='128' cy='62' r='4' fill='%23f0e0ff'/><circle cx='82' cy='100' r='4' fill='%23f0e0ff'/><circle cx='128' cy='138' r='4' fill='%23f0e0ff'/></svg>");
  background-size: contain; background-position: center; background-repeat: no-repeat;
  filter: drop-shadow(0 0 10px color-mix(in oklch, var(--accent) 45%, transparent));
}
.foot-brand .brand-mark { width: 38px; height: 38px; border-radius: 9px; }
.nav-links { display: flex; gap: 34px; font-size: 14px; color: var(--fg-dim); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 13.5px;
  transition: all .2s;
}
.nav-cta:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  cursor: pointer;
  transition: all .25s ease;
  background: transparent;
  white-space: nowrap;
}
.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lang-toggle:hover svg {
  color: var(--accent);
}
.lang-toggle svg {
  transition: color .25s ease;
  flex-shrink: 0;
}

@media (max-width: 720px) { .nav-links { display: none; } }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  font-size: 14.5px; font-weight: 500;
  border-radius: 999px;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #0a0a0a; }
.btn-primary:hover { background: var(--fg); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-arrow { display: inline-block; transition: transform .2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Smaller email/cta link */
.wa-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px; transition: all .2s;
  margin-top: 18px;
}
.wa-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ----- Form fields ----- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-mute); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%; background: transparent; border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--fg); font: inherit; padding: 10px 0;
  outline: none; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 90px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23c8a8e9' stroke-width='1.3' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
}
.field select option { background: #1a1222; color: var(--fg); }

/* ----- Footer ----- */
footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 44px;
  margin-top: 40px;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 52px;
}
@media (max-width: 740px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-brand {
  font-family: var(--serif); font-size: 28px; letter-spacing: -0.02em;
  margin-bottom: 14px; display: flex; align-items: center; gap: 12px;
}
.foot-tag { color: var(--fg-dim); font-size: 14px; max-width: 36ch; line-height: 1.55; }
.foot-col h5 {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--fg-mute);
  margin: 0 0 16px; font-weight: 500;
}
.foot-col a, .foot-col p {
  display: block; color: var(--fg-dim); font-size: 14px;
  padding: 4px 0; margin: 0; transition: color .2s;
}
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  border-top: 1px solid var(--line); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-mute);
}
.foot-bottom a:hover { color: var(--fg); }

/* ----- Tweaks panel ----- */
#tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 100;
  width: 280px;
  background: oklch(0.12 0.01 300);
  border: 1px solid var(--line-strong);
  border-radius: 16px; padding: 18px;
  font-size: 13px; display: none;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6),
              0 0 0 1px color-mix(in oklch, var(--accent) 30%, transparent);
}
#tweaks.show { display: block; }
#tweaks h4 { margin: 0 0 14px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.tweak-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 8px 0; border-top: 1px solid var(--line);
}
.tweak-row:first-of-type { border-top: none; }
.tweak-row label { color: var(--fg-dim); font-size: 12.5px; }
.swatch-row { display: flex; gap: 6px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-strong); cursor: pointer;
  transition: transform .15s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg); }
