:root {
  color-scheme: light;
  --ink: #111917;
  --muted: #586660;
  --line: #d7dfda;
  --panel: #ffffff;
  --soft: #edf5f1;
  --accent: #0f7b6c;
  --accent-dark: #09594e;
  --rose: #b3345a;
  --gold: #c89d2c;
  --night: #07110f;
  --shadow: 0 22px 60px rgba(17, 25, 23, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f8faf8;
}

a { color: inherit; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(18px, 5vw, 74px);
  color: white;
  background: rgba(7, 17, 15, .72);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--rose));
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

nav a { text-decoration: none; }
nav a:hover { color: white; }

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 120px clamp(18px, 5vw, 74px) 46px;
  overflow: hidden;
  color: white;
  background: var(--night);
}

.hero-image, .hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  opacity: .9;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7,17,15,.95), rgba(7,17,15,.72) 38%, rgba(7,17,15,.18) 76%),
    linear-gradient(0deg, rgba(7,17,15,.96), transparent 42%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #57d3be;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: 0; }
h1 {
  margin: 0;
  max-width: 1020px;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: .96;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 56px);
  line-height: 1.04;
}

h3 { margin: 0 0 10px; }

.lead {
  max-width: 800px;
  color: rgba(255,255,255,.78);
  font-size: clamp(18px, 2.15vw, 25px);
  line-height: 1.48;
}

.hero-actions, .preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button, .preset-row button, .chat-form button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 17px;
  color: var(--ink);
  background: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary, .chat-form button {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.button.glass {
  color: white;
  border-color: rgba(255,255,255,.36);
  background: rgba(255,255,255,.08);
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(760px, 100%);
  margin-top: 48px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.hero-stats div {
  padding: 18px;
  background: rgba(7,17,15,.38);
}

.hero-stats strong {
  display: block;
  font-size: 27px;
}

.hero-stats span {
  color: rgba(255,255,255,.7);
  font-size: 13px;
}

.section, .detail-section {
  padding: 78px clamp(18px, 5vw, 74px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 24px;
}

.section-head p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.6;
}

.section-head.narrow {
  display: block;
  max-width: 980px;
}

.platform { background: white; }

.flow-grid, .promise-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.flow-grid article, .promise-grid article, .product-card, .timeline div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(17,25,23,.05);
}

.flow-grid article, .promise-grid article {
  min-height: 220px;
  padding: 20px;
}

.flow-grid span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  font-weight: 900;
}

.flow-grid p, .promise-grid p, .product-card p, .timeline p {
  color: var(--muted);
  line-height: 1.5;
}

.sell-section {
  background:
    linear-gradient(135deg, rgba(15,123,108,.09), transparent 44%),
    #f8faf8;
}

.promise-grid article {
  min-height: 210px;
  background: white;
}

.promise-grid h3 {
  font-size: 22px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  font: inherit;
}

#productSearch { max-width: 430px; }

.products-section {
  background:
    linear-gradient(180deg, #f8faf8, #eef5f1);
}

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

.product-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 19px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card h3 { font-size: 20px; }

.product-card .path {
  margin-top: auto;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.tag {
  display: inline-block;
  width: fit-content;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.detail-section {
  position: relative;
  background: white;
  border-block: 1px solid var(--line);
}

.close-detail {
  position: absolute;
  top: 22px;
  right: clamp(18px, 5vw, 74px);
}

.detail-grid, .security-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  gap: 28px;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.meta-row {
  padding: 13px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
  overflow-wrap: anywhere;
}

.workflow {
  color: white;
  background: var(--night);
}

.workflow .section-head p, .workflow .timeline p { color: rgba(255,255,255,.7); }

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.timeline div {
  min-height: 170px;
  padding: 18px;
  color: white;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}

.security { background: white; }

.attack-console {
  display: grid;
  gap: 12px;
  align-content: start;
}

.result-box {
  min-height: 280px;
  overflow: auto;
  margin: 0;
  border: 1px solid #22332f;
  border-radius: 8px;
  padding: 16px;
  background: #08110f;
  color: #d8f7e6;
  white-space: pre-wrap;
}

.result-box.compact { max-height: 440px; }

.ai-guide { background: #f8faf8; }

.chat-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--accent));
  box-shadow: var(--shadow);
  font-weight: 900;
  cursor: pointer;
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 40;
  width: min(430px, calc(100vw - 28px));
  height: 560px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-panel[hidden] {
  display: none;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  color: white;
  background: var(--night);
}

.chat-head span {
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 20px;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.msg {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
  line-height: 1.45;
  white-space: pre-wrap;
}

.msg.user {
  align-self: flex-end;
  color: white;
  background: var(--accent);
}

.msg.system {
  max-width: 100%;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
  font-size: 13px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .flow-grid, .promise-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
  }
  .section-head, .detail-grid, .security-layout { grid-template-columns: 1fr; }
  .section-head { align-items: stretch; flex-direction: column; }
  #productSearch { max-width: none; }
}

@media (max-width: 640px) {
  .hero { min-height: 860px; }
  .hero-stats, .flow-grid, .promise-grid, .product-grid, .timeline { grid-template-columns: 1fr; }
  h1 { font-size: 43px; }
  .section, .detail-section { padding-block: 56px; }
}
