/* =========================================================
   Kainovis — home: hero, console, stats, capabilities
   ========================================================= */

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 66px) 0 88px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 10%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 10%, #000 10%, transparent 72%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.hero-glow--one {
  top: -240px;
  right: -80px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(92, 225, 194, 0.16), transparent 62%);
}

.hero-glow--two {
  bottom: -280px;
  left: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(141, 180, 255, 0.1), transparent 64%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 58px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 7px 13px 7px 9px;
  border: 1px solid rgba(92, 225, 194, 0.22);
  border-radius: 999px;
  background: rgba(92, 225, 194, 0.055);
  color: #b9f6e8;
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.hero-kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(92, 225, 194, 0.12);
  animation: pulse-dot 2.4s infinite;
}

.hero-title {
  font-size: clamp(44px, 5.4vw, 78px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-title .line {
  display: block;
}

.hero-title .grad {
  background: linear-gradient(92deg, #eafffa 4%, #5ce1c2 48%, #8db4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 540px;
  margin-top: 28px;
  color: #a6b3c2;
  font-size: 16.5px;
  line-height: 1.9;
}

.hero-sub strong {
  color: #e8eef6;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 24px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-note .tick {
  color: var(--accent);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -34px -26px;
  border-radius: 36px;
  background: radial-gradient(circle at 60% 30%, rgba(92, 225, 194, 0.1), transparent 65%);
  filter: blur(16px);
  pointer-events: none;
}

/* ---------- console mock ---------- */

.console {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(18, 29, 39, 0.98), rgba(8, 13, 19, 0.99));
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.console::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 260px at 82% -12%, rgba(92, 225, 194, 0.13), transparent 62%);
  pointer-events: none;
}

.console-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.console-dots {
  display: flex;
  gap: 5px;
}

.console-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.console-title {
  overflow: hidden;
  color: #c7d3df;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid rgba(92, 225, 194, 0.26);
  border-radius: 999px;
  background: rgba(92, 225, 194, 0.07);
  color: #8cebd6;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.console-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.console-body {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
}

.console-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 17px 0;
  border-right: 1px solid var(--line);
}

.console-side span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: #6f8295;
}

.console-side span.is-active {
  background: rgba(92, 225, 194, 0.1);
  color: var(--accent);
}

.console-side .icon {
  width: 14px;
  height: 14px;
}

.console-main {
  min-width: 0;
  padding: 16px;
}

.mail-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
}

.mail-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mail-avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(141, 180, 255, 0.25), rgba(92, 225, 194, 0.16));
  color: #cfe1ff;
  font-size: 10px;
  font-weight: 700;
  flex: none;
}

.mail-sub {
  overflow: hidden;
  flex: 1;
  color: #dbe5ef;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-time {
  color: #64758a;
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}

.mail-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 11px;
}

.kv {
  min-width: 0;
}

.kv label {
  display: block;
  color: #657789;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kv b {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #dce7f1;
  font-size: 9.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv b.is-accent {
  color: #8cebd6;
}

.draft-card {
  margin-top: 11px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 225, 194, 0.18);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(92, 225, 194, 0.065), rgba(255, 255, 255, 0.018));
}

.draft-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.draft-head h4 {
  color: #e6f2ef;
  font-size: 10.5px;
  font-weight: 600;
}

.draft-tag {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(92, 225, 194, 0.13);
  color: #8cebd6;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
}

.draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  color: #9babbc;
  font-size: 9px;
}

.draft-row span:last-child {
  color: #d7e3ee;
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}

.draft-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 8px;
}

.draft-total span {
  color: #8496a8;
  font-size: 8.5px;
}

.draft-total b {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

.confirm-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.avatars {
  display: flex;
}

.avatars span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-left: -5px;
  border: 2px solid #0b1219;
  border-radius: 50%;
  background: #1d2b38;
  color: #93a6b9;
  font-size: 7px;
  font-weight: 700;
}

.avatars span:first-child {
  margin-left: 0;
  background: #244a44;
  color: #9ff2df;
}

.confirm-text {
  flex: 1;
  color: #7d8fa2;
  font-size: 8.5px;
  line-height: 1.4;
}

.confirm-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--accent);
  color: #05130f;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.confirm-btn .icon {
  width: 10px;
  height: 10px;
}

.console-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 11px;
  color: #5d6f82;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

.console-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.console-foot i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4b5d6e;
}

.console-foot .ok {
  color: #78cbb9;
}

.console-foot .ok i {
  background: var(--accent);
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(10, 17, 24, 0.82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: float-soft 7s ease-in-out infinite;
}

.float-chip .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.float-chip div {
  line-height: 1.3;
}

.float-chip small {
  display: block;
  color: #64768a;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.float-chip b {
  display: block;
  color: #dbe6f0;
  font-size: 9.5px;
  font-weight: 600;
}

.float-chip--tl {
  top: -31px;
  left: -20px;
}

.float-chip--br {
  right: -22px;
  bottom: -20px;
  animation-delay: -3s;
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(92, 225, 194, 0.1);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(92, 225, 194, 0.02);
  }
}

/* ---------- stat band ---------- */

.stat-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.013);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 32px 30px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat b {
  display: block;
  color: #f1f7fb;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat b em {
  color: var(--accent);
  font-style: normal;
}

.stat > span {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat > small {
  display: block;
  margin-top: 4px;
  color: #77879a;
  font-size: 11.5px;
}

/* ---------- capability bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.cap-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014));
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}

.cap-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 225, 194, 0.28);
  background: linear-gradient(160deg, rgba(92, 225, 194, 0.055), rgba(255, 255, 255, 0.014));
}

.cap-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 52px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.65;
}

.cap-card--wide {
  grid-column: span 4;
  padding: 34px;
}

.cap-card--half {
  grid-column: span 2;
}

.cap-card--full {
  grid-column: span 6;
}

.cap-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border: 1px solid rgba(92, 225, 194, 0.2);
  border-radius: 11px;
  background: rgba(92, 225, 194, 0.07);
  color: var(--accent);
}

.cap-icon .icon {
  width: 19px;
  height: 19px;
}

.cap-card h3 {
  margin-bottom: 9px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cap-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.cap-list span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #8d9cad;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.boundary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 18px;
  border: 1px dashed rgba(92, 225, 194, 0.2);
  border-radius: 12px;
  background: rgba(92, 225, 194, 0.025);
}

.boundary-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.boundary-col span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: #9eafc0;
  font-size: 9.5px;
}

.boundary-col span .icon {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

.boundary-core {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(92, 225, 194, 0.4);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 225, 194, 0.17), rgba(92, 225, 194, 0.02));
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  box-shadow: 0 0 0 7px rgba(92, 225, 194, 0.04);
}

.cap-card--full {
  display: flex;
  align-items: center;
  gap: 36px;
}

.cap-card--full .cap-icon {
  margin-bottom: 0;
}

.cap-full-copy {
  flex: 1;
}

.cap-full-copy h3 {
  margin-bottom: 5px;
}

.cap-full-copy p {
  max-width: 560px;
}

.model-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 310px;
}

.model-chips span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #9aabbb;
  font-family: var(--font-mono);
  font-size: 9px;
}

.model-chips span.is-hot {
  border-color: rgba(92, 225, 194, 0.28);
  background: rgba(92, 225, 194, 0.06);
  color: #8cebd6;
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 58px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    max-width: 640px;
    margin-inline: auto;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cap-card--wide,
  .cap-card--half,
  .cap-card--full {
    grid-column: span 2;
  }

  .cap-card--full {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .model-chips {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--header-h) + 46px);
    padding-bottom: 64px;
  }

  .hero-title {
    font-size: clamp(38px, 11vw, 54px);
  }

  .hero-sub {
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .float-chip {
    display: none;
  }

  .console-main {
    padding: 12px;
  }

  .console-body {
    grid-template-columns: 1fr;
  }

  .console-side {
    display: none;
  }

  .mail-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 24px 18px;
  }

  .stat b {
    font-size: 27px;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .cap-card--wide,
  .cap-card--half,
  .cap-card--full {
    grid-column: span 1;
    padding: 24px;
  }

  .boundary {
    grid-template-columns: 1fr;
  }

  .boundary-core {
    justify-self: center;
    width: 54px;
    height: 54px;
  }
}
