:root {
  --bg: #f5f5f5;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #2a2321;
  --text-soft: #5a4e49;
  --primary-700: #88373c;
  --primary-800: #7b3338;
  --border: rgba(97, 80, 73, 0.2);
  --shadow-soft: 0 18px 45px rgba(93, 68, 60, 0.12);
  --title-weight: 700;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at top, #f7f4ef 0%, #f5f5f5 45%);
  color: var(--text);
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 0.65rem 1.25rem;
  background: var(--primary-700);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-wordmark {
  margin: 0;
  color: #fff;
  font-family: "Avenir Next", "Avenir", "Segoe UI", sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}


.header-note {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.unlock-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.unlock-form input {
  width: 105px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
}

.unlock-form input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.unlock-form button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.unlock-status {
  min-width: 56px;
  font-size: 0.7rem;
  color: rgba(255, 205, 205, 0.95);
}

.unlock-status.is-active {
  color: rgba(187, 255, 199, 0.95);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 1.2rem;
}

.hero {
  display: grid;
  gap: 1rem;
  align-content: center;
}

.hero-copy {
  text-align: center;
  margin: 1.2rem 0 1.4rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: -0.03em;
  color: var(--primary-700);
  font-family: Avenir, "Avenir Next", Inter, "Segoe UI", system-ui, sans-serif;
  font-weight: var(--title-weight);
}

.hero-slogan {
  font-weight: 400;
  color: var(--primary-700);
  opacity: 0.85;
}

.hero-canvas-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff; /*f5f5f5 */

  min-height: 60vh;
  padding: 2.5rem 1rem;
  perspective: 1800px;
}

.canvas-card {
  position: relative;
  width: 100%;
  min-height: 65vh;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.canvas-card.is-flipped {
  transform: rotateY(180deg);
}

.canvas-face {
  width: 100%;
  height: 100%;
  min-height: 65vh;
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.canvas-toggle {
  position: relative;
  cursor: pointer;
}

.canvas-toggle iframe {
  width: 100%;
  height: 100%;
  min-height: 65vh;
  border: 0;
  pointer-events: none;
}

.hero-logo-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1.15rem;
  pointer-events: none;
  padding: 2rem 2.2rem;
}

.hero-logo-overlay img {
  width: min(35vw, 380px);
  max-width: 75%;
}

.hero-quote {
  margin: 25 0 0 0;
  max-width: min(85ch, 94%);
  color: rgba(136, 55, 60, 0.95);
  font-size: clamp(0.85rem, 1.2vw, 1.02rem);
  line-height: 1.45;
  text-align: center;
  font-style: italic;
  font-weight: 600;
  text-shadow: 0 1px 5px rgba(255, 255, 255, 0.55);
}

.stack-canvas {
  transform: rotateY(180deg);
  width: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  cursor: pointer;
}

.stack-map-wrap {
  width: 100%;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.stack-map-stage {
  position: relative;
  width: min(90%, 1180px);
}

.stack-map {
  display: block;
  width: 100%;
  height: auto;
}

.hotspot {
  position: absolute;
  border: 0;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
}

.hotspot:focus-visible {
  outline: none;
}

.hs-overview,
.hs-workflow,
.hs-integration {
  top: 0.2%;
  height: 20.5%;
}

.hs-overview {
  left: 0.2%;
  width: 33.1%;
}

.hs-workflow {
  left: 34.2%;
  width: 31.6%;
}

.hs-integration {
  left: 66.5%;
  width: 33.2%;
}

.hs-ontology {
  left: 0.2%;
  top: 39.8%;
  width: 99.5%;
  height: 20.6%;
}

.hs-data {
  left: 0.2%;
  top: 79.4%;
  width: 49.8%;
  height: 20.4%;
}

.hs-models {
  left: 50.3%;
  top: 79.4%;
  width: 49.4%;
  height: 20.4%;
}

.canvas-signature {
  position: absolute;
  left: 1rem;
  bottom: 0.75rem;
  color: rgba(136, 55, 60, 0.55);
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  width: min(1100px, 92vw);
  max-height: 90vh;
  border-radius: 16px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
}

.modal-content img {
  display: block;
  width: 100%;
  height: auto;
}

.placeholder-main {
  max-width: 920px;
  margin: 6vh auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.placeholder-main h1 {
  margin: 0;
}

.placeholder-main p {
  color: var(--text-soft);
}


@media (max-width: 720px) {
  .page-header {
    flex-wrap: wrap;
    gap: 0.25rem 0.8rem;
  }

  .header-note {
    font-size: 0.74rem;
  }
}

.network-modal {
  padding: 1rem;
}

.network-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.network-modal-head h3 {
  margin: 0;
  color: #88373c;
  font-size: 1.1rem;
}

.network-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.network-filter-select {
  min-width: 220px;
  border: 1px solid #dbcfd0;
  border-radius: 9px;
  padding: 0.4rem 0.65rem;
  font-size: 0.88rem;
  color: #4f3f3c;
  background: #fff;
}

.network-filter-select:focus-visible {
  outline: 2px solid rgba(136, 55, 60, 0.35);
  outline-offset: 1px;
}

.network-modal-head p {
  margin: 0.3rem 0 0;
  color: #5d4a46;
  font-size: 0.92rem;
}

.modal-close-btn {
  border: 1px solid #d7c8ca;
  background: #fff;
  color: #5d4344;
  border-radius: 10px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}

.network-stats {
  margin-top: 0.75rem;
  font-size: 0.86rem;
  color: #6e5450;
}

.network-legend {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.82rem;
  color: #6b5550;
}

.legend-dot {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  vertical-align: middle;
  border: 1px solid transparent;
}

.legend-dot.triangulum {
  background: #88373c;
  border-color: #88373c;
}

.legend-dot.target {
  background: #cccccc;
  border-color: #cccccc;
}

.network-hint {
  margin-left: auto;
}

.network-loading,
.network-empty {
  margin: 0.6rem 0 0;
  color: #6e5450;
  font-size: 0.9rem;
}

.network-graph {
  margin-top: 0.6rem;
  border: 1px solid #e8dfe0;
  border-radius: 12px;
  overflow: hidden;
  min-height: 62vh;
  background: #fbfaf9;
  user-select: none;
  -webkit-user-select: none;
}

.network-svg {
  width: 100%;
  height: min(74vh, 820px);
  display: block;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.network-svg:active {
  cursor: grabbing;
}

.network-node {
  cursor: pointer;
}

.network-node text {
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.network-edge-label {
  font-size: 11px;
  font-weight: 500;
  fill: #5d4a46;
  stroke: #fbfaf9;
  stroke-width: 3px;
  paint-order: stroke;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 980px) {
  .network-hint {
    width: 100%;
    margin-left: 0;
  }
}
