/* K2W AI — публичный сайт. Дизайн-токены взяты из README.md прототипа. */

:root {
  --bg-base: #05100f;
  --bg-mid: #061716;
  --bg-end: #040b0b;
  --panel-grad-1: rgba(255,255,255,.05);
  --panel-grad-2: rgba(255,255,255,.02);
  --border: rgba(120,240,215,.14);
  --border-hover: rgba(85,245,211,.42);
  --text: #eafffb;
  --text-muted: rgba(234,255,251,.66);
  --text-weak: rgba(234,255,251,.5);
  --accent: #55f5d3;
  --accent-2: #9dfad8;
  --error: #ff958c;
  --dark-on-accent: #04201c;

  --radius-card: 22px;
  --radius-panel: 28px;
  --radius-input: 13px;
  --radius-pill: 999px;

  --shadow-panel: 0 30px 90px rgba(0,0,0,.4);
  --shadow-btn: 0 18px 46px rgba(85,245,211,.24);

  --font-sans: 'Golos Text', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(1100px 620px at 8% -6%, rgba(85,245,211,.16), transparent 60%),
    radial-gradient(900px 520px at 96% 4%, rgba(157,250,216,.08), transparent 58%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-mid) 52%, var(--bg-end) 100%);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 72%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 72%);
}

.content-layer { position: relative; z-index: 1; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(5,16,15,.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.site-nav__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}
.site-nav__logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(85,245,211,.28), rgba(255,255,255,.04));
  border: 1px solid rgba(120,240,215,.3);
  box-shadow: inset 0 0 26px rgba(85,245,211,.2);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}
.site-nav__title { font-weight: 700; font-size: 18px; line-height: 1.1; }
.site-nav__subtitle {
  font-family: var(--font-mono);
  color: var(--text-weak);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  line-height: 1.1;
}
.site-nav__links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav__link { text-decoration: none; font-size: 14px; font-weight: 400; color: rgba(234,255,251,.7); transition: color .2s; }
.site-nav__link:hover, .site-nav__link--active { color: var(--accent); }
.site-nav__link--active { font-weight: 600; }
.btn-burger {
  display: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  width: 42px; height: 42px;
  color: var(--text);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 16px 26px;
  transition: transform .2s, border-color .2s, background .2s;
}
.btn-primary {
  color: var(--dark-on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(120,240,215,.18);
}
.btn-ghost:hover { border-color: var(--border-hover); }
.btn-sm { padding: 11px 18px; font-size: 14px; }

/* ---------- Kicker / section header ---------- */
.kicker {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 500;
}
.section { padding: 80px 0; border-top: 1px solid rgba(255,255,255,.06); }
.section--tight { padding: 20px 0 60px; border-top: none; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 34px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.section-header h2, h2.section-title {
  font-size: clamp(30px,4vw,50px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 12px 0 0;
}
.link-more { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.link-more:hover { opacity: .8; }

h1 {
  font-size: clamp(36px,5vw,64px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.02;
  margin: 0 0 22px;
}
.page-header { padding: 74px 0 46px; max-width: 820px; }
.page-header p { font-size: clamp(17px,1.9vw,21px); color: var(--text-muted); margin: 0; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--panel-grad-1), var(--panel-grad-2));
  padding: 26px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border-hover); }
.card-lift:hover { transform: translateY(-3px); }
.card-num { font-family: var(--font-mono); color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .12em; }
.card h3 { font-size: 22px; line-height: 1.15; margin: 16px 0 10px; letter-spacing: -.02em; font-weight: 600; }
.card p { color: var(--text-muted); font-size: 15px; margin: 0; }

.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,300px), 1fr)); gap: 14px; }
.grid-auto--sm { grid-template-columns: repeat(auto-fit, minmax(min(100%,280px), 1fr)); }
.grid-auto--md { grid-template-columns: repeat(auto-fit, minmax(min(100%,340px), 1fr)); }
.grid-auto--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%,360px), 1fr)); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  border: 1px solid rgba(85,245,211,.28);
  background: rgba(85,245,211,.08);
  color: var(--accent-2);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-size: 12px;
  width: fit-content;
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ---------- Process band (bright) ---------- */
.band-bright {
  border-radius: var(--radius-panel);
  padding: clamp(28px,4vw,46px);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--dark-on-accent);
  box-shadow: 0 30px 90px rgba(85,245,211,.16);
}
.band-bright .kicker { color: inherit; opacity: .7; }
.band-bright h2 { color: inherit; }
.week-card {
  background: rgba(4,32,28,.06);
  border: 1px solid rgba(4,32,28,.14);
  border-radius: 18px;
  padding: 22px;
}
.week-card .label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; opacity: .65; }
.week-card .title { font-size: 19px; font-weight: 700; margin: 12px 0 8px; letter-spacing: -.02em; }
.week-card .text { font-size: 14px; opacity: .78; font-weight: 500; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid rgba(120,240,215,.18);
  border-radius: var(--radius-panel);
  padding: clamp(30px,4vw,52px);
  background: linear-gradient(135deg, rgba(85,245,211,.12), rgba(255,255,255,.03));
  box-shadow: var(--shadow-panel);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(26px,3.4vw,40px); line-height: 1.06; letter-spacing: -.035em; font-weight: 600; margin: 0 0 12px; }
.cta-band p { color: var(--text-muted); margin: 0; }
.cta-band .max { max-width: 560px; }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  padding: 18px 20px;
}
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { color: var(--text-muted); margin: 12px 0 0; font-size: 15px; }

/* ---------- Assistant mock ---------- */
.assistant-mock {
  border: 1px solid rgba(120,240,215,.18);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(18,58,57,.6), rgba(6,19,20,.86));
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.assistant-mock__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
}
.assistant-mock__dots { display: flex; align-items: center; gap: 9px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--red { background: var(--error); }
.dot--yellow { background: #f5d67a; }
.dot--green { background: var(--accent); }
.assistant-mock__label { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: rgba(234,255,251,.6); }
.badge-secure {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; color: var(--accent);
  border: 1px solid rgba(85,245,211,.3); border-radius: 999px; padding: 4px 9px;
}
.assistant-mock__body { padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.bubble-user {
  align-self: flex-end; max-width: 80%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px 16px 4px 16px; padding: 12px 15px; font-size: 14px;
}
.bubble-bot {
  align-self: flex-start; max-width: 88%;
  background: rgba(85,245,211,.1); border: 1px solid rgba(85,245,211,.24);
  border-radius: 16px 16px 16px 4px; padding: 14px 16px; font-size: 14px;
}
.bubble-source {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-2);
  background: rgba(5,16,15,.55); border: 1px solid rgba(85,245,211,.22);
  border-radius: 9px; padding: 6px 10px;
}
.typing-dots { display: flex; align-items: center; gap: 5px; padding: 4px 2px; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: k2wdot 1.1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .18s; }
.typing-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes k2wdot { 0%,80%,100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
.assistant-mock__bottom {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255,255,255,.02);
}
.assistant-mock__input {
  flex: 1; height: 40px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
  display: flex; align-items: center; padding: 0 13px; font-size: 13px; color: rgba(234,255,251,.4);
}
.assistant-mock__meta { font-family: var(--font-mono); font-size: 11px; color: rgba(234,255,251,.45); white-space: nowrap; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 52px; display: flex; gap: 48px; align-items: center; flex-wrap: wrap; }
.hero__text { flex: 1 1 440px; min-width: 300px; }
.hero__visual { flex: 1 1 400px; min-width: 300px; }
.hero__lead { font-size: clamp(17px,1.9vw,21px); color: var(--text-muted); max-width: 600px; margin: 0 0 30px; }
.hero__cta { display: flex; gap: 13px; flex-wrap: wrap; }
.hero__metrics { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 38px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.07); }
.metric-value { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.metric-label { font-family: var(--font-mono); color: var(--text-weak); font-size: 12px; margin-top: 6px; }

/* ---------- Forms ---------- */
.form-panel {
  border: 1px solid rgba(120,240,215,.16);
  border-radius: 24px;
  padding: clamp(22px,3vw,32px);
  background: linear-gradient(135deg, rgba(85,245,211,.1), rgba(255,255,255,.03));
  box-shadow: var(--shadow-panel);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,180px), 1fr)); gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-weak);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 500;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; background: rgba(6,19,20,.6); border: 1px solid rgba(120,240,215,.16);
  border-radius: var(--radius-input); color: var(--text); padding: 13px 14px;
  font: inherit; outline: none; transition: border-color .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); }
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field select option { background: #0b2322; color: var(--text); }

/* Honeypot: визуально похоже на обычное поле, но уведено за пределы экрана
   (не display:none — примитивные боты часто игнорируют такие поля, а видимость
   "как настоящее поле" в DOM-дереве повышает шанс, что бот его всё же заполнит). */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.captcha-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.captcha-box {
  display: flex; align-items: center; gap: 12px;
  background: rgba(6,19,20,.6); border: 1px solid rgba(120,240,215,.16);
  border-radius: var(--radius-input); padding: 11px 16px; min-width: 150px;
}
.captcha-question { font-family: var(--font-mono); font-size: 17px; letter-spacing: .06em; color: var(--accent-2); user-select: none; }
.captcha-refresh { border: 0; background: transparent; color: var(--text-weak); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px; }
.captcha-refresh:hover { color: var(--accent); }
.captcha-answer { flex: 1; min-width: 110px; font-family: var(--font-mono); }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; color: var(--text-muted); font-size: 13px; }
.checkbox-row input { width: auto; margin-top: 4px; }

.form-status { margin-top: 14px; font-size: 14px; }
.form-status--ok { color: var(--accent); }
.form-status--bad { color: var(--error); }
.form-status--pending { color: rgba(234,255,251,.7); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid rgba(255,255,255,.06); color: rgba(234,255,251,.6); }
.site-footer__grid {
  padding: 52px 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%,200px), 1fr));
  gap: 32px;
}
.site-footer__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.site-footer__logo {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(85,245,211,.28), rgba(255,255,255,.04));
  border: 1px solid rgba(120,240,215,.3); font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--text);
}
.site-footer__col-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(234,255,251,.42); margin-bottom: 14px;
}
.site-footer__links { display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__bottom {
  padding: 18px 0 40px; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: rgba(234,255,251,.45);
}

/* ---------- Architecture diagram (security page) ---------- */
.arch-panel {
  border: 1px solid rgba(120,240,215,.16);
  border-radius: var(--radius-panel);
  padding: clamp(24px,3.4vw,40px);
  background: linear-gradient(135deg, rgba(85,245,211,.07), rgba(255,255,255,.02));
}
.arch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,240px), 1fr)); gap: 16px; align-items: stretch; }
.arch-col {
  border: 1px solid rgba(120,240,215,.16); border-radius: 18px; padding: 22px; background: rgba(6,19,20,.5);
}
.arch-col--secure { border-color: rgba(85,245,211,.3); background: rgba(85,245,211,.06); }
.arch-col-title {
  font-family: var(--font-mono); color: rgba(234,255,251,.5); font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px;
}
.arch-col--secure .arch-col-title { color: var(--accent); }
.arch-item { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.arch-item:last-child { margin-bottom: 0; }
.arch-item b { font-size: 15px; }
.arch-item .desc { color: rgba(234,255,251,.6); font-size: 13px; margin-top: 3px; }
.arch-mid { display: grid; place-items: center; padding: 8px; }
.arch-perimeter {
  font-family: var(--font-mono); color: var(--accent); font-size: 11px; letter-spacing: .1em; text-align: center;
  border: 1px dashed rgba(85,245,211,.4); border-radius: 12px; padding: 14px 16px; background: rgba(85,245,211,.05);
}
.arch-secure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.arch-secure-grid .arch-item { border-color: rgba(85,245,211,.18); padding: 11px 13px; margin-bottom: 0; }
.arch-secure-grid .arch-item--wide { grid-column: span 2; }

/* ---------- Blog ---------- */
.blog-featured {
  text-decoration: none; color: inherit; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%,300px), 1fr));
  border: 1px solid var(--border); border-radius: 26px; overflow: hidden; transition: border-color .2s;
}
.blog-featured:hover { border-color: var(--border-hover); }
.blog-featured__cover {
  min-height: 260px;
  background: repeating-linear-gradient(135deg, rgba(85,245,211,.12) 0 12px, rgba(85,245,211,.05) 12px 24px);
  display: grid; place-items: center;
}
.blog-featured__body {
  padding: clamp(24px,3vw,40px); display: flex; flex-direction: column; justify-content: center; gap: 14px;
  background: linear-gradient(135deg, rgba(85,245,211,.08), rgba(255,255,255,.02));
}
.blog-card {
  text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: var(--radius-card);
  overflow: hidden; background: linear-gradient(180deg, var(--panel-grad-1), var(--panel-grad-2));
  display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.blog-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.blog-card__cover {
  height: 150px;
  background: repeating-linear-gradient(135deg, rgba(85,245,211,.1) 0 12px, rgba(85,245,211,.04) 12px 24px);
  display: grid; place-items: center;
}
.blog-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tag-mono { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

/* ---------- Cases / detail lists ---------- */
.case-card {
  border: 1px solid var(--border); border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--panel-grad-1), var(--panel-grad-2));
  padding: clamp(24px,3vw,36px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,240px), 1fr));
  gap: 24px; align-items: start; transition: border-color .2s;
}
.case-card:hover { border-color: var(--border-hover); }
.case-card__head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.case-col-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(234,255,251,.42); margin-bottom: 8px; }
.case-col-text { margin: 0; font-size: 15px; color: rgba(234,255,251,.78); }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.max-820 { max-width: 820px; }
.max-640 { max-width: 640px; }

/* ---------- Responsive nav ---------- */
@media (max-width: 860px) {
  .btn-burger { display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
  .site-nav__links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0 8px;
  }
  .site-nav__links.is-open { display: flex; }
}
