@import url("./base.css");

.architecture-section {
  position: relative;
  padding: 8rem 2rem;
  background:
    radial-gradient(circle at top center, rgba(77, 76, 248, 0.18), transparent 32%),
    var(--black);
  color: var(--white);
  overflow: hidden;
}

.architecture-section .section-intro {
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.architecture-section .section-title {
  color: var(--white);
}

.architecture-section .section-desc {
  color: rgba(255, 255, 255, 0.68);
  max-width: 760px;
}

.architecture-board {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(8, 10, 18, 0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.architecture-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 90px minmax(320px, 1.1fr) 90px minmax(220px, 1fr);
  grid-template-areas:
    ". . owner . ."
    ". . owner-arrow . ."
    "client client-arrow support tasks-arrow tasks"
    ". . notebook-arrow . ."
    ". . notebook . ."
    ". . metrics-arrow . ."
    ". . metrics . ."
    "security security security security security";
  gap: 1rem;
  align-items: stretch;
}

.flow-card {
  position: relative;
  padding: 1.4rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.flow-card h3 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.flow-card-owner {
  grid-area: owner;
  text-align: center;
  background: linear-gradient(135deg, rgba(77, 76, 248, 0.3), rgba(239, 172, 186, 0.12));
}

.flow-card-client {
  grid-area: client;
}

.flow-card-support {
  grid-area: support;
  background: linear-gradient(180deg, rgba(77, 76, 248, 0.16), rgba(77, 76, 248, 0.05));
  border-color: rgba(77, 76, 248, 0.35);
}

.flow-card-tasks {
  grid-area: tasks;
}

.flow-card-notebook {
  grid-area: notebook;
  justify-self: center;
  width: min(100%, 420px);
}

.flow-card-metrics {
  grid-area: metrics;
  justify-self: center;
  width: min(100%, 420px);
  background: linear-gradient(180deg, rgba(239, 172, 186, 0.1), rgba(255, 255, 255, 0.04));
}

.flow-card-security {
  grid-area: security;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.025);
}

.flow-eyebrow {
  display: inline-block;
  margin-bottom: 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.flow-copy {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
}

.flow-list {
  margin-top: 1rem;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.78);
}

.flow-list li + li {
  margin-top: 0.35rem;
}

.flow-tags,
.flow-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.flow-tag,
.tool-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.tool-pill {
  background: rgba(77, 76, 248, 0.18);
  border-color: rgba(77, 76, 248, 0.28);
}

.flow-arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.flow-arrow span {
  position: relative;
  z-index: 1;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(11, 13, 22, 0.95);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.flow-arrow::before,
.flow-arrow::after {
  content: "";
  position: absolute;
}

.arrow-right::before {
  left: 10px;
  right: 16px;
  top: 50%;
  height: 1px;
  background: linear-gradient(to right, rgba(77, 76, 248, 0.25), rgba(77, 76, 248, 0.95));
}

.arrow-right::after {
  right: 11px;
  top: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--blue);
  border-right: 1px solid var(--blue);
  transform: rotate(45deg);
}

.arrow-down::before {
  top: 8px;
  bottom: 16px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, rgba(77, 76, 248, 0.25), rgba(77, 76, 248, 0.95));
}

.arrow-down::after {
  left: calc(50% - 5px);
  bottom: 11px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  transform: rotate(45deg);
}

.owner-arrow {
  grid-area: owner-arrow;
}

.client-arrow {
  grid-area: client-arrow;
}

.tasks-arrow {
  grid-area: tasks-arrow;
}

.notebook-arrow {
  grid-area: notebook-arrow;
}

.metrics-arrow {
  grid-area: metrics-arrow;
}

@media (max-width: 980px) {
  .architecture-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "owner"
      "owner-arrow"
      "client"
      "client-arrow"
      "support"
      "tasks-arrow"
      "tasks"
      "notebook-arrow"
      "notebook"
      "metrics-arrow"
      "metrics"
      "security";
  }

  .flow-card-notebook,
  .flow-card-metrics {
    width: 100%;
  }

  .flow-card-security {
    display: block;
  }

  .client-arrow::before,
  .tasks-arrow::before {
    top: 8px;
    bottom: 16px;
    left: 50%;
    right: auto;
    width: 1px;
    height: auto;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(77, 76, 248, 0.25), rgba(77, 76, 248, 0.95));
  }

  .client-arrow::after,
  .tasks-arrow::after {
    left: calc(50% - 5px);
    right: auto;
    top: auto;
    bottom: 11px;
    border-top: 0;
    border-right: 1px solid var(--blue);
    border-bottom: 1px solid var(--blue);
    transform: rotate(45deg);
  }
}

@media (max-width: 600px) {
  .architecture-section {
    padding: 4rem 1rem;
  }

  .architecture-board {
    padding: 1rem;
    border-radius: 20px;
  }

  .flow-card {
    padding: 1.1rem;
    border-radius: 18px;
  }

  .flow-card h3 {
    font-size: 1.15rem;
  }

  .flow-copy,
  .flow-list {
    font-size: 0.9rem;
  }
}
